DropDownController.java 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. package com.steerinfo.dil.controller;
  2. /**
  3. * @ author :TXF
  4. * @ time :2021/9/4 9:32
  5. */
  6. import com.steerinfo.dil.service.impl.DropDownServiceImpl;
  7. import com.steerinfo.dil.util.BaseRESTfulController;
  8. import com.steerinfo.framework.controller.RESTfulResult;
  9. import io.swagger.annotations.ApiOperation;
  10. import org.apache.ibatis.type.YearTypeHandler;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import org.springframework.web.bind.annotation.GetMapping;
  13. import org.springframework.web.bind.annotation.PathVariable;
  14. import org.springframework.web.bind.annotation.RequestMapping;
  15. import org.springframework.web.bind.annotation.RestController;
  16. import javax.websocket.server.PathParam;
  17. import java.util.HashMap;
  18. import java.util.List;
  19. import java.util.Map;
  20. @RestController
  21. @RequestMapping("/${api.version}/dropDown")
  22. public class DropDownController extends BaseRESTfulController {
  23. //********************************运输计划下拉框接口******************************************
  24. @Autowired
  25. DropDownServiceImpl dropDownService;
  26. @ApiOperation(value="查询所有的批次")
  27. @GetMapping("/getDilBatch")
  28. public RESTfulResult getDilBatch(){
  29. List<Map<String, Object>> batch = dropDownService.getDilBatch();
  30. return success(batch);
  31. }
  32. @ApiOperation(value="查询所有的承运商")
  33. @GetMapping("/getCarrier")
  34. public RESTfulResult getRailPlan(){
  35. List<Map<String, Object>> carrier = dropDownService.getCarrier();
  36. return success(carrier);
  37. }
  38. @ApiOperation(value="查询所有的作业路径")
  39. @GetMapping("/getLine")
  40. public RESTfulResult getLine(){
  41. List<Map<String, Object>> line = dropDownService.getLine();
  42. return success(line);
  43. }
  44. @ApiOperation(value="查询所有的仓库")
  45. @GetMapping("/getWarehouse")
  46. public RESTfulResult getWarehouse(@PathParam("type") Integer type){
  47. Map<String, Object> map = new HashMap<>();
  48. if(type != null){
  49. map.put("type", type);
  50. }
  51. List<Map<String, Object>> warehouse = dropDownService.getWarehouse(map);
  52. return success(warehouse);
  53. }
  54. @ApiOperation(value="查询所有的门岗")
  55. @GetMapping("/getGatepost")
  56. public RESTfulResult getGatepost(){
  57. List<Map<String, Object>> gatepost = dropDownService.getGatepost();
  58. return success(gatepost);
  59. }
  60. @ApiOperation(value="查询所有的采购订单号")
  61. @GetMapping("/getAPO")
  62. public RESTfulResult getAPO(){
  63. List<Map<String, Object>> APO = dropDownService.getAPO();
  64. return success(APO);
  65. }
  66. @ApiOperation(value="查询特定所有的物资")
  67. @GetMapping("/getFuMaterial/{type}")
  68. public RESTfulResult getFuMaterial(@PathVariable("type")Integer type){
  69. List<Map<String, Object>> material = dropDownService.getFuMaterial(type);
  70. return success(material);
  71. }
  72. @ApiOperation(value="查询所有的辅料车辆")
  73. @GetMapping("/getFuCapacityId")
  74. public RESTfulResult getFuCapacityId(){
  75. List<Map<String, Object>> capacityId = dropDownService.getFuCapacityId();
  76. return success(capacityId);
  77. }
  78. @ApiOperation(value="查询所有的港口")
  79. @GetMapping("/getPort")
  80. public RESTfulResult getPort(){
  81. List<Map<String, Object>> port = dropDownService.getPort();
  82. return success(port);
  83. }
  84. @ApiOperation(value="查询所有的月台")
  85. @GetMapping("/getPlatformId")
  86. public RESTfulResult getPlatformId(){
  87. List<Map<String, Object>> port = dropDownService.getPlatformId();
  88. return success(port);
  89. }
  90. //内转物流下拉框
  91. @ApiOperation(value="查询装货地点")
  92. @GetMapping("/getLoadedPlace")
  93. public RESTfulResult getLoadedPlace(){
  94. List<Map<String, Object>> loadedPlace = dropDownService.getLoadedPlace();
  95. return success(loadedPlace);
  96. }
  97. @ApiOperation(value="查询外轮船名")
  98. @GetMapping("/getForeignName")
  99. public RESTfulResult getForeignName(){
  100. List<Map<String, Object>> foreignName = dropDownService.getForeignName();
  101. return success(foreignName);
  102. }
  103. @ApiOperation(value="查询卸货点")
  104. @GetMapping("/getUnloadPoint/{type}")
  105. public RESTfulResult getUnloadPoint(@PathVariable("type") Integer type){
  106. List<Map<String, Object>> mes = dropDownService.getUnloadPoint(type);
  107. return success(mes);
  108. }
  109. }