InboundController.java 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. package com.dk.mdm.controller.ivt;
  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.Inbound;
  6. import com.dk.mdm.model.query.ivt.InboundQuery;
  7. import com.dk.mdm.model.response.ivt.InboundResponse;
  8. import com.dk.mdm.model.response.pur.PurchaseResponse;
  9. import com.dk.mdm.model.vo.ivt.InboundVO;
  10. import com.dk.mdm.model.vo.ivt.OutboundVO;
  11. import com.dk.mdm.service.ivt.InboundPurchaseService;
  12. import com.dk.mdm.service.ivt.InboundService;
  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. @Api(tags = "入库单API接口")
  19. @RestController
  20. @RequestMapping("/ivt/inbound")
  21. public class InboundController{
  22. public BaseService<Inbound> getService() {
  23. return inboundService;
  24. }
  25. @Autowired
  26. private InboundService inboundService;
  27. @Autowired
  28. private InboundPurchaseService inheritedPurchaseService;
  29. /**
  30. * @desc : 条件查询
  31. * @author : 王英杰
  32. * @date : 2024/3/8 10:58
  33. */
  34. @ApiOperation(
  35. value = "分页、关联、条件查询",
  36. notes = "分页、关联、条件查询"
  37. )
  38. @PostMapping({"list_by"})
  39. public ResponseResultVO<PageList<InboundResponse>> selectByCond(@RequestBody InboundQuery inboundQuery) {
  40. return inboundService.selectByCond(inboundQuery);
  41. }
  42. /**
  43. * @desc : 查看来源单据,总单加明细 采购入库用
  44. * @author : 王英杰
  45. * @date : 2024/3/6 10:36
  46. */
  47. @PostMapping({"/{id}"})
  48. public ResponseResultVO selectById(@PathVariable String id) {
  49. return inboundService.selectById(id);
  50. }
  51. /**
  52. * @desc : 查看来源单据,总单加明细 采购退货用
  53. * @author : 于继渤
  54. * @date : 2024/3/6 10:36
  55. */
  56. @ApiOperation(value = "条件查询", notes = "条件查询")
  57. @PostMapping({"select_inbound_and_item"})
  58. public ResponseResultVO<PageList<InboundResponse>> selectInboundAndItem(@RequestBody InboundQuery inboundQuery) {
  59. return inboundService.selectInboundAndItem(inboundQuery);
  60. }
  61. /**
  62. * @desc : 新建入库单
  63. * @author : 王英杰
  64. * @date : 2024/3/6 10:36
  65. */
  66. @ApiOperation(value = "新建出库单", notes = "新建出库单")
  67. @PostMapping({"insert"})
  68. public ResponseResultVO<?> insert(@RequestBody InboundVO inboundVO) {
  69. return inboundService.insert(inboundVO);
  70. }
  71. /**
  72. * @desc : 采购入库新建
  73. * @date : 2024/3/7 14:00
  74. * @author : 王英杰
  75. */
  76. @ApiOperation(
  77. value = "采购入库新建",
  78. notes = "采购入库新建"
  79. )
  80. @PostMapping({"purchase_inbound_insert"})
  81. public ResponseResultVO<?> purchaseInboundInsert(@Valid @RequestBody InboundVO inboundVO) {
  82. return inheritedPurchaseService.purchaseInboundInsert(inboundVO);
  83. }
  84. /**
  85. * @desc : 采购入库办理
  86. * @date : 2024/3/7 15:34
  87. * @author : 王英杰
  88. */
  89. @ApiOperation(
  90. value = "采购入库办理",
  91. notes = "采购入库办理"
  92. )
  93. @PostMapping({"purchase_handle_inbound"})
  94. public ResponseResultVO<?> purchaseHandleInbound(@RequestBody InboundVO inboundVO) {
  95. return inheritedPurchaseService.purchaseHandleInbound(inboundVO);
  96. }
  97. }