ISysDeptService.java 3.4 KB

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