|
@@ -372,10 +372,11 @@ public class SysDeptServiceImpl implements ISysDeptService
|
|
|
// 设置父部门 ID,如果为 null 则默认为顶级部门(0)
|
|
// 设置父部门 ID,如果为 null 则默认为顶级部门(0)
|
|
|
dept.setParentId(parentId == null ? 0L : parentId.getDeptId());
|
|
dept.setParentId(parentId == null ? 0L : parentId.getDeptId());
|
|
|
|
|
|
|
|
- if (null != deptMapper.checkDeptCodeUnique(dept.getDeptCode())) {
|
|
|
|
|
|
|
+ /*if (null != deptMapper.checkDeptCodeUnique(dept.getDeptCode())) {
|
|
|
failureNum++;
|
|
failureNum++;
|
|
|
failureMsg.append(String.format("%1$s、部门已存在;", dept.getDeptCode()));
|
|
failureMsg.append(String.format("%1$s、部门已存在;", dept.getDeptCode()));
|
|
|
- } else if (null != deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId())) {
|
|
|
|
|
|
|
+ } else */
|
|
|
|
|
+ if (null != deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId())) {
|
|
|
failureNum++;
|
|
failureNum++;
|
|
|
failureMsg.append(String.format("%1$s、部门已存在;", dept.getDeptName()));
|
|
failureMsg.append(String.format("%1$s、部门已存在;", dept.getDeptName()));
|
|
|
} else {
|
|
} else {
|