| | |
| | | |
| | | staProtocol = staProtocol.clone(); |
| | | staProtocol.setStaNo(staNo); |
| | | staProtocol.setWorkNo(wrkMast.getWrkNo().shortValue()); |
| | | staProtocol.setWorkNo(wrkMast.getMainWrkNo().shortValue()); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, 1, new Task(2, staProtocol)); |
| | | |
| | | wrkMast.setWrkSts(WrkStsType.INBOUND_DEVICE_RUN.sts); |
| | |
| | | Integer sourceLev = liftThread.getLevToStaNo(Utils.getLev(wrkMast.getSourceLocNo())); |
| | | |
| | | //获取提升机命令 |
| | | List<LiftCommand> liftCommands = liftThread.getPalletOutCommand(wrkMast.getWrkNo(), sourceLev, wrkMast.getStaNo()); |
| | | List<LiftCommand> liftCommands = liftThread.getPalletOutCommand(wrkMast.getMainWrkNo(), sourceLev, wrkMast.getStaNo()); |
| | | LiftCommand liftCommand = liftCommands.get(0); |
| | | if (wrkMast.getMainWrkNo() != null) { |
| | | // if (wrkMast.getMainWrkNo() != null) { |
| | | liftCommand.setTaskNo(wrkMast.getMainWrkNo()); |
| | | } else { |
| | | int deviceWrk = commonService.getWorkNo(8);//生成提升机设备工作号 |
| | | liftCommand.setTaskNo(deviceWrk);//更换随机任务号 |
| | | } |
| | | // } else { |
| | | // int deviceWrk = commonService.getWorkNo(8);//生成提升机设备工作号 |
| | | // liftCommand.setTaskNo(deviceWrk);//更换随机任务号 |
| | | // } |
| | | |
| | | ArrayList<LiftCommand> commands = new ArrayList<>(); |
| | | commands.add(liftCommand); |
| | |
| | | LiftAssignCommand assignCommand = new LiftAssignCommand(); |
| | | assignCommand.setCommands(commands); |
| | | assignCommand.setLiftNo(liftProtocol.getLiftNo().shortValue()); |
| | | assignCommand.setTaskNo(wrkMast.getWrkNo().shortValue()); |
| | | assignCommand.setTaskNo(wrkMast.getMainWrkNo().shortValue()); |
| | | assignCommand.setTaskMode(LiftCommandModeType.PALLET_OUT.id.shortValue()); |
| | | |
| | | wrkMast.setWrkSts(WrkStsType.OUTBOUND_LIFT_RUN.sts); |