|
|
|
@ -13570,11 +13570,15 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
allAdvanceDetailList.addAll(advanceDetailEntityList); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
Map<Long, TrunklineAdvanceEntity> advanceMap = new HashMap<>(); |
|
|
|
|
//把allAdvanceDetailList中所有advanceId放入一个Set集合
|
|
|
|
|
Set<Long> advanceIdSet = allAdvanceDetailList.stream().map(TrunklineAdvanceDetailEntity::getAdvanceId).collect(Collectors.toSet()); |
|
|
|
|
List<TrunklineAdvanceEntity> advanceEntities = advanceService.findListByIds(new ArrayList<>(advanceIdSet)); |
|
|
|
|
//把advanceEntities转化成id为key的Map
|
|
|
|
|
Map<Long, TrunklineAdvanceEntity> advanceMap = advanceEntities.stream().collect(Collectors.toMap(TrunklineAdvanceEntity::getId, Function.identity())); |
|
|
|
|
if(CollUtil.isNotEmpty(advanceIdSet)){ |
|
|
|
|
List<TrunklineAdvanceEntity> advanceEntities = advanceService.findListByIds(new ArrayList<>(advanceIdSet)); |
|
|
|
|
//把advanceEntities转化成id为key的Map
|
|
|
|
|
advanceMap = advanceEntities.stream().collect(Collectors.toMap(TrunklineAdvanceEntity::getId, Function.identity())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//把allAdvanceDetailList转化成orderPackageCode为key的Map
|
|
|
|
@ -13586,6 +13590,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
List<String> orderPackageCodeList = new ArrayList<>(); |
|
|
|
|
Set<String> orderPackageCodeSet = new HashSet<>(); |
|
|
|
|
|
|
|
|
|
Map<Long, TrunklineAdvanceEntity> finalAdvanceMap = advanceMap; |
|
|
|
|
carsLoadScanEntities.forEach(carsLoadScanEntity -> { |
|
|
|
|
String orderPackageCode = carsLoadScanEntity.getScanCode(); |
|
|
|
|
Date unloadTime = carsLoadScanEntity.getUnloadTime(); |
|
|
|
@ -13610,7 +13615,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
updateScanEntity.setOrderCode(trunklineAdvanceDetailEntity.getOrderCode()); |
|
|
|
|
updateScanEntity.setWaybillId(trunklineAdvanceDetailEntity.getWaybillId()); |
|
|
|
|
updateScanEntity.setWaybillNo(trunklineAdvanceDetailEntity.getWaybillNo()); |
|
|
|
|
TrunklineAdvanceEntity advanceEntity = advanceMap.get(advanceId); |
|
|
|
|
TrunklineAdvanceEntity advanceEntity = finalAdvanceMap.get(advanceId); |
|
|
|
|
if(!Objects.isNull(advanceEntity)){ |
|
|
|
|
updateScanEntity.setCustomerName(advanceEntity.getCustomerName()); |
|
|
|
|
updateScanEntity.setCustomerTelephone(advanceEntity.getCustomerPhone()); |
|
|
|
|