基于javaweb的SSM公司人力资源管理系统(java+ssm+jsp+bootstrap+js+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

050023362402

070023362402

080023362402

090023362402

100023362402

110023362402

基于javaweb的SSM公司人力资源管理系统(java+ssm+jsp+bootstrap+js+mysql)

项目介绍

本项目为后台管理系统,分为管理员与普通员工两种角色; 管理员角色包含以下功能: 管理员登录,员工账号管理,部门管理,员工管理,薪资管理,薪资发放,招聘管理,员工培训管理等功能。

普通员工角色包含以下功能: 普通员工登录,员工账号查看,部门管理,员工管理,薪资管理,薪资发放等功能。

环境需要

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

技术栈

  1. 后端:Spring+SpringMVC+Mybatis 2. 前端:JSP+CSS+JavaScript+bootstrap

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中jdbc.properties配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入http://localhost:8080/ 登录

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
		String returnInfo = JSONObject.toJSONString(result);
return returnInfo;

}
@RequestMapping(value = "employee", produces = "text/html;charset=UTF-8", method = RequestMethod.POST)
@ResponseBody
public String add(Employee employee) throws Exception {
String res = employeeService.validate(employee, INSERT);
String returnInfo = JSONObject.toJSONString(res);
return returnInfo;
}
@RequestMapping(value = "employeeSelect", produces = "text/html;charset=UTF-8", method = RequestMethod.POST)
@ResponseBody
public String selectByPrimaryKey(@RequestBody String account) {
String eid = account;
Employee employee =(Employee) employeeService.selectByPrimaryKey(eid);
String json = JSONObject.toJSONString(employee);
return json;
}

@RequestMapping(value = "employee", produces = "text/html;charset=UTF-8", method = RequestMethod.PUT)
@ResponseBody
public String update(Employee employee) throws Exception {
String res = employeeService.validate(employee, UPDATE);
String returnInfo = JSONObject.toJSONString(res);
return returnInfo;
}

@RequestMapping(value = "employee", produces = "text/html;charset=UTF-8", method = RequestMethod.DELETE)
@ResponseBody
public String delete(@RequestBody String number) throws Exception {
String eid = number;
employeeService.deleteByPrimaryKey(eid);
return "删除成功";

}




}
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
49
50
}



@RequestMapping(value = "/register", produces = "text/html;charset=UTF-8", method = RequestMethod.DELETE)
@ResponseBody
public String delete(@RequestBody String account) {
System.out.println(account);
String userAccount = account;
userServiceImpl.deleteByPrimaryKey(userAccount);
// String returnInfo = JSONObject.toJSONString("删除成功");
return "删除成功";

}

@RequestMapping(value = "/register", produces = "text/html;charset=UTF-8", method = RequestMethod.POST)
@ResponseBody
public String add(User user) throws Exception {
String res = userServiceImpl.validate(user, INSERT);
// String res = userServiceImpl.insertAdd(user);
String returnInfo = JSONObject.toJSONString(res);
return returnInfo;
}

@RequestMapping(value = "/register", produces = "text/html;charset=UTF-8", method = RequestMethod.GET)
@ResponseBody
// 分页查询
public String find(HttpServletRequest request) {
// ,HttpSession session
// 从分页工具中得到数据库查询的数据和page的信息
//int pageSize = Integer.parseInt(PageResult.getName("pageSize"));
String pageSize = request.getParameter("pageSize");
String currentPage = request.getParameter("currentPage");
String depNumber = request.getParameter("depNum");
String userNum = request.getParameter("userNum");
String userName = request.getParameter("userName");
//String userAutho = request.getParameter("userAutho");
if (!BiSheUtil.notNull(depNumber)) {
depNumber = null;
}
if (!BiSheUtil.notNull(userNum)) {
userNum = null;
}
if (!BiSheUtil.notNull(userName)) {
userName = null;
}
/*if (!BiSheUtil.notNull(userAutho)) {
userAutho = null;
}*/

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
	String currentPage = request.getParameter("currentPage");
PageInfo page = getPage(pageSize, currentPage);
@SuppressWarnings("unchecked")
List<Userinfo> userInfoList = (List<Userinfo>) userinfoService.selectAll(page);
validate(page);
HashMap result = new HashMap();
result.put("arrayList", userInfoList);
result.put("pageInfo", page);
String returnInfo = JSONObject.toJSONString(result);
return returnInfo;
}

@RequestMapping(value = "userinfo", produces = "text/html;charset=UTF-8", method = RequestMethod.PUT)
@ResponseBody
public String update(Userinfo user) throws Exception {
String res = userinfoService.updateByPrimaryKey(user);
// String res = userServiceImpl.updateByPrimaryKeySelective(user);
String returnInfo = JSONObject.toJSONString(res);
return returnInfo;
}

@RequestMapping(value = "userinfoSelect", produces = "text/html;charset=UTF-8", method = RequestMethod.POST)
@ResponseBody
public String selectByPrimaryKey(@RequestBody String account) {
String userInfoNum = account;
Userinfo user = userinfoService.selectByPrimaryKey(userInfoNum);
String json = JSONObject.toJSONString(user);
return json;
}

@RequestMapping(value = "userinfo", produces = "text/html;charset=UTF-8", method = RequestMethod.POST)
@ResponseBody
public String add(Userinfo user) throws Exception {
String res = userinfoService.insert(user);
// String res = userServiceImpl.insertAdd(user);
String returnInfo = JSONObject.toJSONString(res);
return returnInfo;
}

@RequestMapping(value = "userinfo", produces = "text/html;charset=UTF-8", method = RequestMethod.DELETE)
@ResponseBody
public String delete(@RequestBody String number) throws Exception {
String userInfoNum = number;
userinfoService.deleteByPrimaryKey(userInfoNum);
return "删除成功";

}

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




@Controller
@RequestMapping("/")
public class EmployeeController extends BaseController {

@Autowired
private EmployeeService employeeService;


@RequestMapping(value = "employee", produces = "text/html;charset=UTF-8", method = RequestMethod.GET)
@ResponseBody
public String find(HttpServletRequest request) {
String pageSize = request.getParameter("pageSize");
String currentPage = request.getParameter("currentPage");
PageInfo page = getPage(pageSize, currentPage);
@SuppressWarnings("unchecked")
List<Employee> employeeList = (List<Employee>) employeeService.selectAll(page);
validate(page);
HashMap result = new HashMap();
result.put("arrayList", employeeList );
result.put("pageInfo", page);
String returnInfo = JSONObject.toJSONString(result);
return returnInfo;

}
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
	result.put("arrayList", userInfoList);
result.put("pageInfo", page);
String returnInfo = JSONObject.toJSONString(result);
return returnInfo;
}

@RequestMapping(value = "userinfo", produces = "text/html;charset=UTF-8", method = RequestMethod.PUT)
@ResponseBody
public String update(Userinfo user) throws Exception {
String res = userinfoService.updateByPrimaryKey(user);
// String res = userServiceImpl.updateByPrimaryKeySelective(user);
String returnInfo = JSONObject.toJSONString(res);
return returnInfo;
}

@RequestMapping(value = "userinfoSelect", produces = "text/html;charset=UTF-8", method = RequestMethod.POST)
@ResponseBody
public String selectByPrimaryKey(@RequestBody String account) {
String userInfoNum = account;
Userinfo user = userinfoService.selectByPrimaryKey(userInfoNum);
String json = JSONObject.toJSONString(user);
return json;
}

@RequestMapping(value = "userinfo", produces = "text/html;charset=UTF-8", method = RequestMethod.POST)
@ResponseBody
public String add(Userinfo user) throws Exception {
String res = userinfoService.insert(user);
// String res = userServiceImpl.insertAdd(user);
String returnInfo = JSONObject.toJSONString(res);
return returnInfo;
}

@RequestMapping(value = "userinfo", produces = "text/html;charset=UTF-8", method = RequestMethod.DELETE)
@ResponseBody
public String delete(@RequestBody String number) throws Exception {
String userInfoNum = number;
userinfoService.deleteByPrimaryKey(userInfoNum);
return "删除成功";

}

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
		
}
package manage.controller;





@Controller
@RequestMapping("/")
public class TrainController extends BaseController<Train, TrainService<Train>> {

@Autowired
private TrainService trainService;

/*
* @description
*/
@RequestMapping(value = "train", produces = "text/html;charset=UTF-8", method = RequestMethod.GET)
@ResponseBody
public String find(HttpServletRequest request) {
String pageSize = request.getParameter("pageSize");
String currentPage = request.getParameter("currentPage");
PageInfo page = getPage(pageSize, currentPage);
@SuppressWarnings("unchecked")
List<Train> trainList = (List<Train>) trainService.selectAll(page);
validate(page);
HashMap result = new HashMap();
result.put("arrayList", trainList );
result.put("pageInfo", page);
String returnInfo = JSONObject.toJSONString(result);
return returnInfo;


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