| | |
| | | import com.zy.core.enums.*; |
| | | import com.zy.core.model.ShuttleSlave; |
| | | import com.zy.core.model.Task; |
| | | import com.zy.core.model.command.NyShuttleHttpCommand; |
| | | import com.zy.core.model.command.ShuttleAssignCommand; |
| | | import com.zy.core.model.command.ShuttleCommand; |
| | | import com.zy.core.model.command.ShuttleRedisCommand; |
| | | import com.zy.core.model.command.*; |
| | | import com.zy.core.model.protocol.LiftProtocol; |
| | | import com.zy.core.model.protocol.NyShuttleProtocol; |
| | | import lombok.Data; |
| | |
| | | return true;//提升机达到小车楼层,放行 |
| | | } |
| | | |
| | | //提升机未到达小车楼层,呼叫提升机 |
| | | //获取提升机命令 |
| | | NyLiftCommand liftCommand = NyLiftUtils.getLiftCommand(liftProtocol.getLiftNo().intValue(), NyLiftTaskModelType.MOVE_CAR.id, null, basDevp.getDevNo(), wrkNo.intValue()); |
| | | ArrayList<NyLiftCommand> liftCommands = new ArrayList<>(); |
| | | liftCommands.add(liftCommand); |
| | | |
| | | //提交到线程去工作 |
| | | LiftAssignCommand assignCommand = new LiftAssignCommand(); |
| | | assignCommand.setCommands(liftCommands); |
| | | assignCommand.setLiftNo(liftProtocol.getLiftNo()); |
| | | assignCommand.setTaskNo(wrkNo); |
| | | assignCommand.setTaskMode(NyLiftTaskModelType.MOVE_CAR.id.shortValue()); |
| | | |
| | | //下发任务 |
| | | MessageQueue.offer(SlaveType.Lift, liftProtocol.getLiftNo().intValue(), new Task(3, assignCommand)); |
| | | |
| | | return false;//默认不放行 |
| | | } |
| | | |