CustomAnalyseController.java 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. package cn.cslg.pas.controller;
  2. import cn.cslg.pas.common.core.base.Constants;
  3. import cn.cslg.pas.common.dto.customAnalyse.SelectCustomAnalyseDTO;
  4. import cn.cslg.pas.common.dto.customAnalyse.SelectCustomAnalyseListDTO;
  5. import cn.cslg.pas.common.utils.Response;
  6. import cn.cslg.pas.common.vo.customAnalyse.CustomAnalyseIdVO;
  7. import cn.cslg.pas.common.vo.customAnalyse.CustomAnalyseVO;
  8. import cn.cslg.pas.common.vo.customAnalyse.SelectCustomAnalyseVO;
  9. import cn.cslg.pas.service.business.CustomAnalyseService;
  10. import io.swagger.v3.oas.annotations.Operation;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import org.springframework.web.bind.annotation.PostMapping;
  13. import org.springframework.web.bind.annotation.RequestBody;
  14. import org.springframework.web.bind.annotation.RequestMapping;
  15. import org.springframework.web.bind.annotation.RestController;
  16. import java.util.List;
  17. @RequestMapping(Constants.API_XiaoSHI + "/customAnalyse")
  18. @RestController
  19. public class CustomAnalyseController {
  20. @Autowired
  21. private CustomAnalyseService customAnalyseService;
  22. @Operation(summary = "查询组别")
  23. @PostMapping("/queryAnalyseGroup")
  24. public Response queryAnalyseGroup(@RequestBody SelectCustomAnalyseVO vo) {
  25. List<SelectCustomAnalyseListDTO> list = customAnalyseService.queryAnalyseGroup(vo);
  26. return Response.success(list);
  27. }
  28. @Operation(summary = "查询组别详情")
  29. @PostMapping("/queryAnalyseGroupDetail")
  30. public Response queryAnalyseGroupDetail(@RequestBody CustomAnalyseIdVO vo) {
  31. SelectCustomAnalyseDTO dto = customAnalyseService.queryAnalyseGroupDetail(vo);
  32. return Response.success(dto);
  33. }
  34. @Operation(summary = "添加组别")
  35. @PostMapping("/addAnalyseGroup")
  36. public Response addAnalyseGroup(@RequestBody CustomAnalyseVO vo) {
  37. Integer groupId = customAnalyseService.addAnalyseGroup(vo);
  38. return Response.success(groupId);
  39. }
  40. @Operation(summary = "编辑组别")
  41. @PostMapping("/editAnalyseGroup")
  42. public Response editAnalyseGroup(@RequestBody CustomAnalyseVO vo) {
  43. Integer groupId = customAnalyseService.editAnalyseGroup(vo);
  44. return Response.success(groupId);
  45. }
  46. @Operation(summary = "删除组别")
  47. @PostMapping("/delAnalyseGroup")
  48. public Response delAnalyseGroup(@RequestBody CustomAnalyseIdVO vo) {
  49. Integer groupId = customAnalyseService.delAnalyseGroup(vo);
  50. return Response.success(groupId);
  51. }
  52. }