|  |  | 
 |  |  |                 continue; | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             //判断提升机令牌是否被占用 | 
 |  |  |             if (liftProtocol.getToken() != 0) { | 
 |  |  |                 continue; | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             //搜索是否有待处理的任务 | 
 |  |  |             List<WrkMast> wrkMasts = wrkMastMapper.selectLiftStep223103(); | 
 |  |  |             if (wrkMasts.isEmpty()) { | 
 |  |  | 
 |  |  |  | 
 |  |  |             //获取源站对应的输送站点 | 
 |  |  |             BasDevp sourceBasDevp = basDevpService.selectById(wrkMast.getSourceStaNo()); | 
 |  |  |             //获取目标站对应的输送站点 | 
 |  |  |             BasDevp targetBasDevp = basDevpService.selectById(wrkMast.getStaNo()); | 
 |  |  |             if (sourceBasDevp == null || targetBasDevp == null) { | 
 |  |  |                 return false;//缺少站点信息 | 
 |  |  |             if (sourceBasDevp == null) { | 
 |  |  |                 return false;//站点不存在 | 
 |  |  |             } | 
 |  |  |             //获取源站对应的牛眼提升机站点编号(起点编号) | 
 |  |  |             Integer startSta = Integer.parseInt(sourceBasDevp.getQrCodeValue()); | 
 |  |  |             Integer targetSta = null; | 
 |  |  |             //获取牛眼提升机站点编号(目标编号) | 
 |  |  |             for (LiftStaProtocol liftStaProtocol : liftThread.getLiftStaProtocols()) { | 
 |  |  |                 if (liftStaProtocol.getLev() == Utils.getLev(wrkMast.getLocNo())) { | 
 |  |  |                     targetSta = liftStaProtocol.getStaNo(); | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             if (targetSta == null) { | 
 |  |  |                 return false;//站点编号不存在 | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             //获取提升机命令 | 
 |  |  |             NyLiftCommand liftCommand = NyLiftUtils.getLiftCommand(liftProtocol.getLiftNo().intValue(), NyLiftTaskModelType.MOVE_TRAY.id, sourceBasDevp.getDevNo(), targetBasDevp.getDevNo(), wrkMast.getWrkNo()); | 
 |  |  |  | 
 |  |  |             NyLiftCommand liftCommand = NyLiftUtils.getLiftCommand(liftProtocol.getLiftNo().intValue(), NyLiftTaskModelType.MOVE_TRAY.id, startSta, targetSta, wrkMast.getWrkNo()); | 
 |  |  |             ArrayList<NyLiftCommand> commands = new ArrayList<>(); | 
 |  |  |             commands.add(liftCommand); | 
 |  |  |  | 
 |  |  | 
 |  |  |                 return false;//当前提升机存在未完成任务,等待下一次轮询 | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             //获取源站对应的输送站点 | 
 |  |  |             BasDevp sourceBasDevp = basDevpService.selectByLevAndLiftNo(Utils.getLev(wrkMast.getSourceLocNo()), liftProtocol.getLiftNo().intValue()); | 
 |  |  |             //获取目标站对应的输送站点 | 
 |  |  |             BasDevp targetBasDevp = basDevpService.selectById(wrkMast.getSourceStaNo()); | 
 |  |  |             if (sourceBasDevp == null || targetBasDevp == null) { | 
 |  |  |                 return false;//缺少站点信息 | 
 |  |  |             //获取源站对应的牛眼提升机站点编号(起点编号) | 
 |  |  |             Integer startSta = null; | 
 |  |  |             for (LiftStaProtocol liftStaProtocol : liftThread.getLiftStaProtocols()) { | 
 |  |  |                 if (liftStaProtocol.getLev() == Utils.getLev(wrkMast.getLocNo())) { | 
 |  |  |                     startSta = liftStaProtocol.getStaNo(); | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             if (startSta == null) { | 
 |  |  |                 return false;//站点编号不存在 | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             //获目标站源站对应的输送站点 | 
 |  |  |             BasDevp targetBasDevp = basDevpService.selectById(wrkMast.getStaNo()); | 
 |  |  |             if (targetBasDevp == null) { | 
 |  |  |                 return false;//站点不存在 | 
 |  |  |             } | 
 |  |  |             //获取牛眼提升机站点编号(目标编号) | 
 |  |  |             Integer targetSta = Integer.parseInt(targetBasDevp.getQrCodeValue()); | 
 |  |  |  | 
 |  |  |             //获取提升机命令 | 
 |  |  |             NyLiftCommand liftCommand = NyLiftUtils.getLiftCommand(liftProtocol.getLiftNo().intValue(), NyLiftTaskModelType.MOVE_TRAY.id, sourceBasDevp.getDevNo(), targetBasDevp.getDevNo(), wrkMast.getWrkNo()); | 
 |  |  |             NyLiftCommand liftCommand = NyLiftUtils.getLiftCommand(liftProtocol.getLiftNo().intValue(), NyLiftTaskModelType.MOVE_TRAY.id, startSta, targetSta, wrkMast.getWrkNo()); | 
 |  |  |  | 
 |  |  |             ArrayList<NyLiftCommand> commands = new ArrayList<>(); | 
 |  |  |             commands.add(liftCommand); |