ZhcxInsideInspectionController.java 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. package com.rongwei.bsserver.controller;
  2. import com.rongwei.bscommon.sys.service.ZhcxInsideInspectionService;
  3. import com.rongwei.bsentity.dto.InsideInspectionOperRequest;
  4. import com.rongwei.bsentity.dto.inside.InsideInspectionDispatchRequest;
  5. import com.rongwei.rwcommon.base.R;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.web.bind.annotation.PostMapping;
  8. import org.springframework.web.bind.annotation.RequestBody;
  9. import org.springframework.web.bind.annotation.RequestMapping;
  10. import org.springframework.web.bind.annotation.RestController;
  11. /**
  12. * <p>
  13. * 内部报验-报验管理 前端控制器
  14. * </p>
  15. *
  16. * @author wm
  17. * @since 2024-05-21
  18. */
  19. @RestController
  20. @RequestMapping("/inside/inspection")
  21. public class ZhcxInsideInspectionController {
  22. @Autowired
  23. private ZhcxInsideInspectionService zhcxInsideInspectionService;
  24. /**
  25. * 发起
  26. *
  27. * @param req
  28. * @return
  29. */
  30. @PostMapping("/launch")
  31. public R launch(@RequestBody InsideInspectionOperRequest req){
  32. zhcxInsideInspectionService.launch(req);
  33. return R.ok();
  34. }
  35. /**
  36. * 派单
  37. *
  38. * @param req
  39. * @return
  40. */
  41. @PostMapping("/dispacth")
  42. public R dispacth(@RequestBody InsideInspectionDispatchRequest req){
  43. req.setDispatchFlag(1);
  44. zhcxInsideInspectionService.dispatch(req);
  45. return R.ok("派单成功");
  46. }
  47. /**
  48. * 派单
  49. *
  50. * @param req
  51. * @return
  52. */
  53. @PostMapping("/reDispatch")
  54. public R reDispatch(@RequestBody InsideInspectionDispatchRequest req){
  55. req.setDispatchFlag(2);
  56. zhcxInsideInspectionService.reDispatch(req);
  57. return R.ok("改派成功");
  58. }
  59. }