| | |
| | | |
| | | int lev = 101; |
| | | if (wrkMast.getSourceStaNo() == 1021) { |
| | | //TODO |
| | | // lev = 105; |
| | | lev = 1021; |
| | | lev = 100 + Utils.getLev(wrkMast.getLocNo()); |
| | | } else if (wrkMast.getSourceStaNo() == 1031) { |
| | | lev = 1031; |
| | | lev = 100 + Utils.getLev(wrkMast.getLocNo()); |
| | | } |
| | | //获取提升机命令 |
| | | List<LiftCommand> liftCommands = liftThread.getPalletInCommand(wrkMast.getWrkNo(), sourceStaNo, lev); |
| | |
| | | //获取提升机命令 |
| | | List<LiftCommand> liftCommands = liftThread.getPalletOutCommand(wrkMast.getWrkNo(), sourceLev, wrkMast.getStaNo()); |
| | | LiftCommand liftCommand = liftCommands.get(0); |
| | | |
| | | int deviceWrk = commonService.getWorkNo(8);//生成提升机设备工作号 |
| | | liftCommand.setTaskNo(deviceWrk);//更换随机任务号 |
| | | if ( wrkMast.getStaNo()==1031){ |
| | | liftCommand.setTaskNo(wrkMast.getWrkNo()); |
| | | }else { |
| | | int deviceWrk = commonService.getWorkNo(8);//生成提升机设备工作号 |
| | | liftCommand.setTaskNo(deviceWrk);//更换随机任务号 |
| | | } |
| | | |
| | | ArrayList<LiftCommand> commands = new ArrayList<>(); |
| | | commands.add(liftCommand); |
| | |
| | | wrkMast.setLiftNo(liftProtocol.getLiftNo());//提前锁定提升机 |
| | | wrkMast.setSystemMsg("");//清空消息 |
| | | wrkMast.setModiTime(now); |
| | | |
| | | if (wrkMastService.updateById(wrkMast)) { |
| | | //下发任务 |
| | | liftAction.assignWork(wrkMast.getLiftNo(), assignCommand); |
| | |
| | | wrkMast.setWrkSts(WrkStsType.INBOUND_LIFT_RUN_COMPLETE.sts); |
| | | } else if (wrkMast.getWrkSts() == WrkStsType.OUTBOUND_LIFT_RUN.sts) { |
| | | //104.提升机搬运中 ==> 109.出库完成 |
| | | wrkMast.setWrkSts(WrkStsType.COMPLETE_OUTBOUND.sts); |
| | | if (wrkMast.getStaNo() == 1031) { |
| | | wrkMast.setWrkSts(WrkStsType.OUTBOUND_DEVP_RUN_2.sts); |
| | | } else { |
| | | wrkMast.setWrkSts(WrkStsType.COMPLETE_OUTBOUND.sts); |
| | | } |
| | | wrkMast.setLiftNo(null);//释放提升机 |
| | | } else if (wrkMast.getWrkSts() == WrkStsType.MOVE_LIFT_RUN.sts) { |
| | | //306.提升机搬运中 ==> 307.提升机搬运完成 |
| | |
| | | //提升机至小车层 ==> 提升机至小车层完成 |
| | | wrkMast.setWrkSts(WrkStsType.MOVE_OUT_NO_LIFT_5.sts); |
| | | } |
| | | |
| | | wrkMast.setModiTime(new Date()); |
| | | if (wrkMastService.updateById(wrkMast)) { |
| | | liftThread.setSyncTaskNo(0); |