fix: 结算单空指针异常
This commit is contained in:
+2
-1
@@ -2061,7 +2061,8 @@ public class FormalSettlementServiceImpl extends BaseServiceImpl<FormalSettlemen
|
||||
.orderByAsc(FormalSettlementDetailFee::getLineNo)).stream()
|
||||
.collect(Collectors.groupingBy(FormalSettlementDetailFee::getFormalSettlementDetailId, LinkedHashMap::new, Collectors.toList()));
|
||||
for (FormalSettlementDetail detail : details) {
|
||||
Waybill waybill = waybillMap.get(detail.getWaybillId());
|
||||
// waybillMap 为不可变空 Map(全部明细均无运单号时),get(null) 会抛 NPE,需先判空
|
||||
Waybill waybill = detail.getWaybillId() == null ? null : waybillMap.get(detail.getWaybillId());
|
||||
LinkedHashSet<String> goodsNames = new LinkedHashSet<>();
|
||||
LinkedHashSet<String> goodsTypes = new LinkedHashSet<>();
|
||||
if (waybill != null) {
|
||||
|
||||
Reference in New Issue
Block a user