ISysDeptService.java 2.4 KB

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