Ver código fonte

后台代码更新处理

oyq28 2 dias atrás
pai
commit
de41d5c004

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

@@ -500,6 +500,7 @@ public class TaskWorkNode {
                                     // begin add by yejian on 20220819 for 将机器人上的缓存位利用历来:如果缓存位数量n-1 >= 1,则可以将工件不放到线边库,直接放在缓存位上暂存后轮训线边库逻辑
 
                                     logger.info("节点{}执行缓存位线边库逻辑无需再次取放标志{}", taskNode.getId(), conMap.get(YunjianConstant.YUNJIAN_HCW_XBKFLAG));
+                                    /*
                                     if (conMap.containsKey(YunjianConstant.YUNJIAN_HCW_XBKFLAG)) {
                                         // 将消息重新推入消息对列执行缓存为线边库逻辑,直接移动到设备位子从机器人缓存位拿
                                         logger.info("节点{}执行缓存位线边库逻辑无需再次取放", taskNode.getId());
@@ -510,7 +511,7 @@ public class TaskWorkNode {
                                             //storgeService.unlockStorgeList(storgeList);
                                         }
                                         //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());

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

@@ -328,7 +328,7 @@ public class CacheRobotStrategy implements RobotStrategy {
         //}
         if(robotList.size() == 0 ) {
             dataMap.put("result", false);
-            dataMap.put("resultMsg","手抓/暂存不满足");
+            dataMap.put("resultMsg","手抓/暂存不满足");
             return dataMap;
         }
         TTask task = taskService.getById(taskNode.getTaskId());
@@ -342,10 +342,14 @@ 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());
         String targetXbk = !returnMap.containsKey("targetxbk") ? null : returnMap.get("targetxbk").toString();
-//        if (ObjectUtil.isNotEmpty(targetXbk) && targetXbk.equals("1")) {
-//            dataMap.put("result", false);
-//            return dataMap;
-//        }
+        String xbkCount = dataMap.containsKey(taskNode.getId()+"count")? dataMap.get(taskNode.getId()+"count").toString(): null;
+        //线边库目标位置被占用
+        if (ObjectUtil.isNotEmpty(targetXbk) && targetXbk.equals("1") && StringUtils.isNotEmpty(xbkCount) && xbkCount.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);
@@ -432,7 +436,7 @@ 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());
+                        targetList = targetList.stream().filter(p->!p.getPointId().contains(DemoLineConstant.DEMOLINE_CUT_TOOL_TYPE_CNCT)).collect(Collectors.toList());
                     }
 
                     if (CollectionUtil.isNotEmpty(targetList)) {

+ 1 - 1
imcs-admin-boot/imcs-common/src/main/java/com/github/zuihou/common/constant/DictionaryKey.java

@@ -139,7 +139,7 @@ public interface DictionaryKey {
             put("plateAndClamp", "FMS_XBK");
             put("FMS2.0", "FMS_XBK");
             put("涡轴柔性加工单元", "CT_01");
-
+            put("涡轴柔性加工单元-tool", "CT_02");
             // 示范线配置
 //            put("质量中心-capsule", "XBK_01");
 //            put("柔性线", "XBK_03,XBK_04");