|
@@ -615,7 +615,10 @@ public class TaskWorkNode {
|
|
|
msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + taskNode.getId(), targetStorge, 1, TimeUnit.DAYS);
|
|
|
|
|
|
//满足条件--机器人空闲,设备或线边库有一个空闲
|
|
|
- dataMap.put("Data", startStore);
|
|
|
+ Map locationMap = new HashMap();
|
|
|
+ locationMap.put("location",startStore);
|
|
|
+ dataMap.put("Data", locationMap);
|
|
|
+
|
|
|
dataMap.put("method", "MoveRobotPosition");
|
|
|
}
|
|
|
dataMap.put("result", po!=null);
|
|
@@ -624,7 +627,10 @@ public class TaskWorkNode {
|
|
|
dataMap.put("method", "GetServoStacker");
|
|
|
Storge currentStore = workpieceService.getWorkPieceStock(taskNode.getId(), false);
|
|
|
dataMap.put("fromStorge", currentStore);
|
|
|
- dataMap.put("Data", currentStore);
|
|
|
+
|
|
|
+ Map locationMap = new HashMap();
|
|
|
+ locationMap.put("location",currentStore);
|
|
|
+ dataMap.put("Data", locationMap);
|
|
|
//出入库类型
|
|
|
dataMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
|
|
|
//目的地为机器人手臂
|
|
@@ -638,16 +644,27 @@ public class TaskWorkNode {
|
|
|
dataMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
|
|
|
//目的地为机器人手臂
|
|
|
Storge hcwStorge = (Storge) msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_HCW + taskNode.getId());
|
|
|
- dataMap.put("Data", hcwStorge);
|
|
|
+
|
|
|
+ Map locationMap = new HashMap();
|
|
|
+ locationMap.put("location",hcwStorge);
|
|
|
+ dataMap.put("Data", locationMap);
|
|
|
+
|
|
|
dataMap.put("toStorge", hcwStorge);
|
|
|
dataMap.put("result", true);
|
|
|
}if(count==3) {
|
|
|
- dataMap.put("Data", targetStorge);
|
|
|
+ Map locationMap = new HashMap();
|
|
|
+ locationMap.put("location",targetStorge);
|
|
|
+ dataMap.put("Data", locationMap);
|
|
|
+
|
|
|
dataMap.put("method", "MoveRobotPosition");
|
|
|
}else if(count == 4){//从缓存位拿出来
|
|
|
dataMap.put("method", "GetServoStacker");
|
|
|
Storge hcwStorge = (Storge)msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_HCW + taskNode.getId());
|
|
|
- dataMap.put("Data", hcwStorge);
|
|
|
+
|
|
|
+ Map locationMap = new HashMap();
|
|
|
+ locationMap.put("location",hcwStorge);
|
|
|
+ dataMap.put("Data", locationMap);
|
|
|
+
|
|
|
dataMap.put("fromStorge", hcwStorge);
|
|
|
Storge handStorge = (Storge)msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + taskNode.getId());
|
|
|
dataMap.put("toStorge", handStorge);
|
|
@@ -657,7 +674,11 @@ public class TaskWorkNode {
|
|
|
dataMap.put("method", "SendServoStacker");
|
|
|
//出入库类型
|
|
|
dataMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE,DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
|
|
|
- dataMap.put("Data", targetStorge);
|
|
|
+
|
|
|
+ Map locationMap = new HashMap();
|
|
|
+ locationMap.put("location",targetStorge);
|
|
|
+ dataMap.put("Data", locationMap);
|
|
|
+
|
|
|
dataMap.put("toStorge", targetStorge);
|
|
|
|
|
|
Storge handStorge = (Storge)msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + taskNode.getId());
|
|
@@ -677,7 +698,10 @@ public class TaskWorkNode {
|
|
|
Storge startStore = workpieceService.getWorkPieceStock(taskNode.getId(), false);
|
|
|
|
|
|
dataMap.put("fromStorge", startStore);
|
|
|
- dataMap.put("Data", startStore);
|
|
|
+
|
|
|
+ Map locationMap = new HashMap();
|
|
|
+ locationMap.put("location",startStore);
|
|
|
+ dataMap.put("Data", locationMap);
|
|
|
//出入库类型
|
|
|
dataMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
|
|
|
//目的地为机器人手臂
|
|
@@ -699,7 +723,10 @@ public class TaskWorkNode {
|
|
|
targetStorge = msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + taskNode.getId())==null?null:(Storge) msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + taskNode.getId());
|
|
|
dataMap.put("method", "SendServoStacker");
|
|
|
dataMap.put("toStorge", targetStorge);
|
|
|
- dataMap.put("Data", targetStorge);
|
|
|
+
|
|
|
+ Map locationMap = new HashMap();
|
|
|
+ locationMap.put("location",targetStorge);
|
|
|
+ dataMap.put("Data", locationMap);
|
|
|
}
|
|
|
dataMap.put("result", true);
|
|
|
}
|