|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } else if (param.getLiftTaskMode() == 0) { | 
|---|
|  |  |  | //提升机复位 | 
|---|
|  |  |  | int workNo = commonService.getWorkNo(3);//获取任务号 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //获取提升机命令 | 
|---|
|  |  |  | NyLiftCommand liftCommand = NyLiftUtils.getLiftResetCommand(liftProtocol.getLiftNo().intValue()); | 
|---|
|  |  |  | ArrayList<NyLiftCommand> commands = new ArrayList<>(); | 
|---|
|  |  |  | commands.add(liftCommand); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //提交到线程去工作 | 
|---|
|  |  |  | LiftAssignCommand assignCommand = new LiftAssignCommand(); | 
|---|
|  |  |  | assignCommand.setCommands(commands); | 
|---|
|  |  |  | assignCommand.setLiftNo(liftProtocol.getLiftNo()); | 
|---|
|  |  |  | assignCommand.setTaskNo((short) workNo); | 
|---|
|  |  |  | assignCommand.setAuto(false);//手动模式 | 
|---|
|  |  |  | assignCommand.setTaskMode(NyLiftTaskModelType.RESET.id.shortValue()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (MessageQueue.offer(SlaveType.Lift, liftSlave.getId(), new Task(3, assignCommand))) { | 
|---|
|  |  |  | return R.ok(); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | throw new CoolException("命令下发失败"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | liftProtocol.setToken(0); | 
|---|
|  |  |  | liftProtocol.setProtocolStatusType(LiftProtocolStatusType.IDLE); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | throw new CoolException("未知命令"); | 
|---|
|  |  |  | } | 
|---|