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 34493fd8..c9b414cd 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 @@ -389,7 +389,6 @@ public class PatientInfoServiceImpl implements IPatientInfoService { if (Objects.nonNull(equalsDepartment.getId())) { patientInfoImport.setDepartmentId(equalsDepartment.getId()); patientInfoImport.setDepartmentName(patientInfoImport.getDepartmentName()); - patientInfoImportList.add(patientInfoImport); } else { DeptAliasVO deptAliasVO = new DeptAliasVO(); deptAliasVO.setSn(sn); @@ -402,6 +401,7 @@ public class PatientInfoServiceImpl implements IPatientInfoService { deptAliasVO.setDeptAlias(patientInfoImport.getDeptAlias()); deptAliasVOS.add(deptAliasVO); } + patientInfoImportList.add(patientInfoImport); } //组装返回数据 List patientInfoImports = new ArrayList<>(patientInfoImportList); @@ -427,7 +427,7 @@ public class PatientInfoServiceImpl implements IPatientInfoService { patientInfoImportMainMapper.insertPatientInfoImportMain(patientInfoImportMain); //科室名称全符合新增患者表,否则返回数据 if (CollectionUtils.isNotEmpty(deptAliasVOS)) { - return AjaxResult.success("科室名称不存在", patientInfoImportVO); + return AjaxResult.error("科室名称不存在", patientInfoImportVO); } else { //新增患者表 int i = patientInfoMapper.insertPatientInfoList(patientInfoImportList);