Java 實戰(zhàn)范例之員工管理系統(tǒng)的實現(xiàn)
一、項目簡述
本系統(tǒng)功能包括:分為前端翻后端部分,包括用戶,區(qū)分晉通用戶以及譽里員用戶,包括首頁展示,部門管理,人事管理,員工管理三個模塊等等。
二、項目運行
環(huán)境配置: 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); } /** * 根據(jù)id獲取員工具體信息 * @param id * @return */ @GetMapping("/getUserById") public EmployeeDTO getUserAllInfoById(@RequestParam(name = "id") Integer id) { return employeeService.getUserById(id); } /** * 根據(jù)員工獲取信息 * @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 實戰(zhàn)范例之員工管理系統(tǒng)的實現(xiàn)的詳細內(nèi)容,更多關于Java 員工管理系統(tǒng)的資料請關注腳本之家其它相關文章!
相關文章
Spring?Boot?使用?Disruptor?做內(nèi)部高性能消息隊列
這篇文章主要介紹了Spring?Boot?使用?Disruptor?做內(nèi)部高性能消息隊列,工作中遇到項目使用Disruptor做消息隊列,對你沒看錯,不是Kafka,也不是rabbitmq。Disruptor有個最大的優(yōu)點就是快,還有一點它是開源的哦,下面做個簡單的記錄2022-06-06基于javascript實現(xiàn)獲取最短路徑算法代碼實例
這篇文章主要介紹了基于javascript實現(xiàn)獲取最短路徑算法代碼實例,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友可以參考下2020-02-02springMVC實現(xiàn)前臺帶進度條文件上傳的示例代碼
本篇文章主要介紹了springMVC實現(xiàn)前臺帶進度條文件上傳的示例代碼,具有一定的參考價值,有興趣的可以了解一下。2017-01-01Java使用Kaptcha實現(xiàn)簡單的驗證碼生成器
這篇文章主要為大家詳細介紹了Java如何使用Kaptcha實現(xiàn)簡單的驗證碼生成器,文中的示例代碼講解詳細,具有一定的借鑒價值,有需要的小伙伴可以參考下2024-02-02