| | |
| | | |
| | | List<StockOutParam.LocDetl> stockOutParamLocDetlSort = Utils.getStockOutParamLocDetlSort(param.getLocDetls()); |
| | | boolean sign = true; |
| | | boolean isfull = false; // 是否够数量 |
| | | Double isOut = 0.0; |
| | | List<String> locNoWeighting = new ArrayList<>(); |
| | | for (StockOutParam.LocDetl locDetl : stockOutParamLocDetlSort) { |
| | | if (Cools.isEmpty(locNoWeighting)){ |
| | |
| | | for (String locNo : groupOuterSingleLoc) { |
| | | //每个库位的库位明细 |
| | | if(locs.contains(locNo)) continue; |
| | | LocMast mast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", locNo)); |
| | | if (mast.getLocSts().equals("P") || mast.getLocSts().equals("Q")){ |
| | | throw new CoolException("当前库位的浅库位状态为" + mast.getLocSts() + "暂不支持出库!"); |
| | | } |
| | | for (LocDetl detl : locDetlService.selectByLocNo(locNo)) { |
| | | if (!detl.getMatnr().equals(locDetl.getMatnr())) { |
| | | //不是相同物料 |
| | |
| | | } |
| | | continue; |
| | | } |
| | | locDetls.add(new StockOutParam.LocDetl(detl.getLocNo(), detl.getMatnr(), detl.getBatch(), detl.getAnfme())); |
| | | if (detl.getAnfme() >= locDetl.getCount()) { |
| | | locDetls.add(new StockOutParam.LocDetl(detl.getLocNo(), detl.getMatnr(), detl.getBatch(), locDetl.getCount())); |
| | | isOut = locDetl.getCount(); |
| | | isfull = true; |
| | | break; |
| | | } else { |
| | | locDetls.add(new StockOutParam.LocDetl(detl.getLocNo(), detl.getMatnr(), detl.getBatch(), detl.getAnfme())); |
| | | isOut = detl.getAnfme(); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | locDetls.add(locDetl); |
| | | if (!isfull) { |
| | | |
| | | locDetls.add(new StockOutParam.LocDetl(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch(), locDetl.getCount() - isOut)); |
| | | // locDetls.add(locDetl); |
| | | } |
| | | } |
| | | //出库时,如果当前库位组有相同的物料,则先出外侧物料 6.30日 注释 |
| | | //for (StockOutParam.LocDetl locDetl : param.getLocDetls()) { |
| | |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | //-----------------2023.5.31上架区域版本兼容代码----------------------- |
| | | //判断当前库位组是否均为同一种物料,如不是,则认定需要执行兼容代码 |
| | | //需要将待出库库位前侧库位(不包含最外侧高频库位)执行101全板出库 |