|
@@ -29,11 +29,9 @@ import com.github.zuihou.business.productionReadyCenter.service.BomProcedureVers
|
|
|
import com.github.zuihou.business.productionResourceCenter.dao.ProductionresourceBizMapper;
|
|
|
import com.github.zuihou.business.productionResourceCenter.dao.ProductionresourcePositionMapper;
|
|
|
import com.github.zuihou.business.productionResourceCenter.dao.ZZoneMapper;
|
|
|
+import com.github.zuihou.business.productionResourceCenter.dao.ZZoneProductionresourceMapper;
|
|
|
import com.github.zuihou.business.productionResourceCenter.entity.*;
|
|
|
-import com.github.zuihou.business.productionResourceCenter.service.NodeOperationService;
|
|
|
-import com.github.zuihou.business.productionResourceCenter.service.ProductionresourcePositionService;
|
|
|
-import com.github.zuihou.business.productionResourceCenter.service.ResourceAutoCodeService;
|
|
|
-import com.github.zuihou.business.productionResourceCenter.service.ResourceBusinessService;
|
|
|
+import com.github.zuihou.business.productionResourceCenter.service.*;
|
|
|
import com.github.zuihou.business.productionResourceCenter.service.impl.AGVNodeServiceImpl;
|
|
|
import com.github.zuihou.business.productionResourceCenter.service.impl.MachineNodeServiceImpl;
|
|
|
import com.github.zuihou.business.productionResourceCenter.service.impl.OtherNodeServiceImpl;
|
|
@@ -117,7 +115,7 @@ public class TaskWorkNode {
|
|
|
private ResourceAutoCodeService resourceAutoCodeService;
|
|
|
|
|
|
@Autowired
|
|
|
- private BomProcedureVersionService bomProcedureVersionService;
|
|
|
+ private ZZoneProductionresourceMapper zZoneProductionresourceMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private BomProcedureProductionresourceService bomProcedureProductionresourceService;
|
|
@@ -125,6 +123,10 @@ public class TaskWorkNode {
|
|
|
@Autowired
|
|
|
private ProductionresourceBizMapper productionresourceBizMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ZZoneService zoneService;
|
|
|
+
|
|
|
+
|
|
|
//总控端口
|
|
|
private final String ZK_port = "120";
|
|
|
|
|
@@ -210,6 +212,10 @@ public class TaskWorkNode {
|
|
|
queryMap.put(taskNode.getId() + "count", jsonObject.getString(taskNode.getId() + "count"));
|
|
|
}
|
|
|
|
|
|
+ //把产线放进去,避免多次查询
|
|
|
+ ZZoneProductionresource zoneProductionresource = zZoneProductionresourceMapper.selectOne(Wraps.<ZZoneProductionresource>lbQ().eq(ZZoneProductionresource::getResourceId,taskNode.getResourceId()));
|
|
|
+ ZZone zZone = zoneService.getById(zoneProductionresource.getZoneId());
|
|
|
+ queryMap.put("zone",zZone);
|
|
|
//运行条件验证
|
|
|
Map conMap = checkCon(taskNode, tTask, queryMap);
|
|
|
//组装接口参数
|
|
@@ -373,8 +379,8 @@ public class TaskWorkNode {
|
|
|
logger.info("=============进入条件检测==============" + taskNode);
|
|
|
//业务类型(区分正常设备节点和线边库节点)
|
|
|
String bizType = dataMap.get("bizType") == null ? "" : dataMap.get("bizType").toString();
|
|
|
- //具体的搬运类型
|
|
|
- String carryType = dataMap.get("carryType") == null ? "" : dataMap.get("carryType").toString();
|
|
|
+// //具体的搬运类型
|
|
|
+// String carryType = dataMap.get("carryType") == null ? "" : dataMap.get("carryType").toString();
|
|
|
|
|
|
//判断节点设备类型
|
|
|
ResourceAutoCode resourceAutoCode = taskNode.getAutoNode();
|
|
@@ -395,6 +401,7 @@ public class TaskWorkNode {
|
|
|
map.put("categoryName", DictionaryKey.RESOURCE_CATEGORY.get(category));
|
|
|
map.put("instructions", moduleInstructions);
|
|
|
map.put("moduleName", module.getName());
|
|
|
+ map.put("zone", dataMap.get("zone"));
|
|
|
|
|
|
if ("1".equals(category)) {
|
|
|
nodeOperationService = MsgUtil.getBean(MachineNodeServiceImpl.class);
|
|
@@ -433,6 +440,34 @@ public class TaskWorkNode {
|
|
|
* @return
|
|
|
*/
|
|
|
public Map checkXbkCon(TaskNode taskNode,TTask task, Map<String, Object> map){
|
|
|
+// if(BizConstant.ROBOT_TYPE_CACHE.equals(zoneService.getRobotTypebyZone(taskNode.))){
|
|
|
+//
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
Storge xbkStorage = workpieceService.getWorkPieceStock(taskNode.getId(),false);
|
|
|
//判断线边库是否被锁定占用
|
|
|
if(xbkStorage.getLockStatus()=="1"){
|