基于SSM+MySQL+Bootstrap的员工信息管理系统

登陆

员工信息管理

修改

员工操作记录

录取

离职原因

新增员工

部门管理

职位管理

新增职位

修改密码

开发工具: 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));
	}

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

2016855150

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值