基于javaweb的SSM医院人事管理系统(java+ssm+jsp+bootstrap+jquery+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

100023122402

110023122402

120023122402

130023122402

140023122402

150023122402

基于javaweb的SSM医院人事管理系统(java+ssm+jsp+bootstrap+jquery+mysql)

项目介绍:

本项目旨在为医疗机构实现便捷化人事管理。 人事管理系统,实现的模块有:个人信息管理模块、员工管理模块、考勤管理模块、请假管理模块、部门管理模块。 数据库:使用mysql,Druid数据库连接池,监控数据库访问性能,统计SQL的执行性能。 持久层:mybatis持久化,使用MyBatis-Plus优化,减少sql开发量。 使用spring作为控制层,spring mvc为前端控制器,界面使用bootstrap。

环境需要:

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.数据库:MySql 5.7版本;

技术栈:

  1. 后端:Spring SpringMVC MyBatis 2. 前端:JSP+bootstrap+jQuery

使用说明:

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 将项目中jdbc.properties配置文件中的数据库配置改为自己的配置 3. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat,然后运行; 4. 运行项目,输入localhost:8080/xxx 登录

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
	public String add(Position position){
positionService.insert(position);
return "forward:/position/listPage.do?pageNo=1";
}

@RequestMapping("/{id}/toUpdate.do")
public String toUpdate(@PathVariable Integer id, Model model){
Position position = positionService.selectById(id);
model.addAttribute("position", position);
return "admin/position_update";
}

@RequestMapping("/{id}/update.do")
public String updateById(@PathVariable Integer id, Position position){
position.setId(id);
positionService.updateById(position);
return "forward:/position/listPage.do?pageNo=1";
}

@RequestMapping("/{id}/delete.do")
public String deleteById(@PathVariable Integer id){
positionService.deleteById(id);
return "forward:/position/listPage.do?pageNo=1";
}
}
package com.demo.controller;




@Controller
@RequestMapping("/attendance")
public class AttendanceController {

@Autowired
private AttendanceService attendanceService;

@RequestMapping("/addStart.do")
public String addStart(Integer employeeNumber){
attendanceService.addStart(employeeNumber);
return "welcome";
}

@RequestMapping("/addEnd.do")
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
	}

@RequestMapping("/search")
public String search(Model model, String input, int pageNo){
Page<Employee> page = employeeService.search(input, pageNo);
model.addAttribute("page", page);
return "admin/search_result";
}

@RequestMapping("/logout.do")
public String logout(HttpSession session){
session.removeAttribute("loged");
return "login";
}

}
package com.demo.controller;




@Controller
@RequestMapping("/overtime")
public class OvertimeController {

@Autowired
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36




@Controller
@RequestMapping("/employee")
public class EmployeeController {

@Autowired
private EmployeeService employeeService;
@Autowired
private DepartmentService departmentService;
@Autowired
private PositionService positionService;
@Autowired
private HistoryService historyService;

@RequestMapping("/login.do")
public String toLogin(){
return "login";
}

@RequestMapping("/checkLogin.do")
public String checkLogin(HttpSession session, Employee employee){
Employee employee2 = employeeService.checkLogin(employee.getEmployeeNumber(),
employee.getPassword());
if (employee2 != null) {
session.setAttribute("loged", employee2);
String level = employee2.getPosition().getLevel();
if (level.equals("人事部主任")) {
return "admin/index1";
}else if (level.equals("人事部员工")) {
return "admin/index2";
}else if (level.equals("部门主任")) {
return "admin/index3";
}else {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
	
@RequestMapping("/add.do")
public String add(Overtime overtime, String date){
overtime.setDay(MTimeUtil.stringParse(date));
overtimeService.insert(overtime);
return "forward:/overtime/listPage.do?pageNo=1";
}

@RequestMapping("/{id}/toUpdate.do")
public String toUpdate(Model model, @PathVariable Integer id){
//查询出要修改的记录信息
Overtime overtime = overtimeService.selectById(id);
model.addAttribute("overtime", overtime);
//查询出所有的部门
List<Department> dList = departmentService.selectList(new EntityWrapper<Department>());
model.addAttribute("dList", dList);
//查询出所有的员工
List<Employee> eList = employeeService.selectList(new EntityWrapper<Employee>());
model.addAttribute("eList", eList );
return "admin/overtime_update";
}

@RequestMapping("/{id}/update.do")
public String updateById(@PathVariable Integer id, String date, Overtime overtime){
overtime.setId(id);
overtime.setDay(MTimeUtil.stringParse(date));
overtimeService.updateById(overtime);
return "forward:/overtime/listPage.do?pageNo=1";
}

@RequestMapping("/{id}/delete.do")
public String deleteById(@PathVariable Integer id){
overtimeService.deleteById(id);
return "forward:/overtime/listPage.do?pageNo=1";
}

@RequestMapping("/{employeeNumber}/oneself.do")
public String select(Model model, @PathVariable Integer employeeNumber, int pageNo){
Page<Overtime> page = overtimeService.selectByEmployee(pageNo, employeeNumber);
model.addAttribute("page",page);
return "admin/oneself_overtime";
}

}
package com.demo.controller;



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

@RequestMapping("/{id}/detial.do")
public String selectEmployee(@PathVariable Integer id, Model model){
Employee employee = employeeService.selectEmployee(id);
model.addAttribute("employee", employee);
return "admin/employee_detail";
}

@RequestMapping("/toAdd.do")
public String toAdd(Model model){
List<History> eList = historyService.selectList(new EntityWrapper<History>()
.orderBy("employee_number", false));
model.addAttribute("employeeNumber",eList.get(0).getEmployeeNumber()+1);
List<Department> dList = departmentService.selectList(new EntityWrapper<Department>());
model.addAttribute("dList", dList);
List<Position> pList = positionService.selectList(new EntityWrapper<Position>());
model.addAttribute("pList", pList);
return "admin/employee_add";
}

@RequestMapping("/add.do")
public String add(Employee employee, String date) {
employee.setBirthday(MTimeUtil.stringParse(date));
employeeService.addEmployee(employee);
return "forward:/employee/listPage.do?pageNo=1";
}

@RequestMapping("/{id}/toUpdate.do")
public String toUpdate(Model model, @PathVariable Integer id){
Employee employee = employeeService.selectById(id);
model.addAttribute("employee", employee);
List<Department> dList = departmentService.selectList(new EntityWrapper<Department>());
model.addAttribute("dList", dList);
List<Position> pList = positionService.selectList(new EntityWrapper<Position>());
model.addAttribute("pList", pList);
return "admin/employee_update";
}

@RequestMapping("/{id}/update.do")
public String updateById(@PathVariable Integer id, Employee employee, String date, String status,
HttpSession session){
employee.setId(id);
employee.setBirthday(MTimeUtil.stringParse(date));
//得到操作人员的名字
Employee employee2 = (Employee) session.getAttribute("loged");
if(employee.getDepartmentNumber() == null){
employee.setDepartment(employee2.getDepartment());
employee.setDepartmentNumber(employee2.getDepartmentNumber());


项目链接:
https://javayms.github.io?id=191422272105200ar
https://javayms.pages.dev?id=191422272105200ar