|
@@ -401,12 +401,12 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
|
|
|
|
//满足条件--机器人空闲,设备或线边库有一个空闲
|
|
|
dataMap.put("Data", startStore);
|
|
|
- dataMap.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "moveMaterial");
|
|
|
+ dataMap.put("method", "MoveRobotPosition");
|
|
|
}
|
|
|
dataMap.put("result", logical(robotList,targetStorge));
|
|
|
} else if (count == 1) {
|
|
|
jqrStorge = (Storge) msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + taskNode.getId());
|
|
|
- dataMap.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "fetchMaterial");
|
|
|
+ dataMap.put("method", "GetServoStacker");
|
|
|
Storge currentStore = workpieceService.getWorkPieceStock(taskNode.getId(), false);
|
|
|
dataMap.put("fromStorge", currentStore);
|
|
|
dataMap.put("Data", currentStore);
|
|
@@ -417,7 +417,7 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
|
dataMap.put("result", true);
|
|
|
} else if (count == 2) {
|
|
|
Storge currentStore = workpieceService.getWorkPieceStock(taskNode.getId(), false);
|
|
|
- dataMap.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "putMaterial");
|
|
|
+ dataMap.put("method", "SendServoStacker");
|
|
|
dataMap.put("fromStorge", currentStore);
|
|
|
//出入库类型
|
|
|
dataMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
|
|
@@ -435,8 +435,7 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
|
Storge targetStorge = returnMap.get("store")==null?null:(Storge)returnMap.get("store");
|
|
|
String targetxbk = returnMap.get("targetxbk")==null?null:(String)returnMap.get("targetxbk");
|
|
|
|
|
|
- dataMap.put("zkIp", ZK_ip_zndy);
|
|
|
- dataMap.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "fetchMaterial");
|
|
|
+ dataMap.put("method", "GetServoStacker");
|
|
|
if (logical(robotList,targetStorge)!=null) {
|
|
|
dataMap.put("fromStorge", startStore);
|
|
|
dataMap.put("Data", startStore);
|
|
@@ -464,19 +463,19 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
|
msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_XBK_FLAG + nextTaskNode.getId(), targetxbk, 1, TimeUnit.DAYS);
|
|
|
dataMap.put("result", true);
|
|
|
}
|
|
|
+ dataMap.put("result", logical(robotList,targetStorge));
|
|
|
}
|
|
|
}else if ("放".equals(functionName)) {
|
|
|
Object targetStorge = msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + taskNode.getId());
|
|
|
//执行到第几步
|
|
|
dataMap.put(taskNode.getId().toString()+"count",count);
|
|
|
- dataMap.put("zkIp",ZK_ip_rxx);
|
|
|
if(BizConstant.ROBOT_TYPE_CACHE.equals(zoneService.getRobotTypebyZone(zoneName))){
|
|
|
dataMap.put(YunjianConstant.YUNJIAN_XBK_CACHE_FLAG, "1");
|
|
|
if(count==0) {
|
|
|
dataMap.put("Data", targetStorge);
|
|
|
- dataMap.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "moveMaterial");
|
|
|
+ dataMap.put("method", "MoveRobotPosition");
|
|
|
}else if(count == 1){//从缓存位拿出来
|
|
|
- dataMap.put(DemoLineConstant.DEMOLINE_BIZ_TYPE,"fetchMaterial");
|
|
|
+ dataMap.put("method", "GetServoStacker");
|
|
|
Storge hcwStorge = (Storge)msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_HCW + taskNode.getId());
|
|
|
dataMap.put("Data", hcwStorge);
|
|
|
dataMap.put("fromStorge", hcwStorge);
|
|
@@ -485,7 +484,7 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
|
//出入库类型
|
|
|
dataMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE,DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
|
|
|
}else if(count == 2){
|
|
|
- dataMap.put(DemoLineConstant.DEMOLINE_BIZ_TYPE,"putMaterial");
|
|
|
+ dataMap.put("method", "SendServoStacker");
|
|
|
//出入库类型
|
|
|
dataMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE,DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
|
|
|
dataMap.put("Data", targetStorge);
|
|
@@ -501,7 +500,7 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
|
}
|
|
|
}else if (BizConstant.ROBOT_TYPE_NOCACHE.equals(zoneService.getRobotTypebyZone(zoneName))) {
|
|
|
dataMap.put("zkIp",ZK_ip_zndy);
|
|
|
- dataMap.put(DemoLineConstant.DEMOLINE_BIZ_TYPE,"putMaterial");
|
|
|
+ dataMap.put("method", "SendServoStacker");
|
|
|
dataMap.put("toStorge", targetStorge);
|
|
|
dataMap.put("Data", targetStorge);
|
|
|
dataMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE,DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
|
|
@@ -582,7 +581,7 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
|
*/
|
|
|
public ProductionresourcePosition logical(List<ProductionresourcePosition> robotList,Storge targetStorge){
|
|
|
//设备不存在
|
|
|
- if(checkRobot()){
|
|
|
+ if(!checkRobot()){
|
|
|
// map.put("msg", DictionaryKey.NodeException.NO_RESOURCE);
|
|
|
return null;
|
|
|
}
|