作者主页:源码空间站2022
简介:Java领域优质创作者、Java项目、学习资料、技术互助
文末获取源码
CRM人事管理系统,主要功能有:
用户管理:用户查询、添加用户、编辑、删除;
职位管理:职位查询、添加职位、删除;
部门管理:部门查询、添加部门、删除;
员工管理:员工查询、添加员工、编辑、删除;
公告管理:公告查询、添加公告、删除;
下载中心:文档查询、上传文档;
系统设置:退出系统;
由于本程序规模不大,可供课程设计,毕业设计学习演示之用
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.是否Maven项目: 是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目
6.数据库:MySql 5.7版本;
1. 后端:Spring SpringMVC MyBatis
2. 前端:JSP+Layui+jQuery
1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 将项目中db.properties配置文件中的数据库配置改为自己的配置
3. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat,然后运行;
4. 运行项目,输入localhost:8080/xxx 登录




- @Controller
- @RequestMapping("/department")
- public class DepartmentController {
-
- //注入业务
- @Autowired
- private IDepartmentService departmentService;
-
- @RequestMapping("/deptView")
- public String employeeView() {
-
- return "department/department";
- }
-
- //跳转添加页面
- @RequestMapping("/deptAddView")
- public String departmentAddView() {
-
- return "department/departmentAdd";
- }
-
- //查询部门所有数据
- @RequestMapping("/deptOption")
- @ResponseBody
- public List
jsonDeptOption(String keyword) { - List
list = departmentService.selectAll(keyword); - return list;
- }
-
- //部门添加
- @RequestMapping(value = "/deptAdd", method = RequestMethod.POST)
- @ResponseBody
- public String departmentAdd(@RequestBody Department dept) {
- int insert = departmentService.insert(dept);
- if (insert < 0) {
- return "error";
- }
- return "success";
- }
-
- //部门删除
- @RequestMapping(value = "/deptDelete", method = RequestMethod.GET)
- @ResponseBody
- public String delete(@RequestParam("id") Long id) {
- if (id != null) {
- int index;
- index = departmentService.deleteByPrimaryKey(id);
- if (index == 0 || index == -1) {
- return "error";
- }
- }
- return "success";
- }
-
- @RequestMapping(value = "/deptList", method = RequestMethod.GET)
- public @ResponseBody
- Map
deptList(@RequestParam int page, @RequestParam int limit, - String keyword) {
- System.out.println("keyword = " + keyword);
- //查询结果总数
- List
countDept = departmentService.selectAll(keyword); - //分页
- if (page < 0) {
- page = 1;
- }
- PageHelper.startPage(page, limit);
- List
listDept = departmentService.selectAll(keyword); - //封装json数据
- Map
resultMap = new HashMap() { - {
- put("code", 0);
- put("msg", "");
- put("count", countDept.size());
- put("data", listDept);
- }
- };
- return resultMap;
- }
- }
如果也想学习本系统,下面领取。关注并回复:056ssm