作者主页:编程指南针

作者简介:Java领域优质创作者、CSDN博客专家 、掘金特邀作者、多年架构师设计经验、腾讯课堂常驻讲师

主要内容:Java项目、毕业设计、简历模板、学习资料、面试题库、技术互助

文末获取源码

一,项目简介

系统是前后端分离的项目,直接启动Springboot应用程序类后,再启动前端工程访问即可。主要实现 了企业的人事管理功能,主要包含员工管理、薪资管理、职位管理、权限管理、网盘文件分享管理等模块。

系统亮点:使用REDIS进行数据缓存,优化查询性能;使用分布式文件系统进行文件存储服务;基于Springboot+vue实现前后端分离开发

二,环境介绍

语言环境:Java:  jdk1.8

数据库:Mysql: mysql5.7

应用服务器:Tomcat:  tomcat8.5.31

开发工具:IDEA或eclipse

开发技术:Element UI 、Vue、Axios、SpringBoot、MyBatis、MySQL、Redis、FastDFS(或OSS)、Tomcat8.5.31

三,系统展示

下面展示一下系统的基本功能:

用户登陆:

系统主界面:

员工管理:

高级搜索

员工奖惩管理

添加奖惩

工资套账(工资标准)管理

员工工资管理

系统管理—部门管理

系统管理--职位管理

系统管理—职称管理

文件管理:将文件存储在分布式文件服务Fastdfs或阿里云OSS上,可以在系统中自行配置

以上是本系统的基本功能功能展示,本系统所使用技术比较先进,功能比较完整,界面美观大方,适合毕业设计使用。

四,核心代码展示

package com.me.controller;import com.me.pojo.Department;
import com.me.pojo.RespBean;
import com.me.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;import java.util.List;@RestController
public class DepartmentController {@AutowiredDepartmentService departmentService;@GetMapping("/dep/deps")public RespBean getAllDepartments() {List<Department> list = departmentService.getAllDepartments();
//        for (Department department : list) {
//            System.out.println(department);
//        }return RespBean.ok("AllDepartments", list);}@PostMapping("/dep/add")public RespBean addDep(@RequestBody Department dep) {System.out.println(dep);departmentService.addDep(dep);if (dep.getResult() == 1) {return RespBean.ok("添加成功", dep);}return RespBean.error("添加失败");}@DeleteMapping("/dep/{id}")public RespBean deleteDepById(@PathVariable Integer id) {Department dep = new Department();dep.setId(id);departmentService.deleteDepById(dep);if (dep.getResult() == -2) {return RespBean.error("该部门下有子部门,删除失败");} else if (dep.getResult() == -1) {return RespBean.error("该部门下有员工,删除失败");} else if (dep.getResult() == 1) {return RespBean.ok("删除成功");}return RespBean.error("删除失败");}
}
package com.me.controller;import com.fasterxml.jackson.annotation.JsonFormat;
import com.me.pojo.*;
import com.me.service.DepartmentService;
import com.me.service.EmployeeService;
import com.me.service.JobLevelService;
import com.me.service.PositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;import java.util.Date;
import java.util.List;@RestController
public class EmpController {@AutowiredEmployeeService employeeService;@AutowiredPositionService positionService;@GetMapping("/emp/query")public RespPageBean getEmployeeByPage(@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size, Employee employee,  Date[] beginDateScope) {
//        System.out.println(employee);return employeeService.getEmployeeByPage(page, size, employee, beginDateScope);}@PostMapping("/emp/add")public RespBean addEmp(@RequestBody Employee employee) {
//        System.out.println(employee);if (employeeService.addEmp(employee) == 1) {return RespBean.ok("添加成功!");}return RespBean.error("添加失败!");}@PutMapping("/emp/update")public RespBean updateEmp(@RequestBody Employee employee) {
//        System.out.println(employee);if (employeeService.updateEmp(employee) == 1) {return RespBean.ok("更新成功!");}return RespBean.error("更新失败!");}@DeleteMapping("/emp/delete/{id}")public RespBean deleteEmpByEid(@PathVariable Integer id) {if (employeeService.deleteEmpByEid(id) == 1) {return RespBean.ok("删除成功!");}return RespBean.error("删除失败!");}@GetMapping("/emp/getAllPositions")public RespBean getAllPositions() {return RespBean.ok("positions-",positionService.getAllPositions()) ;}@GetMapping("/emp/nations")public RespBean getAllNations() {return RespBean.ok("nations-",employeeService.getAllNations());}@GetMapping("/emp/politicsstatus")public RespBean getAllPoliticsstatus() {return RespBean.ok("politicsss-",employeeService.getAllPoliticsstatus()) ;}@Autowiredprivate JobLevelService jobLevelService;@GetMapping("/emp/joblevels")public RespBean getAllJobLevels() {return RespBean.ok("joblevels-",jobLevelService.getAllJobLevels());}@Autowiredprivate DepartmentService departmentService;@GetMapping("/emp/deps")public RespBean getAllDepartments() {List<Department> list = departmentService.getAllDepartments();
//        for (Department department : list) {
//            System.out.println(department);
//        }return RespBean.ok("AllDepartments", list);}}
package com.me.controller;import com.me.pojo.Employee;
import com.me.pojo.Employeeec;
import com.me.pojo.RespBean;
import com.me.pojo.RespPageBean;
import com.me.service.EmployeeecService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;@RestController
public class EmployeeecController {@AutowiredEmployeeecService employeeecService;@GetMapping("/ec/{keyword}")public RespBean selectByNameOrWorkId(@PathVariable String keyword){System.out.println(keyword);return RespBean.ok("获取到-",employeeecService.selectByNameOrWorkId(keyword));}@DeleteMapping("/ec/{id}")public RespBean deleteById(@PathVariable int id){System.out.println(id);if(employeeecService.deleteById(id)==1){return RespBean.ok("删除成功");}return RespBean.error("失败");}@PostMapping("/ec/add")public RespBean add(@RequestBody Employeeec employeeec){System.out.println(employeeec);if(employeeecService.insertEc(employeeec)==1){return RespBean.ok("添加成功");}return RespBean.error("失败");}@PutMapping("/ec/update")public RespBean put(@RequestBody Employeeec employeeec){System.out.println(employeeec);if(employeeecService.updateEc(employeeec)==1){return RespBean.ok("添加成功");}return RespBean.error("失败");}}
package com.me.controller;import com.me.pojo.RespBean;
import com.me.service.FileService;
import com.me.util.MD5Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;import javax.servlet.http.HttpServletRequest;@RestController
public class FileController {@AutowiredFileService fileService;@Autowiredprivate StringRedisTemplate stringRedisTemplate;@PostMapping("/file/upload")public RespBean updateFile(MultipartFile file,int id) {System.out.println(id);System.out.println(MD5Util.getMultiFileMd5(file));if(fileService.uploadFile(file,id)){return RespBean.ok("上传成功");}return RespBean.error("图片过大或者格式不对");}@DeleteMapping("/file/{id}")public RespBean deleteById(@PathVariable int id){//        System.out.println(id);if(fileService.deleteById(id)){return RespBean.ok("删除成功");}return RespBean.error("删除失败");}@GetMapping("/file/getAll/{id}")public RespBean getAll(@PathVariable String id){return RespBean.ok("files-",fileService.getAllHrFiles(id));}@GetMapping("/file/getLoginHrId")public RespBean getHrId(HttpServletRequest request){String token = request.getHeader("token");String s = stringRedisTemplate.opsForValue().get("id"+token);return RespBean.ok("获取到用户id",s);}}
package com.me.controller;import com.me.pojo.Hr;
import com.me.pojo.RespBean;
import com.me.service.HrService;
import org.csource.fastdfs.StorageClient1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;import javax.servlet.http.HttpServletRequest;
import java.util.Map;@RestController
public class HrController {@Autowiredprivate StringRedisTemplate stringRedisTemplate;@Autowiredprivate HrService hrService;@GetMapping("/hr/getLoginUser")public RespBean getLoginUser(HttpServletRequest request){String token = request.getHeader("token");String s = stringRedisTemplate.opsForValue().get(token);
//        System.out.println("getLoginUser"+s);Hr hr = hrService.loadUserByUsername(s);return RespBean.ok("获取到用户",hr);}@PutMapping("/hr/pass")public RespBean updateHrPasswd(@RequestBody Map<String, Object> info,HttpServletRequest request) {String oldpass = (String) info.get("oldpass");String pass = (String) info.get("pass");Integer hrid = (Integer) info.get("hrid");System.out.println(hrid+pass);if (hrService.updateHrPasswd(oldpass, pass, hrid)) {//修改密码后需要重新登录String token = request.getHeader("token");Boolean b = stringRedisTemplate.delete(token);return RespBean.ok("更新成功!请重新登录!");}return RespBean.error("更新失败!");}@PutMapping("/hr/info")public RespBean updateHr(@RequestBody Hr hr) {if (hrService.updateHr(hr) == 1) {return RespBean.ok("更新成功!");}return RespBean.error("更新失败!");}@PostMapping("/hr/userface")public RespBean updateHrUserface(MultipartFile file, Integer id) {System.out.println("face    "+id);if(hrService.updateHrUserface(file,id)){return RespBean.ok("更新成功!");}return RespBean.error("图片过大或者格式不对");}}

五,项目总结

项目采用springboot+vue实现前后端分离的项目开发,功能简洁大方,另外使用了redis缓存数据库和oss分布式文件存储服务,是项目的一大亮点。

springboot+vue前后端分离实现企业人事管理系统相关推荐

  1. 基于springboot vue前后端分离的图书借阅管理系统源码

    请观看视频: 基于springboot vue前后端分离的图书借阅管理系统源码 <project xmlns="http://maven.apache.org/POM/4.0.0&qu ...

  2. springboot+vue前后端分离项目(后台管理系统

    2.注册页面这两个页面可以自由切换 3.root登录后的默认页面以及高亮显示 4.几个页面的展示 ![在这里插入图片描述](https://img-blog.csdnimg.cn/04b499bfbf ...

  3. springboot+vue前后端分离项目(后台管理系统)

    学习笔记 学习资源来自于B站UP,up他讲的非常详细,对于熟悉两大框架很有用. 我的作业源代码在文章末尾,欢迎有需要的同学,学习参考使用,内置SQL文件,导入后,开启springboot和vue服务即 ...

  4. 从0搭建一个Springboot+vue前后端分离项目(一)安装工具,创建项目

    从0搭建一个Springboot+vue前后端分离项目(二)使用idea进行页面搭建+页面搭建 参考学习vue官网文档 https://v3.cn.vuejs.org/guide/installati ...

  5. 基于SpringBoot+Vue前后端分离的在线教育平台项目

    基于SpringBoot+Vue前后端分离的在线教育平台项目 赠给有缘人,希望能帮助到你!也请不要吝惜你的大拇指,你的Star.点赞将是对我最大的鼓励与支持! 开源传送门: 后台:Gitee | Gi ...

  6. 网上书城 springboot vue前后端分离

    网上书城 springboot vue前后端分离 文章目录 网上书城 springboot vue前后端分离 前言 一.运行截图 二.pom文件 1.引入库 总结 前言 基于springboot vu ...

  7. 大二期末作孽(SpringBoot+Vue前后端分离博客社区(重构White Hole))

    文章目录 前言 目录 效果演示 前言 由于时间关系,完成度确实不高,而且不签只是完成了客户端,当然目前这样也是已经可以正常使用了,当然有点勉强.不过后续还是会不断的去更新维护的,不过大体的架构是这样的 ...

  8. SpringBoot + Vue前后端分离开发:全局异常处理及统一结果封装

    SpringBoot + Vue前后端分离开发:全局异常处理及统一结果封装 文章目录 SpringBoot + Vue前后端分离开发:全局异常处理及统一结果封装 前后端分离开发中的异常处理 统一结果封 ...

  9. SpringBoot+vue前后端分离博客项目

    SpringBoot+vue前后端分离博客项目 Java后端接口开发 1.前言 2.新建Springboot项目 3.整合mybatis plus 第一步:导入jar包 第二步:然后去写配置文件: 第 ...

  10. 适合新手拿来练习的springboot+vue前后端分离小Demo

    前言: 作者:神的孩子在歌唱 大家好,我叫智 练习springboot+vue前后端分离的Demo 一. 设计数据库 二 . springboot项目创建 2.1 基本配置 2.2 创建dao层 三. ...

最新文章

  1. leetcode-206 反转链表
  2. javascript运行机制之执行顺序详解
  3. 入门 IT 行业,该具备哪些技能?
  4. windows 文件对话框
  5. react.lazy 路由懒加载_Vue面试题: 如何实现路由懒加载?
  6. 可信云十年,重磅研究成果与2021云计算十大关键词悉数发布
  7. Spring容器创建流程(9)完成创建
  8. C#生成CHM文件(应用篇)之代码库编辑器(1)
  9. (转)巧用路由限制你的带宽(转自S.N.T安全小组)
  10. 吉林大学校园网linux客户端,吉林大学校园网认证客户端 v5.2.1 pc版
  11. 基于Nodejs+vue开发实现酒店管理系统
  12. Ubuntu下VSCode使用等宽字体设置
  13. 使用prometheus+grafana监控k8s集群
  14. PDF怎么拆分,PDF拆分技巧
  15. 槃星—第1天任务—植物大战僵尸游戏数据修改(Hex Editor Neo)
  16. 华三交换机 RRPP V7版本
  17. FireStart教程:基于SharePoint的出差报销流程三
  18. 30用一个例子解释mapping到底是什么
  19. 【STM32H7教程】第87章 STM32H7的SDMMC总线基础知识和HAL库API
  20. ubuntu15.10下安装wifi破解软件minidwep-gtk

热门文章

  1. android dff播放器,无损音乐解码播放器
  2. Greenplum字段拼接
  3. 面试被问到HashMap 底层原理?看完这边文章绝对不慌!
  4. 讲解UCOSII嵌入式操作系统的任务调度策略
  5. USB Repair v8.1.3.1285 – USB 修复工具
  6. 微信小程序调查问卷避坑
  7. 【第十届泰迪杯B题电力负荷预测代码】
  8. GDI简单绘图(二)- 绘制验证码
  9. 概率图模型(PGM):贝叶斯网(Bayesian network)初探
  10. 故障树分析法(FTA)