OtherPayableController.java 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. package com.dk.mdm.controller.mac;
  2. import com.dk.common.model.pojo.PageList;
  3. import com.dk.common.response.ResponseResultVO;
  4. import com.dk.mdm.model.pojo.mac.OtherPayable;
  5. import com.dk.common.service.BaseService;
  6. import com.dk.mdm.model.query.mac.OtherPayableQuery;
  7. import com.dk.mdm.model.response.mac.OtherPayableResponse;
  8. import com.dk.mdm.model.vo.mac.OtherPayableVO;
  9. import io.swagger.annotations.ApiOperation;
  10. import org.springframework.web.bind.annotation.*;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import io.swagger.annotations.Api;
  13. import com.dk.mdm.service.mac.OtherPayableService;
  14. import java.util.Map;
  15. @Api(tags = "其他支出单API接口")
  16. @RestController
  17. @RequestMapping("/mac/otherPayable")
  18. public class OtherPayableController{
  19. public BaseService<OtherPayable> getService() {
  20. return otherPayableService;
  21. }
  22. @Autowired
  23. private OtherPayableService otherPayableService;
  24. /**
  25. * @desc : 条件查询
  26. * @author : 付斌
  27. * @date : 2023/1/9 10:36
  28. */
  29. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  30. @PostMapping({"list_by"})
  31. public ResponseResultVO<PageList<OtherPayableResponse>> selectByCond(@RequestBody OtherPayableQuery otherPayableQuery) {
  32. return otherPayableService.selectByCond(otherPayableQuery);
  33. }
  34. /**
  35. * @desc :查询其它收入明细(明细附件)
  36. * @author : 付斌
  37. * @date : 2024-02-28 13:24
  38. */
  39. @PostMapping({"select_other_payable_info_by_id/{id}"})
  40. public ResponseResultVO<Map<String, Object>> selectOtherPayableInfoById(@PathVariable String id) {
  41. return otherPayableService.selectOtherPayableInfoById(id);
  42. }
  43. /**
  44. * @desc : 新建方法
  45. * @author : 付斌
  46. * @date : 2023/1/9 10:48
  47. */
  48. @ApiOperation(value = "新建", notes = "新建")
  49. @PostMapping({"insert"})
  50. public ResponseResultVO<?> insert(@RequestBody OtherPayableVO otherPayableVO) {
  51. return otherPayableService.insert(otherPayableVO);
  52. }
  53. /**
  54. * @desc : 编辑方法
  55. * @author : 付斌
  56. * @date : 2023/1/9 10:49
  57. */
  58. @ApiOperation(value = "编辑", notes = "编辑")
  59. @PostMapping({"update"})
  60. public ResponseResultVO<?> update(@RequestBody OtherPayableVO otherPayableVO) {
  61. return otherPayableService.update(otherPayableVO);
  62. }
  63. /**
  64. * @desc :查询其它收入明细(明细附件)
  65. * @author : 付斌
  66. * @date : 2024-02-28 13:24
  67. */
  68. @PostMapping({"get_other_payable_for_update/{id}"})
  69. public ResponseResultVO<?> getOtherPayableForUpdate(@PathVariable String id) {
  70. return otherPayableService.getOtherPayableForUpdate(id);
  71. }
  72. /**
  73. * @desc : 作废
  74. * @author : 付斌
  75. * @date : 2024-03-08 16:36
  76. */
  77. @ApiOperation(value = "作废", notes = "作废")
  78. @PostMapping({"invalid/{id}"})
  79. public ResponseResultVO<?> invalid(@PathVariable String id) {
  80. return otherPayableService.invalid(id);
  81. }
  82. }