| | |
| | | return false; |
| | | } |
| | | |
| | | if (liftProtocol.getPlatShuttleCheck()) { |
| | | //提升机内有车禁止下发 |
| | | return false; |
| | | } |
| | | // if (liftProtocol.getPlatShuttleCheck()) { |
| | | // //提升机内有车禁止下发 |
| | | // return false; |
| | | // } |
| | | |
| | | if (redisCommand.getLiftSecurityMk()) { |
| | | //已经执行过提升机命令,禁止下发 |
| | |
| | | liftProtocol.setTaskNo(shuttleProtocol.getTaskNo());//设置任务号 |
| | | liftProtocol.setShuttleNo(shuttleProtocol.getShuttleNo());//设置四向穿梭车号 |
| | | liftProtocol.setProtocolStatus(LiftProtocolStatusType.WORKING);//设置提升机状态为工作中 |
| | | liftProtocol.setSecurityMk(true);//标记置为true,防止其他任务占用当前提升机 |
| | | // liftProtocol.setSecurityMk(true);//标记置为true,防止其他任务占用当前提升机 |
| | | redisCommand.setLiftSecurityMk(true);//标记置为true,防止其他任务占用当前提升机 |
| | | //任务数据保存到redis |
| | | redisUtil.set("shuttle_wrk_no_" + redisCommand.getWrkNo(), JSON.toJSONString(redisCommand)); |
| | | |
| | | //命令list |
| | | ArrayList<LiftCommand> liftCommands = new ArrayList<>(); |
| | | LiftCommand liftCommand = liftThread.getLiftUpDownCommand(liftProtocol.getLiftNo(), liftProtocol.getTaskNo(), shuttleLocNoLev); |
| | | liftCommands.add(liftCommand);//将命令添加进list |
| | | // LiftCommand liftCommand = liftThread.getLiftUpDownCommand(liftProtocol.getLiftNo(), liftProtocol.getTaskNo(), shuttleLocNoLev); |
| | | // liftCommands.add(liftCommand);//将命令添加进list |
| | | |
| | | LiftAssignCommand liftAssignCommand = new LiftAssignCommand(); |
| | | liftAssignCommand.setCommands(liftCommands); |
| | | // liftAssignCommand.setCommands(liftCommands); |
| | | liftAssignCommand.setLiftNo(liftProtocol.getLiftNo()); |
| | | liftAssignCommand.setTaskNo(liftProtocol.getTaskNo()); |
| | | //下发任务 |