姚云青 3 роки тому
батько
коміт
6e972415f5

+ 2 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/DemoLine/YunjianConstant.java

@@ -31,6 +31,8 @@ public interface YunjianConstant {
     String XIAOSHOUZHUA="xiaoshouzhua";
 
 
+    //缓存位
+    String YUNJIAN_JXS = "YUNJIAN_JXS";
     //缓存位
     String YUNJIAN_HCW = "YUNJIAN_HCW";
     //柔性机器人的三个点位

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

@@ -485,7 +485,7 @@ public class TaskWorkNode {
                     storgeService.lockStorge(targetStorge, taskNode.getId());
 
                     //抓手缓存
-                    msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.JQR3 + taskNode.getId(), jqrStorge, 1, TimeUnit.DAYS);
+                    msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + taskNode.getId(), jqrStorge, 1, TimeUnit.DAYS);
                     //缓存位缓存
                     msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_HCW + taskNode.getId(), hcwStorge, 1, TimeUnit.DAYS);
                     //目标缓存
@@ -497,7 +497,7 @@ public class TaskWorkNode {
                 }
                 dataMap.put("result", logical(robotList,targetStorge,zone));
             } else if (count == 1) {
-                jqrStorge = (Storge) msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.JQR3 + taskNode.getId());
+                jqrStorge = (Storge) msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + taskNode.getId());
                 dataMap.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "fetchMaterial");
                 Storge currentStore = workpieceService.getWorkPieceStock(taskNode.getId(), false);
                 dataMap.put("fromStorge", currentStore);
@@ -526,7 +526,7 @@ public class TaskWorkNode {
                 Storge hcwStorge = (Storge)msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_HCW + taskNode.getId());
                 dataMap.put("Data", hcwStorge);
                 dataMap.put("fromStorge", hcwStorge);
-                Storge handStorge = (Storge)msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.JQR3 + taskNode.getId());
+                Storge handStorge = (Storge)msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + taskNode.getId());
                 dataMap.put("toStorge", handStorge);
                 //出入库类型
                 dataMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE,DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
@@ -537,7 +537,7 @@ public class TaskWorkNode {
                 dataMap.put("Data", targetStorge);
                 dataMap.put("toStorge", targetStorge);
 
-                Storge handStorge = (Storge)msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.JQR3 + taskNode.getId());
+                Storge handStorge = (Storge)msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + taskNode.getId());
                 dataMap.put("fromStorge", handStorge);
             }
         }else {//没缓存位的机器人,伺服陀机
@@ -568,7 +568,7 @@ public class TaskWorkNode {
                     storgeService.lockStorge(targetStorge, taskNode.getId());
 
                     //抓手缓存
-                    msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.JQR3 + taskNode.getId(), jqrStorge, 1, TimeUnit.DAYS);
+                    msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + taskNode.getId(), jqrStorge, 1, TimeUnit.DAYS);
                     //目标缓存
                     msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + taskNode.getId(), targetStorge, 1, TimeUnit.DAYS);
                 }

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

@@ -369,8 +369,8 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                         storgeService.lockStorge(targetStorge, nextTaskNode.getId());
 
                         //抓手缓存
-                        msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.JQR3 + nextTaskNode.getId(), jqrStorge, 1, TimeUnit.DAYS);
-                        msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.JQR3 + taskNode.getId(), jqrStorge, 1, TimeUnit.DAYS);
+                        msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + nextTaskNode.getId(), jqrStorge, 1, TimeUnit.DAYS);
+                        msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + taskNode.getId(), jqrStorge, 1, TimeUnit.DAYS);
                         //缓存位缓存
                         msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_HCW + nextTaskNode.getId(), hcwStorge, 1, TimeUnit.DAYS);
                         msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_HCW + taskNode.getId(), hcwStorge, 1, TimeUnit.DAYS);
@@ -383,7 +383,7 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                     }
                     dataMap.put("result", logical(robotList,targetStorge));
                 } else if (count == 1) {
-                    jqrStorge = (Storge) msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.JQR3 + taskNode.getId());
+                    jqrStorge = (Storge) msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + taskNode.getId());
                     dataMap.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "fetchMaterial");
                     Storge currentStore = workpieceService.getWorkPieceStock(taskNode.getId(), false);
                     dataMap.put("fromStorge", currentStore);
@@ -433,8 +433,8 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                     storgeService.lockStorge(targetStorge, nextTaskNode.getId());
 
                     //抓手缓存
-                    msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.JQR3 + nextTaskNode.getId(), jqrStorge, 1, TimeUnit.DAYS);
-                    msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.JQR3 + taskNode.getId(), jqrStorge, 1, TimeUnit.DAYS);
+                    msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + nextTaskNode.getId(), jqrStorge, 1, TimeUnit.DAYS);
+                    msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + taskNode.getId(), jqrStorge, 1, TimeUnit.DAYS);
                     //目标缓存
                     msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + nextTaskNode.getId(), targetStorge, 1, TimeUnit.DAYS);
                     dataMap.put("result", true);
@@ -455,7 +455,7 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                     Storge hcwStorge = (Storge)msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_HCW + taskNode.getId());
                     dataMap.put("Data", hcwStorge);
                     dataMap.put("fromStorge", hcwStorge);
-                    Storge handStorge = (Storge)msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.JQR3 + taskNode.getId());
+                    Storge handStorge = (Storge)msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + taskNode.getId());
                     dataMap.put("toStorge", handStorge);
                     //出入库类型
                     dataMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE,DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
@@ -466,7 +466,7 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                     dataMap.put("Data", targetStorge);
                     dataMap.put("toStorge", targetStorge);
 
-                    Storge handStorge = (Storge)msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.JQR3 + taskNode.getId());
+                    Storge handStorge = (Storge)msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + taskNode.getId());
                     dataMap.put("fromStorge", handStorge);
                 }
             }else if (BizConstant.ROBOT_TYPE_NOCACHE.equals(zoneService.getRobotTypebyZone(zoneName))) {