| | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import cn.hutool.core.convert.Convert; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.dromara.common.core.constant.UserConstants; |
| | | import org.dromara.common.core.constant.SystemConstants; |
| | | import org.dromara.common.core.domain.R; |
| | | import org.dromara.common.core.utils.StringUtils; |
| | | import org.dromara.common.log.annotation.Log; |
| | |
| | | return R.fail("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在"); |
| | | } else if (dept.getParentId().equals(deptId)) { |
| | | return R.fail("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己"); |
| | | } else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus())) { |
| | | } else if (StringUtils.equals(SystemConstants.DISABLE, dept.getStatus())) { |
| | | if (deptService.selectNormalChildrenDeptById(deptId) > 0) { |
| | | return R.fail("该部门包含未停用的子部门!"); |
| | | } else if (deptService.checkDeptExistUser(deptId)) { |