| | |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.model.MapNode; |
| | | import com.zy.common.model.NavigateNode; |
| | | import com.zy.common.model.enums.NavigationMapType; |
| | | import com.zy.core.News; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.dispatcher.ShuttleDispatchUtils; |
| | |
| | | @Autowired |
| | | private DeviceConfigService deviceConfigService; |
| | | |
| | | public synchronized List<ShuttleCommand> getStartToTargetCommands(String startLocNo, String endLocNo, Integer mapType, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread) { |
| | | return getStartToTargetCommands(startLocNo, endLocNo, mapType, null, assignCommand, shuttleThread); |
| | | public synchronized List<ShuttleCommand> getStartToTargetCommands(String startLocNo, String endLocNo, List<NavigationMapType> mapTypes, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread) { |
| | | return getStartToTargetCommands(startLocNo, endLocNo, mapTypes, null, assignCommand, shuttleThread); |
| | | } |
| | | |
| | | public synchronized List<ShuttleCommand> getStartToTargetCommands(String startLocNo, String endLocNo, Integer mapType, List<int[]> whites, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread) { |
| | | public synchronized List<ShuttleCommand> getStartToTargetCommands(String startLocNo, String endLocNo, List<NavigationMapType> mapTypes, List<int[]> whites, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread) { |
| | | ShuttleProtocol shuttleProtocol = shuttleThread.getStatus(); |
| | | if (shuttleProtocol == null) { |
| | | return null; |
| | |
| | | Integer shuttleNo = shuttleProtocol.getShuttleNo(); |
| | | //获取小车移动速度 |
| | | Integer runSpeed = Optional.ofNullable(basShuttleService.selectOne(new EntityWrapper<BasShuttle>().eq("shuttle_no", shuttleNo)).getRunSpeed()).orElse(1000); |
| | | List<NavigateNode> nodeList = navigateUtils.calc(startLocNo, endLocNo, mapType, Utils.getShuttlePoints(shuttleNo, Utils.getLev(startLocNo)), whites); |
| | | List<NavigateNode> nodeList = navigateUtils.calc(startLocNo, endLocNo, mapTypes, Utils.getShuttlePoints(shuttleNo, Utils.getLev(startLocNo)), whites); |
| | | if (nodeList == null) { |
| | | News.error("{} dash {} can't find navigate path!", startLocNo, endLocNo); |
| | | shuttleThread.offerSystemMsg("{} dash {} can't find navigate path!", startLocNo, endLocNo); |
| | |
| | | return commands; |
| | | } |
| | | |
| | | public synchronized List<ShuttleCommand> shuttleInOutLiftCommand(String startLocNo, String endLocNo, Integer mapType, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread) { |
| | | public synchronized List<ShuttleCommand> shuttleInOutLiftCommand(String startLocNo, String endLocNo, List<NavigationMapType> mapTypes, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread) { |
| | | NavigateNode startNode = NavigatePositionConvert.locNoToNode(startLocNo); |
| | | NavigateNode endNode = NavigatePositionConvert.locNoToNode(endLocNo); |
| | | List<NavigateNode> unlockPath = new ArrayList<>(); |
| | |
| | | |
| | | //获取小车移动速度 |
| | | Integer runSpeed = Optional.ofNullable(basShuttleService.selectOne(new EntityWrapper<BasShuttle>().eq("shuttle_no", shuttleNo)).getRunSpeed()).orElse(1000); |
| | | List<NavigateNode> nodeList = navigateUtils.calc(startLocNo, endLocNo, mapType, Utils.getShuttlePoints(shuttleNo, Utils.getLev(startLocNo)), null); |
| | | List<NavigateNode> nodeList = navigateUtils.calc(startLocNo, endLocNo, mapTypes, Utils.getShuttlePoints(shuttleNo, Utils.getLev(startLocNo)), null); |
| | | if (nodeList == null) { |
| | | News.error("{} dash {} can't find navigate path!", startLocNo, endLocNo); |
| | | shuttleThread.offerSystemMsg("{} dash {} can't find navigate path!", startLocNo, endLocNo); |