这篇文章主要为大家展示了“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 @Slf4j public class EmployeeController { @Autowired private EmployeeService employeeService; @Autowired private DepartmentService departmentService; @Autowired private JobService jobService; @Autowired private EduLevelMapper eduLevelMapper; @Autowired private EmployeeMapper employeeMapper; /** * 搜索接口 */ @GetMapping("/search") public Result search(@RequestParam(name = "name", required = false,defaultValue = "") String name, @RequestParam(name = "current", required = false, defaultValue = "1") Integer current, @RequestParam(name = "size", required = false, defaultValue = "10") Integer size) { return employeeService.list(current, size, name); } /** * 分页查询接口 * * @param current * @param size * @return */ @GetMapping("/list") public Result list(@RequestParam(name = "current", required = false, defaultValue = "1") Integer current, @RequestParam(name = "size", required = false, defaultValue = "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<String, Object> addUser(@RequestBody Employee employee) { log.info(employee.toString()); return employeeService.add(employee); } /** * 更新用户 * @param employee * @return */ @PostMapping("/update") public Map<String, Object> 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<String, Object> dismissEmployeeById(@RequestParam(name = "id") Integer id) { return employeeService.dismissEmployeeById(id); } /** * 得到所以工作,部门,学历信息 * * @return */ @GetMapping("/otherInfo") public Result getAllOtherInfo() { Map<String, Object> 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中如何实现员工管理系统”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。