WareHouseController.java 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. package com.ruoyi.web.controller.plugin;
  2. import com.ruoyi.ccb.service.ForeignHttpService;
  3. import com.ruoyi.common.core.controller.BaseController;
  4. import lombok.AllArgsConstructor;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.web.bind.annotation.GetMapping;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.RequestParam;
  9. import org.springframework.web.bind.annotation.RestController;
  10. import java.util.Map;
  11. /**
  12. * WMS仓库接⼝
  13. */
  14. @AllArgsConstructor
  15. @RestController
  16. @RequestMapping("/api/open/wareHouse")
  17. public class WareHouseController extends BaseController {
  18. @Autowired
  19. private ForeignHttpService foreignHttpService;
  20. /**
  21. * 获取仓库详细信息
  22. */
  23. @GetMapping("/getWareHouseInfo")
  24. public Map<String, Object> getWareHouseInfo(@RequestParam(value = "wareHouseId") String wareHouseId){
  25. return foreignHttpService.getWareHouseInfo(wareHouseId);
  26. }
  27. /**
  28. * 获取最新库存数据
  29. */
  30. @GetMapping("/getStorageInfo")
  31. public Map<String, Object> getStorageInfo(@RequestParam(value = "wareHouseId") String wareHouseId){
  32. return foreignHttpService.getStorageInfo(wareHouseId);
  33. }
  34. /**
  35. * 库存吞吐趋势信息
  36. */
  37. @GetMapping("/getStorageTrend")
  38. public Map<String, Object> getStorageTrend(@RequestParam(value = "wareHouseId") String wareHouseId,
  39. @RequestParam(value = "startTime",required = false) String startTime,
  40. @RequestParam(value = "endTime",required = false) String endTime){
  41. return foreignHttpService.getStorageTrend(wareHouseId, startTime, endTime);
  42. }
  43. /**
  44. * 货物保管信息
  45. */
  46. @GetMapping("/getCargoInfo")
  47. public Map<String, Object> getCargoInfo(@RequestParam(value = "wareHouseId") String wareHouseId,
  48. @RequestParam(value = "startTime",required = false) String startTime,
  49. @RequestParam(value = "endTime",required = false) String endTime) {
  50. return foreignHttpService.getCargoInfo(wareHouseId, startTime, endTime);
  51. }
  52. /**
  53. * 仓库保管趋势
  54. */
  55. @GetMapping("/getCargoInfoTrend")
  56. public Map<String, Object> getCargoInfoTrend(@RequestParam(value = "wareHouseId") String wareHouseId,
  57. @RequestParam(value = "startTime",required = false) String startTime,
  58. @RequestParam(value = "endTime",required = false) String endTime){
  59. return foreignHttpService.getCargoInfoTrend(wareHouseId, startTime, endTime);
  60. }
  61. /**
  62. * 获取货物品类top值
  63. */
  64. @GetMapping("/getStorageTop")
  65. public Map<String, Object> getStorageTop(@RequestParam(value = "wareHouseId") String wareHouseId,
  66. @RequestParam(value = "countType") Integer countType,
  67. @RequestParam(value = "topCnt") Integer topCnt){
  68. return foreignHttpService.getStorageTop(wareHouseId, countType, topCnt);
  69. }
  70. /**
  71. * 获取货主仓库top值
  72. */
  73. @GetMapping("/getGoodsTop")
  74. public Map<String, Object> getGoodsTop(@RequestParam(value = "wareHouseId") String wareHouseId,
  75. @RequestParam(value = "countType") Integer countType,
  76. @RequestParam(value = "topCnt") Integer topCnt){
  77. return foreignHttpService.getGoodsTop(wareHouseId, countType, topCnt);
  78. }
  79. /**
  80. * 过户交易信息获取
  81. */
  82. @GetMapping("/getTransferInfo")
  83. public Map<String, Object> getTransferInfo(@RequestParam(value = "wareHouseId") String wareHouseId,
  84. @RequestParam(value = "startTime",required = false) String startTime,
  85. @RequestParam(value = "endTime",required = false) String endTime){
  86. return foreignHttpService.getTransferInfo(wareHouseId, startTime, startTime);
  87. }
  88. /**
  89. * 最新的作业统计
  90. */
  91. @GetMapping("/getWorkInfo")
  92. public Map<String, Object> getWorkInfo(@RequestParam(value = "wareHouseId") String wareHouseId){
  93. return foreignHttpService.getWorkInfo(wareHouseId);
  94. }
  95. /**
  96. * 作业统计趋势数据
  97. */
  98. @GetMapping("/getWorkTrend")
  99. public Map<String, Object> getWorkTrend(@RequestParam(value = "wareHouseId") String wareHouseId,
  100. @RequestParam(value = "startTime",required = false) String startTime,
  101. @RequestParam(value = "endTime",required = false) String endTime){
  102. return foreignHttpService.getWorkTrend(wareHouseId, startTime, startTime);
  103. }
  104. }