public class Department extends Object
| 构造器和说明 |
|---|
Department(Config config) |
| 限定符和类型 | 方法和说明 |
|---|---|
CreateDepartmentResp |
create(CreateDepartmentReq req)
创建部门,支持在单个接口中进行部门信息添加,包括部门基本信息、部门负责人、部门自定义字段信息等
此接口字段是否必填以【飞书人事-组织配置】为准。
|
CreateDepartmentResp |
create(CreateDepartmentReq req,
RequestOptions reqOptions)
创建部门,支持在单个接口中进行部门信息添加,包括部门基本信息、部门负责人、部门自定义字段信息等
此接口字段是否必填以【飞书人事-组织配置】为准。
|
DeleteDepartmentResp |
delete(DeleteDepartmentReq req)
删除部门,可以通过该接口通过部门ID删除一个部门记录
删除后无法恢复,
并且在系统中无法查看到对应部门信息,请谨慎操作。
|
DeleteDepartmentResp |
delete(DeleteDepartmentReq req,
RequestOptions reqOptions)
删除部门,可以通过该接口通过部门ID删除一个部门记录
删除后无法恢复,
并且在系统中无法查看到对应部门信息,请谨慎操作。
|
GetDepartmentResp |
get(GetDepartmentReq req)
查询单个部门,该接口支持通过部门id批量查询当天的部门详情信息,包括部门包含的名称、描述、启用状态等。
|
GetDepartmentResp |
get(GetDepartmentReq req,
RequestOptions reqOptions)
查询单个部门,该接口支持通过部门id批量查询当天的部门详情信息,包括部门包含的名称、描述、启用状态等。
|
ListDepartmentResp |
list(ListDepartmentReq req)
批量查询部门(不推荐),批量查询部门信息,包括部门基本信息、自定义字段信息等
本接口不再推荐使用(不支持更复杂的字段鉴权功能),请使用[批量查询部门V2](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/batch_get)接口(支持对成本中心、部门负责人、自定义字段鉴权)。
|
ListDepartmentResp |
list(ListDepartmentReq req,
RequestOptions reqOptions)
批量查询部门(不推荐),批量查询部门信息,包括部门基本信息、自定义字段信息等
本接口不再推荐使用(不支持更复杂的字段鉴权功能),请使用[批量查询部门V2](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/batch_get)接口(支持对成本中心、部门负责人、自定义字段鉴权)。
|
PatchDepartmentResp |
patch(PatchDepartmentReq req)
更新部门,更新部门信息,包括基础信息、自定义字段信息。
|
PatchDepartmentResp |
patch(PatchDepartmentReq req,
RequestOptions reqOptions)
更新部门,更新部门信息,包括基础信息、自定义字段信息。
|
public Department(Config config)
public CreateDepartmentResp create(CreateDepartmentReq req, RequestOptions reqOptions) throws Exception
此接口字段是否必填以【飞书人事-组织配置】为准。建议参照【飞书人事-组织管理-部门-新建】页面来传参 ;
Exceptionpublic CreateDepartmentResp create(CreateDepartmentReq req) throws Exception
此接口字段是否必填以【飞书人事-组织配置】为准。建议参照【飞书人事-组织管理-部门-新建】页面来传参 ;
Exceptionpublic DeleteDepartmentResp delete(DeleteDepartmentReq req, RequestOptions reqOptions) throws Exception
删除后无法恢复, 并且在系统中无法查看到对应部门信息,请谨慎操作。;;该接口不再推荐使用,请使用[【删除部门】](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/delete)接口。;; ;
Exceptionpublic DeleteDepartmentResp delete(DeleteDepartmentReq req) throws Exception
删除后无法恢复, 并且在系统中无法查看到对应部门信息,请谨慎操作。;;该接口不再推荐使用,请使用[【删除部门】](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/delete)接口。;; ;
Exceptionpublic GetDepartmentResp get(GetDepartmentReq req, RequestOptions reqOptions) throws Exception
本接口不再推荐使用(不支持更复杂的字段鉴权功能),请使用[批量查询部门V2](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/batch_get)接口(支持对成本中心、部门负责人、自定义字段鉴权)。;;延迟说明:数据库主从延迟 2s 以内,即:直接创建职级后2s内调用此接口可能查询不到数据。 ;
Exceptionpublic GetDepartmentResp get(GetDepartmentReq req) throws Exception
本接口不再推荐使用(不支持更复杂的字段鉴权功能),请使用[批量查询部门V2](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/batch_get)接口(支持对成本中心、部门负责人、自定义字段鉴权)。;;延迟说明:数据库主从延迟 2s 以内,即:直接创建职级后2s内调用此接口可能查询不到数据。 ;
Exceptionpublic ListDepartmentResp list(ListDepartmentReq req, RequestOptions reqOptions) throws Exception
本接口不再推荐使用(不支持更复杂的字段鉴权功能),请使用[批量查询部门V2](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/batch_get)接口(支持对成本中心、部门负责人、自定义字段鉴权)。;;延迟说明:数据库主从延迟2s以内,即:直接创建部门后2s内调用此接口可能查询不到数据。 ;
Exceptionpublic ListDepartmentResp list(ListDepartmentReq req) throws Exception
本接口不再推荐使用(不支持更复杂的字段鉴权功能),请使用[批量查询部门V2](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/batch_get)接口(支持对成本中心、部门负责人、自定义字段鉴权)。;;延迟说明:数据库主从延迟2s以内,即:直接创建部门后2s内调用此接口可能查询不到数据。 ;
Exceptionpublic PatchDepartmentResp patch(PatchDepartmentReq req, RequestOptions reqOptions) throws Exception
该接口不再推荐使用,请使用[【更新部门】](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/patch)接口。;;;权限说明:该接口不支持范围权限校验,不支持字段权限校验 ;
Exceptionpublic PatchDepartmentResp patch(PatchDepartmentReq req) throws Exception
该接口不再推荐使用,请使用[【更新部门】](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/patch)接口。;;;权限说明:该接口不支持范围权限校验,不支持字段权限校验 ;
ExceptionCopyright © 2026. All rights reserved.