ISysDeptService.java 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. package com.ruoyi.system.service;
  2. import com.baomidou.mybatisplus.extension.service.IService;
  3. import com.ruoyi.common.core.domain.TreeSelect;
  4. import com.ruoyi.common.core.domain.entity.SysDept;
  5. import java.util.List;
  6. /**
  7. * 部门管理 服务层
  8. *
  9. * @author ruoyi
  10. */
  11. public interface ISysDeptService extends IService<SysDept> {
  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<Integer> 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 dept 部门信息
  79. * @return 结果
  80. */
  81. public int insertDept(SysDept dept);
  82. /**
  83. * 修改保存部门信息
  84. *
  85. * @param dept 部门信息
  86. * @return 结果
  87. */
  88. public int updateDept(SysDept dept);
  89. /**
  90. * 删除部门管理信息
  91. *
  92. * @param deptId 部门ID
  93. * @return 结果
  94. */
  95. public int deleteDeptById(Long deptId);
  96. }