基于java+ssm+jsp的企业人事管理系统

项目介绍

进入信息时代以来,很多数据都需要配套软件协助处理,这样可以解决传统方式带来的管理困扰。比如耗时长,成本高,维护数据困难,数据易丢失等缺点。本次使用数据库工具MySQL和编程技术SSM开发的企业人事管理系统,可以实现目标用户群需要的功能,包括考勤管理,奖惩管理,薪资管理,培训管理,系统公告管理等功能。

总之,企业人事管理系统是基于计算机进行数据的处理,则可以短时间内批量完成数据的管理,就连基本的数据录入,更改错误的数据,统计数据等操作要求都可以轻松完成,这样的系统的运用可以减少很多繁琐的工作量,让数据的管理人员提升效率,节省数据处理投入的资金和时间。同时,企业人事管理系统本身就有配套的数据库,用于保存系统的后台数据,对于数据保存的容量则是传统模式不能相比的,在数据安全性上,也有相应的加密技术提供保护,所以数据泄露和被人窃取都不是易事。

.2功能模块设计
下图为管理员的功能设计,管理员管理所有权限的用户资料,管理考勤,培训,薪资,奖惩等资料。
在这里插入图片描述
下图为总经理的功能设计,总经理管理部门主管和员工的考勤信息,奖惩与薪资信息等。
在这里插入图片描述

下图为部门主管的功能设计,部门主管参与上下班打卡,管理员工的考勤和薪资以及奖惩信息。
在这里插入图片描述
下图为员工的功能设计,员工参与上下班打卡,查看自己的奖惩,薪资以及培训信息。
在这里插入图片描述

开发环境

编程语言:Java
数据库 :Mysql
系统架构:B/S
后端框架:SSM
编译工具:idea或者eclipse,jdk1.8,maven
支持定做:java/php/python/android/小程序ue/爬虫/c#/asp.net

系统实现

5.1.1 用户管理
管理用户是管理员的功能。其运行效果图如下。这里的用户包括总经理,部门主管,员工,他们的资料都需要管理员来管理。
在这里插入图片描述

图5.1 用户管理页面

5.1.2 考勤管理
管理考勤是管理员的功能。其运行效果图如下。管理员查看所有人员的考勤打卡信息,包括上班打卡,下班打卡信息。
在这里插入图片描述

图5.2 考勤管理页面

5.1.3 培训管理
管理培训信息是管理员的功能。其运行效果图如下。本模块主要让管理员查看所有人员的培训信息。
在这里插入图片描述

图5.3 培训管理页面

5.2 总经理功能实现
5.2.1 奖惩管理
管理奖惩信息是总经理的功能。其运行效果图如下。总经理添加奖惩信息,查看部门主管和员工的奖惩信息。
在这里插入图片描述

图5.4 奖惩管理页面

5.2.2 薪资管理
管理薪资是总经理的功能。其运行效果图如下。总经理添加薪资信息,查看部门主管和员工的每月薪资。
在这里插入图片描述

图5.5 薪资管理页面

5.3 部门主管功能实现
5.3.1 考勤管理
管理员工的考勤信息是部门主管的功能。其运行效果图如下。部门主管可以参与上下班打卡,可以查看自己的考勤打卡信息。
在这里插入图片描述

图5.6 考勤管理页面

5.3.2 奖惩管理
管理员工的奖惩信息是部门主管的功能。其运行效果图如下。部门主管能够新增员工的奖惩信息,可以查看部门员工的奖惩信息。
在这里插入图片描述

图5.7 奖惩管理页面

5.3.3 系统公告管理
管理系统公告是部门主管的功能。其运行效果图如下。部门主管可以发布系统公告,对系统公告信息进行修改,查看和删除。
在这里插入图片描述

图5.8 系统公告管理页面

5.4 员工功能实现
5.4.1 培训查看
查看培训信息是员工的功能。其运行效果图如下。员工可以在自己的后台查询培训信息,查看属于自己的培训详细信息。
在这里插入图片描述

图5.9 培训查看页面

5.4.2 薪资查看
查看薪资是员工的功能。其运行效果图如下。员工在当前页面只能查询薪资,查看自己的薪资明细。
在这里插入图片描述

图5.10 薪资查看页面

5.4.3 考勤管理
管理个人的考勤信息是员工的功能。其运行效果图如下。员工参与上下班打卡,可以查询考勤记录信息。
在这里插入图片描述

图5.11 考勤管理页面

核心代码

package com.controller;


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.StringUtil;
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.CultivateEntity;

import com.service.CultivateService;
import com.entity.view.CultivateView;
import com.service.YonghuService;
import com.entity.YonghuEntity;
import com.utils.PageUtils;
import com.utils.R;

/**
 * 培训
 * 后端接口
 * @author
 * @email
 * @date
*/
@RestController
@Controller
@RequestMapping("/cultivate")
public class CultivateController {
    private static final Logger logger = LoggerFactory.getLogger(CultivateController.class);

    @Autowired
    private CultivateService cultivateService;


    @Autowired
    private TokenService tokenService;
    @Autowired
    private DictionaryService dictionaryService;


    //级联表service
    @Autowired
    private 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"));
        YonghuEntity yonghuEntity = yonghuService.selectById((Integer) request.getSession().getAttribute("userId"));
        if(role == null || "".equals(role) ){
            return R.error(511,"您没有权限查看");
        }else if (yonghuEntity == null ){
            return R.error(511,"当前登录账户为空");
        }else if ("员工".equals(role)){//员工只能查看自己的
            params.put("yonghuId",request.getSession().getAttribute("userId"));
        }else if ("部门主管".equals(role)){//主管可以查看当前部门下员工的
            Integer bumenTypes = yonghuEntity.getBumenTypes();
            params.put("roleTypes",1);//部门主管只能查看员工列表
            params.put("bumenTypes",bumenTypes);//部门主管只能查看当前部门列表
        }else if ("总经理".equals(role)){
            params.put("roleTypes1111",1);//总经理不能查看总经理的
        }
        //管理员能查看全部

        params.put("orderBy","id");
		PageUtils page = cultivateService.queryPage(params);


        //字典表数据转换
		List<CultivateView> list =(List<CultivateView>)page.getList();

        if ("部门主管".equals(role)){//主管需要查看自己的培训
		List<CultivateEntity> list1 = cultivateService.selectList(new EntityWrapper<CultivateEntity>().eq("yonghu_id", request.getSession().getAttribute("userId")));//查询当前用户的培训
            for(CultivateEntity l:list1){
                CultivateView view = new CultivateView();
                BeanUtils.copyProperties( l , view);//把entity封装在view中
                BeanUtils.copyProperties( yonghuEntity , view ,new String[]{ "id", "createDate"});//把用户信息封装在view中
                list.add(view);//放入list中
            }
        }
        for(CultivateView c:list){
            dictionaryService.dictionaryConvert(c);
        }
        return R.ok().put("data", page);
    }
    /**
    * 后端详情
    */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        CultivateEntity cultivate = cultivateService.selectById(id);
        if(cultivate !=null){
            //entity转view
            CultivateView view = new CultivateView();
            BeanUtils.copyProperties( cultivate , view );//把实体数据重构到view中

            //级联表
            YonghuEntity yonghu = yonghuService.selectById(cultivate.getYonghuId());
            if(yonghu != null){
                BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
            }
            //字典表字典转换
            dictionaryService.dictionaryConvert(view);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }

    }

    /**
    * 后端保存
    */
    @RequestMapping("ve")
    public R save(@RequestBody CultivateEntity cultivate, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,cultivate:{}",this.getClass().getName(),cultivate.toString());
        // 获取相差的天数
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(cultivate.getOnTime());
        long timeInMillis1 = calendar.getTimeInMillis();
        calendar.setTime(cultivate.getDownTime());
        long timeInMillis2 = calendar.getTimeInMillis();
        if(timeInMillis2<timeInMillis1){
            return R.error("培训结束时间小于培训开始时间");
        }
        Long betweenDays =  (timeInMillis2 - timeInMillis1) / (1000L*3600L*24L);
        cultivate.setDayNumber(betweenDays.intValue());
        cultivateService.insert(cultivate);
        return R.ok();

    }

    /**
    * 修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody CultivateEntity cultivate, HttpServletRequest request){
        logger.debug("update方法:,,Controller:{},,cultivate:{}",this.getClass().getName(),cultivate.toString());
        // 获取相差的天数
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(cultivate.getOnTime());
        long timeInMillis1 = calendar.getTimeInMillis();
        calendar.setTime(cultivate.getDownTime());
        long timeInMillis2 = calendar.getTimeInMillis();
        if(timeInMillis2<timeInMillis1){
            return R.error("培训结束时间小于培训开始时间");
        }
        Long betweenDays =  (timeInMillis2 - timeInMillis1) / (1000L*3600L*24L);
        System.out.println(betweenDays);
        cultivate.setDayNumber(betweenDays.intValue());
        cultivateService.updateById(cultivate);//根据id更新
        return R.ok();
    }


    /**
    * 删除
    */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids){
        logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
        cultivateService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }



}

论文参考

在这里插入图片描述

目 录
第一章 绪论 1
1.1 研究背景 1
1.2 研究意义 1
1.3 研究内容 2
第二章 开发环境与技术 3
2.1 JSP技术 3
2.2 MySQL数据库 3
2.3 Java语言 4
2.4 SSM框架 4
第三章 系统分析 5
3.1可行性分析 5
3.1.1运行可行性分析 5
3.1.2经济可行性分析 5
3.1.3技术可行性分析 6
3.2系统流程分析 6
3.3 系统性能分析 8
3.3.1系统安全性 8
3.3.2系统可扩展性 9
3.3.3系统易维护性 9
3.4系统功能分析 9
第四章 系统设计 14
4.1布局设计原则 14
4.2功能模块设计 15
4.3数据库设计 18
4.3.1数据库E-R图 18
4.3.2 数据库表结构 21
第五章 系统实现 24
5.1 管理员功能实现 24
5.1.1 用户管理 24
5.1.2 考勤管理 24
5.1.3 培训管理 25
5.2 总经理功能实现 25
5.2.1 奖惩管理 25
5.2.2 薪资管理 26
5.3 部门主管功能实现 26
5.3.1 考勤管理 26
5.3.2 奖惩管理 27
5.3.3 系统公告管理 27
5.4 员工功能实现 28
5.4.1 培训查看 28
5.4.2 薪资查看 28
5.4.3 考勤管理 29
第六章 系统测试 30
6.1 系统测试的实施 30
6.2 系统测试用例 30
6.2.1 登录功能测试 30
6.2.2 添加部门功能测试 31
6.3 测试的结果 31
结 论 32
参考文献 33
致 谢 34

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值