ExampleInfoController.java 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. package com.fjhx.controller.example;
  2. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  3. import com.fjhx.entity.example.ExampleInfo;
  4. import com.fjhx.service.example.ExampleInfoService;
  5. import org.springblade.core.tool.api.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. import java.util.List;
  12. import java.util.Map;
  13. /**
  14. * <p>
  15. * 流程实例 前端控制器
  16. * </p>
  17. *
  18. * @author ${author}
  19. * @since 2022-08-18
  20. */
  21. @RestController
  22. @RequestMapping("/exampleInfo")
  23. public class ExampleInfoController {
  24. @Autowired
  25. private ExampleInfoService exampleInfoService;
  26. /**
  27. * 代办
  28. */
  29. @PostMapping("/getWaitingProcessingPage")
  30. public R getWaitingProcessingPage(@RequestBody Map<String, String> condition) {
  31. Page<Map<String, Object>> result = exampleInfoService.getWaitingProcessingPage(condition);
  32. return R.data(result);
  33. }
  34. /**
  35. * 审批记录
  36. */
  37. @PostMapping("/record")
  38. public R record(@RequestBody ExampleInfo exampleInfo) {
  39. List<Map<String, Object>> result = exampleInfoService.record(exampleInfo.getFlowLinkNo());
  40. return R.data(result);
  41. }
  42. /**
  43. * 展示流程
  44. */
  45. @PostMapping("/showFlow")
  46. public R showFlow(@RequestBody Map<String, String> condition) {
  47. List<Map<String, Object>> result = exampleInfoService.showFlow(condition.get("code"));
  48. return R.data(result);
  49. }
  50. /**
  51. * 已办
  52. */
  53. @PostMapping("/getDone")
  54. public R getDone(Map<String, String> condition) {
  55. Page<Map<String, Object>> result = exampleInfoService.getDone(condition);
  56. return R.data(result);
  57. }
  58. /**
  59. * 撤回
  60. */
  61. @PostMapping("/withdraw")
  62. public R withdraw(Map<String, Long> condition) {
  63. Long withdrawExampleInfoId = condition.get("withdrawExampleInfoId");
  64. Long withdrawExampleDetailsId = condition.get("withdrawExampleDetailsId");
  65. exampleInfoService.withdraw(withdrawExampleInfoId, withdrawExampleDetailsId);
  66. return R.success();
  67. }
  68. /**
  69. * 撤销
  70. */
  71. @PostMapping("/revoke")
  72. public R revoke(Map<String, Long> condition) {
  73. Long withdrawExampleInfoId = condition.get("withdrawExampleInfoId");
  74. exampleInfoService.revoke(withdrawExampleInfoId);
  75. return R.success();
  76. }
  77. }