|
@@ -231,6 +231,11 @@ public class TaskWorkNode {
|
|
|
ZZoneProductionresource zoneProductionresource = zZoneProductionresourceMapper.selectOne(Wraps.<ZZoneProductionresource>lbQ().eq(ZZoneProductionresource::getResourceId, taskNode.getResourceId()));
|
|
|
ZZone zZone = zoneService.getById(zoneProductionresource.getZoneId());
|
|
|
queryMap.put("zone", zZone);
|
|
|
+
|
|
|
+
|
|
|
+ BBom bom = bBomMapper.selectById(tTask.getBomId());
|
|
|
+ ZZone bomzZone = zoneService.getById(bom.getId());
|
|
|
+ queryMap.put("bomzZone", bomzZone);
|
|
|
//运行条件验证
|
|
|
Map conMap = checkCon(taskNode, tTask, queryMap);
|
|
|
if (null == conMap) {
|
|
@@ -556,6 +561,7 @@ public class TaskWorkNode {
|
|
|
map.put("instructions", moduleInstructions);
|
|
|
map.put("moduleName", module.getName());
|
|
|
map.put("zone", dataMap.get("zone"));
|
|
|
+ map.put("bomzZone", dataMap.get("bomzZone"));
|
|
|
|
|
|
if ("1".equals(category)) {
|
|
|
nodeOperationService = MsgUtil.getBean(MachineNodeServiceImpl.class);
|
|
@@ -638,7 +644,7 @@ public class TaskWorkNode {
|
|
|
|
|
|
Storge startStore = workpieceService.getWorkPieceStock(taskNode.getCompleteBatchNo(), false);
|
|
|
|
|
|
- ProductionresourcePosition po = logical(robotList, targetStorge, zone);
|
|
|
+ ProductionresourcePosition po = logical(robotList, targetStorge,dataMap);
|
|
|
//机器人手抓没被锁定,并且有空闲未知
|
|
|
if (po != null) {
|
|
|
jqrStorge = storgeService.getById(jqrMap.get(DemoLineConstant.DEMOLINE_RJQR_ZS).get(0).getStorgeId());
|
|
@@ -742,7 +748,7 @@ public class TaskWorkNode {
|
|
|
jqrStorge = storgeService.getById(robotList.get(0).getStorgeId());
|
|
|
|
|
|
dataMap.put("method", "GetServoStacker");
|
|
|
- if (logical(robotList, targetStorge, zone) != null) {
|
|
|
+ if (logical(robotList, targetStorge, dataMap) != null) {
|
|
|
Storge startStore = workpieceService.getWorkPieceStock(taskNode.getCompleteBatchNo(), false);
|
|
|
|
|
|
dataMap.put("fromStorge", startStore);
|
|
@@ -832,7 +838,14 @@ public class TaskWorkNode {
|
|
|
* @param robotList
|
|
|
* @return
|
|
|
*/
|
|
|
- public ProductionresourcePosition logical(List<ProductionresourcePosition> robotList, Storge targetStorge, ZZone zone) {
|
|
|
+ public ProductionresourcePosition logical(List<ProductionresourcePosition> robotList, Storge targetStorge, Map<String, Object> dataMap) {
|
|
|
+ ZZone zone = dataMap.get("zone") == null ? null : (ZZone) dataMap.get("zone");
|
|
|
+ ZZone bomzZone = dataMap.get("bomzZone") == null ? null : (ZZone) dataMap.get("bomzZone");
|
|
|
+ //自动模式下,如果下个节点是上下料站,不让走下去
|
|
|
+ if(bomzZone!=null&&"1".equals(bomzZone.getRunMode())){//自动模式,
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
//设备不存在
|
|
|
if (checkRobot(robotList, zone.getName())) {
|
|
|
return null;
|