ISysDeptService.java 2.8 KB

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