ISysDeptService.java 3.5 KB

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