Selaa lähdekoodia

后台功能处理

oyq28 4 kuukautta sitten
vanhempi
commit
a719a36943

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

@@ -258,6 +258,7 @@ public class CacheRobotStrategy implements RobotStrategy {
             if(ObjectUtil.isEmpty(preHcwXbkFlag)){
                 returnMap.put("msg", "已暂存位工装数据无缓存数据");
                 returnMap.put("result", false);
+                taskNodeService.freeLock(taskNode.getCompleteBatchNo());
                 return returnMap;
             }
             targetStorge = hcwStorge;
@@ -360,15 +361,21 @@ public class CacheRobotStrategy implements RobotStrategy {
         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")) {
+            Object hcwXbkFlag = msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_HCW_XBK_FLAG + taskNode.getId());
+            if(ObjectUtil.isNotEmpty(hcwXbkFlag)){
+                dataMap.put("result", false);
+                dataMap.put("resultMsg", "条件判断不通过,目标位被占用,节点名字"+ taskNode.getNodeName()+"节点id:"+taskNode.getId());
+                return dataMap;
+            }
             //暂存位优先级低的节点目标位线边库模式,当暂存位上只有一块工装时将优先级低调整成优先级高
             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.size() == 2 && jqrList.size() == 1){
                 msgUtil.redis_del(DemoLineConstant.JQR_HCW_PART_PRIOTY_EXEC_FLAG + taskNode.getId());
                 msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_HCW_XBK_FLAG + taskNode.getId(), "1");
+                dataMap.put("result", false);
+                dataMap.put("resultMsg", "条件判断不通过,涉及到多次搬运,节点名字"+ taskNode.getNodeName()+"节点id:"+taskNode.getId());
+                return dataMap;
             }
-            dataMap.put("result", false);
-            dataMap.put("resultMsg", "条件判断不通过,涉及到多次搬运,节点名字"+ taskNode.getNodeName()+"节点id:"+taskNode.getId());
-            return dataMap;
         }
         Storge startStore = workpieceService.getWorkPieceStock(taskNode.getCompleteBatchNo(), false);
         List<ProductionresourcePosition> robotXbkList = productionresourcePositionService.getFreeProductionresourcePositionByIds(new String[]{taskNode.getResourceId().toString()});

+ 3 - 0
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/productionReadyCenter/AAutoNodeLogMapper.xml

@@ -70,6 +70,9 @@
                 LEFT JOIN imcs_o_order ioo ON ioo.id = aanl.order_id
                 LEFT JOIN imcs_t_task_node ittn ON ittn.id = aanl.task_node_id
                 LEFT JOIN imcs_t_workpiece itw ON itw.complete_batch_no = ittn.complete_batch_no
+        <if test="aAutoNodeLog.exeStatus != null and aAutoNodeLog.exeStatus != ''">
+            where aanl.exe_status = ${aAutoNodeLog.exeStatus}
+        </if>
         ORDER BY
             aanl.order_id DESC,
             ittn.complete_batch_no DESC,