操作文档
首页
  • 智能网关系列入门
  • 配置软件使用说明
  • 智能网关系列入门(新)
  • 配置软件使用说明(新)
  • 云平台使用说明
  • 云组态使用说明
  • 数据分析使用说明
  • Box系列使用说明
  • MQTT接入
  • BOXConfig使用教程(新)
  • 云平台使用教程
  • 报表设计器使用教程
  • BOXConfig使用教程
开发者平台
  • 硬件相关
  • 配置软件相关
  • 平台相关
  • 远程编程相关
  • 组态设计相关
  • 报表相关
  • 第三方BOX相关
  • BoxConfig相关
私有化平台
更新记录
首页
  • 智能网关系列入门
  • 配置软件使用说明
  • 智能网关系列入门(新)
  • 配置软件使用说明(新)
  • 云平台使用说明
  • 云组态使用说明
  • 数据分析使用说明
  • Box系列使用说明
  • MQTT接入
  • BOXConfig使用教程(新)
  • 云平台使用教程
  • 报表设计器使用教程
  • BOXConfig使用教程
开发者平台
  • 硬件相关
  • 配置软件相关
  • 平台相关
  • 远程编程相关
  • 组态设计相关
  • 报表相关
  • 第三方BOX相关
  • BoxConfig相关
私有化平台
更新记录
  • 新手指引
  • 平台简介

  • 开发者后台

  • API文档

    • 使用流程
    • SDK下载
    • 接口列表

      • 企业
      • 项目
      • 设备
      • 用户
      • 角色
      • 部门
        • 概述
        • 新增部门
          • 请求参数
          • 返回参数
          • java-sdk 调用示例
          • HTTP 调用示例
        • 删除部门
          • 请求参数
          • 返回参数
          • java-sdk 调用示例
          • HTTP 调用示例
        • 获取企业所有部门
          • 请求参数
          • 返回参数
          • java-sdk 调用示例
          • HTTP 调用示例
        • 获取部门列表
          • 请求参数
          • 返回参数
          • java-sdk 调用示例
          • HTTP 调用示例
        • 修改部门
          • 请求参数
          • 返回参数
          • java-sdk 调用示例
          • HTTP 调用示例
      • 变量
      • 模板
      • 系统
      • 报警
      • 标签
      • 看板
      • 看板分组
      • 看板过滤分组
      • 看板树
      • 报表
      • 客户
      • 变量收藏
      • 权限组
      • 日志
      • 消息推送
      • 消息中心服务
  • 示例教程

  • 常见问题

  • 开发者平台
  • API文档
  • 接口列表
2022-09-20
目录

部门

# 概述

部门

类名

DepartmentApi.java

成员方法

名称 方法 Method Path
新增部门 addDepartment POST /api-organization/dept/addDepartment
删除部门 deleteDepartment POST /api-organization/dept/deleteDepartment
获取企业所有部门 getCompanyAllDepartmentList POST /api-organization/dept/getCompanyAllDepartmentList
获取部门列表 getDepartmentList POST /api-organization/dept/getDepartmentList
修改部门 updateDepartment POST /api-organization/dept/updateDepartment

# 新增部门

ResultObject addDepartment(departForm)

新增部门

# 请求参数

名称 类型 描述 备注
departForm DepartForm departForm

# DepartForm

名称 类型 描述 备注
id String 部门id(修改时必须有,添加时不需要) -
name String 部门名称
parentId String 父级部门id
remark String 描述 -
sort Integer 排序号 -

# 返回参数

ResultObject

名称 类型 描述 备注
code String 响应码 -
data Object 响应数据 -
msg String 响应消息 -
time OffsetDateTime 响应时间 -

# java-sdk 调用示例

//实例化api类,传入token
DepartmentApi apiInstance = new DepartmentApi(token);
//实例化请求参数
DepartForm departForm = new DepartForm();

try {
    ResultObject result = apiInstance.addDepartment(departForm);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("调用DepartmentApi.addDepartment异常: " + e.getMessage());
    e.printStackTrace();
}
1
2
3
4
5
6
7
8
9
10
11
12

# HTTP 调用示例

属性 名称
HTTP请求地址 http://[server]:[port]/api-organization/dept/addDepartment
请求方式 POST
Content-Type application/json
header:key Authorization
header:value Bearer YOUR_ACCESS_TOKEN

请求参数:

{
	"name":"",
	"remark":"",
	"id":"",
	"sort":0,
	"parentId":""
}
1
2
3
4
5
6
7

# 删除部门

ResultObject deleteDepartment(deptId)

根据部门Id删除部门

# 请求参数

名称 类型 描述 备注
deptId String 部门ID -

# 返回参数

ResultObject

名称 类型 描述 备注
code String 响应码 -
data Object 响应数据 -
msg String 响应消息 -
time OffsetDateTime 响应时间 -

# java-sdk 调用示例

//实例化api类,传入token
DepartmentApi apiInstance = new DepartmentApi(token);
//实例化请求参数
String deptId = "deptId_example";

try {
    ResultObject result = apiInstance.deleteDepartment(deptId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("调用DepartmentApi.deleteDepartment异常: " + e.getMessage());
    e.printStackTrace();
}
1
2
3
4
5
6
7
8
9
10
11
12

# HTTP 调用示例

属性 名称
HTTP请求地址 http://[server]:[port]/api-organization/dept/deleteDepartment
请求方式 POST
Content-Type application/json
header:key Authorization
header:value Bearer YOUR_ACCESS_TOKEN

请求参数:

{
	"deptId":""
}
1
2
3

# 获取企业所有部门

ResultListDepartment getCompanyAllDepartmentList()

获取企业所有部门

# 请求参数

请求参数为空.

# 返回参数

ResultListDepartment

名称 类型 描述 备注
code String 响应码 -
data List<Department> 响应数据 -
msg String 响应消息 -
time OffsetDateTime 响应时间 -

Department

名称 类型 描述 备注
children List<Department> 子部门 -
companyId String 企业id -
createdBy String 创建人 -
createdTime OffsetDateTime 创建时间 -
id String 主键 -
name String 名称 -
parentId String 父级id -
remark String 备注 -
sort Integer 排序号 -
updatedTime OffsetDateTime 修改时间 -

Department

名称 类型 描述 备注
children List<Department> 子部门 -
companyId String 企业id -
createdBy String 创建人 -
createdTime OffsetDateTime 创建时间 -
id String 主键 -
name String 名称 -
parentId String 父级id -
remark String 备注 -
sort Integer 排序号 -
updatedTime OffsetDateTime 修改时间 -

# java-sdk 调用示例

//实例化api类,传入token
DepartmentApi apiInstance = new DepartmentApi(token);

try {
    ResultListDepartment result = apiInstance.getCompanyAllDepartmentList();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("调用DepartmentApi.getCompanyAllDepartmentList异常: " + e.getMessage());
    e.printStackTrace();
}
1
2
3
4
5
6
7
8
9
10

# HTTP 调用示例

属性 名称
HTTP请求地址 http://[server]:[port]/api-organization/dept/getCompanyAllDepartmentList
请求方式 POST
Content-Type application/json
header:key Authorization
header:value Bearer YOUR_ACCESS_TOKEN

请求参数:

{}
1

# 获取部门列表

ResultListDepartment getDepartmentList()

根据当前登录用户ID查询所在部门及子部门

# 请求参数

请求参数为空.

# 返回参数

ResultListDepartment

名称 类型 描述 备注
code String 响应码 -
data List<Department> 响应数据 -
msg String 响应消息 -
time OffsetDateTime 响应时间 -

Department

名称 类型 描述 备注
children List<Department> 子部门 -
companyId String 企业id -
createdBy String 创建人 -
createdTime OffsetDateTime 创建时间 -
id String 主键 -
name String 名称 -
parentId String 父级id -
remark String 备注 -
sort Integer 排序号 -
updatedTime OffsetDateTime 修改时间 -

Department

名称 类型 描述 备注
children List<Department> 子部门 -
companyId String 企业id -
createdBy String 创建人 -
createdTime OffsetDateTime 创建时间 -
id String 主键 -
name String 名称 -
parentId String 父级id -
remark String 备注 -
sort Integer 排序号 -
updatedTime OffsetDateTime 修改时间 -

# java-sdk 调用示例

//实例化api类,传入token
DepartmentApi apiInstance = new DepartmentApi(token);

try {
    ResultListDepartment result = apiInstance.getDepartmentList();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("调用DepartmentApi.getDepartmentList异常: " + e.getMessage());
    e.printStackTrace();
}
1
2
3
4
5
6
7
8
9
10

# HTTP 调用示例

属性 名称
HTTP请求地址 http://[server]:[port]/api-organization/dept/getDepartmentList
请求方式 POST
Content-Type application/json
header:key Authorization
header:value Bearer YOUR_ACCESS_TOKEN

请求参数:

{}
1

# 修改部门

ResultObject updateDepartment(departForm)

修改部门

# 请求参数

名称 类型 描述 备注
departForm DepartForm departForm

# DepartForm

名称 类型 描述 备注
id String 部门id(修改时必须有,添加时不需要) -
name String 部门名称
parentId String 父级部门id
remark String 描述 -
sort Integer 排序号 -

# 返回参数

ResultObject

名称 类型 描述 备注
code String 响应码 -
data Object 响应数据 -
msg String 响应消息 -
time OffsetDateTime 响应时间 -

# java-sdk 调用示例

//实例化api类,传入token
DepartmentApi apiInstance = new DepartmentApi(token);
//实例化请求参数
DepartForm departForm = new DepartForm();

try {
    ResultObject result = apiInstance.updateDepartment(departForm);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("调用DepartmentApi.updateDepartment异常: " + e.getMessage());
    e.printStackTrace();
}
1
2
3
4
5
6
7
8
9
10
11
12

# HTTP 调用示例

属性 名称
HTTP请求地址 http://[server]:[port]/api-organization/dept/updateDepartment
请求方式 POST
Content-Type application/json
header:key Authorization
header:value Bearer YOUR_ACCESS_TOKEN

请求参数:

{
	"name":"",
	"remark":"",
	"id":"",
	"sort":0,
	"parentId":""
}
1
2
3
4
5
6
7
角色
变量

← 角色 变量→

最近更新
01
菜单栏里找不到“BOX配置”如何处理
06-06
02
购买了新型号的BOX,在配置软件里找不到该型号
06-06
03
部分电脑安装BoxConfig后无法运行
06-06
更多文章>
Copyright © 2021-2024
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式