From 1701804e7c14f723c0d5371d56788fabca30f11c Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Mon, 2 Dec 2024 14:53:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E6=AC=A1=E5=AF=BC=E5=85=A5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/patientinfo/impl/PatientInfoServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/impl/PatientInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/impl/PatientInfoServiceImpl.java index c9b414cd..431c43ad 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/impl/PatientInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/impl/PatientInfoServiceImpl.java @@ -494,7 +494,8 @@ public class PatientInfoServiceImpl implements IPatientInfoService { for (PatientInfoImport patientInfoImport : patientInfoImports) { if (StringUtils.isEmpty(patientInfoImport.getDepartmentName()) || Objects.isNull(patientInfoImport.getDepartmentId())) { DeptAliasVO deptAliasVO = patientInfoImportVO.getDeptAliasVOS().stream().filter(Objects::nonNull).filter(item -> StringUtils.isNotBlank(item.getDepartmentName()) && StringUtils.isNotEmpty(item.getDeptAlias()) && patientInfoImport.getDeptAlias().equals(item.getDeptAlias())).findFirst().orElse(new DeptAliasVO()); - patientInfoImport.setDepartmentId(deptAliasVO.getDepartmentId()); + Department equalsDepartment = departmentList.stream().filter(Objects::nonNull).filter(item -> item.getDepartmentName().equals(deptAliasVO.getDepartmentName())).findFirst().orElse(new Department()); + patientInfoImport.setDepartmentId(equalsDepartment.getId()); patientInfoImport.setDepartmentName(deptAliasVO.getDepartmentName()); } }