基于springboot的工资管理系统

博主主页猫头鹰源码

博主简介:Java领域优质创作者、CSDN博客专家、公司架构师、全网粉丝5万+、专注Java技术领域和毕业设计项目实战

主要内容:毕业设计(Javaweb项目|小程序等)、简历模板、学习资料、面试题库、技术咨询

文末联系获取

项目介绍: 

本系统原创项目,采用springboot框架,数据层采用mybatis,数据库使用mysql,适合选题:工资、工资管理等。

项目功能:

本系统是一个管理系统,主要分为两个角色,分别为管理员、员工,不同角色的功能如下:

登录注册:管理员和员工分别有不同的登录注册页面

个人信息:员工登录后,可以在个人信息管理中修改自己的信息。

员工管理:管理员可以进入新增员工,也可以修改或者删除员工信息,员工注册后也会将信息写入员工表中。

部门管理:这是管理员维护部门的界面,管理员可以增删改查部门信息。

工资管理:管理员登录后,可以下发每个人的工资信息,员工登录后进入工资管理,可以查看自己的工资情况。

请假管理:管理员进行查看审批,员工可以申请请假

考勤打卡:管理员查看考勤情况,员工可以进行考勤

统计管理:主要对每个员工的工资进行统计,以及对部门人数统计。

管理员管理:主要是管理员维护管理员的页面。

系统包含技术:

技术:springboot,mybatis,前端框架h-ui
开发工具:eclipse,idea都可运行
数据库:mysql 5.7
JDK版本:jdk1.8

部分截图说明:

下面是登录页面

管理员首页

管理员对员工进行维护

 管理员工资管理

 管理员请假审批

管理员考勤打卡

管理员查看部门人数统计

管理员个人工资查看

员工登录

员工查看工资

员工考勤打卡

员工请假申请

部分代码:

员工操作

 @Autowired(required=false)     private DepartmentService departmentService;      /*      * @description: 跳转到首页      * @param request      * @param model      * @return: java.lang.String      * @author: mty      * @time: 2020/02/03 23:08      */     @RequestMapping("/employIndex")     public String employIndex(HttpServletRequest request,Model model) throws Exception{         HttpSession session = request.getSession();         if(session.getAttribute("name") == null || session.getAttribute("password") == null){             session.setAttribute("msg", "对不起,请登录!");             return "common/adminLogin";         }         String name = session.getAttribute("name").toString();         String password = session.getAttribute("password").toString();         List<Employ> employList = employService.queryByAll();         int total = employList.size();         model.addAttribute("employList", employList);         model.addAttribute("total", total);         model.addAttribute("name", name);         model.addAttribute("password", password);         return "employ/index";     }      /*      * @description: 员工进入跳转到首页      * @param request      * @param model      * @return: java.lang.String      * @author: mty      * @time: 2020/02/03 23:08      */     @RequestMapping("/employIndex1")     public String employIndex1(HttpServletRequest request,Model model) throws Exception{         HttpSession session = request.getSession();         if(session.getAttribute("name") == null || session.getAttribute("password") == null){             session.setAttribute("msg", "对不起,请登录!");             return "common/adminLogin";         }         String name = session.getAttribute("name").toString();         String password = session.getAttribute("password").toString();         Employ ee = employService.queryByOne(name,password);         List<Employ> employList = new ArrayList<Employ>();         employList.add(ee);         int total = employList.size();         model.addAttribute("employList", employList);         model.addAttribute("total", total);         model.addAttribute("name", name);         model.addAttribute("password", password);         return "employ/index1";     }       /*      * @description:进入修改      * @param id      * @param model      * @return: org.springframework.web.servlet.ModelAndView      * @author: mty      * @time: 2020/02/03 23:10      */     @RequestMapping("/employEdit/{id}")     public ModelAndView  employEdit(@PathVariable("id") String id,Model model) throws Exception{         ModelAndView mv = new ModelAndView();         Employ employ = employService.queryById(id);         List<Department> departmentList = departmentService.queryByAll();         model.addAttribute("employ", employ);         model.addAttribute("departmentList", departmentList);         mv.setViewName("employ/edit");         return mv;     }      /*      * @description:确认修改      * @param employ      * @param model      * @param request      * @return: java.lang.String      * @author: mty      * @time: 2020/02/03 23:11      */     @RequestMapping("/employEditSubmit")     public String  employEditSubmit(Employ employ,Model model,HttpServletRequest request) throws Exception{         try{             Department d = departmentService.queryById(employ.getDepartmentid());             employ.setDepartment(d.getName());             employService.update(employ);             request.setAttribute("msg", "修改成功!");             return "employ/edit";         }catch (Exception e){             request.setAttribute("msg", "修改失败!");             return "employ/edit";         }     }      /*      * @description:进入添加      * @param model      * @param request      * @return: java.lang.String      * @author: mty      * @time: 2020/02/03 23:11      */     @RequestMapping("/employAdd")     public String  employAdd(Model model,HttpServletRequest request) throws Exception{         List<Department> departmentList = departmentService.queryByAll();         model.addAttribute("departmentList", departmentList);         return "employ/add";     }       /*      * @description:确认增加      * @param employ      * @param model      * @param request      * @return: java.lang.String      * @author: mty      * @time: 2020/02/03 23:12      */     @RequestMapping("/employAddSub")     public String  employAddSub(Employ employ,Model model,HttpServletRequest request) throws Exception{         try{             HttpSession session = request.getSession();             if(session.getAttribute("name") == null || session.getAttribute("id") == null){                 session.setAttribute("msg", "对不起,请登录!");                 return "common/adminLogin";             }             Department d = departmentService.queryById(employ.getDepartmentid());             employ.setDepartment(d.getName());             employService.addSelect(employ);             request.setAttribute("msg", "添加成功!");             return "employ/add";         }catch (Exception e){             request.setAttribute("msg", "添加失败!");             return "employ/add";         }     }      /*      * @description:根据ID删除      * @param id      * @param reuqest      * @param model      * @return: org.springframework.web.servlet.ModelAndView      * @author: mty      * @time: 2020/02/03 23:12      */     @RequestMapping("/employDel/{id}")     public ModelAndView employDel(@PathVariable("id") String id,HttpServletRequest reuqest, Model model) throws Exception{         ModelAndView mv = new ModelAndView();         employService.deleteById(id);         mv.setViewName("employ/index");         return mv;     }       /*      * @description:统计每个部门人数      * @author: mty      * @time: 2020/02/03 23:12      */     @RequestMapping("/employStatic")     public ModelAndView employStatic(Model model) throws Exception{         ModelAndView mv = new ModelAndView();         List<Employ> list = employService.queryStatic();         List<Department> de = departmentService.queryByAll();         for(int i=0;i<de.size();i++){             boolean flag = true;             for(int j = 0;j<list.size();j++){                 if(de.get(i).getId().equals(list.get(j).getDepartmentid())){                     flag = false;                 }             }             if(flag){                 Employ employs = new Employ();                 employs.setDepartment(de.get(i).getName());                 employs.setDepartmentid(de.get(i).getId());                 employs.setCount(0);                 list.add(employs);             }         }         List<Integer> data = new ArrayList<Integer>();         List<String> str = new ArrayList<String>();         for(int i = 0;i<list.size();i++){             data.add(list.get(i).getCount());             str.add(list.get(i).getDepartment());         }         model.addAttribute("data", data);         model.addAttribute("str", str);         model.addAttribute("size", list.size());         mv.setViewName("static/index");         return mv;     } 

员工登录

 /*      * @description:员工登录校验      * @param name      * @param password      * @param type      * @param request      * @return: org.springframework.web.servlet.ModelAndView      * @author: mty      * @time: 2020/02/03 11:22      */     @RequestMapping("/employSubmit")     public ModelAndView studentSubmit(String name, String password,HttpServletRequest request) throws Exception{         HttpSession session = request.getSession();         ModelAndView modelAndView = new ModelAndView();         Employ list = employService.queryByOne(name,password);         if(list == null) {             request.setAttribute("msg", "对不起,用户不存在,请重试!");             modelAndView.setViewName("common/login");             return modelAndView;         }else {             Employ employ = list;             List<Employ> elist = employService.queryByAll();             for(int i=0;i<elist.size();i++){                 if( !(employ.getName().equals(elist.get(i).getName()) && employ.getPassword().equals(elist.get(i).getPassword()))){                     if(employ.getNo().equals(elist.get(i).getNo())){                         request.setAttribute("msg", "对不起,工号重复,请重试!");                         modelAndView.setViewName("common/login");                         return modelAndView;                     }                 }             }             session.setAttribute("name", name);             session.setAttribute("id", employ.getId());             session.setAttribute("no", employ.getNo());             session.setAttribute("password", password);             session.setAttribute("department", employ.getDepartment());             session.setAttribute("image", employ.getImage());             modelAndView.setViewName("index1");             return modelAndView;         }     } 

以上就是部分功能展示,从整体上来看,本系统功能是十分完整的,界面设计简洁大方,交互友好,数据库设计也很合理,规模适中,代码工整,清晰,适合学习使用。

好了,今天就到这儿吧,小伙伴们点赞、收藏、评论,一键三连走起呀,下期见~~

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
基于Spring Boot的工资管理系统是一个开源项目,托管在GitHub上。 该项目的目的是帮助企业管理部门更简便地进行工资管理和薪资发放。使用Spring Boot作为后端框架,采用MVC架构进行开发,数据库使用MySQL进行存储。 该系统具有以下特点: 1. 前后端分离:采用前后端分离的架构,前端使用Vue.js进行开发,后端使用Spring Boot提供API接口,并使用Swagger进行接口文档管理。 2. 用户管理:支持管理员对用户进行管理,包括用户的新增、删除、修改以及权限的分配等操作。 3. 工资计算:系统能够根据预设的工资结构和薪资规则,自动计算员工的工资,并生成相应的工资单。 4. 薪资发放:管理员可以根据计算得出的工资单,选择批量发放薪资,系统会自动生成相应的发放记录。 5. 数据分析:系统提供了一些数据分析功能,管理员可以通过图表、报表等形式查看工资发放情况、部门薪资比较、员工薪资排名等信息,帮助企业进行薪资管理决策。 通过GitHub托管该项目,可以方便其他开发者参与贡献代码,提出问题和改进建议,以及让更多企业能够免费使用该系统,并根据自身需求灵活调整和定制功能。 总之,基于Spring Boot的工资管理系统是一个功能齐全、易于使用和开放的工资管理解决方案,通过GitHub的托管,能够让更多开发者参与和使用该系统,从而帮助企业提高工资管理的效率和准确性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值