| | |
| | | if (locMast == null) { |
| | | |
| | | // 库区锁定 |
| | | LocRule locRule = locRuleService.find(Cools.isEmpty(matNos) ? null : matNos.get(0), null); |
| | | LocRule locRule = locRuleService.find(Cools.isEmpty(matNos) ? null : matNos.get(0), null, start, end); |
| | | if (!Cools.isEmpty(locRule)) { |
| | | List<Integer> rows = Utils.getGroupLoc(locRule.getRowBeg()); |
| | | List<LocMast> locMasts = locMastService.queryFreeLocMast1(rows, rows.size(), locTypeDto.getLocType1(), inoutEveryday |
| | |
| | | |
| | | // 2.无库位时,无视区域锁定,重新查找库位 |
| | | if (Cools.isEmpty(locMast)){ |
| | | List<LocMast> locMasts = locMastService.queryFreeLocMastEnd(curRow); |
| | | List<LocMast> locMasts = locMastService.queryFreeLocMastEnd(curRow, locTypeDto.getLocType1()); |
| | | int sign=curRow; |
| | | while (true){ |
| | | if (locMasts.size()==0){ |
| | | sign = getCurRow(sign); |
| | | if (sign != 0){ |
| | | locMasts = locMastService.queryFreeLocMastEnd(sign); |
| | | locMasts = locMastService.queryFreeLocMastEnd(sign, locTypeDto.getLocType1()); |
| | | }else { |
| | | break; |
| | | } |
| | |
| | | } |
| | | } |
| | | for (LocMast locMast1 : locMasts){ |
| | | List<LocMast> locMasts1 = locMastService.queryFreeLocMastEnd0(locMast1.getBay1(), locMast1.getLev1(),locMast1.getRow1()); |
| | | List<LocMast> locMasts1 = locMastService.queryFreeLocMastEnd0(locMast1.getBay1(), locMast1.getLev1(),locMast1.getRow1(), locTypeDto.getLocType1()); |
| | | Integer innermostRow = Utils.getInnermostRow(locMasts1.get(0).getLocNo()); |
| | | for (LocMast locMast2:locMasts1){ |
| | | if (locMast2.getLocSts().equals("O")){ |
| | | if (locMast2.getRow1().equals(innermostRow)) { |
| | | locMast = locMast2; |
| | | break; |
| | | } |
| | | locMast = locMast2; |
| | | break; |
| | | }else if (!locMast2.getLocSts().equals("F")){ |
| | | break; |
| | | } |