Przeglądaj źródła

保障平台线边库查找逻辑修改

yejian 3 lat temu
rodzic
commit
c5f7c48abb

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

@@ -701,7 +701,7 @@ public class TaskWorkNode {
         //执行到第几步
         dataMap.put(taskNode.getId().toString() + "count", count);
         //前序是设备序并且最后一个节点是agv搬运,锁定agv相关库位信息
-        if (BizConstant.ROBOT_TYPE_CACHE.equals(zoneService.getRobotTypebyZone(zone.getName()))) {//有缓存位的机器人
+        if (BizConstant.ROBOT_TYPE_CACHE.equals(zoneService.getRobotTypebyZone(zone.getName()))) { //有缓存位的机器人
             dataMap.put(YunjianConstant.YUNJIAN_ROBORT_CACHE_FLAG, "1");
 
             if (count == 0) {//第一步的时候锁定资源

+ 11 - 3
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/impl/RobotNodeServiceImpl.java

@@ -633,9 +633,17 @@ public class RobotNodeServiceImpl implements NodeOperationService {
         }
 
         if("1".equals(xbkFlag)){//最终放到线边库中
-            //获取机器人操作线边库
-            xbkArr = DictionaryKey.YJ_ZONE_XBK.get(zoneName).split(",");
-            xbkList = productionresourcePositionService.getFreeProductionresourcePositionByNos(xbkArr);
+            // 判断当前节点设备所属产线,如果是保障平台,区分订单是舱体还是框体
+            if("safeguard".equals(zZone.getNo())){
+                //获取机器人操作线边库
+                String xbkKey = zoneName+"-"+bomzZone.getNo();
+                xbkArr = DictionaryKey.YJ_ZONE_XBK.get(xbkKey).split(",");
+                xbkList = productionresourcePositionService.getFreeProductionresourcePositionByNos(xbkArr);
+            }else{
+                //获取机器人操作线边库
+                xbkArr = DictionaryKey.YJ_ZONE_XBK.get(zoneName).split(",");
+                xbkList = productionresourcePositionService.getFreeProductionresourcePositionByNos(xbkArr);
+            }
             log.info("查找线边库库位{}",xbkList);
             if(CollectionUtil.isNotEmpty(xbkList)){
                 ProductionresourcePosition position = xbkList.get(0);

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

@@ -121,7 +121,8 @@ public interface DictionaryKey {
     //设备关联线边库
     Map<String, String> YJ_ZONE_XBK = new HashMap<String, String>(){
         {
-            put("智能生产保障系统", "BZ_02,BZ_03");
+            put("智能生产保障系统-capsule", "BZ_02");
+            put("智能生产保障系统-framework", "BZ_03");
             put("框体类加工单元", "KT_01,KT_02,KT_03");
             put("舱体类加工单元", "CT_01,CT_02,CT_03");
             put("利库", "BZ_01");