123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- package com.steerinfo.dil.controller;
- import com.steerinfo.dil.feign.ESFeign;
- import com.steerinfo.dil.service.impl.QmsQueueListServiceImpl;
- import com.steerinfo.dil.util.BaseRESTfulController;
- import com.steerinfo.dil.util.ColumnDataUtil;
- import com.steerinfo.dil.util.PageListAdd;
- 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;
- @Autowired
- ESFeign esFeign;
- @ApiOperation(value="指令接收-->新增排队链表:需要运输订单号")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "", required = false, dataType = "Map"),
- })
- @PostMapping("/addQueueList")
- public RESTfulResult addQueueList(String orderId){
- int i = qmsQueueListService.addQueueList(new BigDecimal(orderId));
- if(i == 0){
- return failed("该车已有排队!");
- }
- return success(i);
- }
- @ApiOperation(value="排队转移-->新增排队链表:实绩Id、门岗或月台、转移原因")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "实绩Id、门岗或月台、转移原因", required = false, dataType = "Map"),
- })
- @PostMapping("/changeQueue")
- public RESTfulResult changeQueue(@RequestBody(required=false) Map<String, Object> mapValue){
- int i = qmsQueueListService.changeQueue(mapValue);
- 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<String, Object> 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<String, Object> 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<String,Object> mapValue,
- Integer apiId,
- Integer pageNum,
- Integer pageSize,
- String con
- ){
- if(con != null && !"".equals(con) && !"null".equals(con)){
- mapValue.put("index", con);
- }
- PageHelper.startPage(pageNum,pageSize);
- //分页数据
- List<Map<String, Object>> allListMonitor = qmsQueueListService.listMonitor(mapValue);
- List<Map<String, Object>> listMonitor = new ArrayList<>(allListMonitor);
- PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allListMonitor,listMonitor);
- return success(pageList);
- }
- @ApiOperation(value="仓库排队结束-->修改deleted = 1:运输订单号 或者 网格排队实绩 ID 取一个就行")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "运输订单号或者网格排队实绩ID取一个就行", required = false, dataType = "Map"),
- })
- @PostMapping("/queueEndWarehouse")
- public RESTfulResult queueEndWarehouse(@RequestBody(required=false) Map<String, Object> 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<String,Object> 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<Map<String, Object>> allListMonitor = null;
- //如果有条件查询则跳过初始化,和创建索引
- if(mapValue.size() == 0){
- //将查询结果存入索引中
- allListMonitor = qmsQueueListService.warehouseListMonitor(mapValue);
- Map<String, Object> 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<Map<String, Object>> 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<String, Object> mapValue){
- return success(qmsQueueListService.getListQueueMes(mapValue));
- }
- @ApiOperation(value="钢材科允许进厂")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "网格Id", required = false, dataType = "Map"),
- })
- @PostMapping("/allowEnFactory")
- public RESTfulResult allowEnFactory(@RequestBody(required=false) Map<String, Object> mapValue){
- return success(qmsQueueListService.allowEnFactory(mapValue));
- }
- }
|