fix(inpatient): 修复就诊位置更新逻辑
- 修改就诊位置表更新方式,直接更新指定ID的记录 - 添加位置ID设置功能 - 使用updateById方法替代saveOrUpdate方法提高准确性
This commit is contained in:
@@ -265,16 +265,19 @@ public class PatientHomeAppServiceImpl implements IPatientHomeAppService {
|
|||||||
encounterService.saveOrUpdateEncounter(encounter);
|
encounterService.saveOrUpdateEncounter(encounter);
|
||||||
|
|
||||||
// 2.就诊位置表变更
|
// 2.就诊位置表变更
|
||||||
// 就诊位置ID变更
|
// 直接更新指定ID的就诊位置记录
|
||||||
EncounterLocation encounterLocation = new EncounterLocation();
|
EncounterLocation encounterLocation = new EncounterLocation();
|
||||||
encounterLocation.setId(encounterLocationId)
|
encounterLocation.setId(encounterLocationId)
|
||||||
// 设置就诊ID
|
// 设置就诊ID
|
||||||
.setEncounterId(encounterId)
|
.setEncounterId(encounterId)
|
||||||
|
// 设置位置ID
|
||||||
|
.setLocationId(locationId)
|
||||||
// 设置状态枚举
|
// 设置状态枚举
|
||||||
.setStatusEnum(EncounterActivityStatus.COMPLETED.getValue())
|
.setStatusEnum(EncounterActivityStatus.COMPLETED.getValue())
|
||||||
// 设置物理枚举为 8:病床
|
// 设置物理枚举为 8:病床
|
||||||
.setFormEnum(LocationForm.BED.getValue());
|
.setFormEnum(LocationForm.BED.getValue());
|
||||||
encounterLocationService.saveOrUpdateEncounterLocation(encounterLocation);
|
// 直接更新指定ID的记录
|
||||||
|
encounterSuccess = encounterLocationService.updateById(encounterLocation);
|
||||||
|
|
||||||
// 3.位置表
|
// 3.位置表
|
||||||
// 旧病床状态变更(空闲)
|
// 旧病床状态变更(空闲)
|
||||||
|
|||||||
Reference in New Issue
Block a user