• SSM+Vue+Element-UI实现员工工资管理系统


    文末获取源码

    开发语言:Java
    框架:ssm
    JDK版本:JDK1.8
    服务器:tomcat7
    数据库:mysql 5.7/8.0
    数据库工具:Navicat11
    开发软件:eclipse/myeclipse/idea
    Maven包:Maven3.3.9
    浏览器:谷歌浏览器

    目录

    前言介绍

    系统展示

    前台 

    管理员功能

    部门信息管理

    打卡考勤管理

    请假信息管理

    工资信息管理

    员工绩效管理

    员工功能

    打卡考勤管理 

    请假信息管理

    工资信息管理

    员工绩效管理 

    部分核心代码

    工资信息

    上传文件


    前言介绍

    随着科学技术的飞速发展,各行各业都在努力与现代先进技术接轨,通过科技手段提高自身的优势;对于网上办公自动化当然也不能排除在外,随着网络技术的不断成熟,带动了网上办公自动化系统,它彻底改变了过去传统的管理方式,不仅使服务管理难度变低了,还提升了管理的灵活性。这种个性化的平台特别注重交互协调与管理的相互配合,激发了管理人员的创造性与主动性,对网上办公自动化系统而言非常有利。

    本系统采用的数据库是Mysql,使用java技术开发,运行环境使用Tomcat服务器,IDEA是本系统的开发平台。在设计过程中,充分保证了系统代码的良好可读性、实用性、易扩展性、通用性、便于后期维护、操作方便以及页面简洁等特点。

    系统采用了Java技术SSM框架,前端使用 element-ui 组件库,选择MySQL作为系统的数据库,开发工具选择 idea来进行系统的设计。基本实现了在线小说阅读平台应有的主要功能模块,本系统有以下功能:

    (1)前台:首页、公司公告、留言反馈、个人中心、后台管理、在线沟通。 

    (2)管理员:首页、个人中心、部门信息管理、员工管理、打卡考勤管理、请假信息管理、补助金申请管理、工资信息管理、考勤扣款管理、员工绩效管理、留言板管理、系统管理。

    (3)员工:首页、个人中心、打卡考勤管理、请假信息管理、补助金申请管理、工资信息管理、考勤扣款管理、员工绩效管理。

    系统展示

    前台 

    管理员功能

    部门信息管理

    打卡考勤管理

    请假信息管理

    工资信息管理

    员工绩效管理

    员工功能

    打卡考勤管理 

    请假信息管理

    工资信息管理

    员工绩效管理 

    部分核心代码

    工资信息

    1. /**
    2. * 工资信息
    3. * 后端接口
    4. * @author
    5. * @email
    6. * @date 2021-02-04 21:05:51
    7. */
    8. @RestController
    9. @RequestMapping("/gongzixinxi")
    10. public class GongzixinxiController {
    11. @Autowired
    12. private GongzixinxiService gongzixinxiService;
    13. /**
    14. * 后端列表
    15. */
    16. @RequestMapping("/page")
    17. public R page(@RequestParam Map<String, Object> params,GongzixinxiEntity gongzixinxi, HttpServletRequest request){
    18. String tableName = request.getSession().getAttribute("tableName").toString();
    19. if(tableName.equals("yuangong")) {
    20. gongzixinxi.setGonghao((String)request.getSession().getAttribute("username"));
    21. }
    22. EntityWrapper<GongzixinxiEntity> ew = new EntityWrapper<GongzixinxiEntity>();
    23. PageUtils page = gongzixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, gongzixinxi), params), params));
    24. return R.ok().put("data", page);
    25. }
    26. /**
    27. * 前端列表
    28. */
    29. @RequestMapping("/list")
    30. public R list(@RequestParam Map<String, Object> params,GongzixinxiEntity gongzixinxi, HttpServletRequest request){
    31. EntityWrapper<GongzixinxiEntity> ew = new EntityWrapper<GongzixinxiEntity>();
    32. PageUtils page = gongzixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, gongzixinxi), params), params));
    33. return R.ok().put("data", page);
    34. }
    35. /**
    36. * 列表
    37. */
    38. @RequestMapping("/lists")
    39. public R list( GongzixinxiEntity gongzixinxi){
    40. EntityWrapper<GongzixinxiEntity> ew = new EntityWrapper<GongzixinxiEntity>();
    41. ew.allEq(MPUtil.allEQMapPre( gongzixinxi, "gongzixinxi"));
    42. return R.ok().put("data", gongzixinxiService.selectListView(ew));
    43. }
    44. /**
    45. * 查询
    46. */
    47. @RequestMapping("/query")
    48. public R query(GongzixinxiEntity gongzixinxi){
    49. EntityWrapper< GongzixinxiEntity> ew = new EntityWrapper< GongzixinxiEntity>();
    50. ew.allEq(MPUtil.allEQMapPre( gongzixinxi, "gongzixinxi"));
    51. GongzixinxiView gongzixinxiView = gongzixinxiService.selectView(ew);
    52. return R.ok("查询工资信息成功").put("data", gongzixinxiView);
    53. }
    54. /**
    55. * 后端详情
    56. */
    57. @RequestMapping("/info/{id}")
    58. public R info(@PathVariable("id") Long id){
    59. GongzixinxiEntity gongzixinxi = gongzixinxiService.selectById(id);
    60. return R.ok().put("data", gongzixinxi);
    61. }
    62. /**
    63. * 前端详情
    64. */
    65. @RequestMapping("/detail/{id}")
    66. public R detail(@PathVariable("id") Long id){
    67. GongzixinxiEntity gongzixinxi = gongzixinxiService.selectById(id);
    68. return R.ok().put("data", gongzixinxi);
    69. }
    70. /**
    71. * 后端保存
    72. */
    73. @RequestMapping("/save")
    74. public R save(@RequestBody GongzixinxiEntity gongzixinxi, HttpServletRequest request){
    75. gongzixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    76. //ValidatorUtils.validateEntity(gongzixinxi);
    77. gongzixinxiService.insert(gongzixinxi);
    78. return R.ok();
    79. }
    80. /**
    81. * 前端保存
    82. */
    83. @RequestMapping("/add")
    84. public R add(@RequestBody GongzixinxiEntity gongzixinxi, HttpServletRequest request){
    85. gongzixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    86. //ValidatorUtils.validateEntity(gongzixinxi);
    87. gongzixinxiService.insert(gongzixinxi);
    88. return R.ok();
    89. }
    90. /**
    91. * 修改
    92. */
    93. @RequestMapping("/update")
    94. public R update(@RequestBody GongzixinxiEntity gongzixinxi, HttpServletRequest request){
    95. //ValidatorUtils.validateEntity(gongzixinxi);
    96. gongzixinxiService.updateById(gongzixinxi);//全部更新
    97. return R.ok();
    98. }
    99. /**
    100. * 删除
    101. */
    102. @RequestMapping("/delete")
    103. public R delete(@RequestBody Long[] ids){
    104. gongzixinxiService.deleteBatchIds(Arrays.asList(ids));
    105. return R.ok();
    106. }
    107. /**
    108. * 提醒接口
    109. */
    110. @RequestMapping("/remind/{columnName}/{type}")
    111. public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
    112. @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
    113. map.put("column", columnName);
    114. map.put("type", type);
    115. if(type.equals("2")) {
    116. SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    117. Calendar c = Calendar.getInstance();
    118. Date remindStartDate = null;
    119. Date remindEndDate = null;
    120. if(map.get("remindstart")!=null) {
    121. Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
    122. c.setTime(new Date());
    123. c.add(Calendar.DAY_OF_MONTH,remindStart);
    124. remindStartDate = c.getTime();
    125. map.put("remindstart", sdf.format(remindStartDate));
    126. }
    127. if(map.get("remindend")!=null) {
    128. Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
    129. c.setTime(new Date());
    130. c.add(Calendar.DAY_OF_MONTH,remindEnd);
    131. remindEndDate = c.getTime();
    132. map.put("remindend", sdf.format(remindEndDate));
    133. }
    134. }
    135. Wrapper<GongzixinxiEntity> wrapper = new EntityWrapper<GongzixinxiEntity>();
    136. if(map.get("remindstart")!=null) {
    137. wrapper.ge(columnName, map.get("remindstart"));
    138. }
    139. if(map.get("remindend")!=null) {
    140. wrapper.le(columnName, map.get("remindend"));
    141. }
    142. String tableName = request.getSession().getAttribute("tableName").toString();
    143. if(tableName.equals("yuangong")) {
    144. wrapper.eq("gonghao", (String)request.getSession().getAttribute("username"));
    145. }
    146. int count = gongzixinxiService.selectCount(wrapper);
    147. return R.ok().put("count", count);
    148. }
    149. }

    上传文件

    1. /**
    2. * 上传文件映射表
    3. */
    4. @RestController
    5. @RequestMapping("file")
    6. @SuppressWarnings({"unchecked","rawtypes"})
    7. public class FileController{
    8. @Autowired
    9. private ConfigService configService;
    10. /**
    11. * 上传文件
    12. */
    13. @RequestMapping("/upload")
    14. public R upload(@RequestParam("file") MultipartFile file, String type,HttpServletRequest request) throws Exception {
    15. if (file.isEmpty()) {
    16. throw new EIException("上传文件不能为空");
    17. }
    18. String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
    19. String fileName = new Date().getTime()+"."+fileExt;
    20. File dest = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
    21. file.transferTo(dest);
    22. if(StringUtils.isNotBlank(type) && type.equals("1")) {
    23. ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
    24. if(configEntity==null) {
    25. configEntity = new ConfigEntity();
    26. configEntity.setName("faceFile");
    27. configEntity.setValue(fileName);
    28. } else {
    29. configEntity.setValue(fileName);
    30. }
    31. configService.insertOrUpdate(configEntity);
    32. }
    33. return R.ok().put("file", fileName);
    34. }
    35. /**
    36. * 下载文件
    37. */
    38. @IgnoreAuth
    39. @RequestMapping("/download")
    40. public void download(@RequestParam String fileName, HttpServletRequest request, HttpServletResponse response) {
    41. try {
    42. File file = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
    43. if (file.exists()) {
    44. response.reset();
    45. response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName+"\"");
    46. response.setHeader("Cache-Control", "no-cache");
    47. response.setHeader("Access-Control-Allow-Credentials", "true");
    48. response.setContentType("application/octet-stream; charset=UTF-8");
    49. IOUtils.write(FileUtils.readFileToByteArray(file), response.getOutputStream());
    50. }
    51. } catch (IOException e) {
    52. e.printStackTrace();
    53. }
    54. }
    55. }

  • 相关阅读:
    搅动PC市场风云,荣耀何以成为破局者?
    (Mybatis笔记)Mybatis配置文件和映射模板——SqlMapConfig.xml和Mapper.xml
    .NET Core 读取配置技巧 - IOptions<TOptions> 接口
    No ‘Access-Control-Allow-Origin‘ header is present on the requested resource.
    vue3 setup函数
    【Pycharm配置】在Pycharm中配置Jupyter环境
    Gmail 将停止支持基本 HTML 视图
    HBase入门至进阶以及开发等知识梳理
    Tair 对 Redis 引擎架构之争的看法
    高阶 CSS 技巧在复杂动效中的应用
  • 原文地址:https://blog.csdn.net/m0_49113107/article/details/126312298