ISysDeptService.java 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. /**
  20. * 构建前端所需要树结构
  21. *
  22. * @param depts 部门列表
  23. * @return 树结构列表
  24. */
  25. public List<SysDept> buildDeptTree(List<SysDept> depts);
  26. /**
  27. * 构建前端所需要下拉树结构
  28. *
  29. * @param depts 部门列表
  30. * @return 下拉树结构列表
  31. */
  32. public List<TreeSelect> buildDeptTreeSelect(List<SysDept> depts);
  33. /**
  34. * 根据角色ID查询部门树信息
  35. *
  36. * @param roleId 角色ID
  37. * @return 选中部门列表
  38. */
  39. public List<Long> selectDeptListByRoleId(Long roleId);
  40. /**
  41. * 根据部门ID查询信息
  42. *
  43. * @param deptId 部门ID
  44. * @return 部门信息
  45. */
  46. public SysDept selectDeptById(Long deptId);
  47. /**
  48. * 根据ID查询所有子部门(正常状态)
  49. *
  50. * @param deptId 部门ID
  51. * @return 子部门数
  52. */
  53. public int selectNormalChildrenDeptById(Long deptId);
  54. /**
  55. * 是否存在部门子节点
  56. *
  57. * @param deptId 部门ID
  58. * @return 结果
  59. */
  60. public boolean hasChildByDeptId(Long deptId);
  61. /**
  62. * 查询部门是否存在用户
  63. *
  64. * @param deptId 部门ID
  65. * @return 结果 true 存在 false 不存在
  66. */
  67. public boolean checkDeptExistUser(Long deptId);
  68. /**
  69. * 校验部门名称是否唯一
  70. *
  71. * @param dept 部门信息
  72. * @return 结果
  73. */
  74. public String checkDeptNameUnique(SysDept dept);
  75. /**
  76. * 校验部门是否有数据权限
  77. *
  78. * @param deptId 部门id
  79. */
  80. public void checkDeptDataScope(Long deptId);
  81. /**
  82. * 新增保存部门信息
  83. *
  84. * @param dept 部门信息
  85. * @return 结果
  86. */
  87. public int insertDept(SysDept dept);
  88. /**
  89. * 修改保存部门信息
  90. *
  91. * @param dept 部门信息
  92. * @return 结果
  93. */
  94. public int updateDept(SysDept dept);
  95. /**
  96. * 删除部门管理信息
  97. *
  98. * @param deptId 部门ID
  99. * @return 结果
  100. */
  101. public int deleteDeptById(Long deptId);
  102. }