diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/paymentmanage/appservice/impl/IChargeBillServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/paymentmanage/appservice/impl/IChargeBillServiceImpl.java index cac8a2bb..64311b46 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/paymentmanage/appservice/impl/IChargeBillServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/paymentmanage/appservice/impl/IChargeBillServiceImpl.java @@ -933,7 +933,9 @@ public class IChargeBillServiceImpl implements IChargeBillService { // } // 根据省市医保分组 Map> paymentDetailsMapByContract = PaymentRecDetailAccountResultList - .stream().collect(Collectors.groupingBy(PaymentRecDetailAccountResult::getContractNo)); + .stream() + .filter(dto -> dto.getContractNo() != null && !dto.getContractNo().isEmpty()) + .collect(Collectors.groupingBy(PaymentRecDetailAccountResult::getContractNo)); // 查询所有的收费项 List chargeItemIdStrs = paymentReconciliationList.stream().map(PaymentReconciliation::getChargeItemIds) @@ -1408,7 +1410,9 @@ public class IChargeBillServiceImpl implements IChargeBillService { // 医保人次自费人次计算 List list = iEncounterService.getEncounterInfoByTime(startDate, endDate); Map> encounterAccountDtoMapByContract - = list.stream().collect(Collectors.groupingBy(EncounterAccountDto::getContractNo)); + = list.stream() + .filter(dto -> dto.getContractNo() != null && !dto.getContractNo().isEmpty()) + .collect(Collectors.groupingBy(EncounterAccountDto::getContractNo)); for (Map.Entry> stringListEntry : encounterAccountDtoMapByContract .entrySet()) { String key = stringListEntry.getKey(); @@ -1482,7 +1486,9 @@ public class IChargeBillServiceImpl implements IChargeBillService { // 根据省市医保分组 Map> paymentDetailsMapByContract = PaymentRecDetailAccountResultList - .stream().collect(Collectors.groupingBy(PaymentRecDetailAccountResult::getContractNo)); + .stream() + .filter(dto -> dto.getContractNo() != null && !dto.getContractNo().isEmpty()) + .collect(Collectors.groupingBy(PaymentRecDetailAccountResult::getContractNo)); BigDecimal cashSum = BigDecimal.ZERO;// 现金总数 = rmbCashSum + vxCashSum + aliCashSum + uniCashSum BigDecimal rmbCashSum = BigDecimal.ZERO;// 现金总数 @@ -1885,7 +1891,9 @@ public class IChargeBillServiceImpl implements IChargeBillService { // 医保人次自费人次计算 List list = iEncounterService.getEncounterInfoByTime(startDate, endDate); Map> encounterAccountDtoMapByContract - = list.stream().collect(Collectors.groupingBy(EncounterAccountDto::getContractNo)); + = list.stream() + .filter(dto -> dto.getContractNo() != null && !dto.getContractNo().isEmpty()) + .collect(Collectors.groupingBy(EncounterAccountDto::getContractNo)); for (Map.Entry> stringListEntry : encounterAccountDtoMapByContract .entrySet()) { String key = stringListEntry.getKey(); diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/paymentmanage/appservice/impl/PaymentRecServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/paymentmanage/appservice/impl/PaymentRecServiceImpl.java index 5d24d3d6..8ed7ea4a 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/paymentmanage/appservice/impl/PaymentRecServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/paymentmanage/appservice/impl/PaymentRecServiceImpl.java @@ -2331,7 +2331,9 @@ public class PaymentRecServiceImpl implements IPaymentRecService { = iChargeItemService.getChargeItemBaseInfoByIds(prePaymentDto.getChargeItemIds()); Map> chargeItemKVByContractNo - = chargeItemBaseInfoByIds.stream().collect(Collectors.groupingBy(ChargeItemBaseInfoDto::getContractNo)); + = chargeItemBaseInfoByIds.stream() + .filter(dto -> dto.getContractNo() != null && !dto.getContractNo().isEmpty()) + .collect(Collectors.groupingBy(ChargeItemBaseInfoDto::getContractNo)); List yb2303OutputSetInfos = new ArrayList<>(); Yb2303OutputSetInfo yb2303OutputSetInfo; @@ -2459,7 +2461,9 @@ public class PaymentRecServiceImpl implements IPaymentRecService { List chargeItemBaseInfoByIds = iChargeItemService.getChargeItemBaseInfoByIds(paymentDto.getChargeItemIds()); Map> chargeItemKVByContractNo - = chargeItemBaseInfoByIds.stream().collect(Collectors.groupingBy(ChargeItemBaseInfoDto::getContractNo)); + = chargeItemBaseInfoByIds.stream() + .filter(dto -> dto.getContractNo() != null && !dto.getContractNo().isEmpty()) + .collect(Collectors.groupingBy(ChargeItemBaseInfoDto::getContractNo)); List accountList = iAccountService.getAccountListByEncounter(paymentDto.getEncounterId()); if (accountList.isEmpty()) {