WarehousingController.java 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. package com.tld.controller;
  2. import com.tld.model.*;
  3. import com.tld.service.WarehousingService;
  4. import org.redisson.api.RedissonClient;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.web.bind.annotation.*;
  7. import javax.servlet.http.HttpServletRequest;
  8. import javax.servlet.http.HttpServletResponse;
  9. import java.util.Map;
  10. /**
  11. * 入库操作
  12. */
  13. @RestController
  14. @RequestMapping("warehousing")
  15. public class WarehousingController {
  16. @Autowired
  17. private WarehousingService warehousingService;
  18. /**
  19. * 推荐库位
  20. * @param wllbCode 物料编码
  21. * @param suppId 供应商编码
  22. * @param num 数量
  23. * @param unique 唯一标识
  24. * @return 返回结果
  25. */
  26. @GetMapping("getRecommend")
  27. public Map<String, Object> getRecommend(String wllbCode, String suppId, String num, String unique, String producDate, String warehouseWhere, String wbs, String accountSleeve){
  28. return warehousingService.getRecommend(wllbCode, suppId, num, unique, producDate, warehouseWhere, wbs, accountSleeve);
  29. }
  30. /**
  31. * 库位推荐虚拟表入库
  32. * @param warehousingVirtual 参数
  33. * @return 返回结果
  34. */
  35. @PostMapping("addWarehousingVirtual")
  36. public Map<String, Object> addWarehousingVirtual(@RequestBody WarehousingVirtual warehousingVirtual){
  37. return warehousingService.addWarehousingVirtual(warehousingVirtual);
  38. }
  39. /**
  40. * 移库入虚拟表
  41. * @param warehousingVirtual
  42. * @return
  43. */
  44. @PostMapping("addWarehouseTransferVirtual")
  45. public Map<String, Object> addWarehouseTransferVirtual(@RequestBody WarehousingVirtual warehousingVirtual){
  46. return warehousingService.addWarehouseTransferVirtual(warehousingVirtual);
  47. }
  48. /**
  49. * 库位推荐虚拟表入库
  50. * @param warehousingVirtual 参数
  51. * @return 返回结果
  52. */
  53. @PostMapping("addWarehousingVirtualTwo")
  54. public Map<String, Object> addWarehousingVirtualTwo(@RequestBody WarehousingVirtual warehousingVirtual){
  55. return warehousingService.addWarehousingVirtualTwo(warehousingVirtual);
  56. }
  57. /**
  58. * 查询虚拟入库
  59. * @param uniqueCode 参数
  60. * @return 返回接结果
  61. */
  62. @GetMapping("getWarehousingVirtual")
  63. public Map<String, Object> getWarehousingVirtual(String uniqueCode, String type, String warehouseTransferId){
  64. return warehousingService.getWarehousingVirtual(uniqueCode, type, warehouseTransferId);
  65. }
  66. /**
  67. * 删除虚拟数据
  68. * @param warehousingVirtual 参数
  69. * @return 返回结果
  70. */
  71. @DeleteMapping("delWarehousingVirtual")
  72. public Map<String, Object> delWarehousingVirtual(@RequestBody WarehousingVirtual warehousingVirtual){
  73. return warehousingService.delWarehousingVirtual(warehousingVirtual);
  74. }
  75. /**
  76. * 入库
  77. * @param uniqueCode 参数
  78. * @return 返回结果
  79. */
  80. @GetMapping("warehousing")
  81. public Map<String, Object> warehousing(String uniqueCode, String type, String warehouseTransferId){
  82. return warehousingService.warehousing(uniqueCode, type, warehouseTransferId);
  83. }
  84. /**
  85. * 查询入库流水
  86. */
  87. @GetMapping("warehousingFlowing")
  88. public Map<String, Object> warehousingFlowing(Storage storage){
  89. return warehousingService.warehousingFlowing(storage);
  90. }
  91. /**
  92. * 导出流水
  93. * @param storage
  94. * @param response
  95. */
  96. @GetMapping("export")
  97. public void userExport(Storage storage, HttpServletResponse response){
  98. warehousingService.export(storage, response);
  99. }
  100. /**
  101. * 查询报工单
  102. * @param notice 参数
  103. * @return 返回结果
  104. */
  105. @GetMapping("getNotice")
  106. public Map<String, Object> getNotice(Notice notice){
  107. return warehousingService.getNotice(notice);
  108. }
  109. /**
  110. * 半成品材料入库
  111. * @param notice 参数
  112. * @return 返回结果
  113. */
  114. @PostMapping("addInventoryNotice")
  115. public Map<String, Object> addInventoryNotice(@RequestBody Notice notice){
  116. return warehousingService.addInventoryNotice(notice);
  117. }
  118. /**
  119. * 半成品出库
  120. * @param notice 参数
  121. * @return 返回结果
  122. */
  123. @PostMapping("updateInventoryNotice")
  124. public Map<String, Object> updateInventoryNotice(@RequestBody Notice notice){
  125. return warehousingService.updateInventoryNotice(notice);
  126. }
  127. /**
  128. * 删除半成品
  129. * @param id 参数
  130. * @return 返回结果
  131. */
  132. @DeleteMapping("delInventoryNotice")
  133. public Map<String, Object> delInventoryNotice(String id , HttpServletRequest request){
  134. return warehousingService.delInventoryNotice(id,request);
  135. }
  136. /**
  137. * 查询半成品流水
  138. * @param notice 参数
  139. * @return 返回结果
  140. */
  141. @GetMapping("getProduct")
  142. public Map<String, Object> getProduct(Notice notice){
  143. return warehousingService.getProduct(notice);
  144. }
  145. /**
  146. * 导出
  147. * @param notice 参数
  148. * @return 返回结果
  149. */
  150. @GetMapping("productExcel")
  151. public void productExcel(Notice notice, HttpServletResponse response){
  152. warehousingService.productExcel(notice, response);
  153. }
  154. /**
  155. * 产成品入库
  156. * @return 参数
  157. */
  158. @GetMapping("getProductWarehousing")
  159. public Map<String, Object> getProductWarehousing(Notice notice){
  160. return warehousingService.getProductWarehousing(notice);
  161. }
  162. /**
  163. * 推荐库位之后产成品入库
  164. * @return 参数
  165. */
  166. @GetMapping("getProductWarehousingRecommend")
  167. public Map<String, Object> getProductWarehousingRecommend(String uniqueCode, String type, String noticeId){
  168. return warehousingService.getProductWarehousingRecommend(uniqueCode, type, noticeId);
  169. }
  170. /**
  171. * 产成品入库流水
  172. * @param notice 参数
  173. * @return 返回结果
  174. */
  175. @GetMapping("getHalf")
  176. public Map<String, Object> getHalf(Notice notice){
  177. return warehousingService.getHalf(notice);
  178. }
  179. /**
  180. * 产成品导出
  181. * @param notice 参数
  182. * @param response 返回结果
  183. */
  184. @GetMapping("getHalfExcel")
  185. public void getHalfExcel(Notice notice, HttpServletResponse response){
  186. warehousingService.getHalfExcel(notice, response);
  187. }
  188. /**
  189. * 其他入库
  190. * @param askGoods 参数
  191. * @return
  192. */
  193. @GetMapping("otherWarehousing")
  194. public Map<String, Object> otherWarehousing(AskGoods askGoods){
  195. return warehousingService.otherWarehousing(askGoods);
  196. }
  197. /**
  198. * 推荐库位后其他入库
  199. */
  200. @GetMapping("otherWarehou")
  201. public Map<String, Object> otherWarehou(Inventory inventory, HttpServletRequest request){
  202. return warehousingService.otherWarehou(inventory, request);
  203. }
  204. /**
  205. * 查询名牌物料
  206. * @param code 参数
  207. * @return 返回结果
  208. */
  209. @GetMapping("getMing")
  210. public Map<String, Object> getMing(String code){
  211. return warehousingService.getMing(code);
  212. }
  213. /**
  214. * 删除其它入库
  215. * @param id 参数
  216. * @return 返回结果
  217. */
  218. @DeleteMapping("delOtherReceivingGoods")
  219. public Map<String, Object> delOtherReceivingGoods(String id , HttpServletRequest request){
  220. return warehousingService.delOtherReceivingGoods(id,request);
  221. }
  222. /**
  223. * 删除其它出库
  224. * @param id 参数
  225. * @return 返回结果
  226. */
  227. @DeleteMapping("delOtherShipments")
  228. public Map<String, Object> delOtherShipments(String id , HttpServletRequest request){
  229. return warehousingService.delOtherShipments(id,request);
  230. }
  231. }