ISysDeptService.java 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. package com.ruoyi.system.service;
  2. import java.util.List;
  3. import com.ruoyi.common.core.domain.AjaxResult;
  4. import com.ruoyi.common.core.domain.TreeSelect;
  5. import com.ruoyi.common.core.domain.entity.SysDept;
  6. import com.ruoyi.common.core.domain.entity.vo.SysDeptVo;
  7. /**
  8. * 部门管理 服务层
  9. *
  10. * @author ruoyi
  11. */
  12. public interface ISysDeptService
  13. {
  14. /**
  15. * 查询部门管理数据
  16. *
  17. * @param dept 部门信息
  18. * @return 部门信息集合
  19. */
  20. public List<SysDept> selectDeptList(SysDept dept);
  21. /**
  22. * 查询部门树结构信息
  23. *
  24. * @param dept 部门信息
  25. * @return 部门树信息集合
  26. */
  27. public List<TreeSelect> selectDeptTreeList(SysDept dept);
  28. /**
  29. * 构建前端所需要树结构
  30. *
  31. * @param depts 部门列表
  32. * @return 树结构列表
  33. */
  34. public List<SysDept> buildDeptTree(List<SysDept> depts);
  35. /**
  36. * 构建前端所需要下拉树结构
  37. *
  38. * @param depts 部门列表
  39. * @return 下拉树结构列表
  40. */
  41. public List<TreeSelect> buildDeptTreeSelect(List<SysDept> depts);
  42. /**
  43. * 根据角色ID查询部门树信息
  44. *
  45. * @param roleId 角色ID
  46. * @return 选中部门列表
  47. */
  48. public List<Long> selectDeptListByRoleId(Long roleId);
  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. AjaxResult insertDeptList(SysDeptVo sysDeptVo);
  112. AjaxResult selectDeptSixList(SysDept dept);
  113. List<SysDept> selectDeptListChildren(Long parentId);
  114. }