|
@@ -90,14 +90,15 @@ public class QcModuleInfoFacade extends QcModuleInfoServiceImpl {
|
|
|
}
|
|
|
|
|
|
// 同一文书类型下只有一份
|
|
|
- count = this.count(new QueryWrapper<QcModuleInfo>()
|
|
|
+ QcModuleInfo existBean = this.getOne(new QueryWrapper<QcModuleInfo>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("mode_id", addModulInfoVO.getModeId())
|
|
|
.eq("hospital_id", addModulInfoVO.getHospitalId())
|
|
|
.eq("record_module_id", addModulInfoVO.getRecordModuleId())
|
|
|
.ne("id", addModulInfoVO.getId() == null ? -1 : addModulInfoVO.getId()));
|
|
|
- if (count > 0) {
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "相同【医院】【模块】下,模块类型已存在");
|
|
|
+ if (existBean != null) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
+ "相同【医院】【模块】下,模块类型已存在,模板名称【" + existBean.getName() + "】" );
|
|
|
}
|
|
|
|
|
|
Long moduleId = null;
|