Browse Source

编辑部门

lyhzzz 1 year ago
parent
commit
c92f38f171

+ 1 - 1
src/main/java/com/fdkankan/fusion/service/impl/TmDepartmentServiceImpl.java

@@ -63,7 +63,7 @@ public class TmDepartmentServiceImpl extends ServiceImpl<ITmDepartmentMapper, Tm
         if(!checkDeptNameUnique(dept.getName(),dept.getId())){
             throw new BusinessException(ResultCode.DEPT_NAME_EXITS);
         }
-        if(!dept.getId().equals(dept.getParentId())){
+        if(dept.getId().equals(dept.getParentId())){
             throw new BusinessException(ResultCode.DEPT_EDIT_ERROR);
         }
         List<TmDepartment> sonByDeptId = this.getSonByDeptId(dept.getId());