OutboundSaleOrderController.java 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. package com.dk.mdm.controller.ivt.outBound;
  2. import com.dk.common.model.pojo.PageList;
  3. import com.dk.common.response.ResponseResultUtil;
  4. import com.dk.common.response.ResponseResultVO;
  5. import com.dk.common.service.BaseService;
  6. import com.dk.mdm.model.pojo.ivt.Outbound;
  7. import com.dk.mdm.model.query.ivt.OutboundQuery;
  8. import com.dk.mdm.model.query.sale.OrderQuery;
  9. import com.dk.mdm.model.response.ivt.InboundResponse;
  10. import com.dk.mdm.model.response.ivt.OutboundResponse;
  11. import com.dk.mdm.model.response.sale.OrderResponse;
  12. import com.dk.mdm.model.vo.ivt.OutboundItemVO;
  13. import com.dk.mdm.model.vo.ivt.OutboundVO;
  14. import com.dk.mdm.service.ivt.outbound.OutboundSaleOrderService;
  15. import io.swagger.annotations.Api;
  16. import io.swagger.annotations.ApiOperation;
  17. import org.springframework.beans.factory.annotation.Autowired;
  18. import org.springframework.web.bind.annotation.*;
  19. import javax.validation.Valid;
  20. import java.util.List;
  21. import java.util.Map;
  22. @Api(tags = "销售出库单API接口")
  23. @RestController
  24. @RequestMapping("/ivt/outbound_sale_order")
  25. public class OutboundSaleOrderController {
  26. public BaseService<Outbound> getService() {
  27. return outboundSaleOrderService;
  28. }
  29. @Autowired
  30. private OutboundSaleOrderService outboundSaleOrderService;
  31. /**
  32. * @desc : 销售出库新建
  33. * @date : 2024/3/18 15:22
  34. * @author : 寇珊珊
  35. */
  36. @ApiOperation(
  37. value = "销售出库新建",
  38. notes = "销售出库新建"
  39. )
  40. @PostMapping({"outbound_insert"})
  41. public ResponseResultVO<?> saleOrderOutboundInsert(@Valid @RequestBody OutboundVO outboundVO) {
  42. return outboundSaleOrderService.saleOrderOutboundInsert(outboundVO, false);
  43. }
  44. /**
  45. * @desc : 销售出库办理
  46. * @date : 2024/3/18 15:22
  47. * @author : 寇珊珊
  48. */
  49. @ApiOperation(
  50. value = "销售出库办理",
  51. notes = "销售出库办理"
  52. )
  53. @PostMapping({"handle_outbound"})
  54. public ResponseResultVO<?> saleOrderHandleOutbound(@Valid @RequestBody OutboundVO outboundVO) {
  55. return outboundSaleOrderService.saleOrderHandleOutbound(outboundVO);
  56. }
  57. /**
  58. * @desc : 销售出库撤销
  59. * @date : 2024/3/18 15:22
  60. * @author : 寇珊珊
  61. */
  62. @ApiOperation(
  63. value = "销售出库撤销",
  64. notes = "销售出库撤销"
  65. )
  66. @PostMapping({"sale_order_outbound_cancel"})
  67. public ResponseResultVO<?> saleOrderOutboundCancel(@Valid @RequestBody OutboundVO outboundVO) {
  68. return outboundSaleOrderService.saleOrderOutboundCancel(outboundVO);
  69. }
  70. /**
  71. * @desc : 销售出库编辑
  72. * @date : 2024/3/26 9:51
  73. * @author : 寇珊珊
  74. */
  75. @ApiOperation(
  76. value = "销售出库编辑",
  77. notes = "销售出库编辑"
  78. )
  79. @PostMapping({"outbound_update"})
  80. public ResponseResultVO<?> otherOutboundUpdate(@Valid @RequestBody OutboundVO outboundVO) {
  81. return outboundSaleOrderService.saleOutboundUpdate(outboundVO);
  82. }
  83. /**
  84. * @desc : 销售出库作废
  85. * @date : 2024/3/26 9:51
  86. * @author : 寇珊珊
  87. */
  88. @ApiOperation(
  89. value = "销售出库作废",
  90. notes = "销售出库作废"
  91. )
  92. @PostMapping({"repeal/{id}"})
  93. public ResponseResultVO<?> otherOutboundRepeal(@PathVariable String id) {
  94. return outboundSaleOrderService.saleOutboundRepeal(id);
  95. }
  96. /********************************************** 销售出库查询相关方法begin *************************************/
  97. /**
  98. * @desc : 一览页销售出库
  99. * @author : 付斌
  100. * @date : 2023/1/9 10:36
  101. */
  102. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  103. @PostMapping({"list_by"})
  104. public ResponseResultVO<PageList<OutboundResponse>> selectByCond(@RequestBody OutboundQuery outboundQuery) {
  105. return outboundSaleOrderService.selectByCond(outboundQuery);
  106. }
  107. /**
  108. * @desc : 一览页销售出库明细(货物、附件)
  109. * @author : 付斌
  110. * @date : 2024-03-07 16:36
  111. */
  112. @PostMapping({"select_outbound_info_by_id/{id}"})
  113. public ResponseResultVO<Map<String, Object>> selectOutboundInfoById(@PathVariable String id) {
  114. return outboundSaleOrderService.selectOutboundInfoById(id);
  115. }
  116. /**
  117. * @desc : 获取销售出库信息(编辑用)
  118. * @author : 付斌
  119. * @date : 2024-03-03 9:28
  120. */
  121. @ApiOperation(value = "编辑出库单", notes = "编辑出库单")
  122. @PostMapping({"get_outbound_for_update/{id}"})
  123. public ResponseResultVO<?> getOutboundForUpdate(@PathVariable String id) {
  124. return outboundSaleOrderService.getOutboundForUpdate(id);
  125. }
  126. /**
  127. * @desc : 获取销售出库信息(编辑用,适用于直接新建的出库单)
  128. * @author : 付斌
  129. * @date : 2024-03-03 9:28
  130. */
  131. @ApiOperation(value = "编辑出库单", notes = "编辑出库单")
  132. @PostMapping({"get_outbound_together_for_update/{id}"})
  133. public ResponseResultVO<?> getOutboundTogetherForUpdate(@PathVariable String id) {
  134. return outboundSaleOrderService.getOutboundTogetherForUpdate(id);
  135. }
  136. /**
  137. * @desc : 获取销售出库信息(新建退货用)
  138. * @author : 付斌
  139. * @date : 2024-03-03 9:28
  140. */
  141. @ApiOperation(value = "编辑出库单", notes = "编辑出库单")
  142. @PostMapping({"get_out_for_return/{id}"})
  143. public ResponseResultVO<?> getOutForReturn(@PathVariable String id) {
  144. return outboundSaleOrderService.getOutForReturn(id);
  145. }
  146. /**
  147. * @desc : 查询出库明细(货物、附件)
  148. * @author : 付斌
  149. * @date : 2024/3/6 10:36
  150. */
  151. @PostMapping({"/{id}"})
  152. public ResponseResultVO selectById(@PathVariable String id) {
  153. return outboundSaleOrderService.selectById(id);
  154. }
  155. /********************************************** 销售出库查询相关方法end *************************************/
  156. // /**
  157. // * @desc : 条件查询
  158. // * @date : 2024/3/18 15:23
  159. // * @author : 寇珊珊
  160. // */
  161. // @ApiOperation(value = "条件查询", notes = "条件查询")
  162. // @PostMapping({"list_by"})
  163. // public ResponseResultVO<PageList<InboundResponse>> selectByCond(@RequestBody OutboundQuery outboundQuery) {
  164. // return outboundSaleOrderService.selectByCond(outboundQuery);
  165. // }
  166. //
  167. // /**
  168. // * @desc : 明细信息条件查询
  169. // * @date : 2024/3/18 15:23
  170. // * @author : 寇珊珊
  171. // */
  172. // @ApiOperation(value = "明细信息条件查询", notes = "明细信息条件查询")
  173. // @PostMapping({"select_item_info_by_id/{id}"})
  174. // public ResponseResultVO<Map<String, Object>> selectOutBoundSaleOrderItemInfoById(@PathVariable String id) {
  175. // return outboundSaleOrderService.selectOutBoundSaleOrderItemInfoById(id);
  176. // }
  177. // /**
  178. // * @desc : 获取单据信息(编辑用)
  179. // * @date : 2024/3/18 15:22
  180. // * @author : 寇珊珊
  181. // */
  182. // @ApiOperation(value = "获取单据信息(编辑用)", notes = "获取单据信息(编辑用)")
  183. // @PostMapping({"select_by_update/{id}"})
  184. // public ResponseResultVO<?> selectByUpdate(@PathVariable String id) {
  185. // return outboundSaleOrderService.selectByUpdate(id);
  186. // }
  187. /**
  188. * @desc : 条件查询(总单带明细)
  189. * @author : 于继渤
  190. * @date : 2023/1/9 10:36
  191. */
  192. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  193. @PostMapping({"select_by_cond_detail"})
  194. public ResponseResultVO<PageList<OutboundResponse>> selectByCondDetail(@RequestBody OutboundQuery outboundQuery) {
  195. return outboundSaleOrderService.selectByCondDetail(outboundQuery);
  196. }
  197. }