| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- package com.xunmei.system.service;
- import com.baomidou.mybatisplus.extension.service.IService;
- import com.xunmei.system.api.Eto.SysOrgTreeRequestDto;
- import com.xunmei.system.api.domain.SysDept;
- import com.xunmei.system.api.domain.SysOrg;
- import com.xunmei.system.api.vo.SysOrgVO;
- import com.xunmei.system.domain.vo.TreeSelect;
- import java.util.List;
- /**
- * 机构管理 服务层
- *
- * @author xunmei
- */
- public interface ISysDeptService extends IService<SysDept> {
- /**
- * 查询机构管理数据
- *
- * @param dept 机构信息
- * @return 机构信息集合
- */
- List<SysDept> selectDeptList(SysDept dept);
- /**
- * 查询机构树结构信息
- *
- * @param dept 机构信息
- * @return 机构树信息集合
- */
- List<SysOrgVO> selectDeptTreeList(SysOrg dept);
- /**
- * 返回行社树
- * @return
- */
- List<SysOrgVO> selectHangsheTreeList();
- List<SysOrgVO> selectBusinessTreeList(SysOrgTreeRequestDto request);
- /**
- * 获取缓存的行社及行社上级机构
- * @param path
- * @return
- */
- List<SysOrgVO> getHangsheTreeCache(String path);
- /**
- * 获取指定机构树,包含到顶级节点的路径及下级所有机构
- * @param orgId
- * @return
- */
- List<SysOrgVO> hangsheWholePathTree(Long orgId);
- /**
- * 机构管理
- *
- * @param dept
- * @return
- */
- List<SysDept> selectDeptTreeList(SysDept dept);
- List<SysOrgVO> orgWholePathTree(SysOrgTreeRequestDto request);
- /**
- * 构建前端所需要树结构
- *
- * @param depts 机构列表
- * @return 树结构列表
- */
- List<SysOrg> buildDeptTree(List<SysOrg> depts);
- /**
- * 构建前端所需要下拉树结构
- *
- * @param depts 机构列表
- * @return 下拉树结构列表
- */
- List<TreeSelect> buildDeptTreeSelect(List<SysOrg> depts);
- /**
- * 根据角色ID查询机构树信息
- *
- * @param roleId 角色ID
- * @return 选中机构列表
- */
- List<Long> selectDeptListByRoleId(Long roleId);
- /**
- * 根据机构ID查询信息
- *
- * @param deptId 机构ID
- * @return 机构信息
- */
- SysDept selectDeptById(Long deptId);
- /**
- * 根据ID查询所有子机构(正常状态)
- *
- * @param deptId 机构ID
- * @return 子机构数
- */
- int selectNormalChildrenDeptById(Long deptId);
- /**
- * 是否存在机构子节点
- *
- * @param deptId 机构ID
- * @return 结果
- */
- boolean hasChildByDeptId(Long deptId);
- /**
- * 查询机构是否存在用户
- *
- * @param deptId 机构ID
- * @return 结果 true 存在 false 不存在
- */
- boolean checkDeptExistUser(Long deptId);
- /**
- * 校验机构名称是否唯一
- *
- * @param dept 机构信息
- * @return 结果
- */
- boolean checkDeptNameUnique(SysDept dept);
- /**
- * 校验机构是否有数据权限
- *
- * @param deptId 机构id
- */
- void checkDeptDataScope(Long deptId);
- /**
- * 新增保存机构信息
- *
- * @param dept 机构信息
- * @return 结果
- */
- int insertDept(SysDept dept);
- /**
- * 修改保存机构信息
- *
- * @param dept 机构信息
- * @return 结果
- */
- int updateDept(SysDept dept);
- /**
- * 删除机构管理信息
- *
- * @param deptId 机构ID
- * @return 结果
- */
- int deleteDeptById(Long deptId);
- }
|