| | |
| | | //移动托盘 |
| | | int workNo = commonService.getWorkNo(3);//获取任务号 |
| | | |
| | | LiftStaProtocol sourceLiftSta = NyLiftUtils.getLiftStaByStaNo(param.getSourceStaNo()); |
| | | LiftStaProtocol liftSta = NyLiftUtils.getLiftStaByStaNo(param.getStaNo()); |
| | | if (sourceLiftSta == null || liftSta == null) { |
| | | throw new CoolException("源站或目标站不存在"); |
| | | } |
| | | // LiftStaProtocol sourceLiftSta = NyLiftUtils.getLiftStaByStaNo(param.getSourceStaNo()); |
| | | // LiftStaProtocol liftSta = NyLiftUtils.getLiftStaByStaNo(param.getStaNo()); |
| | | // if (sourceLiftSta == null || liftSta == null) { |
| | | // throw new CoolException("源站或目标站不存在"); |
| | | // } |
| | | |
| | | //获取提升机命令 |
| | | NyLiftCommand liftCommand = NyLiftUtils.getLiftCommand(liftProtocol.getLiftNo().intValue(), NyLiftTaskModelType.MOVE_TRAY.id, sourceLiftSta.getStaNo(), liftSta.getStaNo(), workNo); |
| | | NyLiftCommand liftCommand = NyLiftUtils.getLiftCommand(liftProtocol.getLiftNo().intValue(), NyLiftTaskModelType.MOVE_TRAY.id, param.getSourceStaNo(), param.getStaNo(), workNo); |
| | | ArrayList<NyLiftCommand> commands = new ArrayList<>(); |
| | | commands.add(liftCommand); |
| | | |
| | |
| | | } else { |
| | | throw new CoolException("命令下发失败"); |
| | | } |
| | | } else if (param.getLiftTaskMode() == 0) { |
| | | //提升机复位 |
| | | liftProtocol.setToken(0); |
| | | liftProtocol.setProtocolStatusType(LiftProtocolStatusType.IDLE); |
| | | } else { |
| | | throw new CoolException("未知命令"); |
| | | } |