package com.steerinfo.dil.controller; import com.steerinfo.dil.service.impl.QmsQueueListServiceImpl; import com.steerinfo.dil.util.BaseRESTfulController; import com.steerinfo.dil.util.ColumnDataUtil; import com.steerinfo.framework.controller.RESTfulResult; import com.steerinfo.framework.service.pagehelper.PageHelper; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.*; import java.math.BigDecimal; /** * QmsQueueList RESTful接口: * @author generator * @version 1.0-SNAPSHORT 2021-09-14 11:29 * 类描述 * 修订历史: * 日期:2021-09-14 * 作者:generator * 参考: * 描述:QmsQueueList RESTful接口 * @see null * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved. */ @RestController @RequestMapping("/${api.version}/qmsqueuelists") public class QmsQueueListController extends BaseRESTfulController { @Autowired QmsQueueListServiceImpl qmsQueueListService; @Autowired ColumnDataUtil columnDataUtil; @ApiOperation(value="指令接收-->新增排队链表:需要运输订单号") @ApiImplicitParams({ @ApiImplicitParam(name = "mapValue", value = "", required = false, dataType = "Map"), }) @PostMapping("/addQueueList") public RESTfulResult addQueueList(String resultId){ int i = qmsQueueListService.addQueueList(new BigDecimal(resultId)); if(i == 0){ return failed("该车已有排队!"); } return success(i); } @ApiOperation(value="排队取消-->修改排队链表deleted为1") @ApiImplicitParams({ @ApiImplicitParam(name = "mapValue", value = "运输订单号", required = false, dataType = "Map"), }) @PostMapping("/queueCancel") public RESTfulResult queueCancel(@RequestBody(required=false) Map mapValue){ int i = qmsQueueListService.queueCancel(mapValue); return success(i); } @ApiOperation(value="排队插队-->修改排队链表顺序号为最小") @ApiImplicitParams({ @ApiImplicitParam(name = "mapValue", value = "运输订单号或者网格排队实绩ID取一个就行、插队原因", required = false, dataType = "Map"), }) @PostMapping("/queueCutInLine") public RESTfulResult queueCutInLine(@RequestBody(required=false) Map mapValue){ int i = qmsQueueListService.queueCutInLine(mapValue); return success(i); } @ApiOperation(value="排队结束-->修改deleted = 1:运输订单号 或者 网格排队实绩 ID 取一个就行") @ApiImplicitParams({ @ApiImplicitParam(name = "mapValue", value = "运输订单号或者网格排队实绩ID取一个就行", required = false, dataType = "Map"), }) @PostMapping("/queueEndByPDA") public RESTfulResult queueEnd(String resultTotalId){ int i = qmsQueueListService.queueEndByPDA(new BigDecimal(resultTotalId)); return success(i); } @ApiOperation(value="链表监控") @ApiImplicitParams({ @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"), @ApiImplicitParam(name = "apiId(134)", value = "动态表头", required = false, dataType = "Integer"), @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"), }) @PostMapping("/listMonitor") public RESTfulResult listMonitor(@RequestBody(required=false) Map mapValue, Integer apiId, Integer pageNum, Integer pageSize, Integer isSpelling ){ PageHelper.startPage(pageNum,pageSize); //分页数据 if(isSpelling == 1){ //多拼 return success(qmsQueueListService.spellingListMonitor(mapValue)); }else { //单拼 return success(qmsQueueListService.listMonitor(mapValue)); } } @ApiOperation(value="单拼链表查看详情") @PostMapping("/getListMonitorMes") public RESTfulResult getListMonitorMes(@RequestBody(required=false) Map mapValue){ return success(qmsQueueListService.getListMonitorMes(mapValue)); } @ApiOperation(value="多拼链表查看详情") @PostMapping("/getSpellingListMonitorMes") public RESTfulResult getSpellingListMonitorMes(@RequestBody(required=false) Map mapValue){ return success(qmsQueueListService.getSpellingListMonitorMes(mapValue)); } @ApiOperation(value="钢材科允许进厂") @ApiImplicitParams({ @ApiImplicitParam(name = "mapValue", value = "网格Id", required = false, dataType = "Map"), }) @PostMapping("/allowEnFactory") public RESTfulResult allowEnFactory(@RequestBody(required=false) Map mapValue){ return success(qmsQueueListService.allowEnFactory(mapValue)); } @ApiOperation(value="测试门岗计算接口") @PostMapping("/calculateGatepost") public int calculateGatepost(){ return qmsQueueListService.calculateGatepost().intValue(); } // @ApiOperation(value="排队转移-->新增排队链表:实绩Id、门岗或月台、转移原因") // @ApiImplicitParams({ // @ApiImplicitParam(name = "mapValue", value = "实绩Id、门岗或月台、转移原因", required = false, dataType = "Map"), // }) // @PostMapping("/changeQueue") // public RESTfulResult changeQueue(@RequestBody(required=false) Map mapValue){ // int i = qmsQueueListService.changeQueue(mapValue); // return success(i); // } // @ApiOperation(value="仓库排队结束-->修改deleted = 1:运输订单号 或者 网格排队实绩 ID 取一个就行") // @ApiImplicitParams({ // @ApiImplicitParam(name = "mapValue", value = "运输订单号或者网格排队实绩ID取一个就行", required = false, dataType = "Map"), // }) // @PostMapping("/queueEndWarehouse") // public RESTfulResult queueEndWarehouse(@RequestBody(required=false) Map mapValue){ // int i = qmsQueueListService.queueEndWarehouse(mapValue); // return success(i); // } // @ApiOperation(value="仓库链表监控") // @ApiImplicitParams({ // @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"), // @ApiImplicitParam(name = "apiId(134)", value = "动态表头", required = false, dataType = "Integer"), // @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"), // @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"), // @ApiImplicitParam(name = "con", value = "索引", required = false, dataType = "String"), // }) // @PostMapping("/warehouseListMonitor") // public RESTfulResult warehouseListMonitor(@RequestBody(required=false) Map mapValue, // Integer apiId, // Integer pageNum, // Integer pageSize, // String con // ){ // // if(con != null){ // if(!"undefined".equals(con)){ // //设置要查询的索引名称 // String index="get_warehouse_list_monitor"; // //获取查询结果 // return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con)); // } // } // List> allListMonitor = null; // //如果有条件查询则跳过初始化,和创建索引 // if(mapValue.size() == 0){ // //将查询结果存入索引中 // allListMonitor = qmsQueueListService.warehouseListMonitor(mapValue); // Map map = new HashMap<>(); // //添加索引 // map.put("index","get_warehouse_list_monitor"); // //添加id // map.put("indexId","warehouselistId"); // allListMonitor.add(map); // //新建索引 // esFeign.insertIndex(allListMonitor); // //删除 // allListMonitor.remove(allListMonitor.size()-1); // } // if(allListMonitor == null) // allListMonitor = qmsQueueListService.warehouseListMonitor(mapValue); // PageHelper.startPage(pageNum,pageSize); // //分页数据 // List> listMonitor = qmsQueueListService.warehouseListMonitor(mapValue); // PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allListMonitor,listMonitor); // return success(pageList); // } // @ApiOperation(value="查询某一个门岗的排队详情") // @ApiImplicitParams({ // @ApiImplicitParam(name = "mapValue", value = "网格Id", required = false, dataType = "Map"), // }) // @PostMapping("/getListQueueMes") // public RESTfulResult getListQueueMes(@RequestBody(required=false) Map mapValue){ // return success(qmsQueueListService.getListQueueMes(mapValue)); // } }