From 8d02a530c68fc8b575d446985bfb79ee81bdfc6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=8E=E4=BD=97?= Date: Wed, 17 Jun 2026 14:34:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(#790):=20=E8=AF=B7=E4=BF=AE=E5=A4=8D=20Bug?= =?UTF-8?q?=20#790=EF=BC=9A=E3=80=90=E4=BD=8F=E9=99=A2=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E4=BD=8F=E9=99=A2=E5=8C=BB=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99?= =?UTF-8?q?=E3=80=91=E7=94=A8=E7=AE=A1=E7=90=86=E5=91=98=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E6=89=93=E5=BC=80=E4=BD=8F=E9=99=A2=E5=8C=BB=E7=94=9F=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=AB=99=E4=BC=9A=E5=87=BA=E7=8E=B0=E6=8A=A5=E9=94=99?= =?UTF-8?q?=EF=BC=9ADuplicate=20key=206005=20(attempted=20merging=20values?= =?UTF-8?q?=20EncounterAccountDto(encounterId=3D6005,=20advanceAmount=3D0.?= =?UTF-8?q?000000,=20totalAmount=3D0,=20balanceAmount=3D0.000000,=20insuty?= =?UTF-8?q?pe=3Dnull)=20and=20EncounterAccountDto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../appservice/impl/AdviceManageAppServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/AdviceManageAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/AdviceManageAppServiceImpl.java index 2ec6982c2..cb81e7677 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/AdviceManageAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/AdviceManageAppServiceImpl.java @@ -133,9 +133,9 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService { List list = adviceManageAppMapper.getAmount(AccountType.PERSONAL_CASH_ACCOUNT.getCode(), ChargeItemStatus.BILLABLE.getValue(), ChargeItemStatus.BILLED.getValue(), ChargeItemStatus.REFUNDED.getValue(), wrapper); - // 转换为Map,key = encounter_id + // 转换为Map,key = encounter_id(同一encounterId存在多条账户记录时取第一条) Map dtoMap - = list.stream().collect(Collectors.toMap(EncounterAccountDto::getEncounterId, e -> e)); + = list.stream().collect(Collectors.toMap(EncounterAccountDto::getEncounterId, e -> e, (existing, replacement) -> existing)); regPatientMainInfo.getRecords().forEach(e -> { // 设置费用详情 if (dtoMap.containsKey(e.getEncounterId())) {