基于javaweb的公司人力资源管理系统(java+ssm+jsp+bootstrap+js+mysql)

基于javaweb的公司人力资源管理系统(java+ssm+jsp+bootstrap+js+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

20220819204602

20220819204603

20220819204604

20220819204605

20220819204606

20220819204607

基于javaweb+mysql的公司人力资源管理系统(java+SSM+JSP+bootstrap+JS+mysql)

项目介绍

本项目为后台管理系统,分为管理员与普通员工两种角色; 管理员角色包含以下功能: 管理员登录,员工账号管理,部门管理,员工管理,薪资管理,薪资发放,招聘管理,员工培训管理等功能。

普通员工角色包含以下功能: 普通员工登录,员工账号查看,部门管理,员工管理,薪资管理,薪资发放等功能。

环境需要

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版本; 6.是否Maven:否;

技术栈

  1. 后端:Spring+SpringMVC+Mybatis 2. 前端:JSP+CSS+JavaScript+bootstrap

使用说明

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

员工管理控制层:

@Controller

@RequestMapping(“/employee”)

public class EmployeeController {

@Autowired

private IEmployeeService employeeService;

@Autowired

private EmployeeServiceImpl employeeServiceImpl;

@PostMapping(“/login”)

public ModelAndView login(Employee employee, HttpServletRequest request){

Result result = employeeService.login(employee);

if (result.getCode()==0){

return new ModelAndView(“redirect:/page/index”);

request.setAttribute(“pageMsg”,result.getMsg());

return new ModelAndView(“forward:/page/login”);

@PostMapping(“/del_employees”)

@ResponseBody

public ModelAndView deleteEmployees(@RequestParam(“ids”) String ids){

employeeService.deleteEmployees(ids);

return new ModelAndView(“employeeInfo”);

@GetMapping(“/getPage”)

public ModelAndView getPage(@RequestParam(“currentPage”) Integer currentPage){

employeeService.getPageDatas(currentPage);

return new ModelAndView(“employeeInfo”);

@PostMapping(“/addEmployee”)

@ResponseBody

public Result addEmployee(Employee employee){

return employeeService.addEmployee(employee);

@GetMapping(“/getUpdateEmployeeInfo”)

public ModelAndView getUpdateEmployeeInfo(){

employeeServiceImpl.updateAllEmployeeToSession();

return new ModelAndView(“employeeInfo”);

@GetMapping(“/getMyAccount”)

public ModelAndView getMyAccount(){

return new ModelAndView(“myAccount”);

@GetMapping(“/getEmployee”)

@ResponseBody

public Result getEmployee(@RequestParam(“id”) long id){

Employee employee = new Employee();

employee.setId(id);

return employeeService.getEmployee(employee);

@PostMapping(“/updateEmployeeById”)

@ResponseBody

public Result updateEmployeeById(Employee employee){

return employeeService.updateEmployeeById(employee);

@PostMapping(“/getEmployeeByNumber”)

@ResponseBody

public Result getEmployeeByNumber(Employee employee){

return employeeService.getEmployeeByNumber(employee.getEmployeeNumber());

@PostMapping(“/updateEmployeeByNumber”)

@ResponseBody

public Result updateEmployeeByNumber(Employee employee){

return employeeService.updateEmployeeByNumber(employee);

@PostMapping(“/uploadMyImage”)

@ResponseBody

public Result upLoadMyImage(){

return employeeService.upLoadMyImage();

@GetMapping(“/clearLogin”)

@ResponseBody

public Result clearLogin(){

return employeeServiceImpl.clearLogin();

@PostMapping(“/modifyPwd”)

@ResponseBody

public Result modifyPwd(@RequestParam(“oldPwd”) String oldPwd,@RequestParam(“newPwd”) String newPwd){

return employeeService.modifyPwd(oldPwd,newPwd);

@GetMapping(“/loginYesOrNo”)

@ResponseBody

public Result loginYesOrNo(){

employeeServiceImpl.getEmployeeLoginInfo();

return new Result(0,“已登录”,null);

@GetMapping(“/getEmployeeByEmployeeNumber”)

@ResponseBody

public Result getEmployeeByEmployeeNumber(@RequestParam(“employeeNumber”) String employeeNumber)throws ParseException {

Employee employee = new Employee();

employee.setEmployeeNumber(employeeNumber);

return employeeService.getEmployeeByEmployeeNumber(employee);

@PostMapping(“/getEmployeeByName”)

@ResponseBody

public Result getEmployeeByName(Employee employee)throws ParseException{

return employeeService.getEmployeeByName(employee.getEmployeeName());

@GetMapping(“/getPersonByEmployeeNumber”)

@ResponseBody

public ModelAndView getPersonByEmployeeNumber(@RequestParam(“employeeNumber”) String employeeNumber){

Employee employee = new Employee();

employee.setEmployeeNumber(employeeNumber);

employeeServiceImpl.getPersonByEmployeeNumber(employee);

return new ModelAndView(“employeeInfo”);

部门管理控制层:

@RequestMapping(“/Department”)

@RestController

public class DepartmentController {

@Autowired

IDepartmentService departmentService;

@Autowired

private HttpServletRequest request;

@PostMapping(“/addDepartment”)

public Result addDepartment(@RequestParam(“departmentNumber”) String departmentNumber, @RequestParam(“departmentName”) String departmentName,

@RequestParam(“departmentHead”) String departmentHead, @RequestParam(“departmentAddress”) String departmentAddress,

@RequestParam(“departmentTel”) String departmentTel, @RequestParam(“departmentFax”) String departmentFax)throws ParseException {

SimpleDateFormat formatter=new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss”);

Department department = new Department();

department.setDepartmentName(departmentName);

department.setDepartmentNumber(departmentNumber);

department.setDepartmentAddress(departmentAddress);

department.setDepartmentHead(departmentHead);

department.setDepartmentTel(departmentTel);

department.setDepartmentFax(departmentFax);

return departmentService.addDepartment(department);

@GetMapping(“/getAllDepartments”)

public ModelAndView getAllDepartments(){

departmentService.getAllDepartments();

// System.out.println(“就是”+request.getSession().getAttribute(“departmentPage”));

return new ModelAndView(“department”);

@PostMapping(“/deleteDepartment”)

public Result deleteDepartment(@RequestParam(“ids”) String ids){

return departmentService.deleteDepartment(ids);

@PostMapping(“/modifyDepartment”)

public Result modifyDepartment(@RequestParam(“departmentNumber”) String departmentNumber, @RequestParam(“departmentName”) String departmentName,

@RequestParam(“departmentHead”) String departmentHead, @RequestParam(“departmentAddress”) String departmentAddress,

@RequestParam(“departmentTel”) String departmentTel, @RequestParam(“departmentFax”) String departmentFax,

@RequestParam(“id”) long id)throws ParseException{

Department department = new Department();

department.setDepartmentName(departmentName);

department.setDepartmentNumber(departmentNumber);

department.setDepartmentAddress(departmentAddress);

department.setDepartmentHead(departmentHead);

department.setDepartmentTel(departmentTel);

department.setDepartmentFax(departmentFax);

department.setId(id);

// System.out.println("department修改: "+ department);

return departmentService.modifyDepartment(department);

@GetMapping(“/getPage”)

public ModelAndView getPage(@RequestParam(“currentPage”) Integer currentPage){

departmentService.getPageDatas(currentPage);

// System.out.println("currentPage: "+currentPage);

return new ModelAndView(“department”);

@GetMapping(“/getDepartmentById”)

public Result getDepartmentById(@RequestParam(“id”) long id){

return departmentService.getDepartmentById(id);

@GetMapping(“/getDepartmentByDepartmentNumber”)

public ModelAndView getDepartmentByDepartmentNumber(@RequestParam(“departmentNumber”) String departmentNumber)throws ParseException{

departmentService.getDepartmentByDepartmentNumber(departmentNumber);

return new ModelAndView(“department”);

@PostMapping(“/getDepartmentNumberByDepartmentName”)

public Result getDepartmentNumberByDepartmentName(@RequestParam(“departmentName”) String departmentName)throws ParseException{

return departmentService.getDepartmentNumberByDepartmentName(departmentName);

培训管理控制层:

@RequestMapping(“/Education”)

@RestController

public class EducationController {

@Autowired

IEducationService educationService;

@Autowired

private HttpServletRequest request;

@PostMapping(“/addEducation”)

public Result addEducation(@RequestParam(“educationNumber”) String educationNumber,

@RequestParam(“graduation”) String graduation,

@RequestParam(“major”) String major,

@RequestParam(“genre”) String genre,

@RequestParam(“arrangement”) String arrangement,

@RequestParam(“status”) String status,

@RequestParam(“beginTime”) String beginTime,

@RequestParam(“employeeNumber”) String employeeNumber,

@RequestParam(“endTime”) String endTime)throws ParseException {

SimpleDateFormat formatter=new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss”);

Education education = new Education();

education.setEducationNumber(educationNumber);

education.setGraduation(graduation);

education.setMajor(major);

education.setGenre(genre);

education.setArrangement(arrangement);

education.setStatus(status);

education.setBeginTime(beginTime);

education.setEndTime(endTime);

education.setEmployeeNumber(employeeNumber);

return educationService.addEducation(education);

@GetMapping(“/getAllEducations”)

public ModelAndView getAllEducations(){

educationService.getAllEducations();

return new ModelAndView(“education”);

@PostMapping(“/deleteEducation”)

public Result deleteEducation(@RequestParam(“ids”) String ids){

return educationService.deleteEducation(ids);

@PostMapping(“/modifyEducation”)

public Result modifyEducation( @RequestParam(“educationNumber”) String educationNumber,

@RequestParam(“graduation”) String graduation,

@RequestParam(“major”) String major,

@RequestParam(“genre”) String genre,

@RequestParam(“arrangement”) String arrangement,

@RequestParam(“status”) String status,

@RequestParam(“beginTime”) String beginTime,

@RequestParam(“endTime”) String endTime,

@RequestParam(“employeeNumber”)String employeeNumber,

@RequestParam(“id”) long id)throws ParseException{

SimpleDateFormat formatter=new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss”);

Education education = new Education();

education.setEducationNumber(educationNumber);

education.setGraduation(graduation);

education.setMajor(major);

education.setGenre(genre);

education.setArrangement(arrangement);

education.setStatus(status);

education.setBeginTime(beginTime);

education.setEndTime(endTime);

education.setEmployeeNumber(employeeNumber);

education.setId(id);

return educationService.modifyEducation(education);

@GetMapping(“/getPage”)

public ModelAndView getPage(@RequestParam(“currentPage”) Integer currentPage){

educationService.getPageDatas(currentPage);

return new ModelAndView(“education”);

@GetMapping(“/getEducationById”)

public Result getEducationById(@RequestParam(“id”) long id){

return educationService.getEducationById(id);

@GetMapping(“/getEducationByEmployeeNumber”)

public ModelAndView getEducationByEmployeeNumber(@RequestParam(“employeeNumber”) String employeeNumber)throws ParseException{

educationService.getEducationByEmployeeNumber(employeeNumber);

return new ModelAndView(“education”);

@PostMapping(“/getEmployeeNumberByEmployeeName”)

public Result getEmployeeNumberByEmployeeName(@RequestParam(“employeeName”) String employeeName)throws ParseException{

return educationService.getEmployeeNumberByEmployeeName(employeeName);


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值