Browse Source

fix: 增加品牌的非空判断

visual
pref_mail@163.com 3 months ago
parent
commit
0c417cebec
  1. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

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

@ -477,7 +477,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String warehouseAddress = ""; String warehouseAddress = "";
if (CollUtil.isNotEmpty(brands)) { if (CollUtil.isNotEmpty(brands)) {
// 按品牌分组 // 按品牌分组
Map<String, List<LoadScanBrandDTO>> brandMap = brands.stream().collect(Collectors.groupingBy(LoadScanBrandDTO::getBrand)); Map<String, List<LoadScanBrandDTO>> brandMap = brands.stream().filter(b -> StringUtil.isNotBlank(b.getBrand())).collect(Collectors.groupingBy(LoadScanBrandDTO::getBrand));
for (Map.Entry<String, List<LoadScanBrandDTO>> entry : brandMap.entrySet()) { for (Map.Entry<String, List<LoadScanBrandDTO>> entry : brandMap.entrySet()) {
List<LoadScanBrandDTO> value = entry.getValue(); List<LoadScanBrandDTO> value = entry.getValue();
LoadScanBrandDTO brand = value.get(0); LoadScanBrandDTO brand = value.get(0);

Loading…
Cancel
Save