|
|
@ -1322,6 +1322,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public DistributionStockupOrderInfoVO selectOrderInfoSelf(StockupDTO stockupDTO) { |
|
|
|
public DistributionStockupOrderInfoVO selectOrderInfoSelf(StockupDTO stockupDTO) { |
|
|
|
|
|
|
|
Long allocationId = stockupDTO.getAllocationId(); |
|
|
|
DistributionStockArticleEntity byId = distributionStockArticleService.getById(stockupDTO.getStockArticleId()); |
|
|
|
DistributionStockArticleEntity byId = distributionStockArticleService.getById(stockupDTO.getStockArticleId()); |
|
|
|
if (stockupDTO.getStatus().equals(1)) { |
|
|
|
if (stockupDTO.getStatus().equals(1)) { |
|
|
|
//已备货
|
|
|
|
//已备货
|
|
|
@ -1330,7 +1331,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
DistributionStockupSelfVO distributionStockupSelfVO = new DistributionStockupSelfVO(); |
|
|
|
DistributionStockupSelfVO distributionStockupSelfVO = new DistributionStockupSelfVO(); |
|
|
|
AtomicReference<Integer> j = new AtomicReference<>(0); |
|
|
|
AtomicReference<Integer> j = new AtomicReference<>(0); |
|
|
|
AtomicReference<Integer> y = new AtomicReference<>(0); |
|
|
|
AtomicReference<Integer> y = new AtomicReference<>(0); |
|
|
|
if (ObjectUtils.isNotNull(stockupDTO.getAllocationId())) { |
|
|
|
if (ObjectUtils.isNotNull(allocationId)) { |
|
|
|
distributionStockupSelf.forEach(i -> { |
|
|
|
distributionStockupSelf.forEach(i -> { |
|
|
|
if (ObjectUtils.isNotNull(i.getLwugId())) { |
|
|
|
if (ObjectUtils.isNotNull(i.getLwugId())) { |
|
|
|
j.updateAndGet(v -> v + i.getPlanNum()); |
|
|
|
j.updateAndGet(v -> v + i.getPlanNum()); |
|
|
@ -1387,10 +1388,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
List<PackageStockupVO> list = distributionParcelListService.selectOrderInfoSelfAllocationList(stockupDTO); |
|
|
|
List<PackageStockupVO> list = distributionParcelListService.selectOrderInfoSelfAllocationList(stockupDTO); |
|
|
|
Iterator<PackageStockupVO> iterator = list.iterator(); |
|
|
|
Iterator<PackageStockupVO> iterator = list.iterator(); |
|
|
|
List<PackageStockupVO> listPack = new ArrayList<>(); |
|
|
|
List<PackageStockupVO> listPack = new ArrayList<>(); |
|
|
|
if (ObjectUtils.isNotNull(stockupDTO.getAllocationId())) { |
|
|
|
if (ObjectUtils.isNotNull(allocationId)) { |
|
|
|
while (iterator.hasNext()) { |
|
|
|
while (iterator.hasNext()) { |
|
|
|
PackageStockupVO next = iterator.next(); |
|
|
|
PackageStockupVO next = iterator.next(); |
|
|
|
if (stockupDTO.getAllocationId().equals(next.getAllocationId())) { |
|
|
|
if (allocationId.equals(next.getAllocationId())) { |
|
|
|
next.setIsScanStr("已备货"); |
|
|
|
next.setIsScanStr("已备货"); |
|
|
|
next.setIsScan(2); |
|
|
|
next.setIsScan(2); |
|
|
|
listPack.add(next); |
|
|
|
listPack.add(next); |
|
|
@ -1425,7 +1426,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
DistributionStockupSelfVO distributionStockupSelfVO = new DistributionStockupSelfVO(); |
|
|
|
DistributionStockupSelfVO distributionStockupSelfVO = new DistributionStockupSelfVO(); |
|
|
|
if (ObjectUtils.isNotNull(stockupDTO.getAllocationId())) { |
|
|
|
if (ObjectUtils.isNotNull(allocationId)) { |
|
|
|
//查询订单数量 有库位
|
|
|
|
//查询订单数量 有库位
|
|
|
|
List<DistributionStockupSelfVO> distributionStockupSelfVOS = distrilbutionBillStockService.selectDistrilbutionBillPackSelf(stockupDTO); |
|
|
|
List<DistributionStockupSelfVO> distributionStockupSelfVOS = distrilbutionBillStockService.selectDistrilbutionBillPackSelf(stockupDTO); |
|
|
|
List<DistributionStockupSelfVO> collect = distributionStockupSelfVOS.stream().filter(i -> ObjectUtils.isNotNull(i.getWarehouseArea())).collect(Collectors.toList()); |
|
|
|
List<DistributionStockupSelfVO> collect = distributionStockupSelfVOS.stream().filter(i -> ObjectUtils.isNotNull(i.getWarehouseArea())).collect(Collectors.toList()); |
|
|
@ -1504,10 +1505,9 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
List<PackageStockupVO> list = distributionParcelListService.selectOrderInfoSelfList(stockupDTO); |
|
|
|
List<PackageStockupVO> list = distributionParcelListService.selectOrderInfoSelfList(stockupDTO); |
|
|
|
Iterator<PackageStockupVO> iterator = list.iterator(); |
|
|
|
Iterator<PackageStockupVO> iterator = list.iterator(); |
|
|
|
AtomicReference<Integer> j = new AtomicReference<>(0); |
|
|
|
AtomicReference<Integer> j = new AtomicReference<>(0); |
|
|
|
if (Objects.isNull(stockupDTO.getAllocationId())) { |
|
|
|
if (Objects.isNull(allocationId)) { |
|
|
|
|
|
|
|
|
|
|
|
while (iterator.hasNext()) { |
|
|
|
while (iterator.hasNext()) { |
|
|
|
j.updateAndGet(v -> v + 1); |
|
|
|
|
|
|
|
PackageStockupVO next = iterator.next(); |
|
|
|
PackageStockupVO next = iterator.next(); |
|
|
|
if (ObjectUtils.isNotNull(next.getAllocationId())) { |
|
|
|
if (ObjectUtils.isNotNull(next.getAllocationId())) { |
|
|
|
iterator.remove(); |
|
|
|
iterator.remove(); |
|
|
@ -1520,10 +1520,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
next.setIsScanStr("未备货"); |
|
|
|
next.setIsScanStr("未备货"); |
|
|
|
next.setIsScan(1); |
|
|
|
next.setIsScan(1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
j.updateAndGet(v -> v + 1); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
while (iterator.hasNext()) { |
|
|
|
while (iterator.hasNext()) { |
|
|
|
j.updateAndGet(v -> v + 1); |
|
|
|
|
|
|
|
PackageStockupVO next = iterator.next(); |
|
|
|
PackageStockupVO next = iterator.next(); |
|
|
|
if (ObjectUtils.isNull(next.getPositionCode())) { |
|
|
|
if (ObjectUtils.isNull(next.getPositionCode())) { |
|
|
|
iterator.remove(); |
|
|
|
iterator.remove(); |
|
|
@ -1536,6 +1537,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
next.setIsScanStr("未备货"); |
|
|
|
next.setIsScanStr("未备货"); |
|
|
|
next.setIsScan(1); |
|
|
|
next.setIsScan(1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
j.updateAndGet(v -> v + 1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
distributionStockupSelfVO.setPlanNum(j.get()); |
|
|
|
distributionStockupSelfVO.setPlanNum(j.get()); |
|
|
|