患者导入

This commit is contained in:
zhangheng 2024-12-02 14:23:34 +08:00
parent 5790a26e47
commit 5818cf14e2

View File

@ -389,19 +389,19 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
if (Objects.nonNull(equalsDepartment.getId())) {
patientInfoImport.setDepartmentId(equalsDepartment.getId());
patientInfoImport.setDepartmentName(patientInfoImport.getDepartmentName());
} else {
DeptAliasVO deptAliasVO = new DeptAliasVO();
deptAliasVO.setSn(sn);
deptAliasVO.setDeptAlias(patientInfoImport.getDeptAlias());
deptAliasVOS.add(deptAliasVO);
}
} else {
DeptAliasVO deptAliasVO = new DeptAliasVO();
deptAliasVO.setSn(sn);
deptAliasVO.setDeptAlias(patientInfoImport.getDeptAlias());
deptAliasVOS.add(deptAliasVO);
}
patientInfoImportList.add(patientInfoImport);
} else {
DeptAliasVO deptAliasVO = new DeptAliasVO();
deptAliasVO.setSn(sn);
deptAliasVO.setDeptAlias(patientInfoImport.getDeptAlias());
deptAliasVOS.add(deptAliasVO);
}
} else {
DeptAliasVO deptAliasVO = new DeptAliasVO();
deptAliasVO.setSn(sn);
deptAliasVO.setDeptAlias(patientInfoImport.getDeptAlias());
deptAliasVOS.add(deptAliasVO);
}
}
//组装返回数据
List<PatientInfoImport> 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);