EEmployeeInfoController.java 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package com.zksy.controller.info;
  2. import com.zksy.info.domain.EEmployeeInfo;
  3. import com.zksy.info.service.EEmployeeInfoService;
  4. import com.zksy.property.domain.AHouseType;
  5. import com.zksy.property.service.AHouseTypeService;
  6. import com.zksy.utils.AjaxResult;
  7. import io.swagger.annotations.Api;
  8. import io.swagger.annotations.ApiOperation;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.web.bind.annotation.*;
  11. import org.springframework.web.multipart.MultipartFile;
  12. /**
  13. * @author Administrator
  14. * @version 1.0
  15. * @project enterprise-assets-service
  16. * @description 员工基本信息控制层
  17. * @date 2025/6/24 14:33:13
  18. */
  19. @RestController
  20. @RequestMapping("/eemployeeInfo")
  21. @Api(tags = "员工基本信息控制层",description = "员工基本信息控制层desc")
  22. public class EEmployeeInfoController {
  23. @Autowired
  24. private EEmployeeInfoService service;
  25. @GetMapping("/getById/{borrowId}")
  26. @ApiOperation(value = "员工基本信息查询")
  27. public AjaxResult getById(@PathVariable String borrowId) {
  28. return AjaxResult.success(service.getById(borrowId));
  29. }
  30. @GetMapping("/getList")
  31. @ApiOperation(value = "员工基本信息查询所有")
  32. public AjaxResult getList(String workNumber,String fullName) {
  33. return AjaxResult.success(service.getEEmployeeInfoList(workNumber, fullName));
  34. }
  35. @GetMapping("/findByPage")
  36. @ApiOperation(value = "员工基本信息查询分页")
  37. public AjaxResult findByPage(long pageNum, long pageSize, String workNumber,String fullName){
  38. return AjaxResult.success(service.findByPage(pageNum, pageSize, workNumber, fullName));
  39. }
  40. @PostMapping("/save")
  41. @ApiOperation(value = "员工基本信息保存")
  42. public AjaxResult save(@RequestBody EEmployeeInfo eemployeeInfo, MultipartFile multipartFile) {
  43. return service.saveEEmployeeInfo(eemployeeInfo, multipartFile)? AjaxResult.success(eemployeeInfo): AjaxResult.error("保存失败");
  44. }
  45. @PostMapping("/update")
  46. @ApiOperation(value = "员工基本信息修改")
  47. public AjaxResult update(@RequestBody EEmployeeInfo eemployeeInfo, MultipartFile multipartFile) {
  48. return service.updateEEmployeeInfo(eemployeeInfo, multipartFile)? AjaxResult.success(eemployeeInfo): AjaxResult.error("修改失败");
  49. }
  50. @PostMapping("/deleteBatch")
  51. @ApiOperation(value = "员工基本信息删除")
  52. public AjaxResult delete(@RequestBody String[] ids) {
  53. return service.removeBatchEEmployeeInfo(ids)? AjaxResult.success(): AjaxResult.error("删除失败");
  54. }
  55. }