|
@@ -3,6 +3,7 @@ package com.github.zuihou.business.productionResourceCenter.service.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.github.zuihou.business.DemoLine.DemoCacheKey;
|
|
|
import com.github.zuihou.business.DemoLine.DemoLineConstant;
|
|
|
import com.github.zuihou.business.edgeLibrary.entity.Storge;
|
|
@@ -19,7 +20,15 @@ import com.github.zuihou.business.productionResourceCenter.service.NodeOperation
|
|
|
import com.github.zuihou.business.productionResourceCenter.service.ProductionresourcePositionService;
|
|
|
import com.github.zuihou.business.util.MsgUtil;
|
|
|
import com.github.zuihou.common.constant.BizConstant;
|
|
|
+import com.github.zuihou.common.constant.DictionaryKey;
|
|
|
+import com.github.zuihou.common.util.StringUtil;
|
|
|
import com.github.zuihou.database.mybatis.conditions.Wraps;
|
|
|
+import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
|
|
|
+import com.github.zuihou.tenant.entity.Module;
|
|
|
+import com.github.zuihou.tenant.entity.Productionresource;
|
|
|
+import com.github.zuihou.tenant.service.ModuleService;
|
|
|
+import com.github.zuihou.tenant.service.ProductionresourceService;
|
|
|
+import com.google.common.collect.Maps;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -29,6 +38,7 @@ import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
import static java.util.stream.Collectors.groupingBy;
|
|
|
|
|
@@ -59,6 +69,14 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
|
@Autowired
|
|
|
private WorkpieceService workpieceService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ProductionresourceService productionresourceService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ModuleService moduleService;
|
|
|
+
|
|
|
+ private Map<String, Object> map = Maps.newHashMap();
|
|
|
+
|
|
|
private String ZK_ip_zlzx = "192.168.170.61";
|
|
|
|
|
|
//智能单元
|
|
@@ -69,80 +87,161 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
|
|
|
|
private String[] sxlzIdArr,jqrarr,jbwarr = null;
|
|
|
|
|
|
+ private String[] deviceArr, jbwArr;
|
|
|
+
|
|
|
+ private String[] xbkArr;
|
|
|
+
|
|
|
+ private List<ProductionresourcePosition> deviceList;
|
|
|
+
|
|
|
+ private List<ProductionresourcePosition> xbkList;
|
|
|
+
|
|
|
@Override
|
|
|
public void initResource(TaskNode taskNode, TTask task, Map dataMap) {
|
|
|
//productionresourcePosition = getResourcePosition(taskNode);
|
|
|
- this.sxlzIdArr = new String[] {DemoLineConstant.JQR1};
|
|
|
-
|
|
|
+ //this.sxlzIdArr = new String[] {DemoLineConstant.JQR1};
|
|
|
+ String moduleName = dataMap.get("moduleName") == null ? "" : dataMap.get("moduleName").toString();
|
|
|
+ String robotType = dataMap.get("robotType") == null ? "" : dataMap.get("robotType").toString();
|
|
|
+ if(StringUtil.isNotEmpty(moduleName) && StringUtil.isNotEmpty(robotType)) {
|
|
|
+ //List<Module> modules = moduleService.list(new QueryWrapper<Module>().like("name", moduleName));
|
|
|
+ Productionresource productionresource = productionresourceService.getOne(new QueryWrapper<Productionresource>().eq("name", robotType));
|
|
|
+ if(productionresource!=null){
|
|
|
+ deviceArr = new String[] {productionresource.getId().toString()};
|
|
|
+ deviceList = productionresourcePositionService.getFreeProductionresourcePositionByIds(deviceArr);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ xbkArr = dataMap.get("robotType")!=null? new String[]{
|
|
|
+ DictionaryKey.YJ_ZONE_XBK.get(dataMap.get("robotType").toString())
|
|
|
+ }: new String[]{DemoLineConstant.NODE_RESOURCE_ZLZX_XBK};
|
|
|
+ xbkList = productionresourcePositionService.getFreeProductionresourcePositionByNos(xbkArr);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public Map checkCondition(TaskNode taskNode, TTask task, Map<String, Object> dataMap) {
|
|
|
- //业务类型
|
|
|
- String bizType = dataMap.get("bizType") == null ? "" : dataMap.get("bizType").toString();
|
|
|
//具体的搬运类型
|
|
|
String carryType = dataMap.get("carryType") == null ? "" : dataMap.get("carryType").toString();
|
|
|
-
|
|
|
String robotType = dataMap.get("robotType") == null ? "" : dataMap.get("robotType").toString();
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("taskNode", taskNode);
|
|
|
map.put("task", task);
|
|
|
- map.put("bizType", bizType);
|
|
|
-
|
|
|
|
|
|
ResourceAutoCode resourceAutoCode = taskNode.getAutoNode();
|
|
|
- String functionName = resourceAutoCode.getCommand();
|
|
|
- String moduleName = dataMap.get("moduleName") == null ? "" : dataMap.get("moduleName").toString();
|
|
|
+ //String moduleName = dataMap.get("moduleName") == null ? "" : dataMap.get("moduleName").toString();
|
|
|
+ if(!taskNodeService.getRunStatus(taskNode.getResourceId())){
|
|
|
+ map.put("result", false);
|
|
|
+ map.put("msg", DictionaryKey.NodeException.RUNNING_FALSE);
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+ String functionName = DictionaryKey.ROBOT_ACTION.get(resourceAutoCode.getCommand());
|
|
|
+ //设备条件判断
|
|
|
+ ProductionresourcePosition productionresourcePosition = this.logical(deviceList, true);
|
|
|
+ boolean bool = productionresourcePosition!=null ? true : false;
|
|
|
+ if(!bool){
|
|
|
+ map.put("result", false);
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+ //开始库位
|
|
|
+ Storge startStore = workpieceService.getWorkPieceStock(taskNode.getId(), false);
|
|
|
+ //目的库位
|
|
|
+ Storge jqrStorge = storgeService.getById(deviceList.get(0).getStorgeId());
|
|
|
+
|
|
|
+ //目标地址判断
|
|
|
+
|
|
|
+ switch(robotType){
|
|
|
+ case "质量中心机器人":
|
|
|
+ //操作质量中心边库 具有取、移动、放三种指令
|
|
|
+ //取放上下料站
|
|
|
+ //取放三坐标
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "柔性线机器人":
|
|
|
+ //操作柔性线边库 具有取、移动、放三种指令
|
|
|
+ //取放加工设备
|
|
|
+ String count = dataMap.get(taskNode.getId().toString() + "count") == null ? "0" : dataMap.get(taskNode.getId().toString() + "count").toString();
|
|
|
+ map = this.commandHandle(map, startStore, jqrStorge, functionName, count);
|
|
|
+ break;
|
|
|
+ case "智能单元机器人":
|
|
|
+ //操作智能单元线边库 具有取、移动、放三种指令
|
|
|
+ //取放加工设备
|
|
|
+ map = this.commandHandle(map, startStore, jqrStorge, functionName);
|
|
|
+ break;
|
|
|
+ case "舱体线机器人":
|
|
|
+ //操作舱体线边库 具有取、移动、放三种指令
|
|
|
+ //取放加工设备
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "伺服舵机":
|
|
|
+ //操作三个线边库 只具有取、放两种动作
|
|
|
|
|
|
|
|
|
- if ("拿".equals(moduleName)) {
|
|
|
- map.put("zkIp", ZK_ip_zndy);
|
|
|
- map.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "fetchMaterial");
|
|
|
- //判断机器人是否为空
|
|
|
- String jrqarr[] = {resourceAutoCode.getResourceId().toString()};
|
|
|
- List<ProductionresourcePosition> jqrList = productionresourcePositionService.getFreeProductionresourcePositionByIds(jrqarr);
|
|
|
+ break;
|
|
|
+ case "框体线机器人":
|
|
|
+ //操作框体线边库 具有取、移动、放三种指令
|
|
|
+ //取放加工设备
|
|
|
+
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Map operation(JSONObject jsonObject, JSONObject bizJsonObject, Map<String, Object> map) {
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean confirmStatus(TaskNode taskNode) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ public ProductionresourcePosition getResourcePosition(TaskNode taskNode) {
|
|
|
+ List<ProductionresourcePosition> resourcePositionList = productionresourcePositionMapper.selectList(Wraps.<ProductionresourcePosition>lbQ().eq(ProductionresourcePosition::getResourceId, taskNode.getResourceId()));
|
|
|
+ ProductionresourcePosition productionresourcePosition = null;
|
|
|
+ if (resourcePositionList != null && resourcePositionList.size() > 0) {
|
|
|
+ productionresourcePosition = resourcePositionList.get(0);
|
|
|
+ }
|
|
|
+ return productionresourcePosition;
|
|
|
+ }
|
|
|
|
|
|
+ //机器人功能操作
|
|
|
+ private Map<String, Object> commandHandle(Map<String, Object> dataMap, Storge startStore, Storge jqrStorge, String... params){
|
|
|
+ TaskNode taskNode = (TaskNode) dataMap.get("taskNode");
|
|
|
+ TTask task = (TTask) dataMap.get("task");
|
|
|
+ if ("取".equals(params[0])) {
|
|
|
+ dataMap.put("zkIp", ZK_ip_zndy);
|
|
|
+ dataMap.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "fetchMaterial");
|
|
|
TaskNode nextTaskNode = taskNodeService.getNextNTaskNode(taskNode, 1);
|
|
|
-// //判断目标
|
|
|
-// String sum50[] = {DemoLineConstant.DEMOLINE_SUM50_ZNDY};
|
|
|
-// List<ProductionresourcePosition> sum50List = productionresourcePositionService.getFreeProductionresourcePositionByNos(sum50);
|
|
|
-// List<ProductionresourcePosition> xbkList = new ArrayList<>();
|
|
|
-//
|
|
|
-// TaskNode nextTaskNode = taskNodeService.getNextNTaskNode(taskNode, 1);
|
|
|
- if (CollectionUtil.isNotEmpty(jqrList)) {
|
|
|
- Storge startStore = workpieceService.getWorkPieceStock(taskNode.getId(), false);
|
|
|
- map.put("fromStorge", startStore);
|
|
|
- map.put("Data", startStore);
|
|
|
+ //if (CollectionUtil.isNotEmpty(jqrList)) {
|
|
|
+ dataMap.put("fromStorge", startStore);
|
|
|
+ dataMap.put("Data", startStore);
|
|
|
//出入库类型
|
|
|
- map.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
|
|
|
+ dataMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
|
|
|
//目的地为机器人手臂
|
|
|
- Storge jqrStorge = storgeService.getById(jqrList.get(0).getStorgeId());
|
|
|
- map.put("toStorge", jqrStorge);
|
|
|
+ dataMap.put("toStorge", jqrStorge);
|
|
|
//锁定机器人
|
|
|
jqrStorge.setCompleteBatchNo(task.getCompleteBatchNo());
|
|
|
storgeService.lockStorge(jqrStorge, nextTaskNode.getId());
|
|
|
- }
|
|
|
+ //}
|
|
|
//
|
|
|
- map.put("result", (CollectionUtil.isNotEmpty(jqrList)));
|
|
|
- } else if ("拿1".equals(moduleName)) {
|
|
|
- int count = dataMap.get(taskNode.getId().toString() + "count") == null ? 0 : Integer.parseInt(dataMap.get(taskNode.getId().toString() + "count").toString());
|
|
|
+ map.put("result", true);
|
|
|
+ }
|
|
|
+ else if (params[1]!= null) {
|
|
|
+ //int count = dataMap.get(taskNode.getId().toString() + "count") == null ? 0 : Integer.parseInt(dataMap.get(taskNode.getId().toString() + "count").toString());
|
|
|
+ int count = Integer.parseInt(params[1]);
|
|
|
//执行到第几步
|
|
|
- map.put(taskNode.getId().toString() + "count", count);
|
|
|
- map.put(DemoLineConstant.DEMOLINE_RXJQR_FLAG, "1");
|
|
|
- map.put("zkIp", ZK_ip_rxx);
|
|
|
+ dataMap.put(taskNode.getId().toString() + "count", count);
|
|
|
+ dataMap.put(DemoLineConstant.DEMOLINE_RXJQR_FLAG, "1");
|
|
|
+ dataMap.put("zkIp", ZK_ip_rxx);
|
|
|
|
|
|
if (count == 0) {//第一步的时候锁定资源
|
|
|
//判断机器人是否为空
|
|
|
- String jrqarr[] = {resourceAutoCode.getResourceId().toString()};
|
|
|
- List<ProductionresourcePosition> jqrList = productionresourcePositionService.getFreeProductionresourcePositionByNos(jrqarr);
|
|
|
- Map<String, List<ProductionresourcePosition>> jqrMap = jqrList.stream().collect(groupingBy(ProductionresourcePosition::getPointId));
|
|
|
+ Map<String, List<ProductionresourcePosition>> jqrMap = deviceList.stream().collect(groupingBy(ProductionresourcePosition::getPointId));
|
|
|
|
|
|
TaskNode nextTaskNode = taskNodeService.getNextNTaskNode(taskNode, 1);
|
|
|
//机器人手抓没被锁定,并且有空闲未知
|
|
|
- if (CollectionUtil.isNotEmpty(jqrList) && jqrList.size() > 1 && jqrMap.containsKey(DemoLineConstant.DEMOLINE_RJQR_ZS)) {
|
|
|
+ if (CollectionUtil.isNotEmpty(deviceList) && deviceList.size() > 1 && jqrMap.containsKey(DemoLineConstant.DEMOLINE_RJQR_ZS)) {
|
|
|
|
|
|
- Storge jqrStorge = storgeService.getById(jqrMap.get(DemoLineConstant.DEMOLINE_RJQR_ZS).get(0).getStorgeId());
|
|
|
+ jqrStorge = storgeService.getById(jqrMap.get(DemoLineConstant.DEMOLINE_RJQR_ZS).get(0).getStorgeId());
|
|
|
jqrStorge.setCompleteBatchNo(task.getCompleteBatchNo());
|
|
|
storgeService.lockStorge(jqrStorge, nextTaskNode.getId());
|
|
|
// //去掉抓手
|
|
@@ -153,7 +252,6 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
|
hcwStorge.setCompleteBatchNo(task.getCompleteBatchNo());
|
|
|
storgeService.lockStorge(hcwStorge, nextTaskNode.getId());
|
|
|
|
|
|
-
|
|
|
//抓手缓存
|
|
|
msgUtil.redis_set(DemoCacheKey.DEMOLINE_CAMP + "_" + DemoLineConstant.JQR3 + nextTaskNode.getId(), jqrStorge, 1, TimeUnit.DAYS);
|
|
|
msgUtil.redis_set(DemoCacheKey.DEMOLINE_CAMP + "_" + DemoLineConstant.JQR3 + taskNode.getId(), jqrStorge, 1, TimeUnit.DAYS);
|
|
@@ -162,38 +260,39 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
|
msgUtil.redis_set(DemoCacheKey.DEMOLINE_CAMP + "_" + DemoLineConstant.DEMOLINE_RJQR_HCW + taskNode.getId(), hcwStorge, 1, TimeUnit.DAYS);
|
|
|
|
|
|
//满足条件--机器人空闲,设备或线边库有一个空闲
|
|
|
- Storge startStore = workpieceService.getWorkPieceStock(taskNode.getId(), false);
|
|
|
- map.put("Data", startStore);
|
|
|
- map.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "moveMaterial");
|
|
|
+ startStore = workpieceService.getWorkPieceStock(taskNode.getId(), false);
|
|
|
+ dataMap.put("Data", startStore);
|
|
|
+ dataMap.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "moveMaterial");
|
|
|
}
|
|
|
- map.put("result", (CollectionUtil.isNotEmpty(jqrList)) && jqrMap.containsKey(DemoLineConstant.DEMOLINE_RJQR_ZS));
|
|
|
+ dataMap.put("result", (CollectionUtil.isNotEmpty(deviceList)) && jqrMap.containsKey(DemoLineConstant.DEMOLINE_RJQR_ZS));
|
|
|
} else if (count == 1) {
|
|
|
- Storge jqrStorge = (Storge) msgUtil.redis_get(DemoCacheKey.DEMOLINE_CAMP + "_" + DemoLineConstant.JQR3 + taskNode.getId());
|
|
|
- map.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "fetchMaterial");
|
|
|
+ jqrStorge = (Storge) msgUtil.redis_get(DemoCacheKey.DEMOLINE_CAMP + "_" + DemoLineConstant.JQR3 + taskNode.getId());
|
|
|
+ dataMap.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "fetchMaterial");
|
|
|
Storge currentStore = workpieceService.getWorkPieceStock(taskNode.getId(), false);
|
|
|
- map.put("fromStorge", currentStore);
|
|
|
- map.put("Data", currentStore);
|
|
|
+ dataMap.put("fromStorge", currentStore);
|
|
|
+ dataMap.put("Data", currentStore);
|
|
|
//出入库类型
|
|
|
- map.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
|
|
|
+ dataMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
|
|
|
//目的地为机器人手臂
|
|
|
map.put("toStorge", jqrStorge);
|
|
|
- map.put("result", true);
|
|
|
+ dataMap.put("result", true);
|
|
|
} else if (count == 2) {
|
|
|
Storge currentStore = workpieceService.getWorkPieceStock(taskNode.getId(), false);
|
|
|
- map.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "putMaterial");
|
|
|
- map.put("fromStorge", currentStore);
|
|
|
+ dataMap.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "putMaterial");
|
|
|
+ dataMap.put("fromStorge", currentStore);
|
|
|
//出入库类型
|
|
|
- map.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
|
|
|
+ dataMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
|
|
|
//目的地为机器人手臂
|
|
|
Storge hcwStorge = (Storge) msgUtil.redis_get(DemoCacheKey.DEMOLINE_CAMP + "_" + DemoLineConstant.DEMOLINE_RJQR_HCW + taskNode.getId());
|
|
|
- map.put("Data", hcwStorge);
|
|
|
- map.put("toStorge", hcwStorge);
|
|
|
- map.put("result", true);
|
|
|
+ dataMap.put("Data", hcwStorge);
|
|
|
+ dataMap.put("toStorge", hcwStorge);
|
|
|
+ dataMap.put("result", true);
|
|
|
}
|
|
|
|
|
|
- } else if ("放".equals(moduleName)) {
|
|
|
+ }
|
|
|
+ else if ("放".equals(params[0])) {
|
|
|
//判断目标位置是否空闲
|
|
|
- String target[] = {resourceAutoCode.getTargetId().toString()};
|
|
|
+ String target[] = {taskNode.getAutoNode().getTargetId().toString()};
|
|
|
List<ProductionresourcePosition> targetList = productionresourcePositionService.getFreeProductionresourcePositionByNos(target);
|
|
|
List<ProductionresourcePosition> xbkList = new ArrayList<>();
|
|
|
|
|
@@ -202,7 +301,6 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
|
//锁定加工设备库位
|
|
|
targetStorge.setCompleteBatchNo(task.getCompleteBatchNo());
|
|
|
storgeService.lockStorge(targetStorge, taskNode.getId());
|
|
|
-
|
|
|
} else {//设备忙碌,放置到线边库
|
|
|
//TODO,哪里的线边库
|
|
|
String znscdyXBKarr[] = {DemoLineConstant.NODE_RESOURCE_ZNSCDY_XBK};
|
|
@@ -257,7 +355,7 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
|
return map;
|
|
|
|
|
|
|
|
|
- //质量中心机器人
|
|
|
+ //质量中心机器人
|
|
|
// if(DemoLineConstant.JQR1.equals(robotType)){
|
|
|
// //机器人放子盘夹具到上下料站(从子盘到机械手)。可能进行换手操作
|
|
|
// if (DemoLineConstant.DEMOLINE_OP01_03.equals(taskNode.getNodeNo())) {
|
|
@@ -1553,22 +1651,36 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public Map operation(JSONObject jsonObject, JSONObject bizJsonObject, Map<String, Object> map) {
|
|
|
- return map;
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 设备动态逻辑判断处理
|
|
|
+ *
|
|
|
+ * @param deviceList
|
|
|
+ * @param useXbk
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private ProductionresourcePosition logical(List<ProductionresourcePosition> deviceList, boolean useXbk){
|
|
|
+ //设备不存在
|
|
|
+ if(deviceList == null || deviceList.size() == 0){
|
|
|
+ map.put("msg", DictionaryKey.NodeException.NO_RESOURCE);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ deviceList = deviceList.stream().filter(position->position.getStatus()=="1" && position.getLockStatus()=="1").collect(Collectors.toList());
|
|
|
+ //设备被锁定
|
|
|
+ if(deviceList.size() == 0) {
|
|
|
+ if(useXbk){
|
|
|
+ if(xbkList.size() == 0){
|
|
|
+ map.put("msg", DictionaryKey.NodeException.RESOURCE_LOCK);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ map.put("useXbk", true);
|
|
|
+ return xbkList.get(0);
|
|
|
+ }
|
|
|
+ map.put("msg", DictionaryKey.NodeException.RESOURCE_LOCK);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ //设备托盘、夹具条件不满足 待定
|
|
|
|
|
|
- @Override
|
|
|
- public boolean confirmStatus(TaskNode taskNode) {
|
|
|
- return false;
|
|
|
+ return deviceList.get(0);
|
|
|
}
|
|
|
|
|
|
- public ProductionresourcePosition getResourcePosition(TaskNode taskNode) {
|
|
|
- List<ProductionresourcePosition> resourcePositionList = productionresourcePositionMapper.selectList(Wraps.<ProductionresourcePosition>lbQ().eq(ProductionresourcePosition::getResourceId, taskNode.getResourceId()));
|
|
|
- ProductionresourcePosition productionresourcePosition = null;
|
|
|
- if (resourcePositionList != null && resourcePositionList.size() > 0) {
|
|
|
- productionresourcePosition = resourcePositionList.get(0);
|
|
|
- }
|
|
|
- return productionresourcePosition;
|
|
|
- }
|
|
|
}
|