|
@@ -2,6 +2,8 @@ package com.github.zuihou.business.util;
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.github.zuihou.business.DemoLine.DemoCacheKey;
|
|
|
+import com.github.zuihou.business.DemoLine.DemoLineConstant;
|
|
|
import com.github.zuihou.business.DemoLine.YunjianConstant;
|
|
|
import com.github.zuihou.business.edgeLibrary.service.StockInfoService;
|
|
|
import com.github.zuihou.business.edgeLibrary.service.impl.StockInfoServiceImpl;
|
|
@@ -20,6 +22,7 @@ import com.github.zuihou.business.productionResourceCenter.service.ZZoneService;
|
|
|
import com.github.zuihou.business.productionResourceCenter.service.impl.ZZoneServiceImpl;
|
|
|
import com.github.zuihou.business.websocket.WebSocketServer;
|
|
|
import com.github.zuihou.common.constant.BizConstant;
|
|
|
+import com.github.zuihou.common.constant.CacheKey;
|
|
|
import com.github.zuihou.common.constant.DictionaryKey;
|
|
|
import com.github.zuihou.common.constant.ParameterKey;
|
|
|
import com.github.zuihou.common.util.SmbShareFileUtil;
|
|
@@ -41,6 +44,7 @@ import org.springframework.web.client.RestTemplate;
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Component
|
|
|
public class MsgUtil implements ApplicationContextAware {
|
|
@@ -241,6 +245,20 @@ public class MsgUtil implements ApplicationContextAware {
|
|
|
|
|
|
if(1 == measuringResult){
|
|
|
logger.info("三坐标测量失败直接下料");
|
|
|
+
|
|
|
+ // 清楚当前节点工序的redis暂存值
|
|
|
+ List<TaskNode> operationTaskNodes = taskNodeService.list(Wraps.<TaskNode>lbQ().eq(TaskNode::getTaskId, taskNode.getTaskId()));
|
|
|
+ List<Long> operationTaskNodeIds = operationTaskNodes.stream().map(operationTaskNode -> operationTaskNode.getId()).collect(Collectors.toList());
|
|
|
+ for(Long operationTaskNodeId : operationTaskNodeIds){
|
|
|
+ // 清除redis里面的内容
|
|
|
+ msgUtil.redis_del(YunjianConstant.YUNJIAN_CALLBACK_PARAM + "_" + operationTaskNodeId);
|
|
|
+ msgUtil.redis_del(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + operationTaskNodeId);
|
|
|
+ msgUtil.redis_del(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_HCW + operationTaskNodeId);
|
|
|
+ msgUtil.redis_del(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_XBK_FLAG + operationTaskNodeId);
|
|
|
+ msgUtil.redis_del(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + operationTaskNodeId);
|
|
|
+ msgUtil.redis_del(CacheKey.TASK_CURRENT_NODE + "_" + operationTaskNodeId);
|
|
|
+ }
|
|
|
+
|
|
|
//获取下料工序
|
|
|
List<BomProcedure> bomProcedureList = bomProcedureService.list(Wraps.<BomProcedure>lbQ().eq(BomProcedure::getBomId,task.getBomId()).eq(BomProcedure::getType,"下料").orderByAsc(BomProcedure::getSort));
|
|
|
if(CollectionUtil.isNotEmpty(bomProcedureList)){
|