瀏覽代碼

工装回库后台处理

oyq28 2 周之前
父節點
當前提交
6dc21727b2

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

@@ -1936,7 +1936,7 @@ public class TaskWorkNode {
 
 
         //设备不存在
         //设备不存在
         if (!checkRobot(robotList, zone.getName(), count)) {
         if (!checkRobot(robotList, zone.getName(), count)) {
-            dataMap.put("resultMsg","设备不存在或者设备满足条件");
+            dataMap.put("resultMsg","设备不存在或者设备满足条件");
             return null;
             return null;
         }
         }
 //        //资源临界判断
 //        //资源临界判断

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

@@ -1962,6 +1962,9 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
                 }
                 }
             }
             }
         }
         }
+        else{
+            unlockResource(taskNode, task, callBackJson);
+        }
     }
     }
 
 
 
 

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

@@ -273,7 +273,10 @@ public class CacheRobotStrategy implements RobotStrategy {
             msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + taskNode.getId(), targetStorge, 10, TimeUnit.DAYS);
             msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + taskNode.getId(), targetStorge, 10, TimeUnit.DAYS);
         } else {
         } else {
             //暂存位优先级处理判断
             //暂存位优先级处理判断
-            if(hcwList.size()==1){
+            TaskNode beforeNode = taskNodeService.getNextNTaskNode(taskNode, -1);
+            boolean condition = beforeNode!=null && beforeNode.getNodeName().contains("下料") && "04".equals(beforeNode.getInterfaceType()) && "4".equals(taskNode.getNodeType());
+            //排除回库生成节点
+            if(hcwList.size()==1 && !condition){
                 targetStorge = hcwStorge;
                 targetStorge = hcwStorge;
             }
             }
             if (targetXbk.equals("0")) {
             if (targetXbk.equals("0")) {

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

@@ -216,10 +216,10 @@ public class MsgUtil implements ApplicationContextAware {
     public void pushToNextMq(TaskNode taskNode, TTask task, List<TaskNode>taskNodeList, int n, JSONObject callBackJson, TWorkpiece currWorkpiece){
     public void pushToNextMq(TaskNode taskNode, TTask task, List<TaskNode>taskNodeList, int n, JSONObject callBackJson, TWorkpiece currWorkpiece){
         //把推送把下一个节点丢到MQ。
         //把推送把下一个节点丢到MQ。
         JSONObject jsonObject = new JSONObject();
         JSONObject jsonObject = new JSONObject();
-
-        if(n<taskNodeList.size()-1){ //尚未执行到最后一个
+        boolean lastXbk =  n==taskNodeList.size()-1 && callBackJson.containsKey("YUNJIAN_ROBORT_CACHE_FLAG") && callBackJson.containsKey("YUNJIAN_XBKFLAG") && callBackJson.getString(taskNode.getId()+"count").trim().equals("0");
+        if(n<taskNodeList.size()-1 || lastXbk){ //尚未执行到最后一个
             logger.warn("【进入MQ队列判断】,节点:{}",taskNode.getId() );
             logger.warn("【进入MQ队列判断】,节点:{}",taskNode.getId() );
-            TaskNode nextTaskNode = taskNodeList.get(n+1);
+            TaskNode nextTaskNode = !lastXbk ? taskNodeList.get(n+1) : taskNode;
             //TaskNode beforeNode = taskNodeService.getNextNTaskNode(taskNode, -1);
             //TaskNode beforeNode = taskNodeService.getNextNTaskNode(taskNode, -1);
 
 
             String zoneType = (null == redis_get(ParameterKey.PARAMETERS)? "": ((Map<String,String>)redis_get(ParameterKey.PARAMETERS)).get(ParameterKey.ZONE_TYPE).toString());
             String zoneType = (null == redis_get(ParameterKey.PARAMETERS)? "": ((Map<String,String>)redis_get(ParameterKey.PARAMETERS)).get(ParameterKey.ZONE_TYPE).toString());