Browse Source

Merge remote-tracking branch 'origin/master'

wang.sq@aliyun.com 4 months ago
parent
commit
6b1d2f87ac

+ 7 - 6
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/mq/TaskWorkNode.java

@@ -507,10 +507,11 @@ public class TaskWorkNode {
                                         List<String> storgePoints = storgeList.stream().map(p -> p.getPointId()).collect(Collectors.toList());
                                         if (CollectionUtil.isNotEmpty(storgeList)) {
                                             logger.info("节点{}开始释放占用的资源{}", taskNode.getId(), storgePoints.toString());
-                                            storgeService.unlockStorgeList(storgeList);
+                                            //storgeService.unlockStorgeList(storgeList);
                                         }
-                                        msgUtil.pushToNextMq(taskNode, 3);
-                                    } else {
+                                        //msgUtil.pushToNextMq(taskNode, 1);
+                                    }
+                                    //else {
                                         /**
                                          String zoneType = (null == msgUtil.redis_get(ParameterKey.PARAMETERS)? "": ((Map<String,String>)msgUtil.redis_get(ParameterKey.PARAMETERS)).get(ParameterKey.ZONE_TYPE).toString());
                                          if(zoneType.equals(ParameterKey.ZONE_YJ)){
@@ -617,8 +618,8 @@ public class TaskWorkNode {
 
                                                 //todo $需要换地址$
                                                 HttpEntity<String> formEntity = new HttpEntity<String>(jsonParam, headers);
-                                                returnData = restTemplate.postForObject(instructionUrl, formEntity, String.class);
-                                                //returnData = "{\"result\": \"true\"}";
+                                                //returnData = restTemplate.postForObject(instructionUrl, formEntity, String.class);
+                                                returnData = "{\"result\": \"true\"}";
 
                                             }
 
@@ -627,7 +628,7 @@ public class TaskWorkNode {
                                 }
                             }
                         }
-                    }
+ //                   }
                 } else {
                     logger.info("节点{}未获取到了执行锁", taskNode.getId());
                     conMap.put("result", false);

+ 7 - 4
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/TaskNodeServiceImpl.java

@@ -1814,7 +1814,7 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
             //更新节点任务
 
             if (callBackJson.containsKey(YunjianConstant.YUNJIAN_XBKFLAG))  {//临时存放到了线边库,向虚拟线边库发一个MQ。
-                int count = callBackJson.getString(taskNode.getId().toString() + "count") == null ? -1 :
+                int count = callBackJson.getString(taskNode.getId().toString() + "count") == null ? 0 :
                         Integer.parseInt(callBackJson.getString(taskNode.getId().toString() + "count"));
                 int limit = 1;
                 if (!callBackJson.containsKey(YunjianConstant.YUNJIAN_ROBORT_CACHE_FLAG)) {
@@ -2052,13 +2052,14 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
             } else {
                 // 线边库暂存放到设备上释放资源
                 if (StringUtils.isNotBlank(robotType)) {
-                    if ("5".equals(robotStep)) {
+                    if ("0".equals(robotStep) || "1".equals(robotStep)) {
                         logger.info("节点{}线边库暂存后放到设备完成后释放占用的资源", taskNode.getId());
 
                         String jqrHcwPartPriotyExec =
                                 (null == msgUtil.redis_get(DemoLineConstant.JQR_HCW_PART_PRIOTY_EXEC_FLAG + taskNode.getId())) ? "" : (String) msgUtil.redis_get(DemoLineConstant.JQR_HCW_PART_PRIOTY_EXEC_FLAG + taskNode.getId());
                         logger.info("节点{}是否存在当前缓存位上工件先放到目标设备标志{}", taskNode.getId(), jqrHcwPartPriotyExec);
                         List<Storge> storgeList = new ArrayList<>();
+                        /*
                         if ("1".equals(jqrHcwPartPriotyExec)) {
                             storgeList = storgeService.list(Wraps.<Storge>lbQ().eq(Storge::getCampId,
                                     taskNode.getId()).ne(Storge::getPointId, DemoLineConstant.DEMOLINE_RJQR_ZS));
@@ -2077,7 +2078,9 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
                         } else {
                             storgeList = storgeService.list(Wraps.<Storge>lbQ().eq(Storge::getCampId,
                                     taskNode.getId()));
-                        }
+                        } */
+                        storgeList = storgeService.list(Wraps.<Storge>lbQ().eq(Storge::getCampId,
+                                taskNode.getId()));
 
                         List<String> storgePoints =
                                 storgeList.stream().map(p -> p.getPointId()).collect(Collectors.toList());
@@ -2102,7 +2105,7 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
                         }
                     }
                 } else {
-                    if ("1".equals(robotStep)) {
+                    if ("0".equals(robotStep)) {
                         logger.info("节点{}线边库暂存后放到设备完成后释放占用的资源", taskNode.getId());
                         List<Storge> storgeList = storgeService.list(Wraps.<Storge>lbQ().eq(Storge::getCampId,
                                 taskNode.getId()));

+ 85 - 46
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/strategy/impl/CacheRobotStrategy.java

@@ -46,12 +46,15 @@ import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
+import java.util.Comparator;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
+import static java.util.stream.Collectors.groupingBy;
+
 @Component("CACHE")
 @Slf4j
 public class CacheRobotStrategy implements RobotStrategy {
@@ -108,7 +111,6 @@ public class CacheRobotStrategy implements RobotStrategy {
 
         com.github.zuihou.business.productionResourceCenter.entity.Productionresource robot = productionresourceBizMapper.selectById(taskNode.getResourceId());
         ZZoneProductionresource zoneProductionresource = zZoneProductionresourceMapper.selectOne(Wraps.<ZZoneProductionresource>lbQ().eq(ZZoneProductionresource::getResourceId, taskNode.getResourceId()));
-        List<ProductionresourcePosition> robotList = productionresourcePositionService.getFreeProductionresourcePositionByIds(new String[]{taskNode.getResourceId().toString()});
         ZZone zZone = zoneService.getOne(new LbqWrapper<ZZone>().eq(ZZone::getName, zoneName).last("limit 1"));
         Plan orderPlan = planService.getById(task.getPlanId());
         BBom bom = bBomMapper.selectById(task.getBomId());
@@ -124,7 +126,7 @@ public class CacheRobotStrategy implements RobotStrategy {
         robotInfo.put("bomzZone", bomzZone);
         robotInfo.put("plcInfo", plcInfo);
         robotInfo.put("singleRunFlag", orderPlan.getSingleRunFlag());
-        robotInfo.put("robotList", robotList);
+        //robotInfo.put("robotList", robotList);
         //robotInfo.put("xbkList", xbkList);
 
         return robotInfo;
@@ -156,7 +158,7 @@ public class CacheRobotStrategy implements RobotStrategy {
         Storge targetStorge = !returnMap.containsKey("store") ? null : (Storge) returnMap.get("store");
         Long targetStorgeResourceId = !returnMap.containsKey("storeResourceId") ? null : Long.valueOf(returnMap.get("storeResourceId").toString());
 
-        if (targetStorge == null) {
+        if (ObjectUtil.isEmpty(targetStorge)) {
             dataMap.put("result", false);
             dataMap.put("resultmsg","目标点位不满足,线边库不符合要求存放");
             return dataMap;
@@ -164,7 +166,7 @@ public class CacheRobotStrategy implements RobotStrategy {
         String targetXbk = !returnMap.containsKey("targetxbk") ? null : returnMap.get("targetxbk").toString();
 
         //处理机器人库位
-        List<ProductionresourcePosition> robotList = (List<ProductionresourcePosition>) robotInfo.get("robotList");
+        List<ProductionresourcePosition> robotList = productionresourcePositionService.getFreeProductionresourcePositionByIds(new String[]{taskNode.getResourceId().toString()});
         Map putMap = this.robotPut(returnMap, taskNode, startStore, targetStorge, robotList, targetXbk, targetStorgeResourceId);
         return putMap;
     }
@@ -173,73 +175,96 @@ public class CacheRobotStrategy implements RobotStrategy {
     public Map robotPut(Map returnMap, TaskNode taskNode, Storge startStorge, Storge targetStorge, List<ProductionresourcePosition> robotList, String targetXbk, Long targetStorgeResourceId) {
 
         Map<String, List<ProductionresourcePosition>> jqrMap = robotList.stream().collect(Collectors.groupingBy(ProductionresourcePosition::getPointId));
-        //Storge jqrStorge = storgeService.getById(jqrMap.get(DemoLineConstant.DEMOLINE_RJQR_ZS).get(0).getStorgeId());
-        //TaskNode nextTaskNode = taskNodeService.getNextNTaskNode(taskNode,1);
 
         //锁定机器人抓手
         Storge jqrStorge = null;
-        try {
-            jqrStorge = storgeService.getById(jqrMap.get(DemoLineConstant.DEMOLINE_RJQR_ZS).get(0).getStorgeId());
-
-            if(jqrStorge == null){
-                throw new BizException("没有查询到可执行的关节机器人");
-            }
-        }catch (Exception e){
-            throw new BizException("没有查询到可执行的关节机器人");
+        List<ProductionresourcePosition> jqrList = jqrMap.get(DemoLineConstant.DEMOLINE_RJQR_ZS);
+        if(jqrList.size() == 0){
+             returnMap.put("result", false);
+             return returnMap;
+        }else {
+             jqrStorge = storgeService.getById(jqrList.get(0).getStorgeId());
+              if (null == jqrStorge) {
+                  returnMap.put("result", false);
+                  return returnMap;
+              }
         }
 
-        jqrStorge.setCompleteBatchNo(taskNode.getCompleteBatchNo());
-        storgeService.lockStorge(jqrStorge, taskNode.getId());
-
-        List<ProductionresourcePosition> hcwList = jqrMap.get(jqrMap.keySet().stream().filter(p -> !DemoLineConstant.DEMOLINE_RJQR_ZS.equals(p) && !DemoLineConstant.DEMOLINE_RJQR_SIX.equals(p)).findFirst().get());
+        List<ProductionresourcePosition> hcwList = robotList.stream().filter(p -> !DemoLineConstant.DEMOLINE_RJQR_ZS.equals(p.getPointId())).collect(Collectors.toList());
         if (hcwList.size() == 0) {
             //限定抓手交换功能
-            boolean hasJqrhcwPartFlag = false;
-            List<Long> hcwStorgeIdList = hcwList.stream().map(ProductionresourcePosition::getStorgeId).collect(Collectors.toList());
+            List<Long> hcwStorgeIdList = productionresourcePositionService.list(new LbqWrapper<ProductionresourcePosition>().eq(ProductionresourcePosition::getResourceId, taskNode.getResourceId()).ne(ProductionresourcePosition::getPointId, DemoLineConstant.DEMOLINE_RJQR_ZS)).stream().map(ProductionresourcePosition::getStorgeId).collect(Collectors.toList());
             List<TWorkpiece> workpieceList = workpieceService.list(new LbqWrapper<TWorkpiece>().eq(TWorkpiece::getIsEnd, "0").in(TWorkpiece::getStorgeId, hcwStorgeIdList));
             if (workpieceList.size() > 2 || workpieceList.size() == 0) {
                 msgUtil.createWarnLog("机器人设备暂存位数据有误", "DataException");
                 returnMap.put("result", false);
             }
-
-            for (TWorkpiece item : workpieceList) {
-                long jqrHcwStorgeTaskNodeId = item.getTaskNodeId();
-                Object hcwStorgeFlag = msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_HCW_XBK_FLAG + jqrHcwStorgeTaskNodeId);
-                TaskNode hcwTaskNode = taskNodeService.getById(jqrHcwStorgeTaskNodeId);
-                boolean bool = ObjectUtil.isNotEmpty(hcwStorgeFlag) && hcwTaskNode.getTargetResourceId().equals(taskNode.getTargetResourceId()) && taskNode.getCompleteBatchNo() != hcwTaskNode.getCompleteBatchNo();
-                if (bool) {
-                    hasJqrhcwPartFlag = true;
-                    msgUtil.redis_set(DemoLineConstant.JQR_HCW_PART_PRIOTY_EXEC_FLAG + jqrHcwStorgeTaskNodeId, "1");
-                    break;
-                }
-            }
-            if (hasJqrhcwPartFlag) {
+            Object jqrPriotyFlag = msgUtil.redis_get(DemoLineConstant.JQR_HCW_PART_PRIOTY_EXEC_FLAG + taskNode.getId());
+            if(ObjectUtil.isNotEmpty(jqrPriotyFlag)){
                 returnMap.put("result", false);
                 return returnMap;
             }
+
+            TWorkpiece workpiece = workpieceList.stream().filter(item->!item.getTaskNodeId().equals(taskNode.getId())).collect(Collectors.toList()).get(0);
+            Object hcwStorgeFlag = msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_HCW_XBK_FLAG + workpiece.getTaskNodeId());
+            if(ObjectUtil.isEmpty(hcwStorgeFlag)){
+                Object hcwPriotyFlag = msgUtil.redis_get(DemoLineConstant.JQR_HCW_PART_PRIOTY_EXEC_FLAG + workpiece.getTaskNodeId());
+                TTask task = taskService.getById(taskNode.getTaskId());
+                //判断交换位目标设备是否与暂存位任务设备一致
+                if(ObjectUtil.isEmpty(hcwPriotyFlag) && taskNode.getTargetResourceId().equals(task.getResourceId())) {
+                    msgUtil.redis_set(DemoLineConstant.JQR_HCW_PART_PRIOTY_EXEC_FLAG + workpiece.getTaskNodeId(), "1");
+                    returnMap.put("result", false);
+                    return returnMap;
+                }
+            }
         }
         //锁定暂存缓存位库位
-        Storge hcwStorge = storgeService.getById(hcwList.get(0).getStorgeId());
-        hcwStorge.setCompleteBatchNo(taskNode.getCompleteBatchNo());
         startStorge.setCompleteBatchNo(taskNode.getCompleteBatchNo());
-        storgeService.lockStorge(hcwStorge, taskNode.getId());
         storgeService.lockStorge(startStorge, taskNode.getId());
+        //锁定抓手
+        jqrStorge.setCompleteBatchNo(taskNode.getCompleteBatchNo());
+        storgeService.lockStorge(jqrStorge, taskNode.getId());
 
-        if (hcwList.size() > 1) {
+        //暂存库位作为库位起始位不需重复锁定暂存位
+        ProductionresourcePosition startPosition = productionresourcePositionService.getOne(new LbqWrapper<ProductionresourcePosition>().eq(ProductionresourcePosition::getStorgeId, startStorge.getId()).last("limit 1"));
+        List<ProductionresourcePosition> hcwFilter = hcwList.stream().filter(p -> p.getResourceId().equals(startPosition.getResourceId())).collect(Collectors.toList());
+        Storge hcwStorge = null;
+        if(hcwFilter.size() == 0 && hcwList.size()>0) {
+             hcwStorge = storgeService.getById(hcwList.get(0).getStorgeId());
+             hcwStorge.setCompleteBatchNo(taskNode.getCompleteBatchNo());
+             storgeService.lockStorge(hcwStorge, taskNode.getId());
+        }else{
+            hcwStorge = startStorge;
+        }
+        Object hcwExecFlag = msgUtil.redis_get(DemoLineConstant.JQR_HCW_PART_PRIOTY_EXEC_FLAG + taskNode.getId());
+
+        //暂存位判断(暂存位无占用目标位占用 或者 暂存位被占用一个需进行优先级处理判断)
+        if (hcwList.size() > 1 && targetXbk.equals("1")) {
             //锁定暂存缓存位库位
             targetStorge = hcwStorge;
             msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_HCW_XBK_FLAG + taskNode.getId(), "1");
+            returnMap.put(YunjianConstant.YUNJIAN_XBKFLAG, "1");
+            returnMap.put(YunjianConstant.YUNJIAN_HCW_XBKFLAG, "1");
+            msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + taskNode.getId(), targetStorge, 10, TimeUnit.DAYS);
+        }else if(hcwList.size() == 1 && ObjectUtil.isEmpty(hcwExecFlag)){
+            targetStorge = hcwStorge;
+            returnMap.put(YunjianConstant.YUNJIAN_XBKFLAG, "1");
+            returnMap.put(YunjianConstant.YUNJIAN_HCW_XBKFLAG, "1");
+            msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + taskNode.getId(), targetStorge, 10, TimeUnit.DAYS);
         } else {
-            //锁定目标线边库库位
-            targetStorge.setCompleteBatchNo(taskNode.getCompleteBatchNo());
-            storgeService.lockStorge(targetStorge, taskNode.getId());
+            //暂存位无占用直接处理(即size>1或者size=0)
             if (targetXbk.equals("0")) {
                 //目标缓存
                 msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + taskNode.getId(), targetStorge, 10, TimeUnit.DAYS);
             } else {
                 //目标是线边库
                 msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_XBK_FLAG + taskNode.getId(), targetXbk, 10, TimeUnit.DAYS);
+                returnMap.put(YunjianConstant.YUNJIAN_XBKFLAG, "1");
+                returnMap.remove(taskNode.getId().toString()+"count");
             }
+            //锁定目标线边库库位
+            targetStorge.setCompleteBatchNo(taskNode.getCompleteBatchNo());
+            storgeService.lockStorge(targetStorge, taskNode.getId());
         }
         // 放入线边库或机器人缓存位
         log.info("节点{}提前占用机器人抓手{},缓存位{},目标库位{}", taskNode.getId(), jqrStorge.getPointId(), hcwStorge.getPointId(), targetStorge.getPointId());
@@ -271,12 +296,14 @@ public class CacheRobotStrategy implements RobotStrategy {
         locationMap.put("destLocation", targetStorge.getPointId()); //机器人缓存位
         locationMap.put("taskType", DictionaryKey.TASK_TYPE.get("CARRY"));
         locationMap.put("carryType", "1");
+        returnMap.put(YunjianConstant.YUNJIAN_ROBORT_CACHE_FLAG, "1");
         returnMap.put("data", locationMap);
         returnMap.put("method", "RobotAction");
         returnMap.put("result", true);
         returnMap.put("fromStorge", startStorge);
         returnMap.put("toStorge", targetStorge);
 
+
         // 机器人移动到redis记录实时位子
         msgUtil.redis_set(taskNode.getResourceId() + "postion", startStorge.getPointId());
 
@@ -289,25 +316,36 @@ public class CacheRobotStrategy implements RobotStrategy {
     @Override
     public Map robotXbk(Map dataMap, Map robotInfo, TaskNode taskNode, Storge startStorge, Storge goalStorge, List<ProductionresourcePosition> robotList) {
         //暂存位线边库处理
-        Object targetHcwXbk =  msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_HCW_XBK_FLAG + taskNode.getId());
-        if(ObjectUtil.isNotEmpty(targetHcwXbk)){
+        //Object targetHcwXbk =  msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_HCW_XBK_FLAG + taskNode.getId());
+        //if(ObjectUtil.isNotEmpty(targetHcwXbk)){
             Object jqrHcwPartPriotyExec = (null == msgUtil.redis_get(DemoLineConstant.JQR_HCW_PART_PRIOTY_EXEC_FLAG + taskNode.getId())) ? null : msgUtil.redis_get(DemoLineConstant.JQR_HCW_PART_PRIOTY_EXEC_FLAG + taskNode.getId());
             if(ObjectUtil.isNotEmpty(jqrHcwPartPriotyExec)){
                 robotList = robotList.stream().filter(item->item.getPointId().equals(DemoLineConstant.DEMOLINE_RJQR_ZS) && item.getStatus().equals("0")).collect(Collectors.toList());
             }
-        }
+        //}
         if(robotList.size() == 0 ) {
             dataMap.put("result", false);
             return dataMap;
         }
         TTask task = taskService.getById(taskNode.getTaskId());
         BomProcedure bomProcedure = bomProcedureMapper.selectOne(Wraps.<BomProcedure>lbQ().eq(BomProcedure::getId,task.getProcedureId()));
-        String zoneName = robotInfo.get("zoneName").toString();
+        ZZone zZone = (ZZone) robotInfo.get("zZone");
+        String zoneName = zZone.getName();
         List<ProductionresourcePosition> xbkList = productionresourcePositionService.getFreeProductionresourcePositionByNos(DictionaryKey.YJ_ZONE_XBK.get(zoneName).split(","));
 
         Map returnMap = this.robotTarget(taskNode, robotInfo, xbkList, bomProcedure, dataMap);
         //线边库处理
-        return returnMap;
+        Storge targetStorge = !returnMap.containsKey("store") ? null : (Storge) returnMap.get("store");
+        Long targetStorgeResourceId = !returnMap.containsKey("storeResourceId") ? null : Long.valueOf(returnMap.get("storeResourceId").toString());
+        String targetXbk = !returnMap.containsKey("targetxbk") ? null : returnMap.get("targetxbk").toString();
+        if (ObjectUtil.isNotEmpty(targetXbk) && targetXbk.equals("1")) {
+            dataMap.put("result", false);
+            return dataMap;
+        }
+        Storge startStore = workpieceService.getWorkPieceStock(taskNode.getCompleteBatchNo(), false);
+        List<ProductionresourcePosition> robotXbkList = productionresourcePositionService.getFreeProductionresourcePositionByIds(new String[]{taskNode.getResourceId().toString()});
+        Map putMap = this.robotPut(returnMap, taskNode, startStore, targetStorge, robotXbkList, targetXbk, targetStorgeResourceId);
+        return putMap;
     }
 
     public Map robotTarget(TaskNode taskNode, Map robotInfo, List<ProductionresourcePosition> xbkList, BomProcedure bomProcedure, Map<String, Object> returnMap) {
@@ -389,6 +427,8 @@ public class CacheRobotStrategy implements RobotStrategy {
                         }
                     } else {
                         targetList = productionresourcePositionService.getFreeProductionresourcePositionByIds(new String[]{targetResourceId.toString()});
+                        //排除刀具库位
+                        targetList = targetList.stream().filter(p->!p.getPointId().contains("CNCT")).collect(Collectors.toList());
                     }
 
                     if (CollectionUtil.isNotEmpty(targetList)) {
@@ -427,5 +467,4 @@ public class CacheRobotStrategy implements RobotStrategy {
         return returnMap;
     }
 
-
 }

+ 3 - 3
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/util/MsgUtil.java

@@ -481,7 +481,7 @@ public class MsgUtil implements ApplicationContextAware {
             }
 
             if(callBackJson.containsKey(YunjianConstant.YUNJIAN_XBKFLAG)){//临时存放到了线边库,向虚拟线边库发一个MQ。
-                    int count =  callBackJson.getString(taskNode.getId().toString()+"count")==null?-1:Integer.parseInt(callBackJson.getString(taskNode.getId().toString()+"count"));
+                    int count =  callBackJson.getString(taskNode.getId().toString()+"count")==null? 0:Integer.parseInt(callBackJson.getString(taskNode.getId().toString()+"count"));
                     int limit =1;
                     if(!callBackJson.containsKey(YunjianConstant.YUNJIAN_ROBORT_CACHE_FLAG)) {
                         limit =1;
@@ -546,8 +546,8 @@ public class MsgUtil implements ApplicationContextAware {
                 }
                 if(callBackJson.containsKey(YunjianConstant.YUNJIAN_ROBORT_CACHE_FLAG)){//带缓存位机器人的多步骤执行
                     int count =  callBackJson.getString(taskNode.getId().toString()+"count")==null?0:Integer.parseInt(callBackJson.getString(taskNode.getId().toString()+"count"));
-                    int limit = 0;
-                    if(count<limit){//
+                    int limit = callBackJson.getString(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_HCW_XBK_FLAG + taskNode.getId()) == null? 0 : 1;
+                    if(count<limit){
                         count = ++count;
                         jsonObject.put(taskNode.getId().toString()+"count",count);
                         //把当前节点推送到mq

+ 2 - 2
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/operationManagementCenter/ToolbarController.java

@@ -129,9 +129,9 @@ public class ToolbarController {
         String[] startNameCondition = start.split("_");
         String[] goalNameCondition = goal.split("_");
         if(startNameCondition.length != 2 || goalNameCondition.length != 2) return R.fail("数据格式传输有误");
-        Storge startStorge = storgeService.getOne(new LbqWrapper<Storge>().likeRight(Storge::getName, startNameCondition[0]).likeLeft(Storge::getName, startNameCondition[1]).eq(Storge::getPointId, startNameCondition[1]));
+        Storge startStorge = storgeService.getOne(new LbqWrapper<Storge>().eq(Storge::getPointId, startNameCondition[1]));
         if(null == startStorge) return R.fail("起始库位数据不存在");
-        Storge goalStorge = storgeService.getOne(new LbqWrapper<Storge>().likeRight(Storge::getName, goalNameCondition[0]).likeLeft(Storge::getName, goalNameCondition[1]).eq(Storge::getPointId, goalNameCondition[1]));
+        Storge goalStorge = storgeService.getOne(new LbqWrapper<Storge>().eq(Storge::getPointId, goalNameCondition[1]));
         if(null == goalStorge) return R.fail("目的库位数据不存在");
 
         //查询排除类型托板=5