OutboundSaleOrderController.java 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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,false);
  40. }
  41. /**
  42. * @desc : 销售出库办理
  43. * @date : 2024/3/18 15:22
  44. * @author : 寇珊珊
  45. */
  46. @ApiOperation(
  47. value = "销售出库办理",
  48. notes = "销售出库办理"
  49. )
  50. @PostMapping({"handle_outbound"})
  51. public ResponseResultVO<?> saleOrderHandleOutbound(@Valid @RequestBody OutboundVO outboundVO) {
  52. return outboundSaleOrderService.saleOrderHandleOutbound(outboundVO);
  53. }
  54. /**
  55. * @desc : 销售出库撤销
  56. * @date : 2024/3/18 15:22
  57. * @author : 寇珊珊
  58. */
  59. @ApiOperation(
  60. value = "销售出库撤销",
  61. notes = "销售出库撤销"
  62. )
  63. @PostMapping({"sale_order_outbound_cancel"})
  64. public ResponseResultVO<?> saleOrderOutboundCancel(@Valid @RequestBody OutboundVO outboundVO) {
  65. return outboundSaleOrderService.saleOrderOutboundCancel(outboundVO);
  66. }
  67. /**
  68. * @desc : 销售出库编辑
  69. * @date : 2024/3/26 9:51
  70. * @author : 寇珊珊
  71. */
  72. @ApiOperation(
  73. value = "销售出库编辑",
  74. notes = "销售出库编辑"
  75. )
  76. @PostMapping({"outbound_update"})
  77. public ResponseResultVO<?> otherOutboundUpdate(@Valid @RequestBody OutboundVO outboundVO) {
  78. return outboundSaleOrderService.saleOutboundUpdate(outboundVO);
  79. }
  80. /**
  81. * @desc : 销售出库作废
  82. * @date : 2024/3/26 9:51
  83. * @author : 寇珊珊
  84. */
  85. @ApiOperation(
  86. value = "销售出库作废",
  87. notes = "销售出库作废"
  88. )
  89. @PostMapping({"repeal/{id}"})
  90. public ResponseResultVO<?> otherOutboundRepeal(@PathVariable String id) {
  91. return outboundSaleOrderService.saleOutboundRepeal(id);
  92. }
  93. /********************************************** 销售出库查询相关方法begin *************************************/
  94. /**
  95. * @desc : 一览页销售出库
  96. * @author : 付斌
  97. * @date : 2023/1/9 10:36
  98. */
  99. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  100. @PostMapping({"list_by"})
  101. public ResponseResultVO<PageList<OutboundResponse>> selectByCond(@RequestBody OutboundQuery outboundQuery) {
  102. return outboundSaleOrderService.selectByCond(outboundQuery);
  103. }
  104. /**
  105. * @desc : 一览页销售出库明细(货物、附件)
  106. * @author : 付斌
  107. * @date : 2024-03-07 16:36
  108. */
  109. @PostMapping({"select_outbound_info_by_id/{id}"})
  110. public ResponseResultVO<Map<String, Object>> selectOutboundInfoById(@PathVariable String id) {
  111. return outboundSaleOrderService.selectOutboundInfoById(id);
  112. }
  113. /**
  114. * @desc : 获取销售出库信息(编辑用)
  115. * @author : 付斌
  116. * @date : 2024-03-03 9:28
  117. */
  118. @ApiOperation(value = "编辑出库单", notes = "编辑出库单")
  119. @PostMapping({"get_outbound_for_update/{id}"})
  120. public ResponseResultVO<?> getOutboundForUpdate(@PathVariable String id) {
  121. return outboundSaleOrderService.getOutboundForUpdate(id);
  122. }
  123. /**
  124. * @desc : 获取销售出库信息(编辑用,适用于直接新建的出库单)
  125. * @author : 付斌
  126. * @date : 2024-03-03 9:28
  127. */
  128. @ApiOperation(value = "编辑出库单", notes = "编辑出库单")
  129. @PostMapping({"get_outbound_together_for_update/{id}"})
  130. public ResponseResultVO<?> getOutboundTogetherForUpdate(@PathVariable String id) {
  131. return outboundSaleOrderService.getOutboundTogetherForUpdate(id);
  132. }
  133. /**
  134. * @desc : 获取销售出库信息(新建退货用)
  135. * @author : 付斌
  136. * @date : 2024-03-03 9:28
  137. */
  138. @ApiOperation(value = "编辑出库单", notes = "编辑出库单")
  139. @PostMapping({"get_out_for_return/{id}"})
  140. public ResponseResultVO<?> getOutForReturn(@PathVariable String id) {
  141. return outboundSaleOrderService.getOutForReturn(id);
  142. }
  143. /**
  144. * @desc : 查询出库明细(货物、附件)
  145. * @author : 付斌
  146. * @date : 2024/3/6 10:36
  147. */
  148. @PostMapping({"/{id}"})
  149. public ResponseResultVO selectById(@PathVariable String id) {
  150. return outboundSaleOrderService.selectById(id);
  151. }
  152. /********************************************** 销售出库查询相关方法end *************************************/
  153. // /**
  154. // * @desc : 条件查询
  155. // * @date : 2024/3/18 15:23
  156. // * @author : 寇珊珊
  157. // */
  158. // @ApiOperation(value = "条件查询", notes = "条件查询")
  159. // @PostMapping({"list_by"})
  160. // public ResponseResultVO<PageList<InboundResponse>> selectByCond(@RequestBody OutboundQuery outboundQuery) {
  161. // return outboundSaleOrderService.selectByCond(outboundQuery);
  162. // }
  163. //
  164. // /**
  165. // * @desc : 明细信息条件查询
  166. // * @date : 2024/3/18 15:23
  167. // * @author : 寇珊珊
  168. // */
  169. // @ApiOperation(value = "明细信息条件查询", notes = "明细信息条件查询")
  170. // @PostMapping({"select_item_info_by_id/{id}"})
  171. // public ResponseResultVO<Map<String, Object>> selectOutBoundSaleOrderItemInfoById(@PathVariable String id) {
  172. // return outboundSaleOrderService.selectOutBoundSaleOrderItemInfoById(id);
  173. // }
  174. // /**
  175. // * @desc : 获取单据信息(编辑用)
  176. // * @date : 2024/3/18 15:22
  177. // * @author : 寇珊珊
  178. // */
  179. // @ApiOperation(value = "获取单据信息(编辑用)", notes = "获取单据信息(编辑用)")
  180. // @PostMapping({"select_by_update/{id}"})
  181. // public ResponseResultVO<?> selectByUpdate(@PathVariable String id) {
  182. // return outboundSaleOrderService.selectByUpdate(id);
  183. // }
  184. /**
  185. * @desc : 条件查询(总单带明细)
  186. * @author : 于继渤
  187. * @date : 2023/1/9 10:36
  188. */
  189. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  190. @PostMapping({"select_by_cond_detail"})
  191. public ResponseResultVO<PageList<OutboundResponse>> selectByCondDetail(@RequestBody OutboundQuery outboundQuery) {
  192. return outboundSaleOrderService.selectByCondDetail(outboundQuery);
  193. }
  194. }