|
@@ -49,8 +49,7 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
|
|
QueryWrapper<DeptInfo> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<DeptInfo> queryWrapper = new QueryWrapper<>();
|
|
queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
queryWrapper.eq("name", addDeptInfoVO.getName());
|
|
queryWrapper.eq("name", addDeptInfoVO.getName());
|
|
- List<DeptInfo> deptInfoList = this.list(queryWrapper);
|
|
|
|
- if (ListUtil.isNotEmpty(deptInfoList)) {
|
|
|
|
|
|
+ if (this.count(queryWrapper) > 1) {
|
|
throw new CommonException(CommonErrorCode.IS_EXISTS, "添加失败,科室已存在");
|
|
throw new CommonException(CommonErrorCode.IS_EXISTS, "添加失败,科室已存在");
|
|
}
|
|
}
|
|
//添加科室
|
|
//添加科室
|