| | |
| | | // 库区锁定 |
| | | 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 |
| | | // plan first |
| | | // List<Integer> rows = Utils.getGroupLoc(locRule.getRowBeg()); |
| | | // List<LocMast> locMasts = locMastService.queryFreeLocMast1(rows, rows.size(), locTypeDto.getLocType1(), inoutEveryday |
| | | // , locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd()); |
| | | // if (!Cools.isEmpty(locMasts)) { |
| | | // Integer innermostRow = Utils.getInnermostRow(locMasts.get(0).getLocNo()); |
| | | // for (LocMast one : locMasts) { |
| | | // if (one.getRow1().equals(innermostRow)) { |
| | | // locMast = one; |
| | | // crnNo = locMast.getCrnNo(); |
| | | // wrapper = new EntityWrapper<StaDesc>() |
| | | // .eq("type_no", staDescId) |
| | | // .eq("stn_no", sourceStaNo) |
| | | // .eq("crn_no", crnNo); |
| | | // staDesc = staDescService.selectOne(wrapper); |
| | | // if (Cools.isEmpty(staDesc)) { |
| | | // log.error("入库路径不存在, staDescId={}, sourceStaNo={}, crnNo={}", staDescId, sourceStaNo, crnNo); |
| | | // throw new CoolException("入库路径不存在"); |
| | | // } |
| | | // // 检测目标站 |
| | | // staNo = basDevpService.selectById(staDesc.getCrnStn()); |
| | | // if (!staNo.getAutoing().equals("Y")) { |
| | | // throw new CoolException("目标站"+staDesc.getCrnStn()+"不可用"); |
| | | // } |
| | | // break; |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | // plan second |
| | | List<LocMast> locMasts = locMastService.queryFreeLocMast2(locTypeDto.getLocType1() |
| | | , locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd()); |
| | | if (!Cools.isEmpty(locMasts)) { |
| | | Integer innermostRow = Utils.getInnermostRow(locMasts.get(0).getLocNo()); |
| | | for (LocMast one : locMasts) { |
| | | if (one.getRow1().equals(innermostRow)) { |
| | | locMast = one; |
| | | break; |
| | | } |
| | | } |
| | | for (LocMast one : locMasts) { |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if (Cools.isEmpty(locMast)) { |
| | | int sign = curRow; |
| | | while (sign != 0) { |
| | | while (sign != 0 && Cools.isEmpty(locMast)) { |
| | | List<LocMast> locMasts = locMastService.queryFreeLocMastEnd(sign, locTypeDto.getLocType1()); |
| | | for (LocMast loc : locMasts) { |
| | | // 同库位组对应其钱库位是否为 O.空库位 |