123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779 |
- package com.steerinfo.dil.controller;
- import com.steerinfo.dil.mapper.QmsModelUnrooledMapper;
- import com.steerinfo.dil.mapper.QmsQueueResultMapper;
- import com.steerinfo.dil.mapper.QueueInterfaceMapper;
- import com.steerinfo.dil.model.QmsModelUnrooled;
- import com.steerinfo.dil.model.QmsQueueResult;
- import com.steerinfo.dil.service.impl.QmsQueueResultServiceImpl;
- import com.steerinfo.dil.service.impl.QueueInterfaceServiceImpl;
- import com.steerinfo.dil.util.BaseRESTfulController;
- import com.steerinfo.dil.util.ColumnDataUtil;
- import com.steerinfo.dil.util.DataChange;
- 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.math.BigDecimal;
- import java.text.SimpleDateFormat;
- import java.util.*;
- /**
- * QmsQueueResult RESTful接口:
- * @author generator
- * @version 1.0-SNAPSHORT 2021-09-14 11:27
- * 类描述
- * 修订历史:
- * 日期:2021-09-14
- * 作者:generator
- * 参考:
- * 描述:QmsQueueResult RESTful接口
- * @see null
- * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
- */
- @RestController
- @RequestMapping("/${api.version}/qmsqueueresults")
- public class QmsQueueResultController extends BaseRESTfulController {
- @Autowired
- QmsQueueResultServiceImpl qmsQueueResultService;
- @Autowired
- ColumnDataUtil columnDataUtil;
- @Autowired
- QueueInterfaceServiceImpl queueInterfaceService;
- @Autowired
- private QmsQueueResultMapper qmsQueueResultMapper;
- @Autowired
- private QmsModelUnrooledMapper qmsModelUnrooledMapper;
- private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- @ApiOperation(value="触发电子围栏-->新增排队实绩")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "", required = false, dataType = "Map"),
- })
- @PostMapping(value = "/addQueueResult")
- public RESTfulResult addQueueResult(String vno, String isPDA){
- int i = qmsQueueResultService.addQueueResult(vno, isPDA);
- if(i==0) {
- return failed("", "新增失败");
- }else if(i==-1){
- return failed("","车号"+vno+"没有对应的订单");
- }else if(i == -2){
- return failed("请勿重复申请排队");
- }else if(i == -3){
- return failed("非钢材订单不能申请排队");
- }else if(i == -4){
- return failed("订单未审核,不能排队");
- }
- return success();
- }
- @ApiOperation(value="APP端司机查看排队信息")
- @GetMapping("getQueueResultByTotalId")
- public RESTfulResult getQueueResultByTotalId(String resultTotalId){
- if("undefined".equals(resultTotalId)){
- return failed();
- }
- return success(qmsQueueResultService.getQueueResultByTotalId(resultTotalId));
- }
- @ApiOperation(value="查询排队申请")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- @ApiImplicitParam(name = "apiId(125)", value = "动态表头", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- })
- @PostMapping("/getQueueApply")
- public RESTfulResult getQueueApply(@RequestBody(required=false) Map<String,Object> mapValue,
- Integer apiId,
- Integer pageNum,
- Integer pageSize,
- String startTime,
- String endTime,
- String con
- ){
- if(con != null && !"".equals(con) && !"null".equals(con)){
- mapValue.put("index", con);
- }
- DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdf);
- PageHelper.startPage(pageNum,pageSize);
- List<Map<String, Object>> allQueueApply = qmsQueueResultService.getQueueApply(mapValue);
- return success(allQueueApply);
- }
- @ApiOperation(value="查排队开始")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- @ApiImplicitParam(name = "apiId(128)", value = "动态表头", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "gridId", value = "仓储网格(筛选)", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "type", value = "类型3:采购、1|2:销售", required = false, dataType = "Integer"),
- })
- @PostMapping("/getQueueListByQueueUp")
- public RESTfulResult getQueueListByQueueUp(@RequestBody(required=false) Map<String,Object> mapValue,
- Integer locationId,
- String capacityNumber,
- Integer isSpelling
- ){
- if(locationId != null)
- mapValue.put("locationId", locationId);
- if(capacityNumber != null && !"".equals(capacityNumber))
- mapValue.put("capacityNumber", capacityNumber);
- if(isSpelling == 1){
- //原多拼
- List<Map<String, Object>> queueListByQueueUpSpelling = qmsQueueResultService.getQueueListByQueueUpSpelling(mapValue);
- //现多拼数据
- for (Map<String, Object> stringObjectMap : queueListByQueueUpSpelling) {
- BigDecimal orderId = (BigDecimal) stringObjectMap.get("orderId");
- //米数
- List<Map<String, Object>> materialId = qmsQueueResultMapper.getMaterialId(orderId);
- for (Map<String, Object> objectMap : materialId) {
- BigDecimal materialId2 = DataChange.dataToBigDecimal(stringObjectMap.get("materialId"));
- BigDecimal materialId1 = (BigDecimal) objectMap.get("materialId");
- if (materialId2.compareTo(materialId1)==0){
- //钢材长度
- BigDecimal steelmeter = (BigDecimal) objectMap.get("steelmeter");
- stringObjectMap.put("steelMeter",steelmeter);
- }
- }
- }
- return success(queueListByQueueUpSpelling);
- }else if (isSpelling == 2){
- //两拼数据
- List<Map<String, Object>> queueListByQueueUpSpellingNew = qmsQueueResultService.getQueueListByQueueUpSpellingNew(mapValue);
- //现多拼数据
- for (Map<String, Object> stringObjectMap : queueListByQueueUpSpellingNew) {
- BigDecimal orderId = (BigDecimal) stringObjectMap.get("orderId");
- //米数
- List<Map<String, Object>> materialId = qmsQueueResultMapper.getMaterialId(orderId);
- for (Map<String, Object> objectMap : materialId) {
- BigDecimal materialId2 = DataChange.dataToBigDecimal(stringObjectMap.get("materialId"));
- BigDecimal materialId1 = (BigDecimal) objectMap.get("materialId");
- if (materialId2.compareTo(materialId1)==0){
- //钢材长度
- BigDecimal steelmeter = (BigDecimal) objectMap.get("steelmeter");
- stringObjectMap.put("steelMeter",steelmeter);
- }
- }
- }
- return success(queueListByQueueUpSpellingNew);
- }
- else {
- //单拼
- return success(qmsQueueResultService.getQueueListByQueueUp(mapValue));
- }
- }
- @ApiOperation(value="查询排队结束")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- @ApiImplicitParam(name = "apiId(133)", value = "动态表头", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- })
- @PostMapping("/getQueueEndResult")
- public RESTfulResult getQueueEndResult(@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>> AllQueueEndInsert = qmsQueueResultService.getQueueEndResult(mapValue);
- return success(AllQueueEndInsert);
- }
- @ApiOperation(value="查询排队取消")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- @ApiImplicitParam(name = "apiId(131)", value = "动态表头", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- })
- @PostMapping("/getQueueCancel")
- public RESTfulResult getQueueCancel(@RequestBody(required=false) Map<String,Object> mapValue,
- Integer apiId,
- Integer pageNum,
- Integer pageSize,
- String startTime,
- String endTime,
- String con
- ){
- if(con != null && !"".equals(con) && !"null".equals(con)){
- mapValue.put("index", con);
- }
- DataChange.queryDataByDateTime(startTime,endTime,mapValue,sdf); //时间查询插件
- PageHelper.startPage(pageNum,pageSize);
- //分页数据
- List<Map<String, Object>> AllQueueCancel = qmsQueueResultService.getQueueCancel(mapValue);
- return success(AllQueueCancel);
- }
- @PostMapping("isInCircle")
- public synchronized RESTfulResult isInCircle(String longitude,
- String latitude,
- String capacityNo){
- return success(qmsQueueResultService.isInCircle(longitude,latitude,capacityNo));
- }
- @ApiOperation(value="查询仓库排队列表")
- @PostMapping("/getStoreQueueList")
- public RESTfulResult getStoreQueueList(){
- List<Map<String, Object>> storeQueueList = qmsQueueResultService.getStoreQueueList();
- return success(storeQueueList);
- }
- // @ApiOperation(value="查询执行中订单")
- // @ApiImplicitParams({
- // @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- // @ApiImplicitParam(name = "apiId(156)", value = "动态表头", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
- // })
- // @PostMapping("/getAllExecutionOrder")
- // public RESTfulResult getAllExecutionOrder(@RequestBody(required=false) Map<String,Object> mapValue,
- // Integer apiId,
- // Integer pageNum,
- // Integer pageSize,
- // Integer orderType,
- // Integer status,
- // String con
- // ){
- // mapValue.put("orderTypee", orderType);
- // mapValue.put("orderStatus", status);
- // PageHelper.startPage(pageNum,pageSize);
- // //分页数据
- // List<Map<String, Object>> executionOrder = qmsQueueResultService.getAllExecutionOrder(mapValue);
- // PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, executionOrder);
- // return success(pageList);
- //
- // }
- //
- // @ApiOperation(value="指令接收")
- // @ApiImplicitParams({
- // @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- // @ApiImplicitParam(name = "apiId(130、190)", value = "动态表头", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- // })
- // @PostMapping("/orderReceive")
- // public RESTfulResult orderReceive(@RequestBody(required=false) Map<String,Object> mapValue,
- // Integer apiId,
- // Integer pageNum,
- // Integer pageSize,
- // Integer queueType,
- // String con
- // ){
- // if(con != null && !"".equals(con) && !"null".equals(con)){
- // mapValue.put("index", con);
- // }
- // mapValue.put("queueType", queueType);
- // //分页数据
- // PageHelper.startPage(pageNum,pageSize);
- // List<Map<String, Object>> AllOrderReceive = qmsQueueResultService.orderReceive(mapValue);
- // List<Map<String, Object>> executionOrder = new ArrayList<>(AllOrderReceive);
- // PageListAdd pageList = columnDataUtil.tableColumnData(apiId, AllOrderReceive,executionOrder);
- // return success(pageList);
- //
- // }
- // @ApiOperation(value="查询进厂排队详情")
- // @ApiImplicitParams({
- // @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- // @ApiImplicitParam(name = "apiId(184)", value = "动态表头", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- // })
- // @PostMapping("/getAllQueueMes")
- // public RESTfulResult getAllQueueMes(@RequestBody(required=false) Map<String,Object> mapValue,
- // Integer apiId,
- // Integer pageNum,
- // Integer pageSize,
- // Integer gatepostId,
- // String con
- // ){
- // if(gatepostId != null){
- // mapValue.put("gatepostId", gatepostId);
- // }
- // if(con != null && !"".equals(con) && !"null".equals(con)){
- // mapValue.put("index", con);
- // }
- // PageHelper.startPage(pageNum,pageSize);
- // //分页数据
- // List<Map<String, Object>> AllQueueMes = qmsQueueResultService.getQueueMes(mapValue);
- // List<Map<String, Object>> queueMes = qmsQueueResultService.getQueueMes(mapValue);
- // PageListAdd pageList = columnDataUtil.tableColumnData(apiId, AllQueueMes,queueMes);
- // return success(pageList);
- // }
- // @ApiOperation(value="通过运输订单号查询进厂排队详情")
- // @PostMapping("/getQueueMes")
- // public RESTfulResult getQueueMes(Map<String, Object> map){
- // List<Map<String, Object>> warehouseQueueMes = qmsQueueResultService.getQueueMes(map);
- // return success(warehouseQueueMes);
- // }
- // @ApiOperation(value="查询排队转移")
- // @ApiImplicitParams({
- // @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- // @ApiImplicitParam(name = "apiId(124)", value = "动态表头", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- // })
- // @PostMapping("/getChangeQueue")
- // public RESTfulResult getChangeQueue(@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>> AllChangeQueue = qmsQueueResultService.getChangeQueueMes(mapValue);
- // List<Map<String, Object>> changeQueueMes1 = new ArrayList<>(AllChangeQueue);
- // PageListAdd pageList = columnDataUtil.tableColumnData(apiId, AllChangeQueue,changeQueueMes1);
- // return success(pageList);
- // }
- // @ApiOperation(value="通过Id查询排队取消实绩")
- // @ApiImplicitParams({
- // @ApiImplicitParam(name = "resultId", value = "排队取消实绩", required = false, dataType = "Integer"),
- // })
- // @PostMapping("/getQueueCancelByResultId/{resultId}")
- // public RESTfulResult getQueueCancelByResultId(@PathVariable("resultId") Integer resultId){
- // List<Map<String, Object>> mes = qmsQueueResultService.getQueueCancelByResultId(resultId);
- // return success(mes);
- // }
- // @ApiOperation(value="修改排队取消实绩:时间、原因")
- // @ApiImplicitParams({
- // @ApiImplicitParam(name = "qmsQueueResult", value = "排队取消实体类", required = false, dataType = "QmsQueueResult"),
- // })
- // @PostMapping("/updateQueueCancel")
- // public RESTfulResult updateQueueCancel(@RequestBody QmsQueueResult qmsQueueResult){
- // int i = qmsQueueResultService.updateQueueCancel(qmsQueueResult);
- // return success(i);
- // }
- // @ApiOperation(value="查询排队插队")
- // @ApiImplicitParams({
- // @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- // @ApiImplicitParam(name = "apiId(132)", value = "动态表头", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- // })
- // @PostMapping("/getQueueInsert")
- // public RESTfulResult getQueueInsert(@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>> AllQueueInsert = qmsQueueResultService.getQueueInsert(mapValue);
- // List<Map<String, Object>> queueInsert = new ArrayList<>(AllQueueInsert);
- // PageListAdd pageList = columnDataUtil.tableColumnData(apiId, AllQueueInsert,queueInsert);
- // return success(pageList);
- //
- // }
- // @ApiOperation(value="汽车监控(仓库)")
- // @ApiImplicitParams({
- // @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- // @ApiImplicitParam(name = "apiId(135)", value = "动态表头", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- // })
- // @PostMapping("/capacityMonitor")
- // public RESTfulResult capacityMonitor(@RequestBody(required=false) Map<String,Object> mapValue,
- // Integer apiId,
- // Integer pageNum,
- // Integer pageSize,
- // Integer gridType,
- // String con
- // ){
- // mapValue.put("gridType", gridType);
- // if(con != null && !"".equals(con) && !"null".equals(con)){
- // mapValue.put("index", con);
- // }
- // //分页数据
- // PageHelper.startPage(pageNum,pageSize);
- // List<Map<String, Object>> AllCapacityMonitor = qmsQueueResultService.capacityMonitor(mapValue);
- // List<Map<String, Object>> capacityMonitor = new ArrayList<>(AllCapacityMonitor);
- // PageListAdd pageList = columnDataUtil.tableColumnData(apiId, AllCapacityMonitor,capacityMonitor);
- // return success(pageList);
- //
- // }
- // @ApiOperation(value="查询各仓库,门岗的排队状态列表")
- // @PostMapping("/getQueueStatusList")
- // public RESTfulResult getQueueStatusList(){
- // List<Map<String, Object>> queueStatusList = qmsQueueResultService.getQueueStatusList();
- // return success(queueStatusList);
- // }
- // @ApiOperation(value="通过车牌号查询司机接收排队信息")
- // @PostMapping("/getOrderReceive/{capacityNumber}")
- // public RESTfulResult getOrderReceive(@PathVariable("capacityNumber") String capacityNumber){
- // List<Map<String, Object>> orderReceiveMap = qmsQueueResultService.getOrderReceive2(capacityNumber);
- // return success(orderReceiveMap);
- // }
- // @ApiOperation(value="通过车牌号取消排队")
- // @PostMapping("/cancelQueue")
- // public RESTfulResult cancelQueue(@RequestBody Map<String,Object> mapValue){
- // int code = qmsQueueResultService.cancelQueue(mapValue);
- // return success(code);
- // }
- //========================================仓库=====================================================
- // @ApiOperation(value="新增仓库排队")
- // @PostMapping("/addQueueResultByCk")
- // public RESTfulResult addQueueResultByCk(@RequestBody Map<String,Object> mapValue){
- // int code = qmsQueueResultService.addQueueResultByCk(mapValue);
- // return success(code);
- // }
- // @ApiOperation(value="查询仓库排队申请")
- // @ApiImplicitParams({
- // @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- // @ApiImplicitParam(name = "apiId(187)", value = "动态表头", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- // })
- // @PostMapping("/getWarehouseQueueApply")
- // public RESTfulResult getWarehouseQueueApply(@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_queue";
- // //获取查询结果
- // return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));
- // }
- // }
- // List<Map<String, Object>> AllWarehouseQueue = null;
- // //如果有条件查询则跳过初始化,和创建索引
- // if(mapValue.size() == 0){
- // //将查询结果存入索引中
- // AllWarehouseQueue = qmsQueueResultService.getWarehouseQueueApply(mapValue);
- // Map<String, Object> map = new HashMap<>();
- // //添加索引
- // map.put("index","get_warehouse_queue");
- // //添加id
- // map.put("indexId","warehouseQueueId");
- // AllWarehouseQueue.add(map);
- // //新建索引
- // esFeign.insertIndex(AllWarehouseQueue);
- // //删除
- // AllWarehouseQueue.remove(AllWarehouseQueue.size()-1);
- // }
- // if(AllWarehouseQueue == null)
- // AllWarehouseQueue = qmsQueueResultService.getWarehouseQueueApply(mapValue);
- // PageHelper.startPage(pageNum,pageSize);
- // //分页数据
- // List<Map<String, Object>> warehouseQueueApply1= qmsQueueResultService.getWarehouseQueueApply(mapValue);
- // PageListAdd pageList = columnDataUtil.tableColumnData(apiId, AllWarehouseQueue,warehouseQueueApply1);
- // return success(pageList);
- // }
- // @ApiOperation(value="查询仓库排队开始")
- // @ApiImplicitParams({
- // @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- // @ApiImplicitParam(name = "apiId(191)", value = "动态表头", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- // })
- // @PostMapping("/getWarehouseQueueListByQueueUp")
- // public RESTfulResult getWarehouseQueueListByQueueUp(@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";
- // //获取查询结果
- // return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));
- // }
- // }
- // List<Map<String, Object>> AllWarehouseQueueList = null;
- // //如果有条件查询则跳过初始化,和创建索引
- // if(mapValue.size() == 0){
- // //将查询结果存入索引中
- // AllWarehouseQueueList = qmsQueueResultService.getWarehouseQueueListByQueueUp(mapValue);
- // Map<String, Object> map = new HashMap<>();
- // //添加索引
- // map.put("index","get_warehouse_list");
- // //添加id
- // map.put("indexId","warehouseQueueListId");
- // AllWarehouseQueueList.add(map);
- // //新建索引
- // esFeign.insertIndex(AllWarehouseQueueList);
- // //删除
- // AllWarehouseQueueList.remove(AllWarehouseQueueList.size()-1);
- // }
- // if(AllWarehouseQueueList == null)
- // AllWarehouseQueueList = qmsQueueResultService.getWarehouseQueueListByQueueUp(mapValue);
- // PageHelper.startPage(pageNum,pageSize);
- // //分页数据
- // List<Map<String, Object>> warehouseQueueList= qmsQueueResultService.getWarehouseQueueListByQueueUp(mapValue);
- // PageListAdd pageList = columnDataUtil.tableColumnData(apiId, AllWarehouseQueueList,warehouseQueueList);
- // return success(pageList);
- // }
- //
- // @ApiOperation(value="查询仓库排队详情")
- // @ApiImplicitParams({
- // @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- // @ApiImplicitParam(name = "apiId(192)", value = "动态表头", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- // })
- // @PostMapping("/getAllWarehouseQueueMes")
- // public RESTfulResult getAllWarehouseQueueMes(@RequestBody(required=false) Map<String,Object> mapValue,
- // Integer apiId,
- // Integer pageNum,
- // Integer pageSize,
- // Integer platformId,
- // String con
- // ){
- // int count=0;
- // if(platformId != null){
- // mapValue.put("platformId", platformId);
- // count++;
- // }
- //
- //
- // if(con != null){
- // if(!"undefined".equals(con)){
- // //设置要查询的索引名称
- // String index="get_warehousemes_list";
- // //获取查询结果
- // return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));
- // }
- // }
- // List<Map<String, Object>> AllWarehouseQueueMes = null;
- // //如果有条件查询则跳过初始化,和创建索引
- // if(mapValue.size() == count){
- // //将查询结果存入索引中
- // AllWarehouseQueueMes = qmsQueueResultService.getWarehouseQueueMes(mapValue);
- // Map<String, Object> map = new HashMap<>();
- // //添加索引
- // map.put("index","get_warehousemes_list");
- // //添加id
- // map.put("indexId","warehouseMesListId");
- // AllWarehouseQueueMes.add(map);
- // //新建索引
- // esFeign.insertIndex(AllWarehouseQueueMes);
- // //删除
- // AllWarehouseQueueMes.remove(AllWarehouseQueueMes.size()-1);
- // }
- // if(AllWarehouseQueueMes == null)
- // AllWarehouseQueueMes = qmsQueueResultService.getWarehouseQueueMes(mapValue);
- // PageHelper.startPage(pageNum,pageSize);
- // //分页数据
- // List<Map<String, Object>> warehouseQueueList= qmsQueueResultService.getWarehouseQueueMes(mapValue);
- // PageListAdd pageList = columnDataUtil.tableColumnData(apiId, AllWarehouseQueueMes,warehouseQueueList);
- // return success(pageList);
- // }
- //
- // @ApiOperation(value="通过运输订单号查询仓库排队详情")
- // @PostMapping("/getWarehouseQueueMes")
- // public RESTfulResult getWarehouseQueueMes(Map<String, Object> map){
- // List<Map<String, Object>> warehouseQueueMes = qmsQueueResultService.getWarehouseQueueMes(map);
- // return success(warehouseQueueMes);
- // }
- //
- //
- // @ApiOperation(value="查询仓库排队转移")
- // @ApiImplicitParams({
- // @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- // @ApiImplicitParam(name = "apiId(193)", value = "动态表头", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- // })
- // @PostMapping("/getWarehouseQueueChange")
- // public RESTfulResult getWarehouseQueueChange(@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_warechange_list";
- // //获取查询结果
- // return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));
- // }
- // }
- // List<Map<String, Object>> AllWarehouseQueueChange = null;
- // //如果有条件查询则跳过初始化,和创建索引
- // if(mapValue.size() == 0){
- // //将查询结果存入索引中
- // AllWarehouseQueueChange = qmsQueueResultService.getWarehouseQueueChange(mapValue);
- // Map<String, Object> map = new HashMap<>();
- // //添加索引
- // map.put("index","get_warechange_list");
- // //添加id
- // map.put("indexId","warehouseChangeListId");
- // AllWarehouseQueueChange.add(map);
- // //新建索引
- // esFeign.insertIndex(AllWarehouseQueueChange);
- // //删除
- // AllWarehouseQueueChange.remove(AllWarehouseQueueChange.size()-1);
- // }
- // if(AllWarehouseQueueChange == null)
- // AllWarehouseQueueChange = qmsQueueResultService.getWarehouseQueueChange(mapValue);
- // PageHelper.startPage(pageNum,pageSize);
- // //分页数据
- // List<Map<String, Object>> warehouseQueueList= qmsQueueResultService.getWarehouseQueueChange(mapValue);
- // PageListAdd pageList = columnDataUtil.tableColumnData(apiId, AllWarehouseQueueChange,warehouseQueueList);
- // return success(pageList);
- //
- // }
- //
- // @ApiOperation(value="查询仓库排队结束")
- // @ApiImplicitParams({
- // @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
- // @ApiImplicitParam(name = "apiId(194)", value = "动态表头", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
- // @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
- // })
- // @PostMapping("/getWarehouseQueueEndMes")
- // public RESTfulResult getWarehouseQueueEndMes(@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_warequeue_endmes";
- // //获取查询结果
- // return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));
- // }
- // }
- // List<Map<String, Object>> AllWarehouseQueueEndMes = null;
- // //如果有条件查询则跳过初始化,和创建索引
- // if(mapValue.size() == 0){
- // //将查询结果存入索引中
- // AllWarehouseQueueEndMes = qmsQueueResultService.getWarehouseQueueEndMes(mapValue);
- // Map<String, Object> map = new HashMap<>();
- // //添加索引
- // map.put("index","get_warequeue_endmes");
- // //添加id
- // map.put("indexId","wareQueueEndMesId");
- // AllWarehouseQueueEndMes.add(map);
- // //新建索引
- // esFeign.insertIndex(AllWarehouseQueueEndMes);
- // //删除
- // AllWarehouseQueueEndMes.remove(AllWarehouseQueueEndMes.size()-1);
- // }
- // if(AllWarehouseQueueEndMes == null)
- // AllWarehouseQueueEndMes = qmsQueueResultService.getWarehouseQueueEndMes(mapValue);
- // PageHelper.startPage(pageNum,pageSize);
- // //分页数据
- // List<Map<String, Object>> warehouseQueueList= qmsQueueResultService.getWarehouseQueueEndMes(mapValue);
- // PageListAdd pageList = columnDataUtil.tableColumnData(apiId, AllWarehouseQueueEndMes,warehouseQueueList);
- // return success(pageList);
- //
- // }
- @ApiOperation(value="查看所有物资")
- @GetMapping("/getAllModel")
- public RESTfulResult getAllModel(String index){
- Map<String ,Object> map=new HashMap<>();
- map.put("index",index);
- return success(qmsModelUnrooledMapper.getAllModel(map));
- }
- @ApiOperation(value="查看所有物资")
- @GetMapping("/getAllModelUnrolled")
- public RESTfulResult getAllModelUnrolled(String index){
- Map<String ,Object> map=new HashMap<>();
- map.put("index",index);
- return success(qmsModelUnrooledMapper.getAllModelUnrolled(map));
- }
- @ApiOperation(value="新增")
- @PostMapping("/addModel")
- public RESTfulResult addModel(@RequestBody(required=false) Map<String,Object> map){
- QmsModelUnrooled model=new QmsModelUnrooled();
- model.setSpectionsModel(map.get("spectionsModel").toString());
- model.setResultId(qmsModelUnrooledMapper.selectMaxId());
- return success(qmsModelUnrooledMapper.insertSelective(model));
- }
- @ApiOperation(value="修改")
- @PostMapping("/updateModel")
- public RESTfulResult updateModel(@RequestBody(required=false) Map<String,Object> map){
- QmsModelUnrooled model=new QmsModelUnrooled();
- model.setResultId(DataChange.dataToBigDecimal(map.get("resultId")));
- model.setSpectionsModel(map.get("spectionsModel").toString());
- return success(qmsModelUnrooledMapper.updateByPrimaryKeySelective(model));
- }
- @ApiOperation(value="删除")
- @PostMapping("/deleteModel")
- public RESTfulResult deleteModel(@RequestBody(required=false) Map<String,Object> map){
- QmsModelUnrooled model=new QmsModelUnrooled();
- model.setResultId(DataChange.dataToBigDecimal(map.get("resultId")));
- return success(qmsModelUnrooledMapper.deleteByPrimaryKey(model.getResultId()));
- }
- }
|