当前位置:   article > 正文

基于SSM+MySQL+Bootstrap的员工信息管理系统_公司员工信息管理系统bootstrap

公司员工信息管理系统bootstrap

登陆

员工信息管理

修改

员工操作记录

录取

离职原因

新增员工

部门管理

职位管理

新增职位

修改密码

开发工具: Idea/Eclipse
数据库: mysql
Jar包仓库:普通jar包
前段框架:jquery/Bootstrap
后端框架: Spring+SpringMVC+Mybatis

资料说明

基于SSM+MySQL+Bootstrap的员工信息管理系统,包含管理员,部门经理等多个自定义角色。整体功能包含员工信息管理,部门与职位管理,权限管理等。

  1. package com.empl.mgr.controller;
  2. import javax.servlet.http.HttpSession;
  3. import org.springframework.beans.factory.annotation.Autowired;
  4. import org.springframework.context.annotation.Scope;
  5. import org.springframework.stereotype.Controller;
  6. import org.springframework.web.bind.annotation.RequestMapping;
  7. import org.springframework.web.bind.annotation.RequestParam;
  8. import org.springframework.web.bind.annotation.ResponseBody;
  9. import com.empl.mgr.annotation.SecureValid;
  10. import com.empl.mgr.constant.EmployeesState;
  11. import com.empl.mgr.constant.MethodType;
  12. import com.empl.mgr.controller.support.AbstractController;
  13. import com.empl.mgr.service.EmployeesService;
  14. import com.empl.mgr.support.JSONReturn;
  15. @Scope
  16. @Controller
  17. @RequestMapping(value = "employees/departure")
  18. public class EmployeesDepartureController extends AbstractController {
  19. @Autowired
  20. private EmployeesService employeesService;
  21. @ResponseBody
  22. @RequestMapping(value = "findEmployeesInternshipList")
  23. @SecureValid(code = "01004", desc = "获取实习员工列表信息", type = MethodType.FIND)
  24. public JSONReturn findEmployeesInternshipList(@RequestParam int serType, @RequestParam String serVal,
  25. @RequestParam long department, @RequestParam long position, @RequestParam int page, HttpSession httpSession) {
  26. return employeesService.findEmployeesList(serType, serVal, department, position, page, acctName(httpSession),
  27. EmployeesState.EMPL_DEPARTURE, EmployeesState.EMPL_ELIMINATE);
  28. }
  29. @ResponseBody
  30. @RequestMapping(value = "findEmployeesInternshipPage")
  31. @SecureValid(code = "01004", desc = "获取实习员工分页", type = MethodType.FIND)
  32. public JSONReturn findEmployeesInternshipPage(@RequestParam int serType, @RequestParam String serVal,
  33. @RequestParam long department, @RequestParam long position, @RequestParam int page, HttpSession httpSession) {
  34. return employeesService.findEmployeesPage(serType, serVal, department, position, page, acctName(httpSession),
  35. EmployeesState.EMPL_DEPARTURE, EmployeesState.EMPL_ELIMINATE);
  36. }
  37. @ResponseBody
  38. @RequestMapping(value = "destroy")
  39. @SecureValid(code = "01004", desc = "销毁员工数据", type = MethodType.DELETE)
  40. public JSONReturn destroy(@RequestParam long emplId, HttpSession httpSession) {
  41. return employeesService.destroy(emplId, acctName(httpSession));
  42. }
  43. @ResponseBody
  44. @RequestMapping(value = "findDepartureNote")
  45. @SecureValid(code = "01004", desc = "获取员工离职备注", type = MethodType.FIND)
  46. public JSONReturn findDepartureNote(@RequestParam long emplId, HttpSession httpSession) {
  47. return employeesService.findDepartureNote(emplId, acctName(httpSession));
  48. }
  49. @ResponseBody
  50. @RequestMapping(value = "enrollEmployees")
  51. @SecureValid(code = "01004", desc = "重新录取员工信息", type = MethodType.MODIFY)
  52. public JSONReturn enrollEmployees(@RequestParam long emplId, @RequestParam String note, HttpSession httpSession) {
  53. return employeesService.enrollEmployees(emplId, note, acctName(httpSession));
  54. }
  55. }
  1. package com.empl.mgr.controller;
  2. import javax.servlet.http.HttpSession;
  3. import org.springframework.beans.factory.annotation.Autowired;
  4. import org.springframework.context.annotation.Scope;
  5. import org.springframework.stereotype.Controller;
  6. import org.springframework.web.bind.annotation.RequestMapping;
  7. import org.springframework.web.bind.annotation.RequestParam;
  8. import org.springframework.web.bind.annotation.ResponseBody;
  9. import com.empl.mgr.annotation.SecureValid;
  10. import com.empl.mgr.constant.MethodType;
  11. import com.empl.mgr.controller.support.AbstractController;
  12. import com.empl.mgr.service.DepartmentService;
  13. import com.empl.mgr.service.PositionService;
  14. import com.empl.mgr.support.JSONReturn;
  15. @Scope
  16. @Controller
  17. @RequestMapping(value = "position")
  18. public class PositionController extends AbstractController {
  19. @Autowired
  20. private DepartmentService departmentService;
  21. @Autowired
  22. private PositionService positionService;
  23. @ResponseBody
  24. @RequestMapping(value = "findAllDepartment")
  25. @SecureValid(code = "03002", desc = "获取部门下拉框", type = MethodType.FIND)
  26. public JSONReturn findAllDepartment() {
  27. return departmentService.findAllDepartment();
  28. }
  29. @ResponseBody
  30. @RequestMapping(value = "findPositionListInfo")
  31. @SecureValid(code = "03002", desc = "获取职位列表", type = MethodType.FIND)
  32. public JSONReturn findPositionListInfo(@RequestParam int page, @RequestParam long deptId,
  33. @RequestParam String searchValue, HttpSession httpSession) {
  34. return positionService.findPositionListInfo(page, deptId, searchValue, acctName(httpSession));
  35. }
  36. @ResponseBody
  37. @RequestMapping(value = "findPositionPage")
  38. @SecureValid(code = "03002", desc = "获取职位分页", type = MethodType.FIND)
  39. public JSONReturn findPositionPage(@RequestParam int page, @RequestParam long deptId,
  40. @RequestParam String searchValue, HttpSession httpSession) {
  41. return positionService.findPositionPage(page, deptId, searchValue, acctName(httpSession));
  42. }
  43. @ResponseBody
  44. @RequestMapping(value = "addPosition")
  45. @SecureValid(code = "03002", desc = "添加职位", type = MethodType.ADD)
  46. public JSONReturn addPosition(@RequestParam long deptId, @RequestParam String name, @RequestParam String desc,
  47. HttpSession httpSession) {
  48. return positionService.addPosition(deptId, name, desc, acctName(httpSession));
  49. }
  50. @ResponseBody
  51. @RequestMapping(value = "deletePosition")
  52. @SecureValid(code = "03002", desc = "删除职位", type = MethodType.DELETE)
  53. public JSONReturn deletePosition(@RequestParam long id, HttpSession httpSession) {
  54. return positionService.deletePosition(id, acctName(httpSession));
  55. }
  56. @ResponseBody
  57. @RequestMapping(value = "findPositionById")
  58. @SecureValid(code = "03002", desc = "根据ID获取职位信息", type = MethodType.FIND)
  59. public JSONReturn findPositionById(@RequestParam long id, HttpSession httpSession) {
  60. return positionService.findPositionById(id);
  61. }
  62. @ResponseBody
  63. @RequestMapping(value = "modifyPosition")
  64. @SecureValid(code = "03002", desc = "修改职位", type = MethodType.MODIFY)
  65. public JSONReturn modifyPosition(@RequestParam long id, @RequestParam long deptId, @RequestParam String name,
  66. @RequestParam String desc, HttpSession httpSession) {
  67. return positionService.modifyPosition(id, deptId, name, desc, acctName(httpSession));
  68. }
  69. }

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/476469
推荐阅读
相关标签
  

闽ICP备14008679号