| | |
| | | } |
| | | } |
| | | |
| | | News.info("{}目标库位没有搜索到可用穿梭车", locNo); |
| | | //News.info("{}目标库位没有搜索到可用穿梭车", locNo); |
| | | return false; |
| | | } |
| | | |
| | |
| | | int currentLev = Utils.getLev(shuttleProtocol.getCurrentLocNo());//小车当前层高 |
| | | String currentLocNo = shuttleProtocol.getCurrentLocNo();//小车当前库位号 |
| | | |
| | | if (currentLocNo.equals(locNo)) { |
| | | if (currentLocNo.equals(locNo) || currentLocNo.equals(sourceLocNo)) { |
| | | //车辆当前位置已经是目标库位,调度该车 |
| | | //给工作档绑定小车号 |
| | | WrkMast wrkMast1 = wrkMastService.selectByWorkNo(wrkNo); |
| | |
| | | sameShuttles.put(-1, shuttleThread); |
| | | continue; |
| | | } |
| | | |
| | | //当前穿梭车线程到目标地点距离 |
| | | List<NavigateNode> currentShuttlePath = navigateUtils.calc(currentLocNo, locNo, NavigationMapType.NORMAL.id, Utils.getShuttlePoints(shuttleNo, Utils.getLev(currentLocNo)), null);//搜索空闲穿梭车,使用正常通道地图 |
| | | if (currentShuttlePath == null) { |
| | | continue; |
| | | //TODO |
| | | List<NavigateNode> currentShuttlePath; |
| | | if (Utils.getLev(currentLocNo) != Utils.getLev(locNo)) { |
| | | //当前穿梭车线程到目标地点距离 |
| | | currentShuttlePath = navigateUtils.calc(currentLocNo, sourceLocNo, NavigationMapType.NORMAL.id, Utils.getShuttlePoints(shuttleNo, Utils.getLev(currentLocNo)), null);//搜索空闲穿梭车,使用正常通道地图 |
| | | if (currentShuttlePath == null) { |
| | | continue; |
| | | } |
| | | } else { |
| | | //当前穿梭车线程到目标地点距离 |
| | | currentShuttlePath = navigateUtils.calc(currentLocNo, locNo, NavigationMapType.NORMAL.id, Utils.getShuttlePoints(shuttleNo, Utils.getLev(currentLocNo)), null);//搜索空闲穿梭车,使用正常通道地图 |
| | | if (currentShuttlePath == null) { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | Integer currentAllDistance = navigateUtils.getOriginPathAllDistance(currentShuttlePath);//计算当前路径行走总距离 |
| | | sameShuttles.put(currentAllDistance, shuttleThread); |
| | | } |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 小车迁移任务生成 |
| | | */ |
| | |
| | | } |
| | | |
| | | //判断是否有其他任务正在使用穿梭车 |
| | | WrkMast wrkMast2 = wrkMastService.selectShuttleWorking(shuttleNo); |
| | | WrkMast wrkMast2 = wrkMastService.selectShuttleWorking2(shuttleNo, wrkNo, mainWrkMast != null ? mainWrkMast.getMainWrkNo() : null); |
| | | if (wrkMast2 != null && !disableCheck) {//小车存在其他工作档任务,等待执行完成后再生成新的任务 |
| | | if (mainWrkMast == null) { |
| | | News.info("{}号小车,存在其他工作档任务,等待执行完成再生成新的任务", shuttleNo); |
| | | return false; |
| | | } else { |
| | | if (!mainWrkMast.getShuttleNo().equals(shuttleNo)) { |
| | | if (mainWrkMast.getShuttleNo() != null && !mainWrkMast.getShuttleNo().equals(shuttleNo)) { |
| | | News.info("{}号小车,存在其他工作档任务,等待执行完成再生成新的任务", shuttleNo); |
| | | return false; |
| | | } |