| | |
| | | || Utils.getLev(wrkMast.getSourceLocNo()) != Utils.getLev(one.getLocNo()))){ |
| | | continue; |
| | | } |
| | | log.info(""); |
| | | } |
| | | |
| | | //出库库位不是最外层库位,判断浅库位组是否都为空,或存在库位移转任务 |
| | |
| | | if (steProtocol == null) { continue; } |
| | | if (steProtocol.isIdle()) { |
| | | |
| | | //小车只能绑定一笔作业中任务 |
| | | WrkMast wrkMast1 = wrkMastMapper.selectSteNoData(steNo); |
| | | if(wrkMast1 != null){ |
| | | continue; |
| | | } |
| | | |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | SteCommand steCommand = new SteCommand(); |
| | | steCommand.setSteNo(steNo); // 穿梭车编号 |
| | |
| | | steCommand.setRow(Utils.getGroupRow(steProtocol.getRow().intValue()).shortValue()); |
| | | steCommand.setBay(steProtocol.getBay()); |
| | | steCommand.setLev(steProtocol.getLev()); |
| | | steCommand.setMemo("11==>14小车搬出库任务,任务号"+wrkMast.getWrkNo()+""); |
| | | |
| | | if (!MessageQueue.offer(SlaveType.Ste, steNo, new Task(2, steCommand))) { |
| | | log.error("穿梭车命令下发失败,穿梭车号={},任务数据={}", steNo, JSON.toJSON(steCommand)); |
| | | } else { |
| | | log.info("穿梭车命令下发成功(11==>14小车搬出库任务),穿梭车号={},任务数据={}", steNo, JSON.toJSON(steCommand)); |
| | | // 修改工作档状态 11.生成出库ID => 14.小车搬出库 |
| | | Date now = new Date(); |
| | | wrkMast.setWrkSts(14L); |
| | |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (steProtocol == null) { return; } |
| | | if (steProtocol.isIdle()) { |
| | | |
| | | //小车只能绑定一笔作业中任务 |
| | | WrkMast wrkMast1 = wrkMastMapper.selectSteNoData(steNo); |
| | | if(wrkMast1 != null){ |
| | | return; |
| | | } |
| | | |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | SteCommand steCommand = new SteCommand(); |
| | |
| | | if (steProtocol == null) { return; } |
| | | if (steProtocol.isIdle()) { |
| | | |
| | | //小车只能绑定一笔作业中任务 |
| | | WrkMast wrkMast1 = wrkMastMapper.selectSteNoData(steNo); |
| | | if(wrkMast1 != null){ |
| | | return; |
| | | } |
| | | |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | SteCommand steCommand = new SteCommand(); |
| | | steCommand.setSteNo(steNo); // 穿梭车编号 |
| | |
| | | if (steProtocol == null) { return; } |
| | | if (steProtocol.isIdle()) { |
| | | |
| | | //小车只能绑定一笔作业中任务 |
| | | WrkMast wrkMast1 = wrkMastMapper.selectSteNoData(steNo); |
| | | if(wrkMast1 != null){ |
| | | return; |
| | | } |
| | | |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | SteCommand steCommand = new SteCommand(); |
| | | steCommand.setSteNo(steNo); // 穿梭车编号 |
| | |
| | | if (!MessageQueue.offer(SlaveType.Ste, steNo, new Task(2, steCommand))) { |
| | | log.error("穿梭车命令下发失败,穿梭车号={},任务数据={}", steNo, JSON.toJSON(steCommand)); |
| | | } else { |
| | | log.error("穿梭车命令下发成功让小车从 远点 ====>> 待机位,绑定穿梭车,IoType={}, 穿梭车号={},任务数据={}", wrkMast.getIoType(), steNo, JSON.toJSON(steCommand)); |
| | | // 修改工作档状态 绑定穿梭车 |
| | | wrkMast.setSteNo(steNo); |
| | | wrkMast.setModiTime(new Date()); |
| | |
| | | |
| | | if (!basSteService.updatePakMk(steNo, "Y")) { |
| | | log.error("修改穿梭车作业状态 失败!!,穿梭车={}", steNo); |
| | | return; |
| | | } |
| | | |
| | | //小车只能绑定一笔作业中任务 |
| | | WrkMast wrkMast1 = wrkMastMapper.selectSteNoData(steNo); |
| | | if(wrkMast1 != null){ |
| | | return; |
| | | } |
| | | |
| | |
| | | if (steProtocol == null) { return; } |
| | | if (steProtocol.isIdle()) { |
| | | |
| | | //小车只能绑定一笔作业中任务 |
| | | WrkMast wrkMast1 = wrkMastMapper.selectSteNoData(steNo); |
| | | if(wrkMast1 != null){ |
| | | return; |
| | | } |
| | | |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | SteCommand steCommand = new SteCommand(); |
| | | steCommand.setSteNo(steNo); // 穿梭车编号 |
| | |
| | | steCommand.setRow(Utils.getGroupRow(steProtocol.getRow().intValue()).shortValue()); |
| | | steCommand.setBay(steProtocol.getBay()); |
| | | steCommand.setLev(steProtocol.getLev()); |
| | | steCommand.setMemo("绑定小车号,让小车从 远点 ====>> 移动到近点"); |
| | | |
| | | if (!MessageQueue.offer(SlaveType.Ste, steNo, new Task(2, steCommand))) { |
| | | log.error("穿梭车命令下发失败,穿梭车号={},任务数据={}", steNo, JSON.toJSON(steCommand)); |
| | | } else { |
| | | log.info("穿梭车命令下发成功(让小车从远点==>>移动到近点),IoType={}, 穿梭车号={},任务数据={}", wrkMast.getIoType(), steNo, JSON.toJSON(steCommand)); |
| | | // 修改工作档状态 绑定穿梭车 |
| | | wrkMast.setSteNo(steNo); |
| | | wrkMast.setModiTime(new Date()); |
| | |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (steProtocol == null) { return; } |
| | | if (steProtocol.isIdle()) { |
| | | |
| | | //小车只能绑定一笔作业中任务 |
| | | WrkMast wrkMast1 = wrkMastMapper.selectSteNoData(steNo); |
| | | if(wrkMast1 != null){ |
| | | return; |
| | | } |
| | | |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | SteCommand steCommand = new SteCommand(); |
| | |
| | | steCommand.setSteNo(steNo); // 穿梭车编号 |
| | | steCommand.setTaskNo(wrkMast.getWrkNo()); // 工作号 |
| | | steCommand.setTaskMode(SteTaskModeType.findOutByLoc(wrkMast.getSourceLocNo())); // 任务模式: 搬出库 |
| | | steCommand.setMemo("出库 ===>> 迁入小车 完成"); |
| | | if (!MessageQueue.offer(SlaveType.Ste, steNo, new Task(2, steCommand))) { |
| | | log.error("穿梭车命令下发失败,穿梭车号={},任务数据={}", steNo, JSON.toJSON(steCommand)); |
| | | } else { |
| | | log.info("穿梭车命令下发成功,穿梭车号={},任务数据={}", steNo, JSON.toJSON(steCommand)); |
| | | // 13.迁入小车 ==> 14.小车搬出库 |
| | | wrkMast.setWrkSts(14L); |
| | | Date now = new Date(); |