|
|
|
@ -3988,7 +3988,24 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
List<DistributionParcelListEntity> parcelListEntities = trunklineCarsLoadScanService.findParceListByCarsLoadScanIds(carsLoadScanIds); |
|
|
|
|
//把parcelListEntities转成orderPackageCode为键值的map
|
|
|
|
|
Map<String, DistributionParcelListEntity> parcelListMap = parcelListEntities.stream().collect(Collectors.toMap(DistributionParcelListEntity::getOrderPackageCode, e -> e)); |
|
|
|
|
List<DistributionStockArticleEntity> stockArticleEntities = trunklineCarsLoadScanService.findOrderListByCarsLoadScanIds(carsLoadScanIds); |
|
|
|
|
|
|
|
|
|
//把loadScanEntityList中所有元素的fromWarehouseId进行分组
|
|
|
|
|
Map<Long, List<TrunklineCarsLoadScanEntity>> fromWarehouseIdMap = loadScanEntityList.stream().filter(e -> Objects.nonNull(e.getFromWarehouseId())).collect(Collectors.groupingBy(TrunklineCarsLoadScanEntity::getFromWarehouseId)); |
|
|
|
|
|
|
|
|
|
List<DistributionStockArticleEntity> stockArticleEntities = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
fromWarehouseIdMap.keySet().forEach(fromWarehouseId -> { |
|
|
|
|
List<TrunklineCarsLoadScanEntity> list = fromWarehouseIdMap.get(fromWarehouseId); |
|
|
|
|
//把list中所有的orderCode放入一个Set集合
|
|
|
|
|
Set<String> orderCodeSet = list.stream().map(TrunklineCarsLoadScanEntity::getOrderCode).collect(Collectors.toSet()); |
|
|
|
|
FindParamterDTO findParamterDTO = new FindParamterDTO(); |
|
|
|
|
findParamterDTO.setOrderCodeSet(orderCodeSet); |
|
|
|
|
findParamterDTO.setWarehouseId(fromWarehouseId); |
|
|
|
|
List<DistributionStockArticleEntity> stockArticleEntityList = distributionStockArticleClient.findListByOrderCodesAndWarehouseId(findParamterDTO); |
|
|
|
|
stockArticleEntities.addAll(stockArticleEntityList); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
//把stockArticleEntities转成orderCode为键值的map
|
|
|
|
|
Map<String, DistributionStockArticleEntity> stockArticleMap = stockArticleEntities.stream().collect(Collectors.toMap(DistributionStockArticleEntity::getOrderCode, e -> e)); |
|
|
|
|
// List<WarehouseWaybillEntity> waybillEntities = trunklineCarsLoadScanService.findWaybillListByCarsLoadScanIds(carsLoadScanIds);
|
|
|
|
|