|
@@ -8,7 +8,9 @@ import com.github.zuihou.business.DemoLine.DemoLineConstant;
|
|
|
import com.github.zuihou.business.DemoLine.YunjianConstant;
|
|
|
import com.github.zuihou.business.edgeLibrary.entity.StockInfo;
|
|
|
import com.github.zuihou.business.edgeLibrary.entity.Storge;
|
|
|
+import com.github.zuihou.business.edgeLibrary.entity.StorgeType;
|
|
|
import com.github.zuihou.business.edgeLibrary.service.StorgeService;
|
|
|
+import com.github.zuihou.business.edgeLibrary.service.StorgeTypeService;
|
|
|
import com.github.zuihou.business.operationManagementCenter.entity.Plan;
|
|
|
import com.github.zuihou.business.operationManagementCenter.entity.TTask;
|
|
|
import com.github.zuihou.business.operationManagementCenter.entity.TWorkpiece;
|
|
@@ -89,6 +91,9 @@ public class CacheRobotStrategy implements RobotStrategy {
|
|
|
@Autowired
|
|
|
private MsgUtil msgUtil;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private StorgeTypeService storgeTypeService;
|
|
|
+
|
|
|
@Override
|
|
|
public Map robotInfo(TaskNode taskNode, String zoneName) {
|
|
|
Map<String, Object> robotInfo = Maps.newConcurrentMap();
|
|
@@ -225,8 +230,23 @@ public class CacheRobotStrategy implements RobotStrategy {
|
|
|
returnMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
|
|
|
}
|
|
|
|
|
|
+ // 根据起始点位,获取点位属于的类型
|
|
|
+ StorgeType locationStorgeType = null;
|
|
|
+ StorgeType ltargetStorgeType = null;
|
|
|
+ if(!targetStorge.getPointId().isEmpty()){
|
|
|
+
|
|
|
+ locationStorgeType = storgeTypeService.findOneByPointId(startStorge.getPointId());
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!targetStorge.getPointId().isEmpty()){
|
|
|
+ ltargetStorgeType = storgeTypeService.findOneByPointId(targetStorge.getPointId());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
//满足条件--机器人空闲,设备或线边库有一个空闲
|
|
|
Map locationMap = new HashMap();
|
|
|
+ locationMap.put("locationArea", locationStorgeType==null?"": locationStorgeType.getStorgeType()); //当前区域
|
|
|
+ locationMap.put("destLocationArea", ltargetStorgeType ==null?"": ltargetStorgeType.getStorgeType()); //目的区域
|
|
|
locationMap.put("location", startStorge.getPointId()); //零件当前位置
|
|
|
locationMap.put("destLocation", targetStorge.getPointId()); //机器人缓存位
|
|
|
locationMap.put("taskType", DictionaryKey.TASK_TYPE.get("CARRY"));
|