|
@@ -2,7 +2,6 @@ package com.github.zuihou.business.productionResourceCenter.strategy.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
import com.github.zuihou.authority.service.common.ParameterService;
|
|
|
import com.github.zuihou.business.DemoLine.DemoCacheKey;
|
|
|
import com.github.zuihou.business.DemoLine.DemoLineConstant;
|
|
@@ -35,11 +34,9 @@ import com.github.zuihou.common.constant.ParameterKey;
|
|
|
import com.github.zuihou.database.mybatis.conditions.Wraps;
|
|
|
import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
|
|
|
import com.github.zuihou.database.mybatis.conditions.query.QueryWrap;
|
|
|
-import com.github.zuihou.tenant.entity.Productionresource;
|
|
|
import com.github.zuihou.tenant.service.ProductionresourceService;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.codehaus.groovy.util.SingleKeyHashMap;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -48,7 +45,6 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
import java.util.stream.Collectors;
|
|
|
-import java.util.stream.Stream;
|
|
|
|
|
|
@Component("CACHE")
|
|
|
@Slf4j
|
|
@@ -100,7 +96,7 @@ public class CacheRobotStrategy implements RobotStrategy {
|
|
|
|
|
|
com.github.zuihou.business.productionResourceCenter.entity.Productionresource robot = productionresourceBizMapper.selectById(taskNode.getResourceId());
|
|
|
ZZoneProductionresource zoneProductionresource = zZoneProductionresourceMapper.selectOne(Wraps.<ZZoneProductionresource>lbQ().eq(ZZoneProductionresource::getResourceId, taskNode.getResourceId()));
|
|
|
- //List<ProductionresourcePosition> robotList = productionresourcePositionService.getFreeProductionresourcePositionByIds(new String[]{zoneProductionresource.getResourceId().toString()});
|
|
|
+ List<ProductionresourcePosition> robotList = productionresourcePositionService.getFreeProductionresourcePositionByIds(new String[]{taskNode.getResourceId().toString()});
|
|
|
ZZone zZone = zoneService.getOne(new LbqWrapper<ZZone>().eq(ZZone::getName, zoneName).last("limit 1"));
|
|
|
Plan orderPlan = planService.getById(task.getPlanId());
|
|
|
BBom bom = bBomMapper.selectById(task.getBomId());
|
|
@@ -116,6 +112,7 @@ public class CacheRobotStrategy implements RobotStrategy {
|
|
|
robotInfo.put("bomzZone", bomzZone);
|
|
|
robotInfo.put("plcInfo", plcInfo);
|
|
|
robotInfo.put("singleRunFlag", orderPlan.getSingleRunFlag());
|
|
|
+ robotInfo.put("robotList", robotList);
|
|
|
//robotInfo.put("xbkList", xbkList);
|
|
|
|
|
|
return robotInfo;
|
|
@@ -130,6 +127,7 @@ public class CacheRobotStrategy implements RobotStrategy {
|
|
|
if (CollectionUtil.isNotEmpty(flikustockInfos)) {
|
|
|
startStore = storgeService.getById(flikustockInfos.get(0).getStorgeId());
|
|
|
}
|
|
|
+
|
|
|
String xbkFlag = "";
|
|
|
//处理线边库库位
|
|
|
|
|
@@ -140,18 +138,18 @@ public class CacheRobotStrategy implements RobotStrategy {
|
|
|
//处理目标库位
|
|
|
Map returnMap = this.robotTarget(taskNode, robotInfo, xbkList, bomProcedure);
|
|
|
|
|
|
- Storge targetStorge = !returnMap.containsKey("store")?null:(Storge)returnMap.get("store");
|
|
|
- Long targetStorgeResourceId= !returnMap.containsKey("storeResourceId")?null:Long.valueOf(returnMap.get("storeResourceId").toString());
|
|
|
+ Storge targetStorge = !returnMap.containsKey("store") ? null : (Storge) returnMap.get("store");
|
|
|
+ Long targetStorgeResourceId = !returnMap.containsKey("storeResourceId") ? null : Long.valueOf(returnMap.get("storeResourceId").toString());
|
|
|
|
|
|
- if(targetStorge==null){
|
|
|
+ if (targetStorge == null) {
|
|
|
dataMap.put("result", false);
|
|
|
return dataMap;
|
|
|
}
|
|
|
- String targetXbk = !returnMap.containsKey("targetxbk")? null:returnMap.get("targetxbk").toString();
|
|
|
+ String targetXbk = !returnMap.containsKey("targetxbk") ? null : returnMap.get("targetxbk").toString();
|
|
|
|
|
|
//处理机器人库位
|
|
|
List<ProductionresourcePosition> robotList = (List<ProductionresourcePosition>) robotInfo.get("robotList");
|
|
|
- Map putMap = this.robotPut(returnMap,taskNode, startStore, targetStorge,robotList, targetXbk, targetStorgeResourceId);
|
|
|
+ Map putMap = this.robotPut(returnMap, taskNode, startStore, targetStorge, robotList, targetXbk, targetStorgeResourceId);
|
|
|
return putMap;
|
|
|
}
|
|
|
|
|
@@ -168,62 +166,62 @@ public class CacheRobotStrategy implements RobotStrategy {
|
|
|
storgeService.lockStorge(jqrStorge, taskNode.getId());
|
|
|
|
|
|
List<ProductionresourcePosition> hcwList = jqrMap.get(jqrMap.keySet().stream().filter(p -> !DemoLineConstant.DEMOLINE_RJQR_ZS.equals(p) && !DemoLineConstant.DEMOLINE_RJQR_SIX.equals(p)).findFirst().get());
|
|
|
- if(hcwList.size()==0){
|
|
|
+ if (hcwList.size() == 0) {
|
|
|
//限定抓手交换功能
|
|
|
boolean hasJqrhcwPartFlag = false;
|
|
|
List<Long> hcwStorgeIdList = hcwList.stream().map(ProductionresourcePosition::getStorgeId).collect(Collectors.toList());
|
|
|
List<TWorkpiece> workpieceList = workpieceService.list(new LbqWrapper<TWorkpiece>().eq(TWorkpiece::getIsEnd, "0").in(TWorkpiece::getStorgeId, hcwStorgeIdList));
|
|
|
- if(workpieceList.size()>2 || workpieceList.size()==0){
|
|
|
+ if (workpieceList.size() > 2 || workpieceList.size() == 0) {
|
|
|
msgUtil.createWarnLog("机器人设备暂存位数据有误", "DataException");
|
|
|
returnMap.put("result", false);
|
|
|
}
|
|
|
|
|
|
- for(TWorkpiece item : workpieceList) {
|
|
|
- long jqrHcwStorgeTaskNodeId = item.getTaskNodeId();
|
|
|
- Object hcwStorgeFlag = msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_HCW_XBK_FLAG + jqrHcwStorgeTaskNodeId);
|
|
|
- TaskNode hcwTaskNode = taskNodeService.getById(jqrHcwStorgeTaskNodeId);
|
|
|
- boolean bool = ObjectUtil.isNotEmpty(hcwStorgeFlag) && hcwTaskNode.getTargetResourceId().equals(taskNode.getTargetResourceId()) && taskNode.getCompleteBatchNo() != hcwTaskNode.getCompleteBatchNo();
|
|
|
- if (bool) {
|
|
|
- hasJqrhcwPartFlag = true;
|
|
|
- msgUtil.redis_set(DemoLineConstant.JQR_HCW_PART_PRIOTY_EXEC_FLAG + jqrHcwStorgeTaskNodeId, "1");
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- if(hasJqrhcwPartFlag) {
|
|
|
- returnMap.put("result", false);
|
|
|
- return returnMap;
|
|
|
- }
|
|
|
+ for (TWorkpiece item : workpieceList) {
|
|
|
+ long jqrHcwStorgeTaskNodeId = item.getTaskNodeId();
|
|
|
+ Object hcwStorgeFlag = msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_HCW_XBK_FLAG + jqrHcwStorgeTaskNodeId);
|
|
|
+ TaskNode hcwTaskNode = taskNodeService.getById(jqrHcwStorgeTaskNodeId);
|
|
|
+ boolean bool = ObjectUtil.isNotEmpty(hcwStorgeFlag) && hcwTaskNode.getTargetResourceId().equals(taskNode.getTargetResourceId()) && taskNode.getCompleteBatchNo() != hcwTaskNode.getCompleteBatchNo();
|
|
|
+ if (bool) {
|
|
|
+ hasJqrhcwPartFlag = true;
|
|
|
+ msgUtil.redis_set(DemoLineConstant.JQR_HCW_PART_PRIOTY_EXEC_FLAG + jqrHcwStorgeTaskNodeId, "1");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (hasJqrhcwPartFlag) {
|
|
|
+ returnMap.put("result", false);
|
|
|
+ return returnMap;
|
|
|
+ }
|
|
|
}
|
|
|
//锁定暂存缓存位库位
|
|
|
Storge hcwStorge = storgeService.getById(hcwList.get(0).getStorgeId());
|
|
|
hcwStorge.setCompleteBatchNo(taskNode.getCompleteBatchNo());
|
|
|
storgeService.lockStorge(hcwStorge, taskNode.getId());
|
|
|
|
|
|
- if(hcwList.size()>1) {
|
|
|
+ if (hcwList.size() > 1) {
|
|
|
//锁定暂存缓存位库位
|
|
|
targetStorge = hcwStorge;
|
|
|
msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_HCW_XBK_FLAG + taskNode.getId(), "1");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
//锁定目标线边库库位
|
|
|
targetStorge.setCompleteBatchNo(taskNode.getCompleteBatchNo());
|
|
|
storgeService.lockStorge(targetStorge, taskNode.getId());
|
|
|
- if(targetXbk.equals("0")){
|
|
|
+ if (targetXbk.equals("0")) {
|
|
|
//目标缓存
|
|
|
msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + taskNode.getId(), targetStorge, 10, TimeUnit.DAYS);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
//目标是线边库
|
|
|
msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_XBK_FLAG + taskNode.getId(), targetXbk, 10, TimeUnit.DAYS);
|
|
|
}
|
|
|
}
|
|
|
// 放入线边库或机器人缓存位
|
|
|
- log.info("节点{}提前占用机器人抓手{},缓存位{},目标库位{}",taskNode.getId(),jqrStorge.getPointId(),hcwStorge.getPointId(),targetStorge.getPointId());
|
|
|
+ log.info("节点{}提前占用机器人抓手{},缓存位{},目标库位{}", taskNode.getId(), jqrStorge.getPointId(), hcwStorge.getPointId(), targetStorge.getPointId());
|
|
|
//缓存位缓存
|
|
|
msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_HCW + taskNode.getId(), hcwStorge, 10, TimeUnit.DAYS);
|
|
|
returnMap.put("taskType", DictionaryKey.TASK_TYPE.get("CARRY")); //移动类型
|
|
|
|
|
|
- if(taskNode.getNodeName().indexOf("从立库取") > -1){
|
|
|
+ if (taskNode.getNodeName().indexOf("从立库取") > -1) {
|
|
|
returnMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_TRAY_CRK);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
returnMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
|
|
|
}
|
|
|
|
|
@@ -231,8 +229,8 @@ public class CacheRobotStrategy implements RobotStrategy {
|
|
|
Map locationMap = new HashMap();
|
|
|
locationMap.put("location", startStorge.getPointId()); //零件当前位置
|
|
|
locationMap.put("destLocation", targetStorge.getPointId()); //机器人缓存位
|
|
|
- locationMap.put("taskType",DictionaryKey.TASK_TYPE.get("CARRY"));
|
|
|
- locationMap.put("carryType","1");
|
|
|
+ locationMap.put("taskType", DictionaryKey.TASK_TYPE.get("CARRY"));
|
|
|
+ locationMap.put("carryType", "1");
|
|
|
returnMap.put("data", locationMap);
|
|
|
returnMap.put("method", "RobotAction");
|
|
|
returnMap.put("result", true);
|
|
@@ -240,11 +238,11 @@ public class CacheRobotStrategy implements RobotStrategy {
|
|
|
returnMap.put("toStorge", targetStorge);
|
|
|
|
|
|
// 机器人移动到redis记录实时位子
|
|
|
- msgUtil.redis_set(taskNode.getResourceId()+"postion",startStorge.getPointId());
|
|
|
+ msgUtil.redis_set(taskNode.getResourceId() + "postion", startStorge.getPointId());
|
|
|
|
|
|
// 记录机器人移动到对应设备
|
|
|
ProductionresourcePosition productionresourcePosition = productionresourcePositionService.getOne(new QueryWrap<ProductionresourcePosition>().lambda().eq(ProductionresourcePosition::getStorgeId, startStorge.getId()));
|
|
|
- msgUtil.redis_set("JQR_RESOURCE",productionresourcePosition.getResourceId());
|
|
|
+ msgUtil.redis_set("JQR_RESOURCE", productionresourcePosition.getResourceId());
|
|
|
return returnMap;
|
|
|
}
|
|
|
|
|
@@ -253,7 +251,7 @@ public class CacheRobotStrategy implements RobotStrategy {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
- public Map robotTarget(TaskNode taskNode, Map robotInfo, List<ProductionresourcePosition> xbkList, BomProcedure bomProcedure){
|
|
|
+ public Map robotTarget(TaskNode taskNode, Map robotInfo, List<ProductionresourcePosition> xbkList, BomProcedure bomProcedure) {
|
|
|
Map returnMap = new HashMap();
|
|
|
//判断AGV是否有效
|
|
|
String agvValid = parameterService.getValue(ParameterKey.AGVValid, "0");
|
|
@@ -262,88 +260,85 @@ public class CacheRobotStrategy implements RobotStrategy {
|
|
|
Storge startStorge = null;
|
|
|
Storge targetStorge = null;
|
|
|
//单产线AGV目标地址判断处理
|
|
|
- if(agvValid.equals("1") && taskNode.getFindAgvFlag().equals("1")){
|
|
|
- if(singleRunFlag == 1){
|
|
|
- if(CollectionUtil.isNotEmpty(xbkList)){
|
|
|
+ if (agvValid.equals("1") && taskNode.getFindAgvFlag().equals("1")) {
|
|
|
+ if (singleRunFlag == 1) {
|
|
|
+ if (CollectionUtil.isNotEmpty(xbkList)) {
|
|
|
ProductionresourcePosition position = xbkList.get(0);
|
|
|
targetStorge = storgeService.getById(position.getStorgeId());
|
|
|
returnMap.put("storeResourceId", position.getResourceId());
|
|
|
- returnMap.put("store",targetStorge);
|
|
|
- returnMap.put("targetxbk","0");
|
|
|
+ returnMap.put("store", targetStorge);
|
|
|
+ returnMap.put("targetxbk", "0");
|
|
|
}
|
|
|
- }else{
|
|
|
- ZZone zZone = (ZZone)robotInfo.get("zZone");
|
|
|
- ZZone bomzZone = (ZZone)robotInfo.get("bomzZone");
|
|
|
- Map map = storgeService.getPlateStorgeByNo(zZone,bomzZone);
|
|
|
- TaskNode lastAgvTaskNode = taskNodeService.getNextNTaskNode(taskNode,1);
|
|
|
-
|
|
|
- targetStorge = map.get("storge") ==null?null:(Storge)map.get("storge");
|
|
|
- String targetResourceId = map.get("resourceId") ==null?null:(String)map.get("resourceId");
|
|
|
+ } else {
|
|
|
+ ZZone zZone = (ZZone) robotInfo.get("zZone");
|
|
|
+ ZZone bomzZone = (ZZone) robotInfo.get("bomzZone");
|
|
|
+ Map map = storgeService.getPlateStorgeByNo(zZone, bomzZone);
|
|
|
+ TaskNode lastAgvTaskNode = taskNodeService.getNextNTaskNode(taskNode, 1);
|
|
|
+
|
|
|
+ targetStorge = map.get("storge") == null ? null : (Storge) map.get("storge");
|
|
|
+ String targetResourceId = map.get("resourceId") == null ? null : (String) map.get("resourceId");
|
|
|
// 在向下找agv终点位子
|
|
|
// 下一个节点机器人所属产线
|
|
|
- TaskNode afterLastAgvTaskNode = taskNodeService.getNextNTaskNode(lastAgvTaskNode,1);
|
|
|
- ZZoneProductionresource zoneProductionresource = zZoneProductionresourceMapper.selectOne(Wraps.<ZZoneProductionresource>lbQ().eq(ZZoneProductionresource::getResourceId,afterLastAgvTaskNode.getResourceId()));
|
|
|
+ TaskNode afterLastAgvTaskNode = taskNodeService.getNextNTaskNode(lastAgvTaskNode, 1);
|
|
|
+ ZZoneProductionresource zoneProductionresource = zZoneProductionresourceMapper.selectOne(Wraps.<ZZoneProductionresource>lbQ().eq(ZZoneProductionresource::getResourceId, afterLastAgvTaskNode.getResourceId()));
|
|
|
Long agvGoalZoneId = zoneProductionresource.getZoneId();
|
|
|
ZZone agvGoalZone = zoneService.getById(agvGoalZoneId);
|
|
|
String[] jbwArr = DictionaryKey.YJ_ZONE_JBW.get(agvGoalZone.getNo()).split(",");
|
|
|
List<ProductionresourcePosition> jbwBList = productionresourcePositionService.getFreeProductionresourceAgvPositionByNos(jbwArr);
|
|
|
- if(targetStorge!=null&&CollectionUtil.isNotEmpty(jbwBList)){
|
|
|
+ if (targetStorge != null && CollectionUtil.isNotEmpty(jbwBList)) {
|
|
|
ProductionresourcePosition position = jbwBList.get(0);
|
|
|
- if(null!=position){
|
|
|
+ if (null != position) {
|
|
|
taskNode.setTargetResourceId(Long.parseLong(targetResourceId));
|
|
|
lastAgvTaskNode.setTargetResourceId(position.getResourceId());
|
|
|
lastAgvTaskNode.setResourceId(taskNode.getTargetResourceId());
|
|
|
taskNodeService.updateById(taskNode);
|
|
|
taskNodeService.updateById(lastAgvTaskNode);
|
|
|
}
|
|
|
- returnMap.put("storeResourceId",targetResourceId);
|
|
|
- returnMap.put("store",targetStorge);
|
|
|
- returnMap.put("targetxbk","0");
|
|
|
- }
|
|
|
- else{
|
|
|
+ returnMap.put("storeResourceId", targetResourceId);
|
|
|
+ returnMap.put("store", targetStorge);
|
|
|
+ returnMap.put("targetxbk", "0");
|
|
|
+ } else {
|
|
|
xbkFlag = "1";
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else {
|
|
|
// begin modify by yejian on 20220515 for 下料库位问题修改
|
|
|
- TaskNode beforTaskNode = taskNodeService.getNextNTaskNode(taskNode,-1);
|
|
|
- TaskNode baitingTaskNode = taskNodeService.getNextNTaskNode(beforTaskNode,-1);
|
|
|
+ TaskNode beforTaskNode = taskNodeService.getNextNTaskNode(taskNode, -1);
|
|
|
+ TaskNode baitingTaskNode = taskNodeService.getNextNTaskNode(beforTaskNode, -1);
|
|
|
String bomProcedureType = bomProcedure.getType();
|
|
|
- boolean condition = bomProcedureType.equals("下料") && "04".equals(baitingTaskNode.getInterfaceType());
|
|
|
+ boolean condition = bomProcedureType.equals("下料") && "04".equals(baitingTaskNode.getInterfaceType());
|
|
|
//翻面工装下料,节点特殊处理
|
|
|
- boolean nodeCondition = "4".equals(beforTaskNode.getNodeType()) && bomProcedureType.indexOf("上料")>0 && taskNode.getNodeName().indexOf("立库")>0;
|
|
|
- if(condition || nodeCondition){
|
|
|
+ boolean nodeCondition = "4".equals(beforTaskNode.getNodeType()) && bomProcedureType.indexOf("上料") > 0 && taskNode.getNodeName().indexOf("立库") > 0;
|
|
|
+ if (condition || nodeCondition) {
|
|
|
// 下料特殊处理,动态查找可用立库位子存放下料后的子盘夹具
|
|
|
//处理限高工装下料
|
|
|
- long storgeId = storgeService.isHeightLimit(taskNode.getCompleteBatchNo())?storgeService.getLikuHeightLimitStock() : storgeService.getLikuStockInList();
|
|
|
+ long storgeId = storgeService.isHeightLimit(taskNode.getCompleteBatchNo()) ? storgeService.getLikuHeightLimitStock() : storgeService.getLikuStockInList();
|
|
|
targetStorge = storgeService.getById(storgeId);
|
|
|
- returnMap.put("store",targetStorge);
|
|
|
- returnMap.put("targetxbk","0");
|
|
|
- }else{
|
|
|
+ returnMap.put("store", targetStorge);
|
|
|
+ returnMap.put("targetxbk", "0");
|
|
|
+ } else {
|
|
|
List<ProductionresourcePosition> targetList = null;
|
|
|
Long targetResourceId = taskNode.getTargetResourceId();
|
|
|
- if(targetResourceId!=null){
|
|
|
- Productionresource productionresource = productionresourceService.getById(targetResourceId);
|
|
|
+ if (targetResourceId != null) {
|
|
|
//三坐标功能
|
|
|
- if("1".equals(bomProcedure.getThreeDimensionalConf()) || "1".equals(bomProcedure.getThreeDimensionalDeviationConf())){
|
|
|
+ if ("1".equals(bomProcedure.getThreeDimensionalConf()) || "1".equals(bomProcedure.getThreeDimensionalDeviationConf())) {
|
|
|
boolean bool = storgeService.szbStockHandle(false, taskNode);
|
|
|
- if(!bool){
|
|
|
+ if (!bool) {
|
|
|
targetList = null;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
String putPoint = DictionaryKey.ZEISS_LOCATION.get("M");
|
|
|
- targetList = productionresourcePositionService.list(Wraps.<ProductionresourcePosition>lbQ().eq(ProductionresourcePosition::getResourceId, taskNode.getTargetResourceId()).eq(ProductionresourcePosition::getPointId,putPoint));
|
|
|
+ targetList = productionresourcePositionService.list(Wraps.<ProductionresourcePosition>lbQ().eq(ProductionresourcePosition::getResourceId, taskNode.getTargetResourceId()).eq(ProductionresourcePosition::getPointId, putPoint));
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
targetList = productionresourcePositionService.getFreeProductionresourcePositionByIds(new String[]{targetResourceId.toString()});
|
|
|
}
|
|
|
|
|
|
- if(CollectionUtil.isNotEmpty(targetList)){
|
|
|
+ if (CollectionUtil.isNotEmpty(targetList)) {
|
|
|
targetStorge = storgeService.getById(targetList.get(0).getStorgeId());
|
|
|
- returnMap.put("storeResourceId",targetList.get(0).getResourceId());
|
|
|
- returnMap.put("store",targetStorge);
|
|
|
- returnMap.put("targetxbk","0");
|
|
|
- }else{//需要放到线边库
|
|
|
+ returnMap.put("storeResourceId", targetList.get(0).getResourceId());
|
|
|
+ returnMap.put("store", targetStorge);
|
|
|
+ returnMap.put("targetxbk", "0");
|
|
|
+ } else {//需要放到线边库
|
|
|
/*
|
|
|
TaskNode nextTaskNode = taskNodeService.getNextNTaskNode(taskNode,1);
|
|
|
if("放本序加工设备".equals(taskNode.getNodeName())) {
|
|
@@ -362,12 +357,12 @@ public class CacheRobotStrategy implements RobotStrategy {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if("1".equals(xbkFlag)){
|
|
|
+ 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");
|
|
|
+ returnMap.put("storeResourceId", position.getResourceId());
|
|
|
+ returnMap.put("store", targetStorge);
|
|
|
+ returnMap.put("targetxbk", "1");
|
|
|
}
|
|
|
|
|
|
return returnMap;
|