| | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.gkhy.system.domain.vo.DeptVo; |
| | | import com.gkhy.system.mapper.SysUserDeptMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.gkhy.common.annotation.DataScope; |
| | |
| | | |
| | | @Autowired |
| | | private SysRoleMapper roleMapper; |
| | | |
| | | @Autowired |
| | | private SysUserDeptMapper userDeptMapper; |
| | | |
| | | /** |
| | | * 查询部门管理数据 |
| | |
| | | @Override |
| | | public int deleteDeptById(Long deptId) |
| | | { |
| | | //对应的人员部门 |
| | | if (userDeptMapper.selectCountUserDeptByDeptId(deptId) > 0) |
| | | { |
| | | throw new ServiceException("该部门已绑定人员,请先换绑人员"); |
| | | } |
| | | |
| | | |
| | | return deptMapper.deleteDeptById(deptId); |
| | | } |
| | | |