WarehousingController.java 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. package com.tld.controller;
  2. import com.tld.model.AskGoods;
  3. import com.tld.model.Notice;
  4. import com.tld.model.Storage;
  5. import com.tld.model.WarehousingVirtual;
  6. import com.tld.service.WarehousingService;
  7. import com.tld.util.DateUtil;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.web.bind.annotation.*;
  10. import javax.servlet.http.HttpServletResponse;
  11. import java.util.Map;
  12. /**
  13. * 入库操作
  14. */
  15. @RestController
  16. @RequestMapping("warehousing")
  17. public class WarehousingController {
  18. @Autowired
  19. private WarehousingService warehousingService;
  20. /**
  21. * 推荐库位
  22. * @param wllbCode 物料编码
  23. * @param suppId 供应商编码
  24. * @param num 数量
  25. * @param unique 唯一标识
  26. * @return 返回结果
  27. */
  28. @GetMapping("getRecommend")
  29. public Map<String, Object> getRecommend(String wllbCode, String suppId, String num, String unique, String producDate){
  30. return warehousingService.getRecommend(wllbCode, suppId, num, unique, producDate);
  31. }
  32. /**
  33. * 库位推荐虚拟表入库
  34. * @param warehousingVirtual 参数
  35. * @return 返回结果
  36. */
  37. @PostMapping("addWarehousingVirtual")
  38. public Map<String, Object> addWarehousingVirtual(@RequestBody WarehousingVirtual warehousingVirtual){
  39. return warehousingService.addWarehousingVirtual(warehousingVirtual);
  40. }
  41. /**
  42. * 查询虚拟入库
  43. * @param uniqueCode 参数
  44. * @return 返回接结果
  45. */
  46. @GetMapping("getWarehousingVirtual")
  47. public Map<String, Object> addWarehousingVirtual(String uniqueCode){
  48. return warehousingService.getWarehousingVirtual(uniqueCode);
  49. }
  50. /**
  51. * 删除虚拟数据
  52. * @param warehousingVirtual 参数
  53. * @return 返回结果
  54. */
  55. @DeleteMapping("delWarehousingVirtual")
  56. public Map<String, Object> delWarehousingVirtual(@RequestBody WarehousingVirtual warehousingVirtual){
  57. return warehousingService.delWarehousingVirtual(warehousingVirtual);
  58. }
  59. /**
  60. * 入库
  61. * @param uniqueCode 参数
  62. * @return 返回结果
  63. */
  64. @GetMapping("warehousing")
  65. public Map<String, Object> warehousing(String uniqueCode, String type){
  66. return warehousingService.warehousing(uniqueCode, type);
  67. }
  68. /**
  69. * 查询入库流水
  70. */
  71. @GetMapping("warehousingFlowing")
  72. public Map<String, Object> warehousingFlowing(Storage storage){
  73. return warehousingService.warehousingFlowing(storage);
  74. }
  75. /**
  76. * 导出流水
  77. * @param storage
  78. * @param response
  79. */
  80. @GetMapping("export")
  81. public void userExport(Storage storage, HttpServletResponse response){
  82. warehousingService.export(storage, response);
  83. }
  84. /**
  85. * 查询报工单
  86. * @param notice 参数
  87. * @return 返回结果
  88. */
  89. @GetMapping("getNotice")
  90. public Map<String, Object> getNotice(Notice notice){
  91. return warehousingService.getNotice(notice);
  92. }
  93. /**
  94. * 半成品材料入库
  95. * @param notice 参数
  96. * @return 返回结果
  97. */
  98. @PostMapping("addInventoryNotice")
  99. public Map<String, Object> addInventoryNotice(@RequestBody Notice notice){
  100. return warehousingService.addInventoryNotice(notice);
  101. }
  102. /**
  103. * 半成品出库
  104. * @param notice 参数
  105. * @return 返回结果
  106. */
  107. @PostMapping("updateInventoryNotice")
  108. public Map<String, Object> updateInventoryNotice(@RequestBody Notice notice){
  109. return warehousingService.updateInventoryNotice(notice);
  110. }
  111. /**
  112. * 查询半成品流水
  113. * @param notice 参数
  114. * @return 返回结果
  115. */
  116. @GetMapping("getProduct")
  117. public Map<String, Object> getProduct(Notice notice){
  118. return warehousingService.getProduct(notice);
  119. }
  120. /**
  121. * 导出
  122. * @param notice 参数
  123. * @return 返回结果
  124. */
  125. @GetMapping("productExcel")
  126. public void productExcel(Notice notice, HttpServletResponse response){
  127. warehousingService.productExcel(notice, response);
  128. }
  129. /**
  130. * 产成品入库
  131. * @return 参数
  132. */
  133. @GetMapping("getProductWarehousing")
  134. public Map<String, Object> getProductWarehousing(Notice notice){
  135. return warehousingService.getProductWarehousing(notice);
  136. }
  137. /**
  138. * 推荐库位之后产成品入库
  139. * @return 参数
  140. */
  141. @GetMapping("getProductWarehousingRecommend")
  142. public Map<String, Object> getProductWarehousingRecommend(String uniqueCode, String type, String noticeId){
  143. return warehousingService.getProductWarehousingRecommend(uniqueCode, type, noticeId);
  144. }
  145. /**
  146. * 产成品入库流水
  147. * @param notice 参数
  148. * @return 返回结果
  149. */
  150. @GetMapping("getHalf")
  151. public Map<String, Object> getHalf(Notice notice){
  152. return warehousingService.getHalf(notice);
  153. }
  154. /**
  155. * 产成品导出
  156. * @param notice 参数
  157. * @param response 返回结果
  158. */
  159. @GetMapping("getHalfExcel")
  160. public void getHalfExcel(Notice notice, HttpServletResponse response){
  161. warehousingService.getHalfExcel(notice, response);
  162. }
  163. }