赞
踩
登陆
员工信息管理
修改
员工操作记录
录取
新增员工
部门管理
职位管理
新增职位
修改密码
开发工具: Idea/Eclipse
数据库: mysql
Jar包仓库:普通jar包
前段框架:jquery/Bootstrap
后端框架: Spring+SpringMVC+Mybatis
资料说明
基于SSM+MySQL+Bootstrap的员工信息管理系统,包含管理员,部门经理等多个自定义角色。整体功能包含员工信息管理,部门与职位管理,权限管理等。
- package com.empl.mgr.controller;
-
- import javax.servlet.http.HttpSession;
-
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.context.annotation.Scope;
- import org.springframework.stereotype.Controller;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.ResponseBody;
-
- import com.empl.mgr.annotation.SecureValid;
- import com.empl.mgr.constant.EmployeesState;
- import com.empl.mgr.constant.MethodType;
- import com.empl.mgr.controller.support.AbstractController;
- import com.empl.mgr.service.EmployeesService;
- import com.empl.mgr.support.JSONReturn;
-
- @Scope
- @Controller
- @RequestMapping(value = "employees/departure")
- public class EmployeesDepartureController extends AbstractController {
-
- @Autowired
- private EmployeesService employeesService;
-
- @ResponseBody
- @RequestMapping(value = "findEmployeesInternshipList")
- @SecureValid(code = "01004", desc = "获取实习员工列表信息", type = MethodType.FIND)
- public JSONReturn findEmployeesInternshipList(@RequestParam int serType, @RequestParam String serVal,
- @RequestParam long department, @RequestParam long position, @RequestParam int page, HttpSession httpSession) {
- return employeesService.findEmployeesList(serType, serVal, department, position, page, acctName(httpSession),
- EmployeesState.EMPL_DEPARTURE, EmployeesState.EMPL_ELIMINATE);
- }
-
- @ResponseBody
- @RequestMapping(value = "findEmployeesInternshipPage")
- @SecureValid(code = "01004", desc = "获取实习员工分页", type = MethodType.FIND)
- public JSONReturn findEmployeesInternshipPage(@RequestParam int serType, @RequestParam String serVal,
- @RequestParam long department, @RequestParam long position, @RequestParam int page, HttpSession httpSession) {
- return employeesService.findEmployeesPage(serType, serVal, department, position, page, acctName(httpSession),
- EmployeesState.EMPL_DEPARTURE, EmployeesState.EMPL_ELIMINATE);
- }
-
- @ResponseBody
- @RequestMapping(value = "destroy")
- @SecureValid(code = "01004", desc = "销毁员工数据", type = MethodType.DELETE)
- public JSONReturn destroy(@RequestParam long emplId, HttpSession httpSession) {
- return employeesService.destroy(emplId, acctName(httpSession));
- }
-
- @ResponseBody
- @RequestMapping(value = "findDepartureNote")
- @SecureValid(code = "01004", desc = "获取员工离职备注", type = MethodType.FIND)
- public JSONReturn findDepartureNote(@RequestParam long emplId, HttpSession httpSession) {
- return employeesService.findDepartureNote(emplId, acctName(httpSession));
- }
-
- @ResponseBody
- @RequestMapping(value = "enrollEmployees")
- @SecureValid(code = "01004", desc = "重新录取员工信息", type = MethodType.MODIFY)
- public JSONReturn enrollEmployees(@RequestParam long emplId, @RequestParam String note, HttpSession httpSession) {
- return employeesService.enrollEmployees(emplId, note, acctName(httpSession));
- }
-
- }

- package com.empl.mgr.controller;
-
- import javax.servlet.http.HttpSession;
-
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.context.annotation.Scope;
- import org.springframework.stereotype.Controller;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.ResponseBody;
-
- import com.empl.mgr.annotation.SecureValid;
- import com.empl.mgr.constant.MethodType;
- import com.empl.mgr.controller.support.AbstractController;
- import com.empl.mgr.service.DepartmentService;
- import com.empl.mgr.service.PositionService;
- import com.empl.mgr.support.JSONReturn;
-
- @Scope
- @Controller
- @RequestMapping(value = "position")
- public class PositionController extends AbstractController {
-
- @Autowired
- private DepartmentService departmentService;
- @Autowired
- private PositionService positionService;
-
- @ResponseBody
- @RequestMapping(value = "findAllDepartment")
- @SecureValid(code = "03002", desc = "获取部门下拉框", type = MethodType.FIND)
- public JSONReturn findAllDepartment() {
- return departmentService.findAllDepartment();
- }
-
- @ResponseBody
- @RequestMapping(value = "findPositionListInfo")
- @SecureValid(code = "03002", desc = "获取职位列表", type = MethodType.FIND)
- public JSONReturn findPositionListInfo(@RequestParam int page, @RequestParam long deptId,
- @RequestParam String searchValue, HttpSession httpSession) {
- return positionService.findPositionListInfo(page, deptId, searchValue, acctName(httpSession));
- }
-
- @ResponseBody
- @RequestMapping(value = "findPositionPage")
- @SecureValid(code = "03002", desc = "获取职位分页", type = MethodType.FIND)
- public JSONReturn findPositionPage(@RequestParam int page, @RequestParam long deptId,
- @RequestParam String searchValue, HttpSession httpSession) {
- return positionService.findPositionPage(page, deptId, searchValue, acctName(httpSession));
- }
-
- @ResponseBody
- @RequestMapping(value = "addPosition")
- @SecureValid(code = "03002", desc = "添加职位", type = MethodType.ADD)
- public JSONReturn addPosition(@RequestParam long deptId, @RequestParam String name, @RequestParam String desc,
- HttpSession httpSession) {
- return positionService.addPosition(deptId, name, desc, acctName(httpSession));
- }
-
- @ResponseBody
- @RequestMapping(value = "deletePosition")
- @SecureValid(code = "03002", desc = "删除职位", type = MethodType.DELETE)
- public JSONReturn deletePosition(@RequestParam long id, HttpSession httpSession) {
- return positionService.deletePosition(id, acctName(httpSession));
- }
-
- @ResponseBody
- @RequestMapping(value = "findPositionById")
- @SecureValid(code = "03002", desc = "根据ID获取职位信息", type = MethodType.FIND)
- public JSONReturn findPositionById(@RequestParam long id, HttpSession httpSession) {
- return positionService.findPositionById(id);
- }
-
- @ResponseBody
- @RequestMapping(value = "modifyPosition")
- @SecureValid(code = "03002", desc = "修改职位", type = MethodType.MODIFY)
- public JSONReturn modifyPosition(@RequestParam long id, @RequestParam long deptId, @RequestParam String name,
- @RequestParam String desc, HttpSession httpSession) {
- return positionService.modifyPosition(id, deptId, name, desc, acctName(httpSession));
- }
-
- }

Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。