| | |
| | | |
| | | if (shuttleProtocol.getCurrentLocNo().equals(liftSta.getLocNo())) { |
| | | //小车还在输送站点 |
| | | //获取小车待机位 |
| | | String standbyLocNo = Utils.getShuttleStandbyLocNo(liftSta.getLocNo()); |
| | | if (standbyLocNo == null) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "{}任务,获取小车待机位失败", wrkMast.getWrkNo()); |
| | | //小车出提升机近点距离 |
| | | int shuttleOutLiftLocationDistance = 2; |
| | | Config shuttleOutLiftLocationDistanceConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "shuttleOutLiftLocationDistance")); |
| | | if (shuttleOutLiftLocationDistanceConfig != null) { |
| | | shuttleOutLiftLocationDistance = Integer.parseInt(shuttleOutLiftLocationDistanceConfig.getValue()); |
| | | } |
| | | |
| | | String targetLocNo = navigateUtils.calcFirstLocation(shuttleProtocol.getCurrentLocNo(), wrkMast.getSourceLocNo(), NavigationMapType.getMapTypes(NavigationMapType.NORMAL), null, null, shuttleOutLiftLocationDistance); |
| | | if (targetLocNo == null) {//出输送线站点计算失败 |
| | | News.taskInfo(wrkMast.getWrkNo(), "{}任务,{}小车,出输送线站点计算失败", wrkMast.getWrkNo(), shuttleProtocol.getShuttleNo()); |
| | | return false; |
| | | } |
| | | |
| | | //调度小车去待机位 |
| | | boolean dispatchShuttle = shuttleDispatchUtils.dispatchShuttle(wrkMast.getWrkNo(), standbyLocNo, wrkMast.getShuttleNo()); |
| | | boolean dispatchShuttle = shuttleDispatchUtils.dispatchShuttle(wrkMast.getWrkNo(), targetLocNo, wrkMast.getShuttleNo()); |
| | | if (!dispatchShuttle) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "{}任务,小车在输送站点调度小车避让失败", wrkMast.getWrkNo()); |
| | | return false; |
| | |
| | | } |
| | | |
| | | //获取提升机命令 |
| | | LiftCommand liftCommand = liftThread.getPickAndPutCommand(wrkMast.getWrkNo(), liftSta.getLev(), wrkMast.getStaNo()); |
| | | LiftCommand liftCommand = liftThread.getPickAndPutCommand(wrkMast.getWrkNo(), liftSta.getSiteId(), wrkMast.getStaNo()); |
| | | ArrayList<LiftCommand> commands = new ArrayList<>(); |
| | | commands.add(liftCommand); |
| | | |