OutboundSaleOrderController.java 8.0 KB

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