| | |
| | | |
| | | InTaskMsgDto inTaskMsgDto = new InTaskMsgDto(); |
| | | |
| | | int sRow = deviceBind.getStartRow(); |
| | | int eRow = deviceBind.getEndRow(); |
| | | int deviceQty = deviceBind.getDeviceQty(); |
| | | |
| | | |
| | | // ===============>>>> 开始执行 |
| | | curRow = deviceBind.getCurrentRow(); |
| | | |
| | | //此程序用于优化堆垛机异常时的运行时间 |
| | | for (int i = times; i <= deviceQty * 2; i++) { |
| | | int[] locNecessaryParameters = LocUtils.LocNecessaryParameters(deviceBind, curRow, deviceQty); |
| | | curRow = locNecessaryParameters[1]; |
| | | channel = locNecessaryParameters[2]; |
| | | rowCount = locNecessaryParameters[0]; |
| | | nearRow = locNecessaryParameters[3]; |
| | | break; |
| | | } |
| | | //获取排 |
| | | int[] locNecessaryParameters = LocUtils.LocNecessaryParameters(deviceBind, curRow, deviceQty); |
| | | curRow = locNecessaryParameters[1]; |
| | | channel = locNecessaryParameters[2]; |
| | | rowCount = locNecessaryParameters[0]; |
| | | nearRow = locNecessaryParameters[3]; |
| | | |
| | | |
| | | if (nearRow == 0) { |
| | | throw new CoolException("无可用堆垛机"); |
| | | } |
| | |
| | | .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type) |
| | | .eq(Loc::getAreaId, area) |
| | | ); |
| | | if (null != orgMoveLoc){ |
| | | if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | if (null != orgMoveLoc){ |
| | | if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) { |
| | | break; |
| | | } |
| | | } |
| | | loc = locMast2; |
| | | break; |
| | | } |
| | |
| | | .in(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_D.type, LocStsType.LOC_STS_TYPE_F.type) |
| | | .eq(Loc::getAreaId, area) |
| | | ); |
| | | |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | if (null != orgMoveLoc){ |
| | | if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) { |
| | | break; |
| | | } |
| | | } |
| | | loc = locMast1; |
| | | break; |
| | | } else { |
| | |
| | | .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type) |
| | | .eq(Loc::getAreaId, area) |
| | | ); |
| | | if (null != orgMoveLoc){ |
| | | if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | if (null != orgMoveLoc){ |
| | | if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) { |
| | | break; |
| | | } |
| | | } |
| | | loc = locMast2; |
| | | break; |
| | | } |
| | |
| | | .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type) |
| | | .eq(Loc::getAreaId, area) |
| | | ); |
| | | if (null != orgMoveLoc){ |
| | | if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | if (null != orgMoveLoc){ |
| | | if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) { |
| | | break; |
| | | } |
| | | } |
| | | loc = locMast2; |
| | | break; |
| | | } else { |
| | |
| | | .in(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_D.type, LocStsType.LOC_STS_TYPE_D.type) |
| | | .eq(Loc::getAreaId, area) |
| | | ); |
| | | if (null != orgMoveLoc){ |
| | | if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | if (null != orgMoveLoc){ |
| | | if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) { |
| | | break; |
| | | } |
| | | } |
| | | loc = locMast1; |
| | | break; |
| | | } |