| | |
| | | /** |
| | | * 调度车辆 |
| | | */ |
| | | public boolean dispatchShuttle(Integer wrkNo, String locNo) { |
| | | public boolean searchDispatchShuttle(Integer wrkNo, String sourceLocNo, String locNo, String flag) { |
| | | ArrayList<ShuttleThread> sameLev = new ArrayList<>();//相同楼层的穿梭车 |
| | | ArrayList<ShuttleThread> diffLev = new ArrayList<>();//不同楼层的穿梭车 |
| | | |
| | |
| | | Integer shuttleNo = shuttleProtocol.getShuttleNo(); |
| | | //当前穿梭车库位号 |
| | | String currentLocNo = shuttleProtocol.getCurrentLocNo(); |
| | | if (currentLocNo.equals(locNo)) { |
| | | 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) { |
| | |
| | | ShuttleProtocol shuttleProtocol = shuttleThread.getStatus(); |
| | | Integer shuttleNo = shuttleProtocol.getShuttleNo(); |
| | | //尝试调度小车 |
| | | boolean result = shuttleMoveGenerate(wrkNo, locNo, shuttleNo); |
| | | boolean result = shuttleMoveGenerate(wrkNo, sourceLocNo, locNo, shuttleNo, flag, false); |
| | | if (result) { |
| | | return true;//调度成功 |
| | | } |
| | |
| | | ShuttleProtocol shuttleProtocol = shuttleThread.getStatus(); |
| | | Integer shuttleNo = shuttleProtocol.getShuttleNo(); |
| | | //尝试调度小车 |
| | | boolean result = shuttleMoveGenerate(wrkNo, locNo, shuttleNo); |
| | | boolean result = shuttleMoveGenerate(wrkNo, sourceLocNo, locNo, shuttleNo, flag, false); |
| | | if (result) { |
| | | return true;//调度成功 |
| | | } |
| | |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setMainWrkNo(mainWrkMast.getWrkNo()); |
| | | |
| | | if ("TRANSPORT_LIFT".equals(flag)) { |
| | | wrkMast.setMainWrkNo(wrkNo); |
| | | } |
| | | |
| | | boolean res = wrkMastService.insert(wrkMast); |
| | | if (!res) { |
| | | News.error("小车迁移 --- 保存工作档失败! 穿梭车号:" + shuttleNo); |