基于javaweb的SpringBoot人力资源管理系统(java+springboot+elementui+vue+nodejs+mysql)

运行环境

Java≥8、MySQL≥5.7、Node.js≥14

开发工具

后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可

❗没学过node.js的不要搞前后端分离项目

适用

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

功能说明

251524382608

261524382608

271524382608

281524382608

291524382608

301524382608

311524382608

321524382608

331524382608

341524382608

基于javaweb的SpringBoot人力资源管理系统(java+springboot+elementui+vue+nodejs+mysql)

项目介绍

本项目为前后端分离的项目;

系统分为管理员、经理、财务部长等多种角色,角色和角色对应权限可由管理员进行配置;

本系统包含登录、薪资管理(五险一金、参保城市、工资管理)、权限管理(角色管理、菜单管理)、系统管理(文件管理、员工管理、部门管理)、考勤管理(请假审批、考勤表现)、个人信息等功能

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。

2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 前端推荐使用vscode;

3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;

4.数据库:MySql 5.7/8.0版本均可;

5.是否Maven项目:是;

6.是否为前后端分离项目:是;

技术栈

后端框架:Springboot

前端技术:ElementUI、Vue、nodejs

使用说明

后端项目运行:

  1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;

  2. 使用IDEA/Eclipse/MyEclipse导入源码中的hrm项目,导入成功后请执行maven clean;maven install命令,然后运行;

  3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;

  4. 运行项目,控制台提示运行成功后再去运行前端项目;

前端项目运行:

1.打开运行中的cmd;

2.cd到vue-elementui-hrm文件夹目录;

3.执行命令:npm run serve

  1. 运行成功后,在浏览器中输入地址:http://localhost:8080/

管理员:000001/123456

财务部部长:000002/123456

登录页面展示:

五险一金展示页面:

后台管理页面展示:

角色管理展示:

工资管理展示:

部门管理展示页面:

文件管理展示页面:

员工管理展示页面:

 考勤管理展示页面:

参保城市管理展示页面:

部门控制层:

@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);

员工管理控制层:

@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(“/Community”)

@RestController

public class CommunityController {

@Autowired

ICommunityService communityService;

@Autowired

private HttpServletRequest request;

@PostMapping(“/addCommunity”)

public Result addCommunity(@RequestParam(“relation”) String relation,

@RequestParam(“name”) String name,

@RequestParam(“age”) String age,

@RequestParam(“political”) String political,

@RequestParam(“nation”) String nation,

@RequestParam(“work”) String work,

@RequestParam(“post”) String post,

@RequestParam(“phenomenon”) String phenomenon,

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

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

Community community = new Community();

community.setRelation(relation);

community.setName(name);

community.setAge(age);

community.setPolitical(political);

community.setNation(nation);

community.setWork(work);

community.setPost(post);

community.setPhenomenon(phenomenon);

community.setEmployeeNumber(employeeNumber);

return communityService.addCommunity(community);

@GetMapping(“/getAllCommunitys”)

public ModelAndView getAllCommunitys(){

communityService.getAllCommunitys();

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

return new ModelAndView(“community”);

@PostMapping(“/deleteCommunity”)

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

return communityService.deleteCommunity(ids);

@PostMapping(“/modifyCommunity”)

public Result modifyCommunity(@RequestParam(“relation”) String relation,

@RequestParam(“name”) String name,

@RequestParam(“age”) String age,

@RequestParam(“political”) String political,

@RequestParam(“nation”) String nation,

@RequestParam(“work”) String work,

@RequestParam(“post”) String post,

@RequestParam(“phenomenon”) String phenomenon,

@RequestParam(“employeeNumber”) String employeeNumber,

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

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

Community community = new Community();

community.setRelation(relation);

community.setName(name);

community.setAge(age);

community.setPolitical(political);

community.setNation(nation);

community.setWork(work);

community.setPost(post);

community.setPhenomenon(phenomenon);

community.setEmployeeNumber(employeeNumber);

community.setId(id);

return communityService.modifyCommunity(community);

@GetMapping(“/getPage”)

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

communityService.getPageDatas(currentPage);

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

return new ModelAndView(“community”);

@GetMapping(“/getCommunityById”)

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

return communityService.getCommunityById(id);

@GetMapping(“/getCommunityByEmployeeNumber”)

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

communityService.getCommunityByEmployeeNumber(employeeNumber);

return new ModelAndView(“community”);

@PostMapping(“/getEmployeeNumberByEmployeeName”)

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

return communityService.getEmployeeNumberByEmployeeName(employeeName);


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