资源简介

本系统采用SpringMVC+Hibernate+Spring框架整合开发,数据库使用MySQL,构建工具是Gradle。其中前台页面使用了Bootstrap中的一个模板AdminLTE进行美化,可导入IntelliJ IDEA使用。 参考了多个OA相关的项目,大概实现了以下几个模块: 系统管理->用户管理,岗位管理[核心权限分配],部门管理。 审批管理 相册管理 公告管理 其中工作流部分因为时间关系,流程定死了,没有采用JBPM或是Activiti之类的工作流。项目是业余时间开发,项目代码量小,简单容易理解,可以作为入门项目参考。

资源截图

代码片段和文件信息

package com.ys.oa.action.announcement;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.ys.oa.dao.announcement.IAnnouncementMapper;
import com.ys.oa.dao.department.IDepartmentMapper;
import com.ys.oa.dao.post.IPositionMapper;
import com.ys.oa.entity.announcement.AnnouncementEntity;
import com.ys.oa.entity.department.DepartmentEntity;
import com.ys.oa.entity.post.PositionEntity;
import com.ys.oa.entity.user.UserEntity;
import com.ys.oa.pageInfo.PageModel;
import com.ys.oa.pageInfo.PageQuery;

@Controller
@RequestMapping(“announcement“)
public class AnnouncementAction {

@Autowired
private IAnnouncementMapper announcementMapper;

@Autowired
private IDepartmentMapper departmentMapper;

@Autowired
private IPositionMapper positionMapper;

@RequestMapping(“findAnnouncementList“)
public ModelAndView findAnnouncementList() throws Exception{
ModelAndView mv = new ModelAndView(“announcement/announcementList“);
return mv;
}

@RequestMapping(“forPage“)
@ResponseBody
public PageModel forPage(PageQuery p HttpServletRequest request) throws Exception{
if(null == p) p = new PageQuery();
UserEntity user = (UserEntity)request.getSession().getAttribute(“user“);
if(!“超级管理员“.equals(user.getUserName())){
p.setcId(user.getPositionId());
p.setdId(user.getDepartmentId());
}
PageModel model = new PageModel();
List findForPage = announcementMapper.findForPage(p);
if(findForPage != null && findForPage.size() > 0){
for (AnnouncementEntity announcement : findForPage) {
if(“all“.equals(announcement.getSendRangeType())){
announcement.setSendRangeType(“全部员工“);
}
if(“dept“.equals(announcement.getSendRangeType())){
DepartmentEntity findById = departmentMapper.findById(Long.parseLong(announcement.getSendRangeIds()));
announcement.setSendRangeType(“部门:“+findById.getDepartmentName());
}
if(“post“.equals(announcement.getSendRangeType())){
PositionEntity findById = positionMapper.findById(Long.parseLong(announcement.getSendRangeIds()));
announcement.setSendRangeType(“职务:“+findById.getPostName());
}
}
model.setAaData(findForPage);
}else{
model.setAaData(new ArrayList());
}
model.setsEcho(p.getsEcho());
model.setiTotalRecords(findForPage.size());
model.setiTotalDisplayRecords(findForPage.size());
return model;
}

@RequestMapping(“toAdd“)
public ModelAndView toAdd() throws Exception{
ModelAndView mv = new M

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-02-27 11:35  OA\
     目录           0  2019-02-27 11:32  OA\oa\
     文件        3562  2015-05-28 18:42  OA\oa\.classpath
     目录           0  2019-02-27 11:32  OA\oa\.externalToolBuilders\
     文件         548  2015-05-14 17:38  OA\oa\.externalToolBuilders\org.eclipse.wst.jsdt.core.javascriptValidator (1).launch
     目录           0  2019-02-27 11:35  OA\oa\.myeclipse\
     文件         279  2015-08-20 13:48  OA\oa\.mymetadata
     文件        1980  2015-05-14 17:38  OA\oa\.project
     目录           0  2019-02-27 11:32  OA\oa\.settings\
     文件         500  2015-05-14 17:40  OA\oa\.settings\.jsdtscope
     文件         332  2015-07-29 11:37  OA\oa\.settings\org.eclipse.core.resources.prefs
     文件         364  2015-05-14 17:36  OA\oa\.settings\org.eclipse.jdt.core.prefs
     文件         444  2015-05-14 17:36  OA\oa\.settings\org.eclipse.wst.common.component
     文件         252  2015-05-14 17:36  OA\oa\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2015-05-14 17:36  OA\oa\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2015-05-14 17:36  OA\oa\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2019-02-27 11:32  OA\oa\WebRoot\
     文件       41995  2015-06-02 10:23  OA\oa\WebRoot\11.swf
     文件    22207010  2015-06-02 10:20  OA\oa\WebRoot\123.swf
     文件      412092  2015-06-01 17:07  OA\oa\WebRoot\FlexPaperViewer.swf
     目录           0  2019-02-27 11:32  OA\oa\WebRoot\meta-INF\
     文件          36  2015-05-14 17:36  OA\oa\WebRoot\meta-INF\MANIFEST.MF
     目录           0  2019-02-27 11:32  OA\oa\WebRoot\WEB-INF\
     目录           0  2019-02-27 11:32  OA\oa\WebRoot\WEB-INF\classes\
     目录           0  2019-02-27 11:32  OA\oa\WebRoot\WEB-INF\classes\com\
     目录           0  2019-02-27 11:32  OA\oa\WebRoot\WEB-INF\classes\com\ys\
     目录           0  2019-02-27 11:32  OA\oa\WebRoot\WEB-INF\classes\com\ys\oa\
     目录           0  2019-02-27 11:32  OA\oa\WebRoot\WEB-INF\classes\com\ys\oa\action\
     目录           0  2019-02-27 11:32  OA\oa\WebRoot\WEB-INF\classes\com\ys\oa\action\announcement\
     文件        8191  2015-08-20 09:42  OA\oa\WebRoot\WEB-INF\classes\com\ys\oa\action\announcement\AnnouncementAction.class
     目录           0  2019-02-27 11:32  OA\oa\WebRoot\WEB-INF\classes\com\ys\oa\action\authority\
............此处省略2003个文件信息

评论

共有 条评论