fix: 修复收费失败错误 'element cannot be mapped to a null key' - 根本原因

- 修复 PaymentRecStaticServiceImpl.java 第 49、52、55、58 行

- 添加对 ChargeItemDefInfo::getTypeCode 和 ChargeItemDefInfo::getYbType 的 null 过滤

- 修复 IChargeBillServiceImpl.java 第 657 行 Invoice::getReconciliationId
This commit is contained in:
2026-04-03 08:32:04 +08:00
parent 0a5f26e9c0
commit 11244aa48f
2 changed files with 44 additions and 595 deletions

View File

@@ -46,16 +46,24 @@ public class PaymentRecStaticServiceImpl extends ServiceImpl<PaymentRecStaticMap
Map<String, List<ChargeItemDefInfo>> collect;
List<PaymentRecStatic> paymentRecStatics = new ArrayList<>();
if (paymentStatisticalMethod == PaymentStatisticalMethod.FIN_TYPE_CODE) {
collect = chargeItemDefInfoList.stream().collect(Collectors.groupingBy(ChargeItemDefInfo::getTypeCode));
collect = chargeItemDefInfoList.stream()
.filter(info -> info.getTypeCode() != null)
.collect(Collectors.groupingBy(ChargeItemDefInfo::getTypeCode));
getPaymentRecStaticList(paymentId, paymentType, paymentStatisticalMethod, collect, paymentRecStatics);
} else if (paymentStatisticalMethod == PaymentStatisticalMethod.MED_CHRGITM_TYPE) {
collect = chargeItemDefInfoList.stream().collect(Collectors.groupingBy(ChargeItemDefInfo::getYbType));
collect = chargeItemDefInfoList.stream()
.filter(info -> info.getYbType() != null)
.collect(Collectors.groupingBy(ChargeItemDefInfo::getYbType));
getPaymentRecStaticList(paymentId, paymentType, paymentStatisticalMethod, collect, paymentRecStatics);
} else {
collect = chargeItemDefInfoList.stream().collect(Collectors.groupingBy(ChargeItemDefInfo::getTypeCode));
collect = chargeItemDefInfoList.stream()
.filter(info -> info.getTypeCode() != null)
.collect(Collectors.groupingBy(ChargeItemDefInfo::getTypeCode));
getPaymentRecStaticList(paymentId, paymentType, PaymentStatisticalMethod.FIN_TYPE_CODE, collect,
paymentRecStatics);
collect = chargeItemDefInfoList.stream().collect(Collectors.groupingBy(ChargeItemDefInfo::getYbType));
collect = chargeItemDefInfoList.stream()
.filter(info -> info.getYbType() != null)
.collect(Collectors.groupingBy(ChargeItemDefInfo::getYbType));
getPaymentRecStaticList(paymentId, paymentType, PaymentStatisticalMethod.MED_CHRGITM_TYPE, collect,
paymentRecStatics);
}