From 97f04d0b157d8309054105876b91084f2308eaeb Mon Sep 17 00:00:00 2001 From: chenqi Date: Sun, 18 Jan 2026 19:44:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(inpatient):=20=E4=BF=AE=E5=A4=8D=E5=B0=B1?= =?UTF-8?q?=E8=AF=8A=E4=BD=8D=E7=BD=AE=E6=9B=B4=E6=96=B0=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改就诊位置表更新方式,直接更新指定ID的记录 - 添加位置ID设置功能 - 使用updateById方法替代saveOrUpdate方法提高准确性 --- .../appservice/impl/PatientHomeAppServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inpatientmanage/appservice/impl/PatientHomeAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inpatientmanage/appservice/impl/PatientHomeAppServiceImpl.java index 045cc076..bcce9231 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inpatientmanage/appservice/impl/PatientHomeAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inpatientmanage/appservice/impl/PatientHomeAppServiceImpl.java @@ -265,16 +265,19 @@ public class PatientHomeAppServiceImpl implements IPatientHomeAppService { encounterService.saveOrUpdateEncounter(encounter); // 2.就诊位置表变更 - // 就诊位置ID变更 + // 直接更新指定ID的就诊位置记录 EncounterLocation encounterLocation = new EncounterLocation(); encounterLocation.setId(encounterLocationId) // 设置就诊ID .setEncounterId(encounterId) + // 设置位置ID + .setLocationId(locationId) // 设置状态枚举 .setStatusEnum(EncounterActivityStatus.COMPLETED.getValue()) // 设置物理枚举为 8:病床 .setFormEnum(LocationForm.BED.getValue()); - encounterLocationService.saveOrUpdateEncounterLocation(encounterLocation); + // 直接更新指定ID的记录 + encounterSuccess = encounterLocationService.updateById(encounterLocation); // 3.位置表 // 旧病床状态变更(空闲)