QmsQueueListController.java 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. package com.steerinfo.dil.controller;
  2. import com.steerinfo.dil.service.impl.QmsQueueListServiceImpl;
  3. import com.steerinfo.dil.util.BaseRESTfulController;
  4. import com.steerinfo.dil.util.ColumnDataUtil;
  5. import com.steerinfo.framework.controller.RESTfulResult;
  6. import com.steerinfo.framework.service.pagehelper.PageHelper;
  7. import io.swagger.annotations.ApiImplicitParam;
  8. import io.swagger.annotations.ApiImplicitParams;
  9. import io.swagger.annotations.ApiOperation;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.web.bind.annotation.*;
  12. import java.util.*;
  13. import java.math.BigDecimal;
  14. /**
  15. * QmsQueueList RESTful接口:
  16. * @author generator
  17. * @version 1.0-SNAPSHORT 2021-09-14 11:29
  18. * 类描述
  19. * 修订历史:
  20. * 日期:2021-09-14
  21. * 作者:generator
  22. * 参考:
  23. * 描述:QmsQueueList RESTful接口
  24. * @see null
  25. * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
  26. */
  27. @RestController
  28. @RequestMapping("/${api.version}/qmsqueuelists")
  29. public class QmsQueueListController extends BaseRESTfulController {
  30. @Autowired
  31. QmsQueueListServiceImpl qmsQueueListService;
  32. @Autowired
  33. ColumnDataUtil columnDataUtil;
  34. @ApiOperation(value="指令接收-->新增排队链表:需要运输订单号")
  35. @ApiImplicitParams({
  36. @ApiImplicitParam(name = "mapValue", value = "", required = false, dataType = "Map"),
  37. })
  38. @PostMapping("/addQueueList")
  39. public RESTfulResult addQueueList(String resultId){
  40. int i = qmsQueueListService.addQueueList(new BigDecimal(resultId));
  41. if(i == 0){
  42. return failed("该车已有排队!");
  43. }
  44. return success(i);
  45. }
  46. @ApiOperation(value="排队取消-->修改排队链表deleted为1")
  47. @ApiImplicitParams({
  48. @ApiImplicitParam(name = "mapValue", value = "运输订单号", required = false, dataType = "Map"),
  49. })
  50. @PostMapping("/queueCancel")
  51. public RESTfulResult queueCancel(@RequestBody(required=false) Map<String, Object> mapValue){
  52. int i = qmsQueueListService.queueCancel(mapValue);
  53. return success(i);
  54. }
  55. @ApiOperation(value="排队插队-->修改排队链表顺序号为最小")
  56. @ApiImplicitParams({
  57. @ApiImplicitParam(name = "mapValue", value = "运输订单号或者网格排队实绩ID取一个就行、插队原因", required = false, dataType = "Map"),
  58. })
  59. @PostMapping("/queueCutInLine")
  60. public RESTfulResult queueCutInLine(@RequestBody(required=false) Map<String, Object> mapValue){
  61. int i = qmsQueueListService.queueCutInLine(mapValue);
  62. return success(i);
  63. }
  64. @ApiOperation(value="排队结束-->修改deleted = 1:运输订单号 或者 网格排队实绩 ID 取一个就行")
  65. @ApiImplicitParams({
  66. @ApiImplicitParam(name = "mapValue", value = "运输订单号或者网格排队实绩ID取一个就行", required = false, dataType = "Map"),
  67. })
  68. @PostMapping("/queueEndByPDA")
  69. public RESTfulResult queueEnd(String resultTotalId){
  70. int i = qmsQueueListService.queueEndByPDA(new BigDecimal(resultTotalId));
  71. return success(i);
  72. }
  73. @ApiOperation(value="链表监控")
  74. @ApiImplicitParams({
  75. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  76. @ApiImplicitParam(name = "apiId(134)", value = "动态表头", required = false, dataType = "Integer"),
  77. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  78. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  79. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  80. })
  81. @PostMapping("/listMonitor")
  82. public RESTfulResult listMonitor(@RequestBody(required=false) Map<String,Object> mapValue,
  83. Integer apiId,
  84. Integer pageNum,
  85. Integer pageSize,
  86. Integer isSpelling
  87. ){
  88. PageHelper.startPage(pageNum,pageSize);
  89. //分页数据
  90. if(isSpelling == 1){
  91. //多拼
  92. return success(qmsQueueListService.spellingListMonitor(mapValue));
  93. }else {
  94. //单拼
  95. return success(qmsQueueListService.listMonitor(mapValue));
  96. }
  97. }
  98. @ApiOperation(value="单拼链表查看详情")
  99. @PostMapping("/getListMonitorMes")
  100. public RESTfulResult getListMonitorMes(@RequestBody(required=false) Map<String,Object> mapValue){
  101. return success(qmsQueueListService.getListMonitorMes(mapValue));
  102. }
  103. @ApiOperation(value="多拼链表查看详情")
  104. @PostMapping("/getSpellingListMonitorMes")
  105. public RESTfulResult getSpellingListMonitorMes(@RequestBody(required=false) Map<String,Object> mapValue){
  106. return success(qmsQueueListService.getSpellingListMonitorMes(mapValue));
  107. }
  108. @ApiOperation(value="钢材科允许进厂")
  109. @ApiImplicitParams({
  110. @ApiImplicitParam(name = "mapValue", value = "网格Id", required = false, dataType = "Map"),
  111. })
  112. @PostMapping("/allowEnFactory")
  113. public RESTfulResult allowEnFactory(@RequestBody(required=false) Map<String, Object> mapValue){
  114. return success(qmsQueueListService.allowEnFactory(mapValue));
  115. }
  116. @ApiOperation(value="测试门岗计算接口")
  117. @PostMapping("/calculateGatepost")
  118. public int calculateGatepost(){
  119. return qmsQueueListService.calculateGatepost().intValue();
  120. }
  121. // @ApiOperation(value="排队转移-->新增排队链表:实绩Id、门岗或月台、转移原因")
  122. // @ApiImplicitParams({
  123. // @ApiImplicitParam(name = "mapValue", value = "实绩Id、门岗或月台、转移原因", required = false, dataType = "Map"),
  124. // })
  125. // @PostMapping("/changeQueue")
  126. // public RESTfulResult changeQueue(@RequestBody(required=false) Map<String, Object> mapValue){
  127. // int i = qmsQueueListService.changeQueue(mapValue);
  128. // return success(i);
  129. // }
  130. // @ApiOperation(value="仓库排队结束-->修改deleted = 1:运输订单号 或者 网格排队实绩 ID 取一个就行")
  131. // @ApiImplicitParams({
  132. // @ApiImplicitParam(name = "mapValue", value = "运输订单号或者网格排队实绩ID取一个就行", required = false, dataType = "Map"),
  133. // })
  134. // @PostMapping("/queueEndWarehouse")
  135. // public RESTfulResult queueEndWarehouse(@RequestBody(required=false) Map<String, Object> mapValue){
  136. // int i = qmsQueueListService.queueEndWarehouse(mapValue);
  137. // return success(i);
  138. // }
  139. // @ApiOperation(value="仓库链表监控")
  140. // @ApiImplicitParams({
  141. // @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  142. // @ApiImplicitParam(name = "apiId(134)", value = "动态表头", required = false, dataType = "Integer"),
  143. // @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  144. // @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  145. // @ApiImplicitParam(name = "con", value = "索引", required = false, dataType = "String"),
  146. // })
  147. // @PostMapping("/warehouseListMonitor")
  148. // public RESTfulResult warehouseListMonitor(@RequestBody(required=false) Map<String,Object> mapValue,
  149. // Integer apiId,
  150. // Integer pageNum,
  151. // Integer pageSize,
  152. // String con
  153. // ){
  154. //
  155. // if(con != null){
  156. // if(!"undefined".equals(con)){
  157. // //设置要查询的索引名称
  158. // String index="get_warehouse_list_monitor";
  159. // //获取查询结果
  160. // return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));
  161. // }
  162. // }
  163. // List<Map<String, Object>> allListMonitor = null;
  164. // //如果有条件查询则跳过初始化,和创建索引
  165. // if(mapValue.size() == 0){
  166. // //将查询结果存入索引中
  167. // allListMonitor = qmsQueueListService.warehouseListMonitor(mapValue);
  168. // Map<String, Object> map = new HashMap<>();
  169. // //添加索引
  170. // map.put("index","get_warehouse_list_monitor");
  171. // //添加id
  172. // map.put("indexId","warehouselistId");
  173. // allListMonitor.add(map);
  174. // //新建索引
  175. // esFeign.insertIndex(allListMonitor);
  176. // //删除
  177. // allListMonitor.remove(allListMonitor.size()-1);
  178. // }
  179. // if(allListMonitor == null)
  180. // allListMonitor = qmsQueueListService.warehouseListMonitor(mapValue);
  181. // PageHelper.startPage(pageNum,pageSize);
  182. // //分页数据
  183. // List<Map<String, Object>> listMonitor = qmsQueueListService.warehouseListMonitor(mapValue);
  184. // PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allListMonitor,listMonitor);
  185. // return success(pageList);
  186. // }
  187. // @ApiOperation(value="查询某一个门岗的排队详情")
  188. // @ApiImplicitParams({
  189. // @ApiImplicitParam(name = "mapValue", value = "网格Id", required = false, dataType = "Map"),
  190. // })
  191. // @PostMapping("/getListQueueMes")
  192. // public RESTfulResult getListQueueMes(@RequestBody(required=false) Map<String, Object> mapValue){
  193. // return success(qmsQueueListService.getListQueueMes(mapValue));
  194. // }
  195. }