人事管理系统|基于springboot人事管理系统的设计与实现(附项目源码+论文)

基于springboot人事管理系统的设计与实现

目录

基于springboot人事管理系统的设计与实现

一、摘要

二、相关技术

三、系统设计

3.1 整体功能结构图

3.2 功能具体细节设计

四、数据库设计 

五、核心代码 

六、论文参考 

七、源码获取:


一、摘要

传统信息的管理大部分依赖于管理人员的手工登记与管理,然而,随着近些年信息技术的迅猛发展,让许多比较老套的信息管理模式进行了更新迭代,问卷信息因为其管理内容繁杂,管理数量繁多导致手工进行处理不能满足广大用户的需求,因此就应运而生出相应的人事管理系统。

本人事管理系统分为管理员还有用户两个权限,管理员可以管理用户的基本信息内容,可以管理公告信息以及公告的租赁信息,能够与用户进行相互交流等操作,用户可以查看问卷信息,可以查看公告以及查看管理员回复信息等操作。

该人事管理系统采用的是WEB应用程序开发中最受欢迎的B/S三层结构模式,使用占用空间小但功能齐全的MySQL数据库进行数据的存储操作,系统开发技术使用到了JSP技术。该人事管理系统能够解决许多传统手工操作的难题,比如数据查询耽误时间长,数据管理步骤繁琐等问题。总的来说,人事管理系统性能稳定,功能较全,投入运行使用性价比很高。

关键词:人事管理系统;MySQL数据库;springBoot相关技术

二、相关技术


java、tomcat、mysql、spring、sprigBoot、mybatis、query、vue


三、系统设计

3.1 整体功能结构图:

管理员可以管理用户的基本信息,可以管理等功能。管理员功能结构图如下


3.2 功能具体细节设计:

(1)问卷列表

如图显示的就是问卷列表页面,此页面提供给管理员的功能有:查看问卷、新增问卷、修改问卷、删除问卷等。

(2)公告信息管理 

管理员可以对公告信息进行管理,可以新增公告信息,修改公告信息,删除无效的公告信息。公告信息管理界面如图所示。

(3)公告类型管理 

公告类型管理页面显示所有公告类型,在此页面既可以让管理员添加新的公告信息类型,也能对已有的公告类型信息执行编辑更新,失效的公告类型信息也能让管理员快速删除。下图就是公告类型管理页面。公告类型管理界面如图所示。

四、数据库设计 

(1)下图是请假实体和其具备的属性。

(2)下图是考试记录表实体和其具备的属性。

 

(3)下图是答题详情表实体和其具备的属性。

 

(4)下图是员工实体和其具备的属性。

 

(5)下图是错题表实体和其具备的属性。

 

更多图略.... 

五、核心代码 


package com.controller;import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;/*** 错题表* 后端接口* @author* @email
*/
@RestController
@Controller
@RequestMapping("/examrewrongquestion")
public class ExamrewrongquestionController {private static final Logger logger = LoggerFactory.getLogger(ExamrewrongquestionController.class);@Autowiredprivate ExamrewrongquestionService examrewrongquestionService;@Autowiredprivate TokenService tokenService;@Autowiredprivate DictionaryService dictionaryService;//级联表service@Autowiredprivate ExampaperService exampaperService;@Autowiredprivate ExamquestionService examquestionService;@Autowiredprivate YonghuService yonghuService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永不会进入");else if("员工".equals(role))params.put("yonghuId",request.getSession().getAttribute("userId"));if(params.get("orderBy")==null || params.get("orderBy")==""){params.put("orderBy","id");}PageUtils page = examrewrongquestionService.queryPage(params);//字典表数据转换List<ExamrewrongquestionView> list =(List<ExamrewrongquestionView>)page.getList();for(ExamrewrongquestionView c:list){//修改对应字典表字段dictionaryService.dictionaryConvert(c, request);}return R.ok().put("data", page);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id, HttpServletRequest request){logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);ExamrewrongquestionEntity examrewrongquestion = examrewrongquestionService.selectById(id);if(examrewrongquestion !=null){//entity转viewExamrewrongquestionView view = new ExamrewrongquestionView();BeanUtils.copyProperties( examrewrongquestion , view );//把实体数据重构到view中//级联表ExampaperEntity exampaper = exampaperService.selectById(examrewrongquestion.getExampaperId());if(exampaper != null){BeanUtils.copyProperties( exampaper , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段view.setExampaperId(exampaper.getId());}//级联表ExamquestionEntity examquestion = examquestionService.selectById(examrewrongquestion.getExamquestionId());if(examquestion != null){BeanUtils.copyProperties( examquestion , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段view.setExamquestionId(examquestion.getId());}//级联表YonghuEntity yonghu = yonghuService.selectById(examrewrongquestion.getYonghuId());if(yonghu != null){BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段view.setYonghuId(yonghu.getId());}//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put("data", view);}else {return R.error(511,"查不到数据");}}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody ExamrewrongquestionEntity examrewrongquestion, HttpServletRequest request){logger.debug("save方法:,,Controller:{},,examrewrongquestion:{}",this.getClass().getName(),examrewrongquestion.toString());String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永远不会进入");else if("员工".equals(role))examrewrongquestion.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));Wrapper<ExamrewrongquestionEntity> queryWrapper = new EntityWrapper<ExamrewrongquestionEntity>().eq("yonghu_id", examrewrongquestion.getYonghuId()).eq("exampaper_id", examrewrongquestion.getExampaperId()).eq("examquestion_id", examrewrongquestion.getExamquestionId()).eq("examredetails_myanswer", examrewrongquestion.getExamredetailsMyanswer());logger.info("sql语句:"+queryWrapper.getSqlSegment());ExamrewrongquestionEntity examrewrongquestionEntity = examrewrongquestionService.selectOne(queryWrapper);if(examrewrongquestionEntity==null){examrewrongquestion.setInsertTime(new Date());examrewrongquestion.setCreateTime(new Date());examrewrongquestionService.insert(examrewrongquestion);return R.ok();}else {return R.error(511,"表中有相同数据");}}/*** 后端修改*/@RequestMapping("/update")public R update(@RequestBody ExamrewrongquestionEntity examrewrongquestion, HttpServletRequest request){logger.debug("update方法:,,Controller:{},,examrewrongquestion:{}",this.getClass().getName(),examrewrongquestion.toString());String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");
//        else if("员工".equals(role))
//            examrewrongquestion.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));//根据字段查询是否有相同数据Wrapper<ExamrewrongquestionEntity> queryWrapper = new EntityWrapper<ExamrewrongquestionEntity>().notIn("id",examrewrongquestion.getId()).andNew().eq("yonghu_id", examrewrongquestion.getYonghuId()).eq("exampaper_id", examrewrongquestion.getExampaperId()).eq("examquestion_id", examrewrongquestion.getExamquestionId()).eq("examredetails_myanswer", examrewrongquestion.getExamredetailsMyanswer());logger.info("sql语句:"+queryWrapper.getSqlSegment());ExamrewrongquestionEntity examrewrongquestionEntity = examrewrongquestionService.selectOne(queryWrapper);if(examrewrongquestionEntity==null){examrewrongquestionService.updateById(examrewrongquestion);//根据id更新return R.ok();}else {return R.error(511,"表中有相同数据");}}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Integer[] ids){logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());examrewrongquestionService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 批量上传*/@RequestMapping("/batchInsert")public R save( String fileName, HttpServletRequest request){logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");try {List<ExamrewrongquestionEntity> examrewrongquestionList = new ArrayList<>();//上传的东西Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段Date date = new Date();int lastIndexOf = fileName.lastIndexOf(".");if(lastIndexOf == -1){return R.error(511,"该文件没有后缀");}else{String suffix = fileName.substring(lastIndexOf);if(!".xls".equals(suffix)){return R.error(511,"只支持后缀为xls的excel文件");}else{URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径File file = new File(resource.getFile());if(!file.exists()){return R.error(511,"找不到上传文件,请联系管理员");}else{List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件dataList.remove(0);//删除第一行,因为第一行是提示for(List<String> data:dataList){//循环ExamrewrongquestionEntity examrewrongquestionEntity = new ExamrewrongquestionEntity();
//                            examrewrongquestionEntity.setYonghuId(Integer.valueOf(data.get(0)));   //员工id 要改的
//                            examrewrongquestionEntity.setExampaperId(Integer.valueOf(data.get(0)));   //问卷(外键) 要改的
//                            examrewrongquestionEntity.setExamquestionId(Integer.valueOf(data.get(0)));   //试题id(外键) 要改的
//                            examrewrongquestionEntity.setExamredetailsMyanswer(data.get(0));                    //考生作答 要改的
//                            examrewrongquestionEntity.setInsertTime(date);//时间
//                            examrewrongquestionEntity.setCreateTime(date);//时间examrewrongquestionList.add(examrewrongquestionEntity);//把要查询是否重复的字段放入map中}//查询是否重复examrewrongquestionService.insertBatch(examrewrongquestionList);return R.ok();}}}}catch (Exception e){e.printStackTrace();return R.error(511,"批量插入数据异常,请联系管理员");}}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));// 没有指定排序字段就默认id倒序if(StringUtil.isEmpty(String.valueOf(params.get("orderBy")))){params.put("orderBy","id");}PageUtils page = examrewrongquestionService.queryPage(params);//字典表数据转换List<ExamrewrongquestionView> list =(List<ExamrewrongquestionView>)page.getList();for(ExamrewrongquestionView c:list)dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段return R.ok().put("data", page);}/*** 前端详情*/@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id, HttpServletRequest request){logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);ExamrewrongquestionEntity examrewrongquestion = examrewrongquestionService.selectById(id);if(examrewrongquestion !=null){//entity转viewExamrewrongquestionView view = new ExamrewrongquestionView();BeanUtils.copyProperties( examrewrongquestion , view );//把实体数据重构到view中//级联表ExampaperEntity exampaper = exampaperService.selectById(examrewrongquestion.getExampaperId());if(exampaper != null){BeanUtils.copyProperties( exampaper , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段view.setExampaperId(exampaper.getId());}//级联表ExamquestionEntity examquestion = examquestionService.selectById(examrewrongquestion.getExamquestionId());if(examquestion != null){BeanUtils.copyProperties( examquestion , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段view.setExamquestionId(examquestion.getId());}//级联表YonghuEntity yonghu = yonghuService.selectById(examrewrongquestion.getYonghuId());if(yonghu != null){BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段view.setYonghuId(yonghu.getId());}//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put("data", view);}else {return R.error(511,"查不到数据");}}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody ExamrewrongquestionEntity examrewrongquestion, HttpServletRequest request){logger.debug("add方法:,,Controller:{},,examrewrongquestion:{}",this.getClass().getName(),examrewrongquestion.toString());Wrapper<ExamrewrongquestionEntity> queryWrapper = new EntityWrapper<ExamrewrongquestionEntity>().eq("yonghu_id", examrewrongquestion.getYonghuId()).eq("exampaper_id", examrewrongquestion.getExampaperId()).eq("examquestion_id", examrewrongquestion.getExamquestionId()).eq("examredetails_myanswer", examrewrongquestion.getExamredetailsMyanswer());logger.info("sql语句:"+queryWrapper.getSqlSegment());ExamrewrongquestionEntity examrewrongquestionEntity = examrewrongquestionService.selectOne(queryWrapper);if(examrewrongquestionEntity==null){examrewrongquestion.setInsertTime(new Date());examrewrongquestion.setCreateTime(new Date());examrewrongquestionService.insert(examrewrongquestion);return R.ok();}else {return R.error(511,"表中有相同数据");}}}


六、论文参考 

七、源码获取:

 点赞、收藏、关注、评论啦。有任何问题欢迎咨询

👇🏻获取联系方式在文章末尾👇🏻

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/779666.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

C# 异步与 Unity 协程(实例讲解)

C#异步编程实例&#xff1a; 假设我们有一个需要从Web获取数据的简单应用。我们可以使用C#的异步编程模型来避免UI线程被HTTP请求阻塞 1using System.Net.Http; 2using System.Threading.Tasks; 3 4public class AsyncExample 5{ 6 public async Task<string> Fetch…

【ripro美化】全站美化包WordPress RiPro主题二开美化版sucaihu-childV1.9(功能集成到后台)

使用介绍 1、【宝塔】删除ripro文件&#xff0c;上传最新ripro版本&#xff0c;然后上传压缩包内的ripro里面的对应文件到ripro主题对应内覆盖&#xff08;找到对应路径单个文件去覆盖&#xff09;。 2、然后上传ripro-chlid子主题美化包到/wp-content/themes路径下 3、注意顺…

蓝桥杯---蜗牛【动态规划典型题目】

题目链接&#xff1a;蜗牛 import java.util.*;public class Main {public static void main(String[] args) {Scanner scannernew Scanner(System.in);int nscanner.nextInt();int[] xnew int[n1];for(int i1;i<n;i){x[i]scanner.nextInt();}int[] anew int[n1];int[] bnew…

npm卸载不掉的解决方案

不管怎么重装重启都报错 真服了&#xff0c;npm卸载不掉绝对是有缓存存在&#xff0c;用where npm查到d盘 实际上根本不在这个地方&#xff0c;这个是我安装的6.14.12版本的npm的地方&#xff0c;我说我怎么怎么重装怎么导包都不行呢&#xff0c;偷偷隐藏在这个目录里面&#…

【代码随想录算法训练营第三十九天 | LeetCode62.不同路径、63. 不同路径 II】

代码随想录算法训练营第三十九天 | LeetCode62.不同路径、63. 不同路径 II 一、62.不同路径 解题代码C&#xff1a; class Solution { public:int uniquePaths(int m, int n) {vector<vector<int>> dp(m, vector<int>(n, 0));for (int i 0; i < m; i) …

GRE_MGRE综合实验

目录 1、R5为ISP&#xff0c;只能进行IP地址配置&#xff0c;其所有地址均配为公有IP地址。 IP配置 配置公网全网通 2、&#xff08;1&#xff09;R1和R5间使用PPP的PAP认证&#xff0c;R5为主认证方。 PAP认证 &#xff08;2&#xff09;R2与R5之间使用ppp的CHAP认证&am…

如何修改IDEA的代码样式配置+代码格式化快捷键配置

目录 问题现象&#xff1a; 问题分析&#xff1a; 温馨提示&#xff1a; 1、IDEA的代码样式配置 1.1、Use tab character - Smart tabs 配置&#xff1a; 1.2、Tab Size 配置&#xff1a; 1.3、Indent 配置&#xff1a; 1.4、Continuation Indent 配置 1.5、应用并保存 2、…

openstack 不能调度到某主机上分析

dashboard显示有足够资源创建虚拟机 创建一个1c2g20g配置的虚拟机&#xff0c;在过滤时把10-197-0-2这个主机过滤掉了&#xff0c;日志如下&#xff1a; 2024-03-25 17:52:14.087 26 DEBUG nova.scheduler.filters.disk_filter [req-8f2f32fb-1efe-4e5d-81fc-618210c7c76d 773…

【LeetCode: 面试题 16.05. 阶乘尾数 + 阶乘】

&#x1f680; 算法题 &#x1f680; &#x1f332; 算法刷题专栏 | 面试必备算法 | 面试高频算法 &#x1f340; &#x1f332; 越难的东西,越要努力坚持&#xff0c;因为它具有很高的价值&#xff0c;算法就是这样✨ &#x1f332; 作者简介&#xff1a;硕风和炜&#xff0c;…

俄罗斯深陷芯片自主困境,良率仅5成 |百能云芯

俄罗斯的芯片产业一直以来都面临着诸多挑战&#xff0c;尤其是在当前的国际形势下&#xff0c;这些挑战更加凸显。随着俄乌冲突的爆发&#xff0c;西方国家对俄罗斯实施了一系列经济制裁&#xff0c;导致俄罗斯科技产业受到了严重影响。据了解&#xff0c;俄国最大的本土芯片厂…

Redis的数据类型String使用场景实战

Redis的数据类型String使用场景实战 String模型的使用场景 常见面试题&#xff1a;redis在你们项目是怎么使用的&#xff1f;String类型说一个&#xff0c;还有其他用处没&#xff1f; 知识回顾 // 获取redis的key为 WATCH_KEEPER_PREFIX "wka" 的值String wka …

Ubuntu修改自启动软件或程序

Ubuntu修改自启动软件或程序 在编译程序的时候发现速度很慢&#xff0c;查找发现自启动选项太多&#xff0c;cpu占用率越来越高&#xff0c;现在进行查询并修改权限。 1、查找当前进程 top2、选择相对于的服务查找是否自启动设置 systemctl list-unit-files该指令用以下显示…

关于style/class的几种写法

一. style写法 1. <div :style"{ width: 13px, height: 13px, borderRadius: 50%, backgroundColor: this.dataObj.status red ? red : this.dataObj.status yellow ? yellow : this.dataObj.status green ? #1eab75 : }"></div> 2. <div :st…

[Java、Android面试]_14_Retrofit的作用

本人今年参加了很多面试&#xff0c;也有幸拿到了一些大厂的offer&#xff0c;整理了众多面试资料&#xff0c;后续还会分享众多面试资料。 整理成了面试系列&#xff0c;由于时间有限&#xff0c;每天整理一点&#xff0c;后续会陆续分享出来&#xff0c;感兴趣的朋友可关注收…

二维数组中a[0] 和 a[0]的区别

在C语言中&#xff0c;二维数组是以连续内存块的形式存储的&#xff0c;其中每个元素都是数组。让我们来看看a[0]和&a[0]的区别&#xff1a; a[0]&#xff1a;这表示二维数组的第一个元素&#xff0c;也就是第一行的地址。在内存中&#xff0c;它代表的是第一行的起始地址。…

Qt使用事件过滤器

自己使用事件过滤器的总结 1、应用给事件管理器分发事件&#xff0c;事件管理器根据事件类别将事件发给对应的类。 2、事件过滤器在应用和事件管理器之间拦截事件派发给事件管理器的事件&#xff0c; 这个操作会给事件过滤器传递两个参数&#xff0c;一个是Object&#xff08;…

基于Arduino IDE 野火ESP8266模块 MQTT 的开发

一、库介绍 Arduino常用的MQTT库主要有PubSubClient。  PubSubClient库是一个广泛使用的MQTT客户端库&#xff0c;它基于MQTT 3.1.1版本&#xff0c;并且支持ESP8266和ESP32等Arduino兼容的硬件平台。PubSubClient库允许Arduino设备连接到MQTT服务器&#xff0c;发布和订阅MQT…

【每日算法】dfs解决迷宫问题

迷宫问题是比较基础的dfs类型算法题。主要是针对起点和终点来求解最小行走路径 这样的题目肯定是要有回溯过程&#xff0c;因为每一个节点&#xff0c;不是只走一个方向&#xff0c;是四个方向都要走到&#xff0c;才能够知道最终能否走到终点。这样的题目dfs基本框架就是&…

微信公众号新人欢迎语消息推送

问题记录 1.使用的vue2 对象新增属性不具备响应性 this.$set(item, miniTitle, item.title) this.$set(item, miniPagepath, item.pagepath) 2.使用wangeidtor4.6.0富文本组件&#xff0c;富文本组件更改后&#xff0c;值不会马上双绑到自己的值上面 使用onchange进行绑定 …

芒果YOLOv5改进87:轻量化检测头篇:LiteShiftHead 独家原创检测头 | 即插即用,大幅减少参数量,轻量化的同时精度更高效涨点,全网独家改进

💡本篇内容:芒果YOLOv5改进87:轻量化检测头篇:LiteShiftHead 独家原创检测头 | 即插即用,独家新颖更新,大幅减少参数量,轻量化的同时精度高效涨点,全网独家 芒果专栏提出多种原创的轻量化检测头 LiteShiftHead 结构,改进源码教程 | 详情如下🥇 同时本文将演示说清楚二…