修改超声工具新增患者方法 增加验证 重复的不允许添加
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
yudao-ui-admin CI / build (14.x) (push) Has been cancelled
yudao-ui-admin CI / build (16.x) (push) Has been cancelled
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
yudao-ui-admin CI / build (14.x) (push) Has been cancelled
yudao-ui-admin CI / build (16.x) (push) Has been cancelled
This commit is contained in:
parent
1f4e35e8c1
commit
8586d9fea8
@ -290,6 +290,11 @@ public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMappe
|
||||
if (createReqVOs != null && createReqVOs.size() > 0) {
|
||||
for (PatientExamInfoAddReqVO createReqVO : createReqVOs) {
|
||||
if (createReqVO != null) {
|
||||
// 检查是否已存在重复数据
|
||||
if (isDuplicateData(createReqVO.getExamId(), createReqVO.getOrgId())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
patientexamlist = BeanUtils.toBean(createReqVO, PatientexamlistDO.class);
|
||||
|
||||
dateTime = LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
@ -309,7 +314,13 @@ public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMappe
|
||||
ids = Collections.emptyList();
|
||||
return ids;
|
||||
}
|
||||
|
||||
|
||||
private boolean isDuplicateData(String examId, String orgId) {
|
||||
QueryWrapper<PatientexamlistDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("examId", examId)
|
||||
.eq("orgId", orgId);
|
||||
return patientexamlistMapper.selectCount(queryWrapper) > 0;
|
||||
}
|
||||
@Override
|
||||
public void updateExamItemNameById(String id, String examItemName) {
|
||||
validatePatientexamlistExists(id);
|
||||
@ -684,4 +695,6 @@ public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMappe
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user