ReceiptController.java 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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.ReceiptService;
  14. import java.util.Map;
  15. @Api(tags = "收付款单API接口")
  16. @RestController
  17. @RequestMapping("/mac/receipt")
  18. public class ReceiptController {
  19. public BaseService<RecPay> getService() {
  20. return receiptService;
  21. }
  22. @Autowired
  23. private ReceiptService receiptService;
  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 receiptService.selectByCond(recPayQuery);
  33. }
  34. /**
  35. * @desc : 条件查询--客户详情的收款列表
  36. * @author : 姜永辉
  37. * @date : 2023/1/9 10:36
  38. */
  39. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  40. @PostMapping({"list_by_cus"})
  41. public ResponseResultVO<PageList<RecPayResponse>> selectByCondCus(@RequestBody RecPayQuery recPayQuery) {
  42. return receiptService.selectByCondCus(recPayQuery);
  43. }
  44. /**
  45. * @desc :查询收款明细(货物、收款、附件)
  46. * @author : 付斌
  47. * @date : 2024-02-28 13:24
  48. */
  49. @PostMapping({"select_rp_info_by_id/{id}"})
  50. public ResponseResultVO<Map<String, Object>> selectRpInfoById(@PathVariable String id) {
  51. return receiptService.selectRpInfoById(id);
  52. }
  53. /**
  54. * @desc : 通过ID查询
  55. * @author : 付斌
  56. * @date : 2023/1/9 10:41
  57. */
  58. @PostMapping({"/{id}"})
  59. public ResponseResultVO selectById(@PathVariable String id) {
  60. return receiptService.selectById(id);
  61. }
  62. /**
  63. * @desc : 新建客户收款
  64. * @author : 付斌
  65. * @date : 2023/1/9 10:48
  66. */
  67. @ApiOperation(value = "新建客户收款", notes = "新建客户收款")
  68. @PostMapping({"insert_receipt"})
  69. public ResponseResultVO<?> insertReceipt(@RequestBody RecPayVO recPayVO) {
  70. return receiptService.insertReceipt(recPayVO);
  71. }
  72. /**
  73. * @desc : 新建客户退款
  74. * @author : 付斌
  75. * @date : 2023/1/9 10:48
  76. */
  77. @ApiOperation(value = "新建客户退款", notes = "新建客户退款")
  78. @PostMapping({"insert_refund"})
  79. public ResponseResultVO<?> insertRefund(@RequestBody RecPayVO recPayVO) {
  80. return receiptService.insertRefund(recPayVO);
  81. }
  82. /**
  83. * @desc : 编辑客户收款/退款
  84. * @author : 付斌
  85. * @date : 2023/1/9 10:49
  86. */
  87. @ApiOperation(value = "编辑客户收款/退款", notes = "编辑客户收款/退款")
  88. @PostMapping({"update"})
  89. public ResponseResultVO<?> update(@RequestBody RecPayVO recPayVO) {
  90. return receiptService.update(recPayVO);
  91. }
  92. /**
  93. * @desc :查询收款明细(编辑用)
  94. * @author : 付斌
  95. * @date : 2024-02-28 13:24
  96. */
  97. @ApiOperation(value = "查询收款明细(编辑用)", notes = "查询收款明细(编辑用)")
  98. @PostMapping({"get_rp_for_update/{id}"})
  99. public ResponseResultVO<?> getRpForUpdate(@PathVariable String id) {
  100. return receiptService.getRpForUpdate(id);
  101. }
  102. /**
  103. * @desc : 新建应收收款(收款+冲应收)
  104. * @author : 付斌
  105. * @date : 2023/1/9 10:48
  106. */
  107. @ApiOperation(value = "新建应收收款", notes = "新建应收收款")
  108. @PostMapping({"insert_receivable_receipt"})
  109. public ResponseResultVO<?> insertReceivableReceipt(@RequestBody RecPayVO recPayVO) {
  110. return receiptService.insertReceivableReceipt(recPayVO);
  111. }
  112. /**
  113. * @desc : 更新应收收款(小编辑)
  114. * @author : 付斌
  115. * @date : 2023/1/9 10:48
  116. */
  117. @ApiOperation(value = "更新应收收款", notes = "更新应收收款")
  118. @PostMapping({"update_receivable_receipt"})
  119. public ResponseResultVO<?> updateReceivableReceipt(@RequestBody RecPayVO recPayVO) {
  120. return receiptService.updateReceivableReceipt(recPayVO);
  121. }
  122. /**
  123. * @desc : 作废
  124. * @author : 付斌
  125. * @date : 2024-03-08 16:36
  126. */
  127. @ApiOperation(value = "作废", notes = "作废")
  128. @PostMapping({"invalid/{id}"})
  129. public ResponseResultVO<?> invalid(@PathVariable String id) {
  130. return receiptService.invalid(id);
  131. }
  132. /**
  133. * @desc : 获取应收收款(编辑用)
  134. * @author : 付斌
  135. * @date : 2024-03-03 9:28
  136. */
  137. @ApiOperation(value = "获取应收收款(编辑用)", notes = "获取应收收款(编辑用)")
  138. @PostMapping({"get_receivable_receipt_for_update/{id}"})
  139. public ResponseResultVO<?> getReceivableReceiptForUpdate(@PathVariable String id) {
  140. return receiptService.getReceivableReceiptForUpdate(id);
  141. }
  142. /**
  143. * @desc : 供应商收退款查询
  144. * @author : 于继渤
  145. * @date : 2024/7/5 10:36
  146. */
  147. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  148. @PostMapping({"get_rp_sup_list"})
  149. public ResponseResultVO<PageList<RecPayResponse>> getRpSupList(@RequestBody RecPayQuery recPayQuery) {
  150. return receiptService.getRpSupList(recPayQuery);
  151. }
  152. }