Java|Java 实战范例之员工管理系统的实现
一、项目简述
本系统功能包括:分为前端翻后端部分,包括用户,区分晋通用户以及誉里员用户,包括首页展示,部门管理,人事管理,员工管理三个模块等等。
二、项目运行
环境配置: Jdkl . 8 + Tomcats . 5 + Mysql + HBuilderX ( Webstorm 也行)+ Eclispe ( IntelliJ IDEA,Eclispe , MyEclispe , Sts 都支持)。
项目技术: html + css +js + vue + v 一 charts + electron + springboot + mybatis + Mysql + Maven 等等。
文章图片
文章图片
文章图片
文章图片
员工操作代码:
/** * @author yy */@RestController@RequestMapping("/employee")@CrossOrigin@Slf4jpublic class EmployeeController {@Autowiredprivate EmployeeService employeeService; @Autowiredprivate DepartmentService departmentService; @Autowiredprivate JobService jobService; @Autowiredprivate EduLevelMapper eduLevelMapper; @Autowiredprivate EmployeeMapper employeeMapper; /*** 搜索接口*/@GetMapping("/search")public Result search(@RequestParam(name = "name", required = false,defaultValuehttps://www.it610.com/article/= "") String name,@RequestParam(name = "current", required = false, defaultValuehttps://www.it610.com/article/= "1") Integer current,@RequestParam(name = "size", required = false, defaultValuehttps://www.it610.com/article/= "10") Integer size) {return employeeService.list(current, size, name); } /*** 分页查询接口** @param current* @param size* @return*/@GetMapping("/list")public Result list(@RequestParam(name = "current", required = false, defaultValuehttps://www.it610.com/article/= "1") Integer current,@RequestParam(name = "size", required = false, defaultValuehttps://www.it610.com/article/= "10") Integer size) {return employeeService.list(current, size, null); } /*** 根据id获取员工具体信息* @param id* @return*/@GetMapping("/getUserById")public EmployeeDTO getUserAllInfoById(@RequestParam(name = "id") Integer id) {return employeeService.getUserById(id); } /*** 根据员工获取信息* @param id* @return*/@GetMapping("/getEmployeeById")public Employee getUserById(@RequestParam(name = "id") Integer id) {return employeeMapper.selectById(id); }/*** 增加员工接口** @param employee* @return*/@PostMapping("/add")public Map addUser(@RequestBody Employee employee) {log.info(employee.toString()); return employeeService.add(employee); } /*** 更新用户* @param employee* @return*/@PostMapping("/update")public Map updateUser(@RequestBody Employee employee) {log.info(employee.toString()); return employeeService.update(employee); } /*** 删除用户* @param id* @return*/@GetMapping("/delete")public Result deleteEmployeeById(@RequestParam(name = "id") Integer id) {return employeeService.deleteEmployeeById(id); } /*** 辞退员工** @param id* @return*/@GetMapping("/dismiss")public Map dismissEmployeeById(@RequestParam(name = "id") Integer id) {return employeeService.dismissEmployeeById(id); } /*** 得到所以工作,部门,学历信息** @return*/@GetMapping("/otherInfo")public Result getAllOtherInfo() {Map info = new HashMap<>(); info.put("departments", departmentService.selectAll()); info.put("jobs", jobService.selectAll()); info.put("eduLevels", eduLevelMapper.selectList(null)); return Result.success(info); } @GetMapping("/map")public Result getMap() {return employeeService.getMap(); }}
【Java|Java 实战范例之员工管理系统的实现】以上就是Java 实战范例之员工管理系统的实现的详细内容,更多关于Java 员工管理系统的资料请关注脚本之家其它相关文章!
推荐阅读
- JAVA(抽象类与接口的区别&重载与重写&内存泄漏)
- 事件代理
- Java|Java OpenCV图像处理之SIFT角点检测详解
- java中如何实现重建二叉树
- 数组常用方法一
- 【Hadoop踩雷】Mac下安装Hadoop3以及Java版本问题
- Java|Java基础——数组
- RxJava|RxJava 在Android项目中的使用(一)
- java之static、static|java之static、static final、final的区别与应用
- 《机器学习实战》高清中文版PDF英文版PDF+源代码下载