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

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

人事员工考勤管理,登录用户分为:
人事部主任(超级管理员)
人事部员工(管理员)
部门主任(部门管理)
部门员工(普通员工)

个人信息维护、员工管理、请假、签到打卡、审批、部门管理、职位管理等……

470123182502

360123182502

370123182502

390123182502

400123182502

410123182502

420123182502

430123182502

440123182502

450123182502

460123182502

技术框架

JavaBean MVC JSP SSM(Spring SpringMVC MyBatis) MySQL Bootstrap……

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

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

@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 {
return "admin/index4";
}
}else{
return "login";
}
}

@RequestMapping("/welcome.do")
public String toWelcome(){
return "welcome";
}

@RequestMapping("/listPage.do")
public String selectList(Model model, int pageNo){
Page<Employee> page = employeeService.selectListByPage(pageNo);
model.addAttribute("page", page);
return "admin/employee_list";
}

@RequestMapping("/{id}/detial.do")
public String selectEmployee(@PathVariable Integer id, Model model){
Employee employee = employeeService.selectEmployee(id);
model.addAttribute("employee", employee);
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
		session.removeAttribute("loged");
return "login";
}

}
package com.demo.controller;




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

@Autowired
private OvertimeService overtimeService;
@Autowired
private EmployeeService employeeService;
@Autowired
private DepartmentService departmentService;

@RequestMapping("/listPage.do")
public String selectListByPgae(Model model, int pageNo){
Page<Overtime> page = overtimeService.selectListByPage(pageNo);
model.addAttribute("page",page);
return "admin/overtime_list";
}

@RequestMapping("/toAdd.do")
public String toAdd(Model model){
//查询出所有的部门
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_add";
}
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
package com.demo.controller;




@Controller
@RequestMapping("/position")
public class PositionController {

@Autowired
private PositionService positionService;

@RequestMapping("/listPage.do")
public String selecListByPage(int pageNo, Model model){
Page<Position> page = positionService.selectListByPage(pageNo);
model.addAttribute("page", page);
return "admin/position_list";
}


@RequestMapping("/toAdd.do")
public String toAdd(Model model){
List<Position> dList = positionService.selectList(new EntityWrapper<Position>()
.orderBy("position_number", false));
model.addAttribute("positionNumber", dList.get(0).getPositionNumber()+1);
return "admin/position_add";
}

@RequestMapping("/add.do")
public String add(Position position){
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
49
50

@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 {
return "admin/index4";
}
}else{
return "login";
}
}

@RequestMapping("/welcome.do")
public String toWelcome(){
return "welcome";
}

@RequestMapping("/listPage.do")
public String selectList(Model model, int pageNo){
Page<Employee> page = employeeService.selectListByPage(pageNo);
model.addAttribute("page", page);
return "admin/employee_list";
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
}

@RequestMapping("/{id}/update.do")
public String updateStatus(@PathVariable Integer id){
leaveService.updateStatus(id);
return "forward:/leave/notlist.do";
}

@RequestMapping("/toAdd.do")
public String toAdd(){
return "admin/leave_add";
}

@RequestMapping("/add.do")
public String add(HttpSession session,Integer employeeNumber, Leave leave, String start, String end){
leave.setEmployeeNumber(employeeNumber);
leave.setStartTime(MTimeUtil.stringParse(start));
leave.setEndTime(MTimeUtil.stringParse(end));
Employee employee = (Employee)session.getAttribute("loged");
leave.setDepartmentNumber(employee.getDepartmentNumber());
leaveService.insert(leave);
return "forward:/employee/welcome.do";
}

@RequestMapping("/oneself.do")
public String seletByEmployee(HttpSession session, int pageNo, Model model){
Employee employee = (Employee)session.getAttribute("loged");
Page<Leave> page = leaveService.seletByEmployee(employee.getEmployeeNumber(), pageNo);
model.addAttribute("page", page);
return "admin/oneself_leave";
}

@RequestMapping("/notlist.do")
public String selectNotList(Model model, HttpSession session){
//获取登录用户的信息
Employee employee = (Employee) session.getAttribute("loged");
List<Leave> list = leaveService.selectListByStatus(employee.getDepartmentNumber(), "未批准");
model.addAttribute("list", list);
return "admin/leave_notlist";
}

@RequestMapping("/yeslist.do")
public String selectYesList(Model model, HttpSession session){
//获取登录用户的信息
Employee employee = (Employee) session.getAttribute("loged");
List<Leave> list = leaveService.selectListByStatus(employee.getDepartmentNumber(), "已批准");
model.addAttribute("list", list);
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




@Controller
@RequestMapping("/leave")
public class LeaveController {

@Autowired
private LeaveService leaveService;

@RequestMapping("/list.do")
public String selectList(Model model){
List<Leave> list = leaveService.selectList();
model.addAttribute("list", list);
return "admin/leave_list";
}

@RequestMapping("/{id}/detail.do")
public String selectLeave(@PathVariable Integer id, Model model){
Leave leave = leaveService.selectLeave(id);
model.addAttribute("leave", leave);
return "admin/leave_detail";
}

@RequestMapping("/{id}/update.do")
public String updateStatus(@PathVariable Integer id){
leaveService.updateStatus(id);
return "forward:/leave/notlist.do";
}

@RequestMapping("/toAdd.do")


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