ISysDeptService.java 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. package com.xunmei.system.service;
  2. import com.baomidou.mybatisplus.extension.service.IService;
  3. import com.xunmei.system.api.domain.SysDept;
  4. import com.xunmei.system.api.domain.SysOrg;
  5. import com.xunmei.system.api.vo.SysOrgVO;
  6. import com.xunmei.system.domain.vo.TreeSelect;
  7. import java.util.List;
  8. /**
  9. * 部门管理 服务层
  10. *
  11. * @author xunmei
  12. */
  13. public interface ISysDeptService extends IService<SysDept> {
  14. /**
  15. * 查询部门管理数据
  16. *
  17. * @param dept 部门信息
  18. * @return 部门信息集合
  19. */
  20. List<SysDept> selectDeptList(SysDept dept);
  21. /**
  22. * 查询部门树结构信息
  23. *
  24. * @param dept 部门信息
  25. * @return 部门树信息集合
  26. */
  27. List<SysOrgVO> selectDeptTreeList();
  28. /**
  29. * 返回行社树
  30. * @return
  31. */
  32. List<SysOrgVO> selectHangsheTreeList();
  33. /**
  34. * 获取缓存的行社及行社上级机构
  35. * @param path
  36. * @return
  37. */
  38. List<SysOrgVO> getHangsheTreeCache(String path);
  39. /**
  40. * 获取指定机构树,包含到顶级节点的路径及下级所有机构
  41. * @param orgId
  42. * @return
  43. */
  44. List<SysOrgVO> hangsheWholePathTree(Long orgId);
  45. /**
  46. * 部门管理
  47. *
  48. * @param dept
  49. * @return
  50. */
  51. List<SysDept> selectDeptTreeList(SysDept dept);
  52. /**
  53. * 构建前端所需要树结构
  54. *
  55. * @param depts 部门列表
  56. * @return 树结构列表
  57. */
  58. List<SysOrg> buildDeptTree(List<SysOrg> depts);
  59. /**
  60. * 构建前端所需要下拉树结构
  61. *
  62. * @param depts 部门列表
  63. * @return 下拉树结构列表
  64. */
  65. List<TreeSelect> buildDeptTreeSelect(List<SysOrg> depts);
  66. /**
  67. * 根据角色ID查询部门树信息
  68. *
  69. * @param roleId 角色ID
  70. * @return 选中部门列表
  71. */
  72. List<Long> selectDeptListByRoleId(Long roleId);
  73. /**
  74. * 根据部门ID查询信息
  75. *
  76. * @param deptId 部门ID
  77. * @return 部门信息
  78. */
  79. SysDept selectDeptById(Long deptId);
  80. /**
  81. * 根据ID查询所有子部门(正常状态)
  82. *
  83. * @param deptId 部门ID
  84. * @return 子部门数
  85. */
  86. int selectNormalChildrenDeptById(Long deptId);
  87. /**
  88. * 是否存在部门子节点
  89. *
  90. * @param deptId 部门ID
  91. * @return 结果
  92. */
  93. boolean hasChildByDeptId(Long deptId);
  94. /**
  95. * 查询部门是否存在用户
  96. *
  97. * @param deptId 部门ID
  98. * @return 结果 true 存在 false 不存在
  99. */
  100. boolean checkDeptExistUser(Long deptId);
  101. /**
  102. * 校验部门名称是否唯一
  103. *
  104. * @param dept 部门信息
  105. * @return 结果
  106. */
  107. boolean checkDeptNameUnique(SysDept dept);
  108. /**
  109. * 校验部门是否有数据权限
  110. *
  111. * @param deptId 部门id
  112. */
  113. void checkDeptDataScope(Long deptId);
  114. /**
  115. * 新增保存部门信息
  116. *
  117. * @param dept 部门信息
  118. * @return 结果
  119. */
  120. int insertDept(SysDept dept);
  121. /**
  122. * 修改保存部门信息
  123. *
  124. * @param dept 部门信息
  125. * @return 结果
  126. */
  127. int updateDept(SysDept dept);
  128. /**
  129. * 删除部门管理信息
  130. *
  131. * @param deptId 部门ID
  132. * @return 结果
  133. */
  134. int deleteDeptById(Long deptId);
  135. }