OrderController.java 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. package com.dk.mdm.controller.sale;
  2. import com.dk.common.infrastructure.constant.Constant;
  3. import com.dk.common.model.pojo.PageList;
  4. import com.dk.common.response.ResponseResultVO;
  5. import com.dk.mdm.mapper.pur.PurchaseItemMapper;
  6. import com.dk.mdm.model.pojo.sale.Order;
  7. import com.dk.common.service.BaseService;
  8. import com.dk.mdm.model.query.sale.OrderQuery;
  9. import com.dk.mdm.model.response.sale.OrderResponse;
  10. import com.dk.mdm.model.vo.pur.PurchaseVO;
  11. import com.dk.mdm.model.vo.sale.OrderVO;
  12. import com.dk.mdm.service.pur.PurchaseService;
  13. import io.swagger.annotations.ApiOperation;
  14. import org.springframework.web.bind.annotation.*;
  15. import org.springframework.beans.factory.annotation.Autowired;
  16. import io.swagger.annotations.Api;
  17. import com.dk.mdm.service.sale.OrderService;
  18. import java.util.Map;
  19. @Api(tags = "销售订单API接口")
  20. @RestController
  21. @RequestMapping("/sale/order")
  22. public class OrderController {
  23. public BaseService<Order> getService() {
  24. return orderService;
  25. }
  26. @Autowired
  27. private OrderService orderService;
  28. /**
  29. * @desc : 条件查询
  30. * @author : 付斌
  31. * @date : 2023/1/9 10:36
  32. */
  33. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  34. @PostMapping({"list_by"})
  35. public ResponseResultVO<PageList<OrderResponse>> selectByCond(@RequestBody OrderQuery orderQuery) {
  36. return orderService.selectByCond(orderQuery);
  37. }
  38. /**
  39. * @desc : 条件查询(数量)小程序使用
  40. * @author : 周兴
  41. * @date : 2024/4/10 10:36
  42. */
  43. @ApiOperation(value = "条件查询(数量)小程序使用", notes = "条件查询(数量)小程序使用")
  44. @PostMapping({"count_order_by_cond"})
  45. public ResponseResultVO<?> countOrderByCond(@RequestBody OrderQuery orderQuery) {
  46. return orderService.countByCond(orderQuery);
  47. }
  48. /**
  49. * @desc : 以销定采 查询
  50. * @author : 王英杰
  51. * @date : 2023/3/14 10:36
  52. */
  53. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  54. @PostMapping({"purchase_based_on_sales_list_by"})
  55. public ResponseResultVO<PageList<Map<String, Object>>> purSaleSelectByCond(@RequestBody OrderQuery orderQuery) {
  56. return orderService.purSaleSelectByCond(orderQuery);
  57. }
  58. /**
  59. * @desc :查询订单明细(货物、收款、附件)
  60. * @author : 付斌
  61. * @date : 2024-02-28 13:24
  62. */
  63. @PostMapping({"select_order_info_by_id/{id}"})
  64. public ResponseResultVO<Map<String, Object>> selectOrderInfoById(@PathVariable String id) {
  65. return orderService.selectOrderInfoById(id);
  66. }
  67. /**
  68. * @desc : 通过ID查询
  69. * @author : 付斌
  70. * @date : 2023/1/9 10:41
  71. */
  72. @PostMapping({"/{id}"})
  73. public ResponseResultVO selectById(@PathVariable String id) {
  74. return orderService.selectById(id);
  75. }
  76. /**
  77. * @desc : 新建订单
  78. * @author : 付斌
  79. * @date : 2023/1/9 10:48
  80. */
  81. @ApiOperation(value = "新建订单", notes = "新建订单")
  82. @PostMapping({"insert"})
  83. public ResponseResultVO<?> insert(@RequestBody OrderVO orderVO) {
  84. return orderService.insert(orderVO);
  85. }
  86. /**
  87. * @desc : 编辑订单
  88. * @author : 付斌
  89. * @date : 2023/1/9 10:49
  90. */
  91. @ApiOperation(value = "编辑订单", notes = "编辑订单")
  92. @PostMapping({"update"})
  93. public ResponseResultVO<?> update(@RequestBody OrderVO orderVO) {
  94. return orderService.update(orderVO);
  95. }
  96. /**
  97. * @desc : 作废
  98. * @author : 付斌
  99. * @date : 2024-03-08 16:36
  100. */
  101. @ApiOperation(value = "作废", notes = "作废")
  102. @PostMapping({"invalid/{id}"})
  103. public ResponseResultVO<?> invalid(@PathVariable String id) {
  104. return orderService.invalid(id);
  105. }
  106. /**
  107. * @desc : 获取订单信息(编辑用)
  108. * @author : 付斌
  109. * @date : 2024-03-03 9:28
  110. */
  111. @ApiOperation(value = "获取订单信息(编辑用)", notes = "获取订单信息(编辑用)")
  112. @PostMapping({"get_order_for_update/{id}"})
  113. public ResponseResultVO<?> getOrderForUpdate(@PathVariable String id) {
  114. return orderService.getOrderForUpdate(id);
  115. }
  116. /**
  117. * @desc : 获取订单信息(出库用)
  118. * @author : 付斌
  119. * @date : 2024-03-06 12:58
  120. */
  121. @ApiOperation(value = "获取订单信息(出库用)", notes = "获取订单信息(出库用)")
  122. @PostMapping({"get_order_for_out/{id}"})
  123. public ResponseResultVO<?> getOrderForOut(@PathVariable String id) {
  124. return orderService.getOrderForOut(id);
  125. }
  126. /**
  127. * @desc : 获取订单信息(退货用)
  128. * @author : 付斌
  129. * @date : 2024-03-06 12:58
  130. */
  131. @ApiOperation(value = "获取订单信息(退货用)", notes = "获取订单信息(退货用)")
  132. @PostMapping({"get_order_for_return/{id}"})
  133. public ResponseResultVO<?> getOrderForReturn(@PathVariable String id) {
  134. return orderService.getOrderForReturn(id);
  135. }
  136. /**
  137. * @desc : 条件查询(总单带明细)
  138. * @author : 于继渤
  139. * @date : 2023/1/9 10:36
  140. */
  141. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  142. @PostMapping({"select_total_single_tape_detail_page"})
  143. public ResponseResultVO<PageList<OrderResponse>> selectTotalSingleTapeDetailPage(@RequestBody OrderQuery orderQuery) {
  144. return orderService.selectTotalSingleTapeDetailPage(orderQuery);
  145. }
  146. /**
  147. * @desc : 销售跟踪报表
  148. * @author : 宋扬
  149. * @date : 2024/4/24 17:16
  150. */
  151. @PostMapping("get_order_track_report")
  152. public ResponseResultVO<PageList> getOrderTrackReport(@RequestBody Map<String, Object> param) {
  153. return orderService.getOrderTrackReport(param);
  154. }
  155. /**
  156. * @desc : 作废
  157. * @author : 付斌
  158. * @date : 2024-03-08 16:36
  159. */
  160. @ApiOperation(value = "作废", notes = "作废")
  161. @PostMapping({"one_key_invalid/{id}"})
  162. public ResponseResultVO<?> oneKeyInvalid(@PathVariable String id) {
  163. return orderService.oneKeyInvalid(id);
  164. }
  165. }