ISysDeptService.java 2.7 KB

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