|
@@ -151,6 +151,9 @@ public class CacheRobotStrategy implements RobotStrategy {
|
|
|
List<ProductionresourcePosition> xbkList = productionresourcePositionService.getFreeProductionresourcePositionByNos(DictionaryKey.YJ_ZONE_XBK.get(zoneName).split(","));
|
|
|
//处理目标库位
|
|
|
returnMap = this.robotTarget(taskNode, robotInfo, xbkList, bomProcedure,returnMap);
|
|
|
+ if(returnMap.containsKey("result") && "false".equalsIgnoreCase(returnMap.get("result").toString())){
|
|
|
+ return returnMap;
|
|
|
+ }
|
|
|
|
|
|
Storge targetStorge = !returnMap.containsKey("store") ? null : (Storge) returnMap.get("store");
|
|
|
Long targetStorgeResourceId = !returnMap.containsKey("storeResourceId") ? null : Long.valueOf(returnMap.get("storeResourceId").toString());
|
|
@@ -395,6 +398,9 @@ public class CacheRobotStrategy implements RobotStrategy {
|
|
|
List<ProductionresourcePosition> xbkList = productionresourcePositionService.getFreeProductionresourcePositionByNos(DictionaryKey.YJ_ZONE_XBK.get(zoneName).split(","));
|
|
|
|
|
|
Map returnMap = this.robotTarget(taskNode, robotInfo, xbkList, bomProcedure, dataMap);
|
|
|
+ if(returnMap.containsKey("result") && "false".equalsIgnoreCase(returnMap.get("result").toString())){
|
|
|
+ return returnMap;
|
|
|
+ }
|
|
|
//线边库处理
|
|
|
Storge startStore = workpieceService.getWorkPieceStock(taskNode.getCompleteBatchNo(), false);
|
|
|
Storge targetStorge = !returnMap.containsKey("store") ? null : (Storge) returnMap.get("store");
|
|
@@ -548,12 +554,16 @@ public class CacheRobotStrategy implements RobotStrategy {
|
|
|
}
|
|
|
|
|
|
if ("1".equals(xbkFlag)) {
|
|
|
-
|
|
|
- ProductionresourcePosition position = xbkList.get(0);
|
|
|
- targetStorge = storgeService.getById(position.getStorgeId());
|
|
|
- returnMap.put("storeResourceId", position.getResourceId());
|
|
|
- returnMap.put("store", targetStorge);
|
|
|
- returnMap.put("targetxbk", "1");
|
|
|
+ if(xbkList.isEmpty()){
|
|
|
+ returnMap.put("result", false);
|
|
|
+ returnMap.put("resultMsg", returnMap.containsKey("resultMsg")?returnMap.get("resultMsg"):"线边库查询不到可以用库位");
|
|
|
+ }else {
|
|
|
+ ProductionresourcePosition position = xbkList.get(0);
|
|
|
+ targetStorge = storgeService.getById(position.getStorgeId());
|
|
|
+ returnMap.put("storeResourceId", position.getResourceId());
|
|
|
+ returnMap.put("store", targetStorge);
|
|
|
+ returnMap.put("targetxbk", "1");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return returnMap;
|