RecPayController.java 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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.RecPay;
  5. import com.dk.common.service.BaseService;
  6. import com.dk.mdm.model.query.mac.RecPayQuery;
  7. import com.dk.mdm.model.response.mac.RecPayResponse;
  8. import com.dk.mdm.model.vo.mac.RecPayVO;
  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.RecPayService;
  14. import java.util.Map;
  15. @Api(tags = "收付款单API接口")
  16. @RestController
  17. @RequestMapping("/mac/recPay")
  18. public class RecPayController{
  19. public BaseService<RecPay> getService() {
  20. return recPayService;
  21. }
  22. @Autowired
  23. private RecPayService recPayService;
  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<RecPayResponse>> selectByCond(@RequestBody RecPayQuery recPayQuery) {
  32. return recPayService.selectByCond(recPayQuery);
  33. }
  34. /**
  35. * @desc :查询收款明细(货物、收款、附件)
  36. * @author : 付斌
  37. * @date : 2024-02-28 13:24
  38. */
  39. @PostMapping({"select_rp_info_by_id/{id}"})
  40. public ResponseResultVO<Map<String, Object>> selectRpInfoById(@PathVariable String id) {
  41. return recPayService.selectRpInfoById(id);
  42. }
  43. /**
  44. * @desc : 通过ID查询
  45. * @author : 付斌
  46. * @date : 2023/1/9 10:41
  47. */
  48. @PostMapping({"/{id}"})
  49. public ResponseResultVO selectById(@PathVariable String id) {
  50. return recPayService.selectById(id);
  51. }
  52. /**
  53. * @desc : 新建客户收款
  54. * @author : 付斌
  55. * @date : 2023/1/9 10:48
  56. */
  57. @ApiOperation(value = "新建客户收款", notes = "新建客户收款")
  58. @PostMapping({"insert_receipt"})
  59. public ResponseResultVO<?> insertReceipt(@RequestBody RecPayVO recPayVO) {
  60. return recPayService.insertReceipt(recPayVO);
  61. }
  62. /**
  63. * @desc : 新建客户退款
  64. * @author : 付斌
  65. * @date : 2023/1/9 10:48
  66. */
  67. @ApiOperation(value = "新建客户退款", notes = "新建客户退款")
  68. @PostMapping({"insert_refund"})
  69. public ResponseResultVO<?> insertRefund(@RequestBody RecPayVO recPayVO) {
  70. return recPayService.insertRefund(recPayVO);
  71. }
  72. /**
  73. * @desc : 编辑客户收款/退款
  74. * @author : 付斌
  75. * @date : 2023/1/9 10:49
  76. */
  77. @ApiOperation(value = "编辑客户收款/退款", notes = "编辑客户收款/退款")
  78. @PostMapping({"update"})
  79. public ResponseResultVO<?> update(@RequestBody RecPayVO recPayVO) {
  80. return recPayService.update(recPayVO);
  81. }
  82. /**
  83. * @desc :查询收款明细(编辑用)
  84. * @author : 付斌
  85. * @date : 2024-02-28 13:24
  86. */
  87. @ApiOperation(value = "查询收款明细(编辑用)", notes = "查询收款明细(编辑用)")
  88. @PostMapping({"get_rp_for_update/{id}"})
  89. public ResponseResultVO<?> getRpForUpdate(@PathVariable String id) {
  90. return recPayService.getRpForUpdate(id);
  91. }
  92. /**
  93. * @desc : 新建应收收款(收款+冲应收)
  94. * @author : 付斌
  95. * @date : 2023/1/9 10:48
  96. */
  97. @ApiOperation(value = "新建应收收款", notes = "新建应收收款")
  98. @PostMapping({"insert_receivable_receipt"})
  99. public ResponseResultVO<?> insertReceivableReceipt(@RequestBody RecPayVO recPayVO) {
  100. return recPayService.insertReceivableReceipt(recPayVO);
  101. }
  102. }