public class DepartmentService
extends java.lang.Object
构造器和说明 |
---|
DepartmentService() |
限定符和类型 | 方法和说明 |
---|---|
DepartmentPostBean |
addDepartment(java.lang.String pId,
java.lang.String depName)
添加部门
|
void |
deleteDepartment(java.lang.String departmentId)
删除部门
|
void |
editDepartment(java.lang.String departmentId,
java.lang.String depName)
编辑部门
|
java.lang.String |
getDepartmentFullPath(Department department,
java.lang.String splitter)
获取部门的全路径(以自定义的分隔符连接)
|
java.lang.String |
getDepartmentFullPath(java.lang.String departmentId)
获取部门的全路径
|
java.util.List<DepartmentPostBean> |
getDepartmentsUnderParentDepartment(java.lang.String currentUserId,
java.lang.String pId)
根据父部门的部门id,获取子部门
|
java.util.List<DepartmentPostBean> |
getDepartmentTree(java.lang.String currentUserId)
获取部门树
|
java.util.List<DepartmentPostBean> |
getDepRolesUnderParentDepRole(java.lang.String currentUserId,
java.lang.String pId)
根据父部门的部门角色id,获取子部门
|
static DepartmentService |
getInstance() |
DepartmentPostBean |
getRootDepartment(java.lang.String currentUserId)
获取根部门
|
java.util.List<DepartmentPostBean> |
searchDepartments(java.lang.String currentUserId,
java.lang.String keyword)
部门搜索, 完整树结构
|
java.util.List<DepartmentPostBean> |
searchDepRoles(java.lang.String currentUserId,
java.lang.String keyword)
已过时。
|
public static DepartmentService getInstance()
public DepartmentPostBean addDepartment(java.lang.String pId, java.lang.String depName) throws java.lang.Exception
pId
- 父节点iddepName
- 部门名称java.lang.Exception
- 异常public void deleteDepartment(java.lang.String departmentId) throws java.lang.Exception
departmentId
- 部门idjava.lang.Exception
- 异常public void editDepartment(java.lang.String departmentId, java.lang.String depName) throws java.lang.Exception
departmentId
- 部门iddepName
- 部门名称java.lang.Exception
- 异常public java.lang.String getDepartmentFullPath(Department department, java.lang.String splitter) throws java.lang.Exception
department
- 部门splitter
- 分隔符号java.lang.Exception
- 异常public java.lang.String getDepartmentFullPath(java.lang.String departmentId) throws java.lang.Exception
departmentId
- 部门idjava.lang.Exception
- 异常public DepartmentPostBean getRootDepartment(java.lang.String currentUserId) throws java.lang.Exception
currentUserId
- 当前用户java.lang.Exception
- 异常public java.util.List<DepartmentPostBean> getDepartmentsUnderParentDepartment(java.lang.String currentUserId, java.lang.String pId) throws java.lang.Exception
currentUserId
- 当前用户pId
- 父部门idjava.lang.Exception
- 异常public java.util.List<DepartmentPostBean> getDepRolesUnderParentDepRole(java.lang.String currentUserId, java.lang.String pId) throws java.lang.Exception
currentUserId
- 当前用户pId
- 父部门idjava.lang.Exception
- 异常public java.util.List<DepartmentPostBean> searchDepartments(java.lang.String currentUserId, java.lang.String keyword) throws java.lang.Exception
currentUserId
- 当前用户keyword
- 关键字java.lang.Exception
- 异常public java.util.List<DepartmentPostBean> getDepartmentTree(java.lang.String currentUserId) throws java.lang.Exception
currentUserId
- 当前用户java.lang.Exception
- 异常@Deprecated public java.util.List<DepartmentPostBean> searchDepRoles(java.lang.String currentUserId, java.lang.String keyword) throws java.lang.Exception
currentUserId
- 当前用户keyword
- 关键字java.lang.Exception
- 异常