| | |
| | | continue; |
| | | } |
| | | |
| | | // 小车处于通道 |
| | | List<String> channel = slaveProperties.getChannel(); |
| | | for (String channelLocNo : channel) { |
| | | if (steProtocol.getRow().intValue() == Utils.getRow(channelLocNo) |
| | | && steProtocol.getBay().intValue() == Utils.getBay(channelLocNo) |
| | | && steProtocol.getLev().intValue() == Utils.getLev(channelLocNo)) { |
| | | Integer otherSte = existOtherSte(channelLocNo, wrkCharge.getSteNo()); |
| | | if (null != otherSte) { |
| | | log.warn("{}号小车充电阻断,原因:通道存在{}号穿梭车!", wrkCharge.getSteNo(), otherSte); |
| | | } else { |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | SteCommand steCommand = new SteCommand(); |
| | | steCommand.setSteNo(wrkCharge.getSteNo()); // 穿梭车编号 |
| | | steCommand.setTaskNo(wrkCharge.getWrkNo()); // 工作号 |
| | | steCommand.setTaskMode(SteTaskModeType.GO_ORIGIN); // 去右端 |
| | | |
| | | steCommand.setRow(Utils.getGroupRow(steProtocol.getRow().intValue(), false).shortValue()); |
| | | steCommand.setBay(steProtocol.getBay()); |
| | | steCommand.setLev(steProtocol.getLev()); |
| | | if (!MessageQueue.offer(SlaveType.Ste, wrkCharge.getSteNo(), new Task(2, steCommand))) { |
| | | log.error("穿梭车命令下发失败,穿梭车号={},任务数据={}", wrkCharge.getSteNo(), JSON.toJSON(steCommand)); |
| | | } else { |
| | | // 修改工作档状态 21.准备充电 ===> 25.小车走行 |
| | | wrkCharge.setWrkSts(25L); |
| | | Date now = new Date(); |
| | | wrkCharge.setModiTime(now); |
| | | if (!wrkChargeService.updateById(wrkCharge)) { |
| | | log.error("修改充电任务状态 21.准备充电 ===> 25.小车走行 失败!!,工作号={}", wrkCharge.getWrkNo()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 处于充电库位组 |
| | | if (steProtocol.getRow().intValue() == Utils.getRow(chargeLocNo) |
| | | && steProtocol.getBay().intValue() == Utils.getBay(chargeLocNo) |