|  |  |  | 
|---|
|  |  |  | for(StockOutParam.LocDetl one : param.getLocDetls()){ | 
|---|
|  |  |  | locs.add(one.getLocNo()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | boolean sign = false; | 
|---|
|  |  |  | for (StockOutParam.LocDetl locDetl : param.getLocDetls()) { | 
|---|
|  |  |  | //获取同一库位组的外侧库位号 | 
|---|
|  |  |  | List<String> groupOuterSingleLoc = Utils.getGroupOuterSingleLoc(locDetl.getLocNo()); | 
|---|
|  |  |  | 
|---|
|  |  |  | groupOuterSingleLoc = Utils.getGroupOuterSingleLocLowFrequency(locDetl.getLocNo()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | for (String locNo : groupOuterSingleLoc) { | 
|---|
|  |  |  | //每个库位的库位明细 | 
|---|
|  |  |  | if(locs.contains(locNo)) continue; | 
|---|
|  |  |  | for (LocDetl detl : locDetlService.selectByLocNo(locNo)) { | 
|---|
|  |  |  | if (!detl.getMatnr().equals(locDetl.getMatnr())) { | 
|---|
|  |  |  | //不是相同物料 | 
|---|
|  |  |  | if (Utils.getBay(locDetl.getLocNo())>=21){ | 
|---|
|  |  |  | locDetls.add(new StockOutParam.LocDetl(detl.getLocNo(), detl.getMatnr(), detl.getBatch(), detl.getAnfme())); | 
|---|
|  |  |  | if (!sign){ | 
|---|
|  |  |  | for (String locNo : groupOuterSingleLoc) { | 
|---|
|  |  |  | //每个库位的库位明细 | 
|---|
|  |  |  | if(locs.contains(locNo)) continue; | 
|---|
|  |  |  | for (LocDetl detl : locDetlService.selectByLocNo(locNo)) { | 
|---|
|  |  |  | if (!detl.getMatnr().equals(locDetl.getMatnr())) { | 
|---|
|  |  |  | //不是相同物料 | 
|---|
|  |  |  | if (Utils.getBay(locDetl.getLocNo())>=21){ | 
|---|
|  |  |  | locDetls.add(new StockOutParam.LocDetl(detl.getLocNo(), detl.getMatnr(), detl.getBatch(), detl.getAnfme())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | locDetls.add(new StockOutParam.LocDetl(detl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch(), detl.getAnfme())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | locDetls.add(new StockOutParam.LocDetl(detl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch(), detl.getAnfme())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | sign = true; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | locDetls.add(locDetl); | 
|---|
|  |  |  | } | 
|---|