WarehousingController.java 5.4 KB

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