ISysDeptService.java 2.7 KB

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