基于javaweb的SpringBoot企业考勤管理系统(java+springboot+layui+jsp+bootstrap+mysql+maven)

运行环境

Java≥8、MySQL≥5.7

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

140023282402

150023282402

160023282402

170023282402

180023282402

190023282402

基于javaweb的SpringBoot企业考勤管理系统(java+springboot+layui+jsp+bootstrap+mysql+maven)

项目介绍

  • 基于SpringBoot-Layui开发的学生版企业考勤管理系统完整代码;  - 分别为员工打卡系统和企业考勤管理两个系统 - 其中企业考勤管理系统主要功能包括: 员工信息管理、考勤信息管理、考勤统计、操作日志信息、登录日志信息、系统用户管理等功能。

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
4.数据库:MySql 5.7版本;

技术栈

  1. 后端:SpringBoot+Mybatis

  2. 前端:JSP+Bootstrap+jQuery+LayUI

使用说明
运行项目,输入http://localhost:8080/web/jsp/login.jsp
管理端用户名  admin  密码  123456
打卡端用户名  马云  密码  630021197005112121

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

@Controller
@RequestMapping("/com")
public class GdkqzydhController {
@Autowired
private ComService comService;
@Autowired
private CzrzxxService czrzxxService;

/**查询各地考勤专员信息表*/
@GetMapping("find_Com")
@ResponseBody
public PageInfo<Map<String,Object>> find_Com(HttpServletRequest request, String ssk){
try {
List<Map<String,Object>> list = null;
PageHelper.startPage(Integer.valueOf(request.getParameter("page")),Integer.valueOf(request.getParameter("limit")));
list = comService.find_Com(ssk);
PageInfo info = new PageInfo(list);
return info;
}catch (Exception e){
e.printStackTrace();
return null;
}
}

/**新增或修改各地考勤专员表*/
@PostMapping("saveOrUpdate_Com")
@ResponseBody
public int saveOrUpdate_Com(Com com){
int i = 0;
i = comService.saveOrUpdate_Com(com);
return i;
}

/**通过id查询各地考勤专员表*/
@PostMapping("getComById")
@ResponseBody
public Map<String,Object> getComById(String id){
Map<String,Object> map = new HashMap<>();
map = comService.getComById(id);
return map;
}

/**通过id删除考勤表信息*/
@GetMapping("delete_ComById")
@ResponseBody
public int delete_ComById(String id,String name){
int i = 0;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
public int delete_CheckById(String id,String name){
int i = 0;
i = checkService.delete_CheckById(id,name);
if(i>0){
String bz = "删除考勤信息";
czrzxxService.addCzrzxx(bz,name);
}
return i;
}

/**通过id查询考勤表*/
@PostMapping("getCheckById")
@ResponseBody
public Map<String,Object> getCheckById(String id){
Map<String,Object> map = new HashMap<>();
map = checkService.getCheckById(id);
return map;
}

/**新增或修改考勤表*/
@PostMapping("saveOrUpdate_Check")
@ResponseBody
public int saveOrUpdate_Check(Check check,String name){
int i = 0;
try{
i = checkService.saveOrUpdate_Check(check,name);
}catch (Exception e){
e.printStackTrace();
i=0;
}
return i;
}

/**新增考勤表手动打卡*/
@PostMapping("add_ChackByScdk")
@ResponseBody
public int add_ChackByScdk(Check check){
int i = 0;
try{
i = checkService.add_ChackByScdk(check);
}catch (Exception e){
e.printStackTrace();
i=0;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
}


/****
* 搜索员工表
*/
@GetMapping("find_StaByZjhmAndXm")
@ResponseBody
public List<Map> find_StaByZjhmAndXm(String ssk){
List<Map> list = null;
list = staService.find_StaByZjhmAndXm(ssk);
System.out.println(list);
return list;
}

/**通过证件号码查询员工表*/
@GetMapping("getStaByZjhm")
@ResponseBody
public int getStaByZjhm(Sta sta){
List<Map> map = null;
String zjhm = sta.getZjhm();
map = staService.getStaByZjhm(zjhm);
if (map.size()<1){
return 1;
}else{
return 0;
}
}
/**通过工号查询员工表*/
@PostMapping("getStaByGh")
@ResponseBody
public Map<String,Object> getStaByGh(String gh){
Map<String,Object> map = new HashMap<>();
map = staService.getStaByGh(gh);
return map;
}
/**查询部门表*/
@GetMapping("getStaSsbm")
@ResponseBody
public List<Map<String,Object>> getStaSsbm(){
List<Map<String,Object>> list = null;
try{
list = staService.getStaSsbm();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@RequestMapping("/com")
public class GdkqzydhController {
@Autowired
private ComService comService;
@Autowired
private CzrzxxService czrzxxService;

/**查询各地考勤专员信息表*/
@GetMapping("find_Com")
@ResponseBody
public PageInfo<Map<String,Object>> find_Com(HttpServletRequest request, String ssk){
try {
List<Map<String,Object>> list = null;
PageHelper.startPage(Integer.valueOf(request.getParameter("page")),Integer.valueOf(request.getParameter("limit")));
list = comService.find_Com(ssk);
PageInfo info = new PageInfo(list);
return info;
}catch (Exception e){
e.printStackTrace();
return null;
}
}

/**新增或修改各地考勤专员表*/
@PostMapping("saveOrUpdate_Com")
@ResponseBody
public int saveOrUpdate_Com(Com com){
int i = 0;
i = comService.saveOrUpdate_Com(com);
return i;
}

/**通过id查询各地考勤专员表*/
@PostMapping("getComById")
@ResponseBody
public Map<String,Object> getComById(String id){
Map<String,Object> map = new HashMap<>();
map = comService.getComById(id);
return map;
}

/**通过id删除考勤表信息*/
@GetMapping("delete_ComById")
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
    }


/**登录打卡系统*/
@PostMapping("get_StaLogin")
public void get_StaLogin(Sta sta, HttpServletResponse response){
response.setContentType("text/html;charset=utf-8");
response.setCharacterEncoding("utf-8");
PrintWriter out = null;
JSONObject jobject = new JSONObject();
Map<String,Object> map;
try{
out = response.getWriter();
String xm = sta.getXm();
String zjhm = sta.getZjhm();
System.out.println(xm+zjhm);
map = staService.get_StaLogin(xm,zjhm);
System.out.println(map.get("xm"));
if(null!=map){
jobject.put("xm", map.get("xm"));
jobject.put("zjhm", map.get("zjhm"));
jobject.put("gh", map.get("gh"));
jobject.put("ssbm", map.get("ssbm"));
}
out.print(jobject.toString());
}catch (Exception e){
jobject = new JSONObject();
jobject.put("errorCode", "401");
jobject.put("data", "");
out.print(jobject.toString());
e.printStackTrace();
}
}
}
package com.cn.qykqgl.qykqgl.controller.jbxxgl;


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33


@Controller
@RequestMapping("/user")
public class UserController {
@Autowired
private UserService userService;
@Autowired
private CzrzxxService czrzxxService;

/**通过id查询员工表,判断旧密码是否正确*/
@GetMapping("get_UserPasswordById")
@ResponseBody
public int get_UserPasswordById(User user){
List<Map> map = null;
System.out.println(user);
String id = user.getId();
String password = user.getPassword();
map = userService.get_UserPasswordById(id,password);
if (map.size()>0){
return 1;
}else{
return 0;
}
}

/**修改密码*/
@PostMapping("Update_UserPassword")
@ResponseBody
public int Update_UserPassword(User user,String czyh){
int i = userService.Update_UserPassword(user);
if(i>0){
//给操作日志表添加信息


项目链接:
https://javayms.github.io?id=451422302105200gv
https://javayms.pages.dev?id=451422302105200gv