Browse Source

1.干线bug修复

dist.1.3.0
zhenghaoyu 6 months ago
parent
commit
1b03661b32
  1. 19
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

19
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -3988,7 +3988,24 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
List<DistributionParcelListEntity> parcelListEntities = trunklineCarsLoadScanService.findParceListByCarsLoadScanIds(carsLoadScanIds); List<DistributionParcelListEntity> parcelListEntities = trunklineCarsLoadScanService.findParceListByCarsLoadScanIds(carsLoadScanIds);
//把parcelListEntities转成orderPackageCode为键值的map //把parcelListEntities转成orderPackageCode为键值的map
Map<String, DistributionParcelListEntity> parcelListMap = parcelListEntities.stream().collect(Collectors.toMap(DistributionParcelListEntity::getOrderPackageCode, e -> e)); 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 //把stockArticleEntities转成orderCode为键值的map
Map<String, DistributionStockArticleEntity> stockArticleMap = stockArticleEntities.stream().collect(Collectors.toMap(DistributionStockArticleEntity::getOrderCode, e -> e)); Map<String, DistributionStockArticleEntity> stockArticleMap = stockArticleEntities.stream().collect(Collectors.toMap(DistributionStockArticleEntity::getOrderCode, e -> e));
// List<WarehouseWaybillEntity> waybillEntities = trunklineCarsLoadScanService.findWaybillListByCarsLoadScanIds(carsLoadScanIds); // List<WarehouseWaybillEntity> waybillEntities = trunklineCarsLoadScanService.findWaybillListByCarsLoadScanIds(carsLoadScanIds);

Loading…
Cancel
Save