ISysDeptService.java 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. package com.ruoyi.system.service;
  2. import cn.hutool.core.lang.tree.Tree;
  3. import com.ruoyi.system.domain.SysDept;
  4. import java.util.List;
  5. /**
  6. * 部门管理 服务层
  7. *
  8. * @author Lion Li
  9. */
  10. public interface ISysDeptService {
  11. /**
  12. * 查询部门管理数据
  13. *
  14. * @param dept 部门信息
  15. * @return 部门信息集合
  16. */
  17. List<SysDept> selectDeptList(SysDept dept);
  18. /**
  19. * 查询部门树结构信息
  20. *
  21. * @param dept 部门信息
  22. * @return 部门树信息集合
  23. */
  24. List<Tree<Long>> selectDeptTreeList(SysDept dept);
  25. /**
  26. * 构建前端所需要下拉树结构
  27. *
  28. * @param depts 部门列表
  29. * @return 下拉树结构列表
  30. */
  31. List<Tree<Long>> buildDeptTreeSelect(List<SysDept> depts);
  32. /**
  33. * 根据角色ID查询部门树信息
  34. *
  35. * @param roleId 角色ID
  36. * @return 选中部门列表
  37. */
  38. List<Long> selectDeptListByRoleId(Long roleId);
  39. /**
  40. * 根据部门ID查询信息
  41. *
  42. * @param deptId 部门ID
  43. * @return 部门信息
  44. */
  45. SysDept selectDeptById(Long deptId);
  46. /**
  47. * 根据ID查询所有子部门数(正常状态)
  48. *
  49. * @param deptId 部门ID
  50. * @return 子部门数
  51. */
  52. long selectNormalChildrenDeptById(Long deptId);
  53. /**
  54. * 是否存在部门子节点
  55. *
  56. * @param deptId 部门ID
  57. * @return 结果
  58. */
  59. boolean hasChildByDeptId(Long deptId);
  60. /**
  61. * 查询部门是否存在用户
  62. *
  63. * @param deptId 部门ID
  64. * @return 结果 true 存在 false 不存在
  65. */
  66. boolean checkDeptExistUser(Long deptId);
  67. /**
  68. * 校验部门名称是否唯一
  69. *
  70. * @param dept 部门信息
  71. * @return 结果
  72. */
  73. String checkDeptNameUnique(SysDept dept);
  74. /**
  75. * 校验部门是否有数据权限
  76. *
  77. * @param deptId 部门id
  78. */
  79. void checkDeptDataScope(Long deptId);
  80. /**
  81. * 新增保存部门信息
  82. *
  83. * @param dept 部门信息
  84. * @return 结果
  85. */
  86. int insertDept(SysDept dept);
  87. /**
  88. * 修改保存部门信息
  89. *
  90. * @param dept 部门信息
  91. * @return 结果
  92. */
  93. int updateDept(SysDept dept);
  94. /**
  95. * 删除部门管理信息
  96. *
  97. * @param deptId 部门ID
  98. * @return 结果
  99. */
  100. int deleteDeptById(Long deptId);
  101. }