博主介绍: ✌全网粉丝30W+,csdn特邀作者、博客专家、CSDN新星计划导师、java领域优质创作者,博客之星、掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java技术领域和毕业项目实战 ✌
🍅 文末获取源码联系 🍅
👇🏻 精彩专栏 推荐订阅 👇🏻 不然下次找不到哟
Java项目精品实战案例《100套》
Java微信小程序项目实战《100套》
系统介绍:
现代经济快节奏发展以及不断完善升级的信息化技术,让传统数据信息的管理升级为软件存储,归纳,集中处理数据信息的管理方式。本单位人事管理系统就是在这样的大环境下诞生,其可以帮助管理者在短时间内处理完毕庞大的数据信息,使用这种软件工具可以帮助管理人员提高事务处理效率,达到事半功倍的效果。此单位人事管理系统利用当下成熟完善的SSM框架,使用跨平台的可开发大型商业网站的Java语言,以及最受欢迎的RDBMS应用软件之一的Mysql数据库进行程序开发。实现了人员基础数据的管理,考勤管理,职位和职称修改。单位人事管理系统的开发根据操作人员需要设计的界面简洁美观,在功能模块布局上跟同类型网站保持一致,程序在实现基本要求功能时,也为数据信息面临的安全问题提供了一些实用的解决方案。可以说该程序在帮助管理者高效率地处理工作事务的同时,也实现了数据信息的整体化,规范化与自动化
在分析并得出使用者对程序的功能要求时,就可以进行程序设计了。如图展示的就是管理员功能结构图,管理员主要负责填充人员和其类别信息,并对已填充的数据进行维护,包括修改与删除,管理员也需要审核老师注册信息,发布公告信息,管理人员和管理员信息等。
 
   图 系统功能结构图
功能截图:
5.1.1 管理员管理
如图5.1显示的就是管理员管理管理员的页面,可以对管理员进行增删改操作
 
   图5.1 管理员管理页面
5.1.2 用户管理
如图5.2显示的就是用户管理页面,此页面提供给管理员的功能有:新增用户,修改用户,删除用户等。
 
   
 
   图5.2 用户管理页面
5.1.3 考勤管理
如图5.3显示的就是考勤管理页面.可以对考勤进行查询和删除和统计功能。
 
   图5.3 考勤管理页面
代码实现:
/**
 * 用户
 * 后端接口
 * @author
 * @email
 * @date 2022-02-25
*/
@RestController
@Controller
@RequestMapping("/yonghu")
public class YonghuController {
    private static final Logger logger = LoggerFactory.getLogger(YonghuController.class);
    @Autowired
    private YonghuService yonghuService
    @Autowired
    private TokenService tokenService;
    //级联表service
    //字典表map
    Map<String, Map<Integer, String>> dictionaryMap;
    /**
    * 后端列表
    */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
        PageUtils page = yonghuService.queryPage(params);
        //字典表数据转换
        List<YonghuView> list =(List<YonghuView>)page.getList();
        ServletContext servletContext = ContextLoader.getCurrentWebApplicationContext().getServletContext();
        dictionaryMap = (Map<String, Map<Integer, String>>) servletContext.getAttribute("dictionaryMap");
        for(YonghuView c:list){
            this.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);
        YonghuEntity yonghu = yonghuService.selectById(id);
        if(yonghu !=null){
            //entity转view
            YonghuView view = new YonghuView();
            BeanUtils.copyProperties( yonghu , view );//把实体数据重构到view中
            //字典表字典转换
            ServletContext servletContext = ContextLoader.getCurrentWebApplicationContext().getServletContext();
            dictionaryMap = (Map<String, Map<Integer, String>>) servletContext.getAttribute("dictionaryMap");
            this.dictionaryConvert(view);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }
    }
    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());
        Wrapper<YonghuEntity> queryWrapper = new EntityWrapper<YonghuEntity>()
            .eq("username", yonghu.getUsername())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        YonghuEntity yonghuEntity = yonghuService.selectOne(queryWrapper);
        if(yonghuEntity==null){
            yonghu.setCreateTime(new Date());
            yonghu.setPassword("123456");
        //  String role = String.valueOf(request.getSession().getAttribute("role"));
        //  if("".equals(role)){
        //      yonghu.set
        //  }
            yonghuService.insert(yonghu);
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }
    /**
    * 修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
        logger.debug("update方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());
        //根据字段查询是否有相同数据
        Wrapper<YonghuEntity> queryWrapper = new EntityWrapper<YonghuEntity>()
            .notIn("id",yonghu.getId())
            .eq("username", yonghu.getUsername())
            .eq("password", yonghu.getPassword())
            .eq("name", yonghu.getName())
            .eq("phone", yonghu.getPhone())
            .eq("zhiwu_types", yonghu.getZhiwuTypes())
            .eq("zhicheng_types", yonghu.getZhichengTypes())
            .eq("id_number", yonghu.getIdNumber())
            .eq("sex_types", yonghu.getSexTypes())
            .eq("nation", yonghu.getNation())
            .eq("politics_types", yonghu.getPoliticsTypes())
            .eq("residence", yonghu.getResidence())
            .eq("birthplace", yonghu.getBirthplace())
            .eq("marriage_types", yonghu.getMarriageTypes())
            .eq("education_types", yonghu.getEducationTypes())
            .eq("school", yonghu.getSchool())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        YonghuEntity yonghuEntity = yonghuService.selectOne(queryWrapper);
        if("".equals(yonghu.getMyPhoto()) || "null".equals(yonghu.getMyPhoto())){
                yonghu.setMyPhoto(null);
        }
        if(yonghuEntity==null){
            //  String role = String.valueOf(request.getSession().getAttribute("role"));
            //  if("".equals(role)){
            //      yonghu.set
            //  }
            yonghuService.updateById(yonghu);//根据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());
        yonghuService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    /**
    *字典表数据转换
    */
    public void dictionaryConvert(YonghuView yonghuView){
        //当前表的字典字段
        if(StringUtil.isNotEmpty(String.valueOf(yonghuView.getZhiwuTypes()))){
            yonghuView.setZhiwuValue(dictionaryMap.get("zhiwu_types").get(yonghuView.getZhiwuTypes()));
        }
        if(StringUtil.isNotEmpty(String.valueOf(yonghuView.getZhichengTypes()))){
            yonghuView.setZhichengValue(dictionaryMap.get("zhicheng_types").get(yonghuView.getZhichengTypes()));
        }
        if(StringUtil.isNotEmpty(String.valueOf(yonghuView.getSexTypes()))){
            yonghuView.setSexValue(dictionaryMap.get("sex_types").get(yonghuView.getSexTypes()));
        }
        if(StringUtil.isNotEmpty(String.valueOf(yonghuView.getPoliticsTypes()))){
            yonghuView.setPoliticsValue(dictionaryMap.get("politics_types").get(yonghuView.getPoliticsTypes()));
        }
        if(StringUtil.isNotEmpty(String.valueOf(yonghuView.getMarriageTypes()))){
            yonghuView.setMarriageValue(dictionaryMap.get("marriage_types").get(yonghuView.getMarriageTypes()));
        }
        if(StringUtil.isNotEmpty(String.valueOf(yonghuView.getEducationTypes()))){
            yonghuView.setEducationValue(dictionaryMap.get("education_types").get(yonghuView.getEducationTypes()));
        }
        //级联表的字典字段
    }
    /**
    * 登录
    */
    @IgnoreAuth
    @PostMapping(value = "/login")
    public R login(String username, String password, String captcha, HttpServletRequest request) {
    YonghuEntity yonghu = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("username", username));
        if(yonghu==null || !yonghu.getPassword().equals(password)) {
            return R.error("账号或密码不正确");
        }
        String token = tokenService.generateToken(yonghu.getId(),username, "yonghu", "用户");
        R r = R.ok();
        r.put("token", token);
        r.put("role","用户");
        r.put("userId",yonghu.getId());
        return r;
    }
    /**
    * 注册
    */
    @IgnoreAuth
    @PostMapping(value = "/register")
    public R register(@RequestBody YonghuEntity yonghu){
    //        ValidatorUtils.validateEntity(user);
        if(yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("username", yonghu.getUsername())) !=null) {
            return R.error("用户已存在");
        }
        yonghuService.insert(yonghu);
        return R.ok();
    
    /**
    * 获取用户的session用户信息
    */
    @RequestMapping("/session")
    public R getCurrYonghu(HttpServletRequest request){
        Integer id = (Integer)request.getSession().getAttribute("userId");
        YonghuEntity yonghu = yonghuService.selectById(id);
        return R.ok().put("data", yonghu);
    }
    /**
    * 退出
    */
    @GetMapping(value = "logout")
    public R logout(HttpServletRequest request) {
        request.getSession().invalidate();
        return R.ok("退出成功");
    }
}
 
 论文参考:
 
   目 录
目 录III
1 绪论1
1.1 研究背景1
1.2 目的和意义1
1.3 论文结构安排2
2 相关技术3
2.1 SSM框架介绍3
2.2 B/S结构介绍3
2.3 Mysql数据库介绍4
3 系统分析6
3.1 系统可行性分析6
3.1.1 技术可行性分析6
3.1.2 经济可行性分析6
3.1.3 运行可行性分析6
3.2 系统性能分析7
3.2.1 易用性指标7
3.2.2 可扩展性指标7
3.2.3 健壮性指标7
3.2.4 安全性指标8
3.3 系统流程分析8
3.3.1 操作流程分析8
3.3.2 登录流程分析9
3.3.3 信息添加流程分析10
3.3.4 信息删除流程分析11
4 系统设计12
4.1 系统概要设计12
4.2 系统功能结构设计12
4.3 数据库设计13
4.3.1 数据库E-R图设计13
4.3.2 数据库表结构设计16
5 系统实现19
5.1 管理员功能介绍19
5.1.1 管理员管理19
5.1.2 用户管理19
5.1.3 考勤管理20
6 系统测试21
6.1 系统测试的特点 21
6.2 系统功能测试22
6.2.1 登录功能测试22
6.2.2 添加类别功能测试22
6.3 测试结果分析22
结 论24
致 谢25
参考文献26
获取源码:
大家 点赞、收藏、关注、评 论啦 、 查看 👇🏻 获取联系方式 👇🏻
精彩专栏 推荐订阅 :在 下方专栏 👇🏻
Java项目精品实战案例《100套》
Java微信小程序项目实战《100套》


















