|
|
@@ -222,6 +222,8 @@ public class MsgUtil implements ApplicationContextAware {
|
|
|
Order order = orderMapper.selectById(task.getOrderId());
|
|
|
Plan plan = planMapper.selectById(task.getPlanId());
|
|
|
BBom bom = bBomMapper.selectById(task.getBomId());
|
|
|
+ Productionresource productionresource = productionresourceBizMapper.selectById(task.getResourceId());
|
|
|
+ boolean isBZ = productionresource.getCode().contains("BZ");
|
|
|
|
|
|
if(zoneType.equals(ParameterKey.ZONE_SFX)){
|
|
|
//如果是三坐标检测
|
|
|
@@ -317,7 +319,7 @@ public class MsgUtil implements ApplicationContextAware {
|
|
|
|
|
|
|
|
|
//获取配置工序
|
|
|
- BomProcedure bomProcedure = bomProcedureMapper.selectById(task.getProcedureId());
|
|
|
+ //BomProcedure bomProcedure = bomProcedureMapper.selectById(task.getProcedureId());
|
|
|
logger.info("【进入YJ_MQ队列判断】,节点对象:{}",JSONObject.toJSONString(taskNode));
|
|
|
//如果是三坐标检测
|
|
|
if("3".equals(taskNode.getNodeType())){
|
|
|
@@ -529,7 +531,7 @@ public class MsgUtil implements ApplicationContextAware {
|
|
|
taskMapper.updateById(task);
|
|
|
|
|
|
}else{
|
|
|
- this.cleanCacheId(repeatKey, taskNode.getId().toString(), bomzZone);
|
|
|
+ this.cleanCacheId(repeatKey, taskNode.getId().toString(), bomzZone, isBZ);
|
|
|
dynamicRabbitMq.sendMsg(nextTaskNode.getResourceId().toString(),jsonObject.toString());
|
|
|
}
|
|
|
|
|
|
@@ -582,14 +584,14 @@ public class MsgUtil implements ApplicationContextAware {
|
|
|
else if(nextNode!=null){
|
|
|
boolean ret = this.priorityHandle(taskNode, nextNode, jsonObject);
|
|
|
if(ret) {
|
|
|
- this.cleanCacheId(repeatKey, taskNode.getId().toString(), bomzZone);
|
|
|
+ this.cleanCacheId(repeatKey, taskNode.getId().toString(), bomzZone, false);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- }else if(positionCache || agvCache){
|
|
|
+ }else if((positionCache && !isBZ) || agvCache){
|
|
|
boolean ret = this.priorityHandle(taskNode, nextNode, jsonObject);
|
|
|
if(ret) {
|
|
|
- this.cleanCacheId(repeatKey, taskNode.getId().toString(), bomzZone);
|
|
|
+ this.cleanCacheId(repeatKey, taskNode.getId().toString(), bomzZone, false);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
@@ -606,7 +608,7 @@ public class MsgUtil implements ApplicationContextAware {
|
|
|
task.setStatus("3");
|
|
|
taskMapper.updateById(task);
|
|
|
}else{
|
|
|
- logger.info("【节点任务放入MQ】节点id:{}",nextTaskNode);
|
|
|
+ logger.warn("【节点任务放入MQ】节点id:{}",nextTaskNode);
|
|
|
/*
|
|
|
TaskNode nextNextNode = taskNodeService.getNextNTaskNode(nextTaskNode, 1);
|
|
|
boolean bool = nextTaskNode.getTargetResourceId()==null && nextNextNode!=null && nextNextNode.getTargetResourceId()!=null ;
|
|
|
@@ -617,7 +619,7 @@ public class MsgUtil implements ApplicationContextAware {
|
|
|
}
|
|
|
} */
|
|
|
jsonObject.put(nextTaskNode.getId().toString()+"count","0");
|
|
|
- this.cleanCacheId(repeatKey, taskNode.getId().toString(), bomzZone);
|
|
|
+ this.cleanCacheId(repeatKey, taskNode.getId().toString(), bomzZone, isBZ);
|
|
|
dynamicRabbitMq.sendMsg(nextTaskNode.getResourceId().toString(),jsonObject.toString());
|
|
|
}
|
|
|
}
|
|
|
@@ -629,13 +631,13 @@ public class MsgUtil implements ApplicationContextAware {
|
|
|
*
|
|
|
* @param repeatKey
|
|
|
*/
|
|
|
- public void cleanCacheId(String repeatKey, String taskNodeId, ZZone zZone){
|
|
|
+ public void cleanCacheId(String repeatKey, String taskNodeId, ZZone zZone, boolean isBz){
|
|
|
String cacheUid = msgUtil.redis_get(repeatKey) == null ? "" : msgUtil.redis_get(repeatKey).toString();
|
|
|
if (StringUtil.isNotEmpty(cacheUid)){
|
|
|
msgUtil.redis_del(repeatKey);
|
|
|
msgUtil.redis_fuzzy_del(YunjianConstant.YUNJIAN_SCHEDULE_LIST, taskNodeId);
|
|
|
}
|
|
|
- if(StringUtil.isNotEmpty(taskNodeId) && null!=zZone){
|
|
|
+ if(StringUtil.isNotEmpty(taskNodeId) && null!=zZone && !isBz){
|
|
|
String symbol="";
|
|
|
switch(zZone.getNo()){
|
|
|
case "capsule": symbol = "CT_jqr"; break;
|