| | |
| | | if (steNo != null) { |
| | | // 小车行走到堆垛机待搬移点 |
| | | if (wrkMast.getWrkSts() == 2L && wrkMast.getSteNo() == null) { |
| | | this.letCarBeReady(wrkMast, steNo); |
| | | this.letCarBeReady(wrkMast, steNo, wrkMast.getLocNo()); |
| | | } |
| | | // 小车搬走 |
| | | if (wrkMast.getWrkSts() == 3L) { |
| | |
| | | if (steNo != null) { |
| | | // 小车行走到堆垛机待搬移点 |
| | | if (wrkMast.getWrkSts() == 2L && wrkMast.getSteNo() == null) { |
| | | this.letCarBeReady(wrkMast, steNo); |
| | | this.letCarBeReady(wrkMast, steNo, wrkMast.getLocNo()); |
| | | } |
| | | // 堆垛机将货放至小车上 3.小车待搬(小车不用搬运,已经在当前组库位) / 6.小车待入 ===>> 7.吊车入库中 |
| | | if (wrkMast.getWrkSts() == 3L || wrkMast.getWrkSts() == 6L) { |
| | |
| | | SteThread steThread = queryIdleCar(wrkMast); |
| | | if (steThread != null) { |
| | | // 让小车等待搬运待续 |
| | | this.letCarBeReady(wrkMast, steThread.getSlave().getId()); |
| | | this.letCarBeReady(wrkMast, steThread.getSlave().getId(), wrkMast.getLocNo()); |
| | | } |
| | | } |
| | | // 堆垛机搬运小车 |
| | |
| | | // 不是最外层库位,需要使用穿梭车搬运后,再堆垛机出库 |
| | | } else { |
| | | // 当前组库位是否有穿梭车 |
| | | Integer steNo = this.hasCarOfIdle(wrkMast.getLocNo()); |
| | | Integer steNo = this.hasCarOfIdle(wrkMast.getSourceLocNo()); |
| | | // 有小车 |
| | | if (steNo != null) { |
| | | if (wrkMast.getWrkSts() == 11L && wrkMast.getSteNo() == null) { |
| | |
| | | SteCommand steCommand = new SteCommand(); |
| | | steCommand.setSteNo(steNo); // 穿梭车编号 |
| | | steCommand.setTaskNo(wrkMast.getWrkNo()); // 工作号 |
| | | steCommand.setTaskMode(SteTaskModeType.TO_B); // 任务模式: 去近点 等待堆垛机叉取 |
| | | steCommand.setTaskMode(SteTaskModeType.findOutByLoc(wrkMast.getSourceLocNo())); // 任务模式: 去近点 等待堆垛机叉取 |
| | | |
| | | SteABType ab = Utils.selectAB(steProtocol.getRow().intValue()); |
| | | |
| | | |
| | | // todo:luxiaotao |
| | | if (!MessageQueue.offer(SlaveType.Ste, steNo, new Task(2, steCommand))) { |
| | | log.error("穿梭车命令下发失败,穿梭车号={},任务数据={}", steNo, JSON.toJSON(steCommand)); |
| | | } else { |
| | |
| | | SteThread steThread = queryIdleCar(wrkMast); |
| | | if (steThread != null) { |
| | | // 让小车等待搬运待续 |
| | | this.letCarBeReady(wrkMast, steThread.getSlave().getId()); |
| | | this.letCarBeReady(wrkMast, steThread.getSlave().getId(), wrkMast.getSourceLocNo()); |
| | | } |
| | | } |
| | | // 堆垛机搬运小车 |
| | |
| | | * 让小车从 远点 ====>> 移动到近点 |
| | | * 等待堆垛机搬运 |
| | | */ |
| | | public void letCarBeReady(WrkMast wrkMast, Integer steNo) { |
| | | public void letCarBeReady(WrkMast wrkMast, Integer steNo, String locNo) { |
| | | // 获取穿梭车信息 |
| | | SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, steNo); |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | |
| | | SteCommand steCommand = new SteCommand(); |
| | | steCommand.setSteNo(steNo); // 穿梭车编号 |
| | | steCommand.setTaskNo(wrkMast.getWrkNo()); // 工作号 |
| | | steCommand.setTaskMode(SteTaskModeType.TO_B); // 任务模式: 去近点 等待堆垛机叉取 |
| | | steCommand.setTaskMode(SteTaskModeType.findOriginByLoc(locNo)); // 任务模式: 去近点 等待堆垛机叉取 |
| | | |
| | | steCommand.setRow(Utils.getGroupRow(steProtocol.getRow().intValue()).shortValue()); |
| | | steCommand.setBay(steProtocol.getBay()); |
| | |
| | | SteCommand steCommand = new SteCommand(); |
| | | steCommand.setSteNo(steNo); // 穿梭车编号 |
| | | steCommand.setTaskNo(wrkMast.getWrkNo()); // 工作号 |
| | | steCommand.setTaskMode(SteTaskModeType.TO_B); // 任务模式: 去近点 等待堆垛机叉取 |
| | | // todo:luxiaotao |
| | | steCommand.setTaskMode(SteTaskModeType.findInByLoc(wrkMast.getLocNo())); // 任务模式: 搬入库 |
| | | if (!MessageQueue.offer(SlaveType.Ste, steNo, new Task(2, steCommand))) { |
| | | log.error("穿梭车命令下发失败,穿梭车号={},任务数据={}", steNo, JSON.toJSON(steCommand)); |
| | | } else { |
| | |
| | | SteCommand steCommand = new SteCommand(); |
| | | steCommand.setSteNo(steNo); // 穿梭车编号 |
| | | steCommand.setTaskNo(wrkMast.getWrkNo()); // 工作号 |
| | | steCommand.setTaskMode(SteTaskModeType.TO_B); // 任务模式: 去近点 等待堆垛机叉取 |
| | | // todo:luxiaotao |
| | | steCommand.setTaskMode(SteTaskModeType.findOutByLoc(wrkMast.getSourceLocNo())); // 任务模式: 搬出库 |
| | | if (!MessageQueue.offer(SlaveType.Ste, steNo, new Task(2, steCommand))) { |
| | | log.error("穿梭车命令下发失败,穿梭车号={},任务数据={}", steNo, JSON.toJSON(steCommand)); |
| | | } else { |