1. MIX.IOT.2018.F.11.24-APIQ API

1.1. 文档说明

智物联《物联网基础平台MixIOT》(以下简称:MixIOT)包括数十个子系统与服务。为不同子系统之间通信与数据交互提供支持,MixIOT平台通过HTTP协议提供低频数据接口APIQ。

1.2. 适用对象

本文档适用人员范围:MixIOT平台开发、运维、测试、交付等所有相关人员。

1.3. 修订记录

日期 文档版本 适用ADMIN版本 编写
2018-08-21 MIX.IOT.2018.F.21.18 0.8.0(包括)及以下版本 Ken

创建 MixIOT 无用户中心接口

日期 文档版本 适用ADMIN版本 编写
2018-12-13 MIX.IOT.2018.F.21.22 0.8.0(不包括)-1.2.0(不包括) Ken

修订 MixIOT 有用户中心接口

去除用户增删改查接口

新增票据校验/修改密码接口

日期 文档版本 适用ADMIN版本 编写
2019-03-09 MIX.IOT.2018.F.21.23 1.2.0(包括)-1.3.4(不包括) Ken

接口返回采用mix_code 全新格式,接口不向下兼容

增加mix_code说明

日期 文档版本 适用ADMIN版本 编写
2019-06-21 MIX.IOT.2018.F.21.24 1.3.4(包括)及以上 Ken

登录接口新增参数:keep_alive,支持令牌不同的长短时效

新增重获令牌接口:RefreshToken,支持二级验证机制

get_menu_list接口不建议使用,文档中去除说明(未来接口将去除)

APP登录接口不建议使用(使用统一登录接口替代),文档中去除说明(未来接口将去除)

get_list接口查询条件:is_all参数不建议使用,文档中去除说明(未来参数将去除)

get_all_list接口不建议使用(使用APIM接口接口替代),文档中去除说明(未来接口将去除)

新增信息反馈接口:Feedback

1.4. 请求地址

请求地址:http(s):// + host:port +/+ url

1.5. 请求说明

固定传参

在 http header 中传入参数,该参数来源于用户登录后获得到的验证信息,用于鉴权

参考

Authorization: Bearer d6nAGWraBuRY4wkEo7KLK4d3N53A4i5gMnj1iiCZQujZS783WE1SfHNkBFjkns85

1.6. 响应说明

1.6.1. code状态码

所有响应都提供了遵循如下响应规则,在后面的响应说明中不再做出说明:

code 含义 备注
200 请求成功 code不为200,则说明请求失败
500 请求错误
401 令牌失效

1.6.2. 返回格式

1.单条记录

{
    "code":200,
    "msg":"查询成功",
    "mix_code":130001,
    "mix_msg":"接口请求成功",
    "mix_ext":"第三方服务请求成功",
    "result":[]
}

2.多条记录

{
    "code":200,
    "msg":"查询成功",
    "mix_code":130001,
    "mix_msg":"接口请求成功",
    "mix_ext":"第三方服务请求成功",
    "result":{
        "page_index":1,
        "page_size":20,
        "total_pages":0,
        "total_records":0,
        "data":[]
    }
}

备注:mix_code编码是MixIOT平台编码,提供国际化翻译(详见附录)。

1.7. 接口定义

1.7.1. 认证与授权

1.7.1.1. Login(登录)

属性
url /api/login
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
username 登录账户 String 登录账户
password 登录密码 String
system 登录系统 String
keep_alive 会话周期 String short/medium/long

system 和 username 参数说明:

登录系统 system username
MixPro系统 MixPro 用户名
ADMIN系统 ADMIN 用户名
APP应用 APP 手机号

keep_alive 参数说明:

token 时效 refresh_token 时效
default 2h 1d
short 1d 7d
medium 3d 30d
long 7d 90d

返回示例:

{
    "code": 200,
    "msg": "登录成功",
    "mix_code": 130002,
    "mix_msg": "",
    "mix_ext": "",
    "result": {
        "user_id": 1000,
        "username": "admin",
        "is_super": 1,
        "mobile": "13812312300",
        "description": "",
        "extension": "9527",
        "email": "admin@mixlinker.com",
        "address": "",
        "reference": "mixlinker.pro.admin",
        "created": "2018-06-14 20:00:00",
        "ticket": "VXtqg4RfMM2rFsoXgKNhFjUHx2AtQAFh",
        "refresh_token": "vmONEv3tyOGsoQBhCQyOXqDyqZlVixetTPEXL12CVeDIlgXXOHb3UuM9HBUhvXpN",
        "keep_alive": "long",
        "token": "VXtqg4RfMM2rFsoXgKNhFjUHx2AtQAFh"
    }
}

备注:

若无特殊说明,其他接口鉴权时 需要将token通过http请求头 header发送以下数据鉴权($token表示登录返回的token数据):

Authorization:Bearer $token

1.7.1.2. CheckTicket(票据校验)

调用接口:

属性
url /api/check_ticket
http方法 post
Content-Type application/json或application/x-www-form-urlencoded
备注 CheckTicket接口无需鉴权

请求参数:

字段 字段名称 字段类型 说明 是否必传
source 系统标识 String
ticket 票据(令牌) String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code":200,
    "msg":"Ticket校验成功",
    "mix_code":130003,
    "mix_msg":"",
    "mix_ext":"",
    "result":{
        "user_id":1001,
        "username":"admin",
        "is_super":1,
        "description":"超级管理员",
        "mobile":"13800138000",
        "email":"admin@mixlinker.com",
        "address":"深圳市美声创谷春谷3楼-智物联网络有限公司",
        "created":"2018-10-18 16:44:17"
    }
}

备注:

CheckTicket接口提供单点登录鉴权,非单点登录时通过Login接口登录。

1.7.1.3. RefreshToken(重新获取 Token)

调用接口:

属性
url /api/refresh_token
http方法 post
Content-Type application/json或application/x-www-form-urlencoded
备注 CheckTicket接口无需鉴权

请求参数:

字段 字段名称 字段类型 说明 是否必传
refresh_token 更新令牌 String
source 系统来源 String 如:ADMIN/MixPro/APP

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "重新获取 Ticket 成功",
    "mix_code": 130004,
    "mix_msg": "",
    "mix_ext": "",
    "result": {
        "user_id": 1000,
        "username": "admin",
        "realname": "",
        "customer_id": "",
        "is_super": 1,
        "mobile": "13812312300",
        "description": "",
        "sex": "",
        "position": "",
        "phone": "",
        "extension": "9527",
        "email": "admin@mixlinker.com",
        "address": "",
        "template": "",
        "script": "",
        "reference": "mixlinker.pro.admin",
        "created": "2018-06-14 20:00:00",
        "ticket": "4iCJohHIaCQuoGsazi1KMm0hlMieO7rk",
        "refresh_token": "MRFfbUGUWRdapLtK7Ur59EpluIoaFBmpujJzFs5H4fGj8f90g4M9vUM841jXoB5u",
        "keep_alive": "default",
        "token": "4iCJohHIaCQuoGsazi1KMm0hlMieO7rk"
    }
}

1.7.1.4. User(当前用户信息)

调用接口:

属性
url /api/user
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
- - - - -

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code":200,
    "msg":"查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result":{
        "user_id":1001,
        "username":"admin",
        "is_super":1,
        "description":"超级管理员",
        "mobile":"13800138000",
        "email":"admin@mixlinker.com",
        "address":"深圳市美声创谷春谷3楼-智物联网络有限公司",
        "created":"2018-10-18 16:44:17"
    }
}

1.7.1.5. ResetPassword(更改密码)

调用接口:

属性
url /api/reset_password
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
old_password 旧密码 String
new_password 新密码 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code":200,
    "msg":"修改成功",
    "mix_code":130004,
    "mix_msg":"",
    "mix_ext":"",
    "result":[]
}

1.7.1.6. Upload(附件上传)

调用接口:

属性
url /api/file/upload
http方法 post
Content-Type multipart/form-data

请求参数:

字段 字段名称 字段类型 说明 是否必传
upload_file 文件 File
type 上传类型 String 作业:activity 服务:service 设备:equipment

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "上传成功",
    "mix_code":130005,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "path": "equipment/2018/11/fangkuaizutaitu.gif"
    }
}

1.7.1.7. Download(附件下载)

调用接口:

属性
url /api/file/download
http方法 get
Content-Type
备注 Download接口无需鉴权

请求参数:

字段 字段名称 字段类型 说明 是否必传
path 文件路径 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 500,
    "msg": "文件不存在",
    "mix_code":230006,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

备注:

下载成功时,直接返回输出文件流;下载失败时,返回状态码和提示信息。

1.7.1.8. Download(附件下载)

调用接口:

属性
url /api/setting/feedback
http方法 get
Content-Type

请求参数:

字段 字段名称 字段类型 说明 是否必传
title 反馈标题 String
type 反馈类型 String
description 反馈内容 String
name 反馈人员 String
company 公司名称 String
email 电子邮箱 String
phone 联系电话 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "反馈成功",
    "mix_code":230006,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.2. Activity(作业)

1.7.2.1. 查询列表(关注设备或关注客户或无设备ID)

调用接口:

属性
url /api/activity/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["activity_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "activity_id": 1001,
                "activity_name": "日常作业",
                "date": "2018-12-07 12:30:00",
                "category": "",
                "description": null,
                "customer_id": 1001,
                "equipment_id": 1001,
                "staff": "",
                "attachment": "",
                "template": null,
                "script": null,
                "reference": "",
                "created": "2018-12-07 12:30:00",
                "is_available": 1
            }
        ]
    }
}

1.7.2.2. 查询指定记录

调用接口:

属性
url /api/activity/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
activity_id 作业标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "activity_id": 1001,
        "activity_name": "日常作业",
        "date": "2018-12-07 12:30:00",
        "category": "",
        "description": null,
        "customer_id": 1001,
        "equipment_id": 1001,
        "staff": "",
        "attachment": "",
        "template": null,
        "script": null,
        "reference": "",
        "created": "2018-12-07 12:30:00",
        "is_available": 1
    }
}

1.7.2.3. 查询列表(EXP使用:关注设备)

调用接口:

属性
url /api/exp/activity/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 0,
        "data": []
    }
}

1.7.2.4. 添加activity

调用接口:

属性
url /api/activity/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
activity_name 作业名称 String
date 作业时间 datetime
category 作业类型 String
description 描述 Text
customer_id 客户标识 String
equipment_id 设备标识 String
staff 服务人员 String
attachment 服务附件路径 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.2.5. 编辑activity

调用接口:

属性
url /api/activity/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
activity_id 作业标识 String
activity_name 作业名称 String
date 作业时间 datetime
category 作业类型 String
description 描述 Text
customer_id 客户标识 String
staff 服务人员 String
attachment 服务附件路径 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.2.6. 删除activity

调用接口:

属性
url /api/activity/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
activity_id 作业标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.3. Alert(报警)

1.7.3.1. 查询列表(关注设备或无设备ID)

调用接口:

属性
url /api/alert/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["alert_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "alert_id": 1001,
                "code": "2514",
                "alert_name": "油分器堵塞",
                "description": "Label_En:Oil Separator Blocked;Label_Cn:油分器堵塞",
                "aprus_id": "A22018083100002",
                "equipment_id": 1002,
                "template": "",
                "script": "",
                "reference": "",
                "created": "2018-09-01 15:43:32",
                "is_available": 1
            }
        ]
    }
}

1.7.3.2. 查询指定记录

调用接口:

属性
url /api/alert/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
alert_id 报警标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "alert_id": 1001,
        "code": "2514",
        "alert_name": "油分器堵塞",
        "description": "Label_En:Oil Separator Blocked;Label_Cn:油分器堵塞",
        "aprus_id": "A22018083100002",
        "equipment_id": 1002,
        "template": "",
        "script": "",
        "reference": "",
        "created": "2018-09-01 15:43:32",
        "is_available": 1
    }
}

1.7.3.3. 查询列表(EXP使用:关注设备)

调用接口:

属性
url /api/exp/alert/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 0,
        "data": []
    }
}

1.7.3.4. 添加alert

调用接口:

属性
url /api/alert/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
alert_name 报警代码 String
description 描述 Text
aprus_id 适配器标识 String
equipment_id 设备标识 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "msg": "添加成功",
    "result": []
}

1.7.3.5. 编辑alert

调用接口:

属性
url /api/alert/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
alert_id 报警标识 String
alert_name 报警代码 String
description 描述 Text
aprus_id 适配器标识 String
equipment_id 设备标识 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.3.6. 删除alert

调用接口:

属性
url /api/alert/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
alert_id 报警标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.4. AlertMosaic(报警挂板)

1.7.4.1. 查询AlertMosaic详细列表

调用接口:

属性
url /api/alert_mosaic/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["equipment_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [{
            "equipment_id": 1005,
            "alert_mosaic": {
                "7493 ": ["1001 ", "速度反馈错误 "]
            },
            "template": "",
            "script": "",
            "reference": "",
            "created": "2018-09-11 16:52:04",
            "is_available": 1
        }]
    }
}

1.7.4.2. 查询AlertMosaic指定记录

调用接口:

属性
url /api/alert_mosaic/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "equipment_id": 1007,
        "alert_mosaic": {
            "7603": [
                "1002",
                "减速过电流"
            ]
        },
        "template": "",
        "script": "",
        "reference": "",
        "created": "2018-09-11 16:54:13",
        "is_available": 1
    }
}

1.7.4.3. 查询AlertMosaic指定设备挂板列表

调用接口:

属性
url /api/alert_mosaic/get_list_by_equipment
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "alert_id": 1001,
                "code": "2514",
                "alert_name": "油分器堵塞",
                "description": "Label_En:Oil Separator Blocked;Label_Cn:油分器堵塞",
                "aprus_id": "A22018083100002",
                "equipment_id": 1002,
                "template": "",
                "script": "",
                "reference": "",
                "created": "2018-09-01 15:43:32",
                "is_available": 1
            }
        ]
    }
}

1.7.4.4. 查询AlertMosaic关注设备挂板列表

调用接口:

属性
url /api/alert_mosaic/get_list_by_user
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "alert_id": 1001,
                "code": "2514",
                "alert_name": "油分器堵塞",
                "description": "Label_En:Oil Separator Blocked;Label_Cn:油分器堵塞",
                "aprus_id": "A22018083100002",
                "equipment_id": 1002,
                "template": "",
                "script": "",
                "reference": "",
                "created": "2018-09-01 15:43:32",
                "is_available": 1
            }
        ]
    }
}

1.7.4.5. 添加AlertMosaic

调用接口:

属性
url /api/alert_mosaic/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String
alert_mosaic 告警标识集合 Text
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.4.6. 编辑AlertMosaic

调用接口:

属性
url /api/alert_mosaic/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String
alert_mosaic 告警标识集合 Text
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.4.7. 删除AlertMosaic

调用接口:

属性
url /api/alert_mosaic/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.5. Aprus(适配器)

1.7.5.1. 查询Aprus详细列表

调用接口:

属性
url /api/aprus/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["aprus_id", "like", "fidiser"], ["aprus_name", "=", "专用适配器"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "aprus_id": "A201812060003",
                "aprus_name": "空压机-0766",
                "access": "pub",
                "topic": "r,a,v,p,i,n,d",
                "description": "无",
                "maker": "智物联",
                "config_id": 1002,
                "codebase_id": 1001,
                "nominal": null,
                "activated": "2018-08-31 16:37:39",
                "type": "2",
                "template": null,
                "script": null,
                "reference": null,
                "created": "2018-08-31 16:37:39",
                "is_available": 1
            }
        ]
    }
}

1.7.5.2. 查询Aprus指定记录

调用接口:

属性
url /api/aprus/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
aprus_id 适配器标识 String 适配器标识

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "aprus_id": "A201812060003",
        "aprus_name": "空压机-0766",
        "access": "pub",
        "topic": "r,a,v,p,i,n,d",
        "description": "无",
        "maker": "智物联",
        "config_id": 1002,
        "codebase_id": 1001,
        "nominal": null,
        "activated": "2018-08-31 16:37:39",
        "type": "2",
        "template": null,
        "script": null,
        "reference": null,
        "created": "2018-08-31 16:37:39",
        "is_available": 1
    }
}

1.7.5.3. 添加Aprus

调用接口:

属性
url /api/aprus/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
aprus_id 适配器标识 String
aprus_name 适配器名称 String
description 描述 Text
username 鉴权用户名 String
pin 鉴权验证码 String
access 报文权限 String 单选:all,pub,sub
topic 报文主题 String 多选: all:all pub:r,a,v,p,i,n sub:g/#
maker 生产厂家 String
config_id 适配器配置标识 String 对应config表
codebase_id 代码库 String 对应codebase
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.5.4. 编辑Aprus

调用接口:

属性
url /api/customer/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
aprus_id 适配器标识 String
aprus_name 适配器名称 String
description 描述 Text
username 鉴权用户名 String
pin 鉴权验证码 String
access 报文权限 String 单选:all,pub,sub
topic 报文主题 String 多选: all:all pub:r,a,v,p,i,n sub:g/#
description 描述 text
maker 生产厂家 String
config_id 适配器配置标识 String 对应config表
codebase_id 代码库 String 对应codebase
nominal 公称名义 String 不可编辑
activated 激活时间 datetime 不可编辑
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.5.5. 删除Aprus

调用接口:

属性
url /api/aprus/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
aprus_id 适配器标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.6. Codebase(代码库)

1.7.6.1. 查询Codebase详细列表

调用接口:

属性
url /api/codebase/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["codebase_id", "like", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "codebase_id": 1001,
                "codebase_name": "1号机组",
                "description": "",
                "template": "[]",
                "script": "[]",
                "reference": "",
                "created": "2018-09-18 18:03:26",
                "is_available": 1,
                "boss_sync": 0
            }
        ]
    }
}

1.7.6.2. 查询Codebase指定记录

调用接口:

属性
url /api/codebase/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
codebase_id 代码库标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "customer_id": 1001,
        "customer_name": "智物联",
        "description": "智物联-物联网平台",
        "secret": "5JHC",
        "exp_id": "zhiwulian.exp",
        "province": "广东省",
        "city": "深圳市",
        "address": "美声创谷春谷",
        "phone": "075523740592",
        "contact": "admin",
        "mobile": "13800138000",
        "email": "admin.mixlinker.com",
        "template": "",
        "script": "",
        "reference": "",
        "created": "2018-09-18 17:42:50"
    }
}

1.7.6.3. 添加Codebase

调用接口:

属性
url /api/codebase/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
codebase_name 代码库名称 String
description 描述 Text
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.6.4. 编辑Codebase

调用接口:

属性
url /api/codebase/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
codebase_id 代码库标识 String
codebase_name 代码库名称 String
description 描述 Text
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.6.5. 删除Codebase

调用接口:

属性
url /api/codebase/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
codebase_id 代码库标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
     "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.7. Collect(离线数据类型)

1.7.7.1. 查询Collect详细列表

调用接口:

属性
url /api/collect/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["event_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "collect_id": "temperature",
                "collect_name": "温度",
                "instrument": "温度计",
                "unit": "摄氏度",
                "description": null,
                "default_value": "0",
                "template": null,
                "script": null,
                "reference": "",
                "created": "2018-09-05 17:25:53",
                "is_available": 1,
                "boss_sync": 0
            }
        ]
    }
}

1.7.7.2. 查询Collect指定记录

调用接口:

属性
url /api/collect/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
collect_id 数据采集标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "collect_id": "temperature",
        "collect_name": "温度",
        "instrument": "温度计",
        "unit": "摄氏度",
        "description": null,
        "default_value": "0",
        "template": null,
        "script": null,
        "reference": "",
        "created": "2018-09-05 17:25:53",
        "is_available": 1,
        "boss_sync": 0
    }
}

1.7.7.3. 添加Collect

调用接口:

属性
url /api/collect/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
collect_id 数据采集标识 String
collect_name 数据采集类型名称 String
instrument 记录仪器 String
unit 数据单位 String
description 描述 Text
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.7.4. 编辑Collect

调用接口:

属性
url /api/collect/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
collect_id 数据采集标识 String
collect_name 数据采集类型名称 String
instrument 记录仪器 String
unit 数据单位 String
description 描述 Text
template 模板/样式 text
script 脚本 text
reference 参考号 String
is_available 是否有效 Boolean 1:是,0:否

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.7.5. 删除Collect

调用接口:

属性
url /api/collect/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
collect_id 数据采集标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.8. Collectos(离线数据结果)

1.7.8.1. 查询Collectos列表

调用接口:

属性
url /api/collectos/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime
is_all 是否返回所有数据 Boolean 1:是,0:否;如果为空,则默认0

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["collectos_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "collectos_id": 1001,
                "collectos_name": "temperature",
                "description": null,
                "collect_id": "temperature",
                "equipment_id": 1004,
                "data": "25",
                "collectos_file": "",
                "collector": "",
                "collect_time": "2018-11-23 18:43:30",
                "template": null,
                "script": null,
                "reference": "",
                "created": "2018-11-23 18:43:30",
                "is_available": 1,
                "boss_sync": 0,
                "collect_name": "温度",
                "unit": "℃"
            }
        ]
    }
}

1.7.8.2. 查询Collectos指定记录

调用接口:

属性
url /api/collectos/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
collectos_id 消息标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "collectos_id": 1001,
        "collectos_name": "temperature",
        "description": null,
        "collect_id": "temperature",
        "equipment_id": 1004,
        "data": "25",
        "collectos_file": "",
        "collector": "",
        "collect_time": "2018-11-23 18:43:30",
        "template": null,
        "script": null,
        "reference": "",
        "created": "2018-11-23 18:43:30",
        "is_available": 1,
        "boss_sync": 0,
        "collect_name": "温度",
        "unit": "℃"
    }
}

1.7.8.3. 添加Collectos

调用接口:

属性
url /api/collectos/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
collectos_name 采集结果名称 String
description 描述 Text
collect_id 采集类型标识 String
collect_time 采集时间 String
equipment_id 设备标识 String
data 采集数据 text
collectos_file 附件路径 String
collector 采集人员 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.8.4. 编辑Collectos

调用接口:

属性
url /api/collectos/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
collectos_id 采集结果标识 String
collectos_name 采集结果名称 String
description 描述 Text
collect_id 采集类型标识 String
equipment_id 设备标识 String
data 采集数据 text
collectos_file 附件路径 String
collector 采集人员 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.8.5. 删除Collectos

调用接口:

属性
url /api/collectos/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
collectos_id 消息标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.9. Common(公共接口)

1.7.9.1. 查询故障、报警、事件-详细列表

调用接口:

属性
url /api/common/get_all_warn
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime
is_group 是否查询设备组 Boolean 不传则返回所有数据; 值为1则只返回设备组数据; 值为0则只返回设备数据

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "id": 1002,
                "name": "锅炉过热",
                "type": "alert",
                "type_name": "报警",
                "code": "9527",
                "aprus_id": "A22018083100002",
                "equipment_id": 1001,
                "equipment_name": "pro+测试设备",
                "description": "Label_En:Oil Separator Blocked;Label_Cn:锅炉过热",
                "created": "2018-09-11 17:03:07",
                "is_available": 1
            }
        ]
    }
}

1.7.10. Config(适配器配置)

1.7.10.1. 查询Config详细列表

调用接口:

属性
url /api/config/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", ${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["config_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "success",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "customer_id": 1001,
                "customer_name": "智物联",
                "description": "智物联-物联网平台",
                "secret": "5JHC",
                "exp_id": "zhiwulian.exp",
                "province": "广东省",
                "city": "深圳市",
                "address": "美声创谷春谷",
                "phone": "075523740592",
                "contact": "admin",
                "mobile": "13800138000",
                "email": "admin.mixlinker.com",
                "template": null,
                "script": null,
                "reference": null,
                "created": "2018-09-18 17:42:50"
            }
        ]
    }
}

1.7.10.2. 查询Config指定记录

调用接口:

属性
url /api/config/get
http方法 post

请求参数:

字段 字段名称 字段类型 说明 是否必传
config_id 适配器配置标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
data 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "config_id": 1001,
                "config_name": "空压机配置",
                "description": null,
                "hardware": null,
                "mcu_file": null,
                "mcu_version": null,
                "remosu_file": null,
                "remosu_version": null,
                "lua_file": null,
                "lua_version": null,
                "template": null,
                "script": null,
                "reference": null,
                "created": "2018-09-20 22:14:41",
                "is_available": 1,
                "boss_sync": 0
            }
        ]
    }
}

1.7.10.3. 添加Config

调用接口:

属性
url /api/config/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
config_name 适配器配置名称 String
description 描述 Text
firmware 硬件版本号 String
mcu_file mcu文件路径 String
mcu_version muc版本号 String
lua_file lua程序文件路径 String
lua_version lua版本号 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.10.4. 编辑Config

调用接口:

属性
url /api/config/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
config_id 适配器配置标识 String
config_name 适配器配置名称 String
description 描述 Text
firmware 硬件版本号 String
mcu_file mcu文件路径 String
mcu_version muc版本号 String
lua_file lua程序文件路径 String
lua_version lua版本号 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.10.5. 删除Config

调用接口:

属性
url /api/config/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
config_id 适配器配置标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.11. Customer(客户)

1.7.11.1. 查询列表(Customer关注客户)

调用接口:

属性
url /api/customer/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

其中,运算符为MySQL比较运算符,支持一下几种:

运算符 含义
= 等于
> 大于
\< 小于
>= 大于等于
\<= 小于等于
!=或\<> 不等于
LIKE或like 包含

举例

[["customer_id", "=", "1001"], ["customer_name", "LIKE", "智物联"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "success",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "customer_id": 1001,
                "customer_name": "智物联",
                "description": "智物联-物联网平台",
                "secret": "5JHC",
                "exp_id": "zhiwulian.exp",
                "province": "广东省",
                "city": "深圳市",
                "address": "美声创谷春谷",
                "phone": "075523740592",
                "contact": "admin",
                "mobile": "13800138000",
                "email": "admin.mixlinker.com",
                "template": null
                "script": null,
                "reference": null,
                "created": "2018-09-18 17:42:50"
            }
        ]
    }
}

1.7.11.2. 指定记录

调用接口:

属性
url /api/customer/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
customer_id 客户标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "customer_id": 1001,
        "customer_name": "智物联",
        "description": "智物联-物联网平台",
        "secret": "5JHC",
        "exp_id": "zhiwulian.exp",
        "province": "广东省",
        "city": "深圳市",
        "address": "美声创谷春谷",
        "phone": "075523740592",
        "contact": "admin",
        "mobile": "13800138000",
        "email": "admin.mixlinker.com",
        "template": "",
        "script": "",
        "reference": "",
        "created": "2018-09-18 17:42:50"
    }
}

1.7.11.3. EXP列表

调用接口:

属性
url /api/customer/get_exp_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": [
        {
            "exp_id": "develop.exp",
            "exp_name": "智物联"
        }
    ]
}

1.7.11.4. 添加Customer

调用接口:

属性
url /api/customer/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
customer_name 客户名称 String
description 描述 Text
secret 管理密码 String
exp_id EXP标识 String
province 省份 String
city 城市/地区 String
address 地址 String
phone 电话 String
contact 联系人 String
mobile 联系人手机 String
email 邮箱 String
template 模板/样式 Text
script 脚本 Text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.11.5. 编辑Customer

调用接口:

属性
url /api/customer/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
customer_id 客户标识 String
customer_name 客户名称 String
description 描述 Text
secret 管理密码 String
exp_id EXP标识 String
province 省份 String
city 城市/地区 String
address 地址 String
phone 电话 String
contact 联系人 String
mobile 联系人手机 String
email 邮箱 String
template 模板/样式 Text
script 脚本 Text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.11.6. 删除Customer

调用接口:

属性
url /api/customer/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
customer_id 客户标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.12. Dashboard(显示板)

1.7.12.1. 查询Dashboard详细列表

调用接口:

属性
url /api/dashboard/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["dashboard_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "dashboard_id": 1003,
                "dashboard_name": "设备大屏模板",
                "description": "",
                "template": "[]",
                "script": "[]",
                "mixshow": "[]",
                "exp": "[]",
                "reference": "",
                "created": "2018-10-17 13:59:21",
                "is_available": 1,
                "boss_sync": 0
            }
        ]
    }
}

1.7.12.2. 查询Dashboard指定记录

调用接口:

属性
url /api/dashboard/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
dashboard_id 显示板标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "dashboard_id": 1003,
        "dashboard_name": "设备大屏模板",
        "description": "",
        "template": "[]",
        "script": "[]",
        "mixshow": "[]",
        "exp": "[]",
        "reference": "",
        "created": "2018-10-17 13:59:21",
        "is_available": 1,
        "boss_sync": 0
    }
}

1.7.12.3. 添加Dashboard

调用接口:

属性
url /api/dashboard/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
dashboard_name 显示板名称 String
description 描述 Text
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.12.4. 编辑Dashboard

调用接口:

属性
url /api/dashboard/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
dashboard_id 显示板标识 String
dashboard_name 显示板名称 String
description 描述 Text
template 模板/样式 text
script 脚本 text
reference 参考号 String
is_available 是否有效 Boolean 1:是,0:否

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.12.5. 删除Dashboard

调用接口:

属性
url /api/dashboard/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
dashboard_id 显示板标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.13. Datasheet(数据表)

1.7.13.1. 查询Datasheet详细列表

调用接口:

属性
url /api/datasheet/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["key", "operator", "value"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["datasheet_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 2,
        "data": [
            {
                "datasheet_id": 1002,
                "datasheet_name": "深海捷",
                "description": null,
                "file": null,
                "template": null,
                "script": null,
                "reference": null,
                "created": "2018-09-20 20:18:48",
                "is_available": 1,
                "boss_sync": 0
            },
            {
                "datasheet_id": 1001,
                "datasheet_name": "智物联",
                "description": null,
                "file": null,
                "template": null,
                "script": null,
                "reference": null,
                "created": "2018-09-18 19:46:47",
                "is_available": 1,
                "boss_sync": 0
            }
        ]
    }
}

1.7.13.2. 查询Datasheet指定记录

调用接口:

属性
url /api/datasheet/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
datasheet_id 数据表标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "datasheet_id": 1002,
        "datasheet_name": "深海捷",
        "description": null,
        "file": null,
        "template": null,
        "script": null,
        "reference": null,
        "created": "2018-09-20 20:18:48",
        "is_available": 1,
        "boss_sync": 0
    }
}

1.7.13.3. 添加Datasheet

调用接口:

属性
url /api/datasheet/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
datasheet_name 数据表名称 String
description 描述 Text
file 数据表文件路径
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.13.4. 编辑Datasheet

调用接口:

属性
url /api/datasheet/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
datasheet_id 数据表标识 String
datasheet_name 数据表名称 String
description 描述 Text
file 数据表文件路径
template 模板/样式 text
script 脚本 text
reference 参考号 String
is_available 是否有效 Boolean 1:是,0:否

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.13.5. 删除Datasheet

调用接口:

属性
url /api/datasheet/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
datasheet_id 数据表标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.14. Equipment(设备)

1.7.14.1. 查询Equipment列表(关注设备)

调用接口:

属性
url /api/equipment/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime
is_all 是否不分页返回(即返回所有数据) Boolean 1:是,0:否;如果为空,则默认0

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"

举例

[["equipment_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [{
            "equipment_id": 1005,
            "equipment_name": "设备5",
            "description": "设备5",
            "customer_id": 1003,
            "equipment_sn": "1001",
            "model": "设备5",
            "type_id": 1001,
            "camera_list": "",
            "is_group": 0,
            "camera_url": "http://hls.open.ys7.com/openlive/9ba56459b9ca4e78b85ebced5c365083.m3u8,https://www.baidu.com",
            "datasheet_id": 1001,
            "aprus_list": [" A22018083100003 ", "A22018083100002"],
            "mapping_id": 1003,
            "gis": "",
            "secret": "DZHR",
            "auth_code": 1234,
            "equipment_image": "equipment/2018/09/Desert_VJR97.jpg",
            "addition": [{
                "title ": "基本信息 ",
                "data ": [
                    ["生产厂家 ", ""],
                    ["锅炉吨位 ", "10 吨"],
                    ["设备尺寸 ", ""],
                    ["设备重量 ", ""],
                    ["制造日期 ", ""],
                    ["启用日期 ", ""]
                ]
            }],
            "created": "2018-08-3018:24:19",
            "customer_name": "test",
            "status_code": 0,
            "status_name": "停止"
        }]
    }
}

1.7.14.2. 查询Equipment指定记录

调用接口:

属性
url /api/equipment/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "equipment_id": 1005,
        "equipment_name": "设备5",
        "description": "设备5",
        "customer_id": 1003,
        "equipment_sn": "1001",
        "model": "设备5",
        "type_id": 1001,
        "camera_list": "",
        "is_group": 0,
        "camera_url": "http://hls.open.ys7.com/openlive/9ba56459b9ca4e78b85ebced5c365083.m3u8,https://www.baidu.com",
        "datasheet_id": 1001,
        "aprus_list": [" A22018083100003 ", "A22018083100002"],
        "mapping_id": 1003,
        "gis": "",
        "secret": "DZHR",
        "auth_code": 1234,
        "equipment_image": "equipment/2018/09/Desert_VJR97.jpg",
        "addition": [{
            "title ": "基本信息 ",
            "data ": [
                ["生产厂家 ", ""],
                ["锅炉吨位 ", "10 吨"],
                ["设备尺寸 ", ""],
                ["设备重量 ", ""],
                ["制造日期 ", ""],
                ["启用日期 ", ""]
            ]
        }],
        "created": "2018-08-3018:24:19",
        "customer_name": "test",
        "status_code": 0,
        "status_name": "停止"
    }
}

1.7.14.3. 添加Equipment

调用接口:

属性
url /api/equipment/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_name 设备名称 String
description 描述 Text
customer_id 客户标识 String
equipment_sn 设备编号 String
model 设备型号 String
datasheet_id 设备数据表标识 String
aprus_list 适配器列表 String
mapping_id 设备与适配器参数映射表标识 String
statistics_id 统计计算标识 String
gis 设备地理信息 String
secret 管理密码 String
auth_code 反向控制管理密码 String
equipment_image 设备图片路径 String
addition 附加字段/自定义字段 Json
template 模板/样式 text
script 脚本 text
reference 参考号 String

addition数据格式说明(json格式):

[
    {
        "title": "锅炉信息",
        "data": [
            ["燃料类型","天然气"],
            ["锅炉重量","2吨"],
            ["出厂日期","2018-03-03"]
        ]
    },
    {
        "title": "能效指标信息",
        "data": [
            ["热效率",0.8],
            ["燃料热值",7000],
            ["吨汽燃料指标",0.21]
        ]
    }
]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.14.4. 编辑Equipment

调用接口:

属性
url /api/equipment/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String
equipment_name 设备名称 String
description 描述 Text
customer_id 客户标识 String
equipment_sn 设备编号 String
model 设备型号 String
datasheet_id 设备数据表标识 String
aprus_list 适配器列表 String
mapping_id 设备与适配器参数映射表标识 String
statistics_id 统计计算标识 String
gis 设备地理信息 String
secret 管理密码 String
auth_code 反向控制管理密码 String
equipment_image 设备图片路径 String
addition 附加字段/自定义字段 Json
template 模板/样式 text
script 脚本 text
reference 参考号 String

addition数据格式说明(json格式):

[
    {
        "title": "锅炉信息",
        "data": [
            ["燃料类型","天然气"],
            ["锅炉重量","2吨"],
            ["出厂日期","2018-03-03"]
        ]
    },
    {
        "title": "能效指标信息",
        "data": [
            ["热效率",0.8],
            ["燃料热值",7000],
            ["吨汽燃料指标",0.21]
        ]
    }
]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.14.5. 删除Equipment

调用接口:

属性
url /api/equipment/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.14.6. 查询Equipment反向控制列表

调用接口:

属性
url /api/equipment/get_codebase_template
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": [{
        "aprus_id": "A22018083100003",
        "aprus_name": "锅炉专用",
        "codebase_id": 1001,
        "template": [
            ["Control", "StartRemoteControl", "设备控制", "2", "L1_3_9", "1|2|4|8", "远程启动|远程停机|卸载|加载", "PEA"],
            ["temp", "temp", "设备控制", "2", "L1_3_8", "$", "温度", "PEA"]
        ]
    }]
}

1.7.14.7. 查询Equipment故障和报警列表

调用接口:

属性
url /api/equipment/get_warn_info
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String
total 查询记录数 Integer 大于 0,如果为空,则默认为 20

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "total_records": 3,
        "data": [
            {
                "id": 1002,
                "name": "锅炉过热",
                "type": "alert",
                "description": "Label_En:Oil Separator Blocked;Label_Cn:锅炉过热",
                "created": "2018-09-11 17:03:07"
            },
            {
                "id": 1001,
                "name": "速度反馈错误",
                "type": "fault",
                "description": "Label_En:Speed Feedback Error;Label_Cn:速度反馈错误",
                "created": "2018-09-03 15:43:32"
            },
            {
                "id": 1002,
                "name": "减速过电流",
                "type": "fault",
                "description": "Label_En:Retarded Overcurrent;Label_Cn:减速过电流",
                "created": "2018-09-01 15:43:32"
            }
        ]
    }
}

1.7.14.8. 查询Equipment服务和作业列表

调用接口:

属性
url /api/equipment/get_task_info
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String
total 查询记录数 Integer 大于 0,如果为空,则默认为 20

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "total_records": 3,
        "data": [
            {
                "id": 1001,
                "name": "施工服务",
                "type": "service",
                "description": "",
                "date": "2018-11-30 09:16:18"
            },
            {
                "id": 1001,
                "name": "日常检修",
                "type": "activity",
                "description": "",
                "date": "2018-11-30 09:16:18"
            },
            {
                "id": 1002,
                "name": "普通作业",
                "type": "activity",
                "description": "",
                "date": "2018-11-30 09:16:18"
            }
        ]
    }
}

1.7.14.9. 查询 Equipment APP显示板信息

调用接口:

属性
url /api/equipment/get_dashboard_template
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "equipment_id": 1001,
        "mapping_id": 1001,
        "template": [{
            "specialParameters": [{
                "title": "瞬时流量",
                "key": "S01",
                "value": "0",
                "unit": "Nm³"
            }],
            "basicParameters": [{
                "title": "累计流量",
                "key": "S04",
                "value": "0",
                "unit": "Nm³"
            }, {
                "title": "供气压力",
                "key": "S05",
                "value": "0",
                "unit": "Mpa"
            }],
            "moreParameter": [{
                "class": "数值监控类",
                "data": [{
                    "title": "瞬时流量",
                    "key": "S01",
                    "value": "0",
                    "unit": "Nm³"
                }]
            }],
            "controlPanel": [{
                "title": "远程控制监控5",
                "key": "S13",
                "value": "0",
                "unit": "h",
                "max": "50",
                "min": "0",
                "color": "#ffffff"
            }]
        }]
    }
}

1.7.14.10. 查询Equipment故障和报警挂板列表

调用接口:

属性
url /api/equipment/get_mosaic_warn
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "success",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 2,
        "total_records": 1,
        "data": [
            {
                "id": 1001,
                "name": "速度反馈错误",
                "type": "fault",
                "code": "7493",
                "equipment_id": 1001,
                "aprus_id": "A22018083100002",
                "description": "Label_En:Speed Feedback Error;Label_Cn:速度反馈错误",
                "created": "2018-09-03 15:43:32"
            },
            {
                "id": 1001,
                "name": "油分器堵塞",
                "type": "alert",
                "code": "2514",
                "equipment_id": 1002,
                "aprus_id": "A22018083100002",
                "description": "Label_En:Oil Separator Blocked;Label_Cn:油分器堵塞",
                "created": "2018-09-01 15:43:32"
            }
        ]
    }
}

1.7.14.11. 查询Equipment设备关联适配器的Fidis变量

调用接口:

属性
url /api/equipment/get_fidis_variable
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String
aprus_id 适配器标识 String 如:A20180831003
aprus_key 参数上报Key String 如:L1_3_1

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "fidis_var": "S01"
    }
}

1.7.15. EquipmentGroup(设备组)

1.7.15.1. 查询EquipmentGroup列表(关注设备组)

调用接口:

属性
url /api/equipment_group/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime
is_all 是否不分页返回(即返回所有数据) Boolean 1:是,0:否;如果为空,则默认0

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["group_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "group_id": 1001,
                "group_name": "pro+设备",
                "description": null,
                "sub_equipment": "1007,1005",
                "main_equipment": "1001",
                "secret": "NYEW",
                "image": null,
                "template": "[]",
                "script": "[]",
                "reference": null,
                "created": "2018-09-25 09:30:49",
                "is_available": 1,
                "addition": "[]",
                "gis": "23.5485544122,114.0661345267,0,0",
                "customer_id": 1001,
                "customer_name": "智物联",
                "气站状态": 1,
                "气电比": "0.1172",
                "设备尺寸": "",
                "锅炉吨位": "",
                "产气量": "10.5H",
                "更新时间": "2018-11-30 17:16:35"
            }
        ]
    }
}

1.7.15.2. 查询EquipmentGroup指定记录

调用接口:

属性
url /api/equipment_group/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
group_id 设备组标识 Integer

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "group_id": 1001,
        "group_name": "pro+设备",
        "description": null,
        "sub_equipment": "1007,1005",
        "main_equipment": "1001",
        "secret": "NYEW",
        "image": null,
        "template": "[]",
        "script": "[]",
        "reference": null,
        "created": "2018-09-25 09:30:49",
        "is_available": 1,
        "addition": "[]",
        "gis": "23.5485544122,114.0661345267,0,0",
        "customer_id": 1001,
        "customer_name": "智物联",
        "气站状态": 1,
        "气电比": "0.1172",
        "设备尺寸": "",
        "锅炉吨位": "",
        "产气量": "10.5H",
        "更新时间": "2018-11-30 17:16:35"
    }
}

1.7.15.3. 添加EquipmentGroup

调用接口:

属性
url /api/equipment_group/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
group_name 设备组名称 String
description 描述 String
sub_equipment 子设备标识集合,如:1001,1002,1003 String
main_equipment 主设备标识 Integer
secret 管理密码 String
image 设备组图片路径 String
template 模板/样式 String
script 脚本 String
reference 参考号 String
created 记录创建时间 datetime
is_available 是否有效:1是、0否 Integer

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.15.4. 编辑EquipmentGroup

调用接口:

属性
url /api/equipment_group/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
group_id 设备组标识 Integer
group_name 设备组名称 String
description 描述 String
sub_equipment 子设备标识集合,如:1001,1002,1003 String
main_equipment 主设备标识 Integer
secret 管理密码 String
image 设备组图片路径 String
template 模板/样式 String
script 脚本 String
reference 参考号 String
created 记录创建时间 datetime
is_available 是否有效:1是、0否 Integer
addition 扩展信息 JSON

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.15.5. 删除EquipmentGroup

调用接口:

属性
url /api/equipment_group/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
group_id 设备组标识 Integer

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.15.6. 查询设备组子设备列表

调用接口:

属性
url /api/equipment_group/get_equipment
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
group_id 设备组标识 Integer

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": [
        {
            "equipment_id": 1005,
            "equipment_name": "测试设备5",
            "description": "测试设备5",
            "customer_id": 1003,
            "equipment_sn": "1001",
            "model": "测试设备5",
            "type_id": null,
            "camera_list": "测试设备5",
            "is_group": 0,
            "camera_url": "http://hls.open.ys7.com/openlive/9ba56459b9ca4e78b85ebced5c365083.m3u8,https://www.baidu.com",
            "datasheet_id": null,
            "aprus_list": "",
            "mapping_id": 1003,
            "gis": "",
            "secret": "DZHR",
            "auth_code": null,
            "equipment_image": "",
            "addition": [],
            "created": "2018-08-30 18:24:19",
            "is_available": 1,
            "boss_sync": 0,
            "customer_name": "test",
            "status_code": 0,
            "status_name": "关机|故障"
        }
    ]
}

1.7.15.7. 查询设备组事件、故障、报警、服务、作业列表

调用接口:

属性
url /api/equipment_group/get_process
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
group_id 设备组编号 Integer
start_time 查询开始时间 datetime
end_time 查询结束时间 datetime
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 0,
        "total_records": 0,
        "data": []
    }
}

1.7.15.8. 查询设备组事件列表

调用接口:

属性
url /api/equipment_group/get_event
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
group_id 设备组编号 Integer
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 0,
        "total_records": 0,
        "data": []
    }
}

1.7.15.9. 查询设备组故障挂板列表

调用接口:

属性
url /api/equipment_group/get_fault_mosaic
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
group_id 设备组编号 Integer
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 0,
        "total_records": 0,
        "data": []
    }
}

1.7.15.10. 查询设备组报警挂板列表

调用接口:

属性
url /api/equipment_group/get_alert_mosaic
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
group_id 设备组编号 Integer
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 0,
        "total_records": 0,
        "data": []
    }
}

1.7.15.11. 查询设备组故障和报警挂板列表

调用接口:

属性
url /api/equipment_group/get_mosaic_warn
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
group_id 设备组编号 Integer
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 0,
        "total_records": 0,
        "data": []
    }
}

1.7.16. Event(事件)

1.7.16.1. 查询Event详细列表(关注设备或无设备ID)

调用接口:

属性
url /api/event/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["event_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "event_id": 1003,
                "code": "3701",
                "event_name": "设备开始加载",
                "description": "Label_En:System Load Start;Label_Cn:设备开始加载",
                "aprus_id": "A22018083100002",
                "equipment_id": 1002,
                "template": null,
                "script": null,
                "reference": "",
                "created": "2018-09-11 16:43:42",
                "is_available": 1
            }
        ]
    }
}

1.7.16.2. 查询Event指定记录

调用接口:

属性
url /api/event/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
event_id 事件标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "event_id": 1003,
        "code": "3701",
        "event_name": "设备开始加载",
        "description": "Label_En:System Load Start;Label_Cn:设备开始加载",
        "aprus_id": "A22018083100002",
        "equipment_id": 1002,
        "template": null,
        "script": null,
        "reference": "",
        "created": "2018-09-11 16:43:42",
        "is_available": 1
    }
}

1.7.16.3. 查询Event列表(EXP使用:关注设备)

调用接口:

属性
url /api/exp/event/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 0,
        "data": []
    }
}

1.7.16.4. 添加Event

调用接口:

属性
url /api/event/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
event_name 事件代码 String
description 描述 Text
aprus_id 适配器标识 String
equipment_id 设备标识 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.16.5. 编辑Event

调用接口:

属性
url /api/event/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
event_id 事件标识 String
event_name 事件代码 String
description 描述 Text
aprus_id 适配器标识 String
equipment_id 设备标识 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.16.6. 删除Event

调用接口:

属性
url /api/event/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
event_id 事件标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.17. Fault(故障)

1.7.17.1. 查询Fault列表(关注设备或无设备ID)

调用接口:

属性
url /api/fault/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["fault_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 2,
        "data": [
            {
                "fault_id": 1001,
                "code": "7493",
                "fault_name": "速度反馈错误",
                "description": "Label_En:Speed Feedback Error;Label_Cn:速度反馈错误",
                "aprus_id": "A22018083100002",
                "equipment_id": 1001,
                "template": "",
                "script": "",
                "reference": "",
                "created": "2018-09-03 15:43:32",
                "is_available": 1
            }
        ]
    }
}

1.7.17.2. 查询Fault指定记录

调用接口:

属性
url /api/fault/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
fault_id 故障ID Integer 自增id

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "fault_id": 1001,
        "code": "7493",
        "fault_name": "速度反馈错误",
        "description": "Label_En:Speed Feedback Error;Label_Cn:速度反馈错误",
        "aprus_id": "A22018083100002",
        "equipment_id": 1001,
        "template": "",
        "script": "",
        "reference": "",
        "created": "2018-09-03 15:43:32",
        "is_available": 1
    }
}

1.7.17.3. 查询Fault列表(EXP使用:关注设备)

调用接口:

属性
url /api/exp/fault/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 0,
        "data": []
    }
}

1.7.17.4. 添加Fault

调用接口:

属性
url /api/fault/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
fault_name 故障代码 String
description 描述 Text
aprus_id 适配器标识 String
equipment_id 设备标识 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.17.5. 编辑Fault

调用接口:

属性
url /api/fault/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
fault_id 故障标识 String
fault_name 故障代码 String
description 描述 Text
aprus_id 适配器标识 String
equipment_id 设备标识 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.17.6. 删除Fault

调用接口:

属性
url /api/fault/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
fault_id 故障ID Integer 自增id

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.18. FaultMosaic(故障挂板)

1.7.18.1. 查询FaultMosaic列表

调用接口:

属性
url /api/fault_mosaic/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}",{value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["equipment_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 2,
        "data": [
            {
                "equipment_id": 1007,
                "fault_mosaic": {
                    "7603": [
                        "1002",
                        "减速过电流"
                    ]
                },
                "template": null,
                "script": null,
                "reference": "",
                "created": "2018-09-11 16:54:13",
                "is_available": 1
            },
            {
                "equipment_id": 1005,
                "fault_mosaic": {
                    "7493": [
                        "1001",
                        "速度反馈错误"
                    ]
                },
                "template": "",
                "script": "",
                "reference": "",
                "created": "2018-09-11 16:52:04",
                "is_available": 1
            }
        ]
    }
}

1.7.18.2. 查询FaultMosaic指定记录

调用接口:

属性
url /api/fault_mosaic/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "result": {
        "equipment_id": 1007,
        "fault_mosaic": {
            "7603": [
                "1002",
                "减速过电流"
            ]
        },
        "template": null,
        "script": null,
        "reference": "",
        "created": "2018-09-11 16:54:13",
        "is_available": 1
    }
}

1.7.18.3. 查询指定设备挂板列表

调用接口:

属性
url /api/fault_mosaic/get_list_by_equipment
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "fault_id": 1001,
                "code": "7493",
                "fault_name": "速度反馈错误",
                "description": "Label_En:Speed Feedback Error;Label_Cn:速度反馈错误",
                "aprus_id": "A22018083100002",
                "equipment_id": 1001,
                "template": "",
                "script": "",
                "reference": "",
                "created": "2018-09-03 15:43:32",
                "is_available": 1
            }
        ]
    }
}

1.7.18.4. 查询关注设备挂板列表

调用接口:

属性
url /api/fault_mosaic/get_list_by_user
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
is_all 是否返回所有数据 Boolean 1:是,0:否;如果为空,则默认0

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "fault_id": 1001,
                "code": "7493",
                "fault_name": "速度反馈错误",
                "description": "Label_En:Speed Feedback Error;Label_Cn:速度反馈错误",
                "aprus_id": "A22018083100002",
                "equipment_id": 1001,
                "template": "",
                "script": "",
                "reference": "",
                "created": "2018-09-03 15:43:32",
                "is_available": 1
            }
        ]
    }
}

1.7.18.5. 添加fault_mosaic

调用接口:

属性
url /api/fault_mosaic/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String
fault_mosaic 故障标识集合 Json
template 模板/样式 String
script 脚本 String
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.18.6. 编辑fault_mosaic

调用接口:

属性
url /api/fault_mosaic/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String
fault_mosaic 故障标识集合 Text
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.18.7. 删除fault_mosaic

调用接口:

属性
url /api/fault_mosaic/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.19. Mapping(映射表)

1.7.19.1. 查询Mapping详细列表

调用接口:

属性
url /api/mapping/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["mapping_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "mapping_id": 1003,
                "mapping_name": "设备大屏配置",
                "description": "",
                "dashboard_id": 1003,
                "template": "[]",
                "script": "[]",
                "reference": "",
                "created": "2018-10-17 14:03:39",
                "is_available": 1,
                "boss_sync": 0
            }
        ]
    }
}

1.7.19.2. 查询Mapping指定记录

调用接口:

属性
url /api/mapping/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
mapping_id 映射表标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "mapping_id": 1003,
        "mapping_name": "设备大屏配置",
        "description": "",
        "dashboard_id": 1003,
        "template": "[]",
        "script": "[]",
        "reference": "",
        "created": "2018-10-17 14:03:39",
        "is_available": 1,
        "boss_sync": 0
    }
}

1.7.19.3. 添加Mapping

调用接口:

属性
url /api/mapping/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
mapping_name 映射表名称 String
description 描述 Text
dashboard_id 显示板标识 String
template 模板/样式 text
script 脚本 text
reference 参考号 String
is_available 是否有效 Boolean 1:是,0:否

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.19.4. 编辑Mapping

调用接口:

属性
url /api/mapping/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
mapping_id 映射表标识 String
mapping_name 映射表名称 String
description 描述 Text
dashboard_id 显示板标识 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.19.5. 删除Mapping

调用接口:

属性
url /api/mapping/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
mapping_id 映射表标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.20. Message(消息)

1.7.20.1. 查询Message列表

调用接口:

属性
url /api/message/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime
is_all 是否返回所有数据 Boolean 1:是,0:否;如果为空,则默认0

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["message_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "message_id": 1009,
                "message_name": "适配器离线",
                "date": null,
                "category": "AprusDisconnect",
                "unit": "gards",
                "messenger": "A22018083100002",
                "description": "",
                "customer_id": null,
                "template": null,
                "script": null,
                "reference": "",
                "created": "2018-09-03 18:46:26",
                "is_available": 1
            }
        ]
    }
}

1.7.20.2. 查询Message指定记录

调用接口:

属性
url /api/message/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
message_id 消息标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "message_id": 1009,
        "message_name": "适配器离线",
        "date": null,
        "category": "AprusDisconnect",
        "unit": "gards",
        "messenger": "A22018083100002",
        "description": "",
        "customer_id": null,
        "template": null,
        "script": null,
        "reference": "",
        "created": "2018-09-03 18:46:26",
        "is_available": 1
    }
}

1.7.20.3. 添加Message

调用接口:

属性
url /api/message/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
message_name 消息摘要或标题 String
date 消息时间 datetime
category 消息类型 String
unit 消息来源分类 String
messenger 消息来源 String
description 描述 Text
customer_id 客户标识 String
template 模板/样式 text
script 脚本 text
reference 参考号 String
is_available 是否有效 Boolean 1:是,0:否

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.20.4. 编辑Message

调用接口:

属性
url /api/message/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
message_id 消息标识 String
message_name 消息摘要或标题 String
date 消息时间 datetime
category 消息类型 String
unit 消息来源分类 String
messenger 消息来源 String
description 描述 Text
customer_id 客户标识 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.20.5. 删除Message

调用接口:

属性
url /api/message/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
message_id 消息标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.21. Normal(设备状态)

1.7.21.1. 查询Normal详细列表

调用接口:

属性
url /api/normal/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["equipment_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "equipment_id": 1005,
                "is_online": 1,
                "is_boot": 0,
                "is_fault": 1,
                "is_alert": 0
            }
        ]
    }
}

1.7.21.2. 查询Normal指定记录

调用接口:

属性
url /api/normal/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_id 设备标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "equipment_id": 1005,
        "is_online": 1,
        "is_boot": 0,
        "is_fault": 1,
        "is_alert": 0
    }
}

1.7.22. Service(服务)

1.7.22.1. 查询Service列表(关注设备或关注客户或无设备ID)

调用接口:

属性
url /api/service/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime
is_all 是否返回所有数据 Boolean 1:是,0:否;如果为空,则默认0

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["service_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "service_id": 1001,
                "service_name": "施工服务",
                "date": "2018-11-30 09:16:18",
                "category": "",
                "description": null,
                "customer_id": 1001,
                "equipment_id": 1001,
                "staff": "",
                "attachment": "",
                "template": null,
                "script": null,
                "reference": "",
                "created": "2018-11-30 09:16:52",
                "is_available": 1
            }
        ]
    }
}

1.7.22.2. 查询Service指定记录

调用接口:

属性
url /api/service/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
service_id 服务标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "service_id": 1001,
        "service_name": "施工服务",
        "date": "2018-11-30 09:16:18",
        "category": "",
        "description": null,
        "customer_id": 1001,
        "equipment_id": 1001,
        "staff": "",
        "attachment": "",
        "template": null,
        "script": null,
        "reference": "",
        "created": "2018-11-30 09:16:52",
        "is_available": 1
    }
}

1.7.22.3. 查询Service列表(EXP使用:关注设备)

调用接口:

属性
url /api/exp/service/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 0,
        "data": []
    }
}

1.7.22.4. 添加service

调用接口:

属性
url /api/service/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
service_name 服务名称 String
date 服务时间 datetime
category 服务类型 String
description 描述 Text
customer_id 客户标识 String
equipment_id 设备标识 String
staff 服务人员 String
attachment 服务附件路径 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.22.5. 编辑service

调用接口:

属性
url /api/service/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
service_id 服务标识 String
service_name 服务名称 String
date 服务时间 datetime
category 服务类型 String
description 描述 Text
customer_id 客户标识 String
staff 服务人员 String
attachment 服务附件路径 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.22.6. 删除service

调用接口:

属性
url /api/service/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
service_id 服务标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.23. Setting(系统信息)

1.7.23.1. 系统信息-关于我们

调用接口:

属性
url /api/setting/about_us
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
- - - - -

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "logo": "logo.png",
        "name": "深圳市智物联网络有限公司",
        "title": "智物联网络",
        "version": "1.0.0",
        "kernel": "1.0.0",
        "warning": "警告:本计算机程序受版权法及国际公约的保护,未经授权擅自复制或散布本程序的部分或全部,将承受严厉的民事和刑事处罚,对已知的违反者将给予法律范围内的全面制裁。",
        "copyright": "CopyRight 2014-2017 深圳市智物联网络有限公司"
    }
}

1.7.23.2. 系统信息-信息反馈

调用接口:

属性
url api/setting/feedback
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
name 反馈人员 String
company 公司名称 String
email 邮箱 String
phone 联系电话 String
title 反馈标题 String
type 反馈类型 String
description 描述 text

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "反馈成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.24. Statistics(统计计算类型)

1.7.24.1. 查询Statistics详细列

调用接口:

属性
url /api/statistics/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["statistics_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "statistics_id": "FuelConsumption",
                "statistics_name": "燃料消耗",
                "description": "每两小时燃料消耗的统计",
                "scheduled": "1",
                "pathfile": "/statistics_services/auto_generator/FuelConsumption.json",
                "template": "",
                "script": {
                    "connector": {
                        "INFLUXDB": {
                            "host": "rnd.mixiot.top:8086"
                        },
                        "MYSQL": {
                            "host": "rnd.mixiot.top:3306"
                        }
                    },
                    "cycle": "5m",
                    "description": "每两小时燃料消耗的统计",
                    "expr": "accumulate(S19)",
                    "name": "FuelConsumption",
                    "result": {
                        "precision": 3
                    },
                    "selection": {
                        "filter_and": {
                            "mappingID": [
                                "1002"
                            ]
                        }
                    },
                    "source": {
                        "MO": {
                            "object": [
                                "S19"
                            ]
                        }
                    },
                    "statistics_id": "FuelConsumption",
                    "statos_name": "燃料消耗",
                    "track": true
                },
                "reference": "",
                "auto_curdwm": null,
                "type": "",
                "stats": 1,
                "auto_dwm": 1,
                "created": "2018-09-07 12:02:45",
                "is_available": 1,
                "boss_sync": 0
            }
        ]
    }
}

1.7.24.2. 查询Statistics指定记录

调用接口:

属性
url /api/statistics/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
statistics_id 统计计算标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "statistics_id": "FuelConsumption",
                "statistics_name": "燃料消耗",
                "description": "每两小时燃料消耗的统计",
                "scheduled": "1",
                "pathfile": "/statistics_services/auto_generator/FuelConsumption.json",
                "template": "",
                "script": {
                    "connector": {
                        "INFLUXDB": {
                            "host": "rnd.mixiot.top:8086"
                        },
                        "MYSQL": {
                            "host": "rnd.mixiot.top:3306"
                        }
                    },
                    "cycle": "5m",
                    "description": "每两小时燃料消耗的统计",
                    "expr": "accumulate(S19)",
                    "name": "FuelConsumption",
                    "result": {
                        "precision": 3
                    },
                    "selection": {
                        "filter_and": {
                            "mappingID": [
                                "1002"
                            ]
                        }
                    },
                    "source": {
                        "MO": {
                            "object": [
                                "S19"
                            ]
                        }
                    },
                    "statistics_id": "FuelConsumption",
                    "statos_name": "燃料消耗",
                    "track": true
                },
                "reference": "",
                "auto_curdwm": null,
                "type": "",
                "stats": 1,
                "auto_dwm": 1,
                "created": "2018-09-07 12:02:45",
                "is_available": 1,
                "boss_sync": 0
            }
        ]
    }
}

1.7.24.3. 添加statistics

调用接口:

属性
url /api/statistics/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
statistics_id 统计映射表标识 String
statistics_name 统计映射表名称 String
description 描述 Text
scheduled 执行时间 Datetime
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.24.4. 编辑statistics

调用接口:

属性
url /api/statistics/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
statistics_id 统计映射表标识 String
statistics_name 统计映射表名称 String
description 描述 Text
scheduled 执行时间 Datetime
template 模板/样式 text
script 脚本 text
reference 参考号 String
is_available 是否有效 Boolean 1:是,0:否

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.24.5. 删除statistics

调用接口:

属性
url /api/statistics/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
statistics_id 统计映射表标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.25. Statos(统计计算结果)

1.7.25.1. 查询Statos列表

调用接口:

属性
url /api/statos/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["statos_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 1,
        "data": [
            {
                "statos_id": 1001,
                "statos_name": "GasElectricityRatioKaiJiaSuYe Every Hour Calculate",
                "description": "Every Hour (14) Calculate",
                "statistics_id": "GasElectricityRatioKaiJiaSuYe",
                "equipment_id": 1020,
                "data": "0.0936",
                "template": null,
                "script": null,
                "reference": "",
                "year": 2018,
                "month": 11,
                "day": 30,
                "hour": 14,
                "created": "2018-11-30 15:06:00",
                "is_available": 1,
                "boss_sync": 0
            }
        ]
    }
}

1.7.25.2. 查询Statos指定记录

调用接口:

属性
url /api/statos/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
statos_id 消息标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "statos_id": 1001,
        "statos_name": "GasElectricityRatioKaiJiaSuYe Every Hour Calculate",
        "description": "Every Hour (14) Calculate",
        "statistics_id": "GasElectricityRatioKaiJiaSuYe",
        "equipment_id": 1020,
        "data": "0.0936",
        "template": null,
        "script": null,
        "reference": "",
        "year": 2018,
        "month": 11,
        "day": 30,
        "hour": 14,
        "created": "2018-11-30 15:06:00",
        "is_available": 1,
        "boss_sync": 0
    }
}

1.7.25.3. 添加Statos

调用接口:

属性
url /api/statos/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
statos_name 统计结果名称 String
description 描述 Text
statistics_id 统计计算标识 String
equipment_id 设备标识 String
data 采集数据 text
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.25.4. 编辑Statos

调用接口:

属性
url /api/statos/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
statos_id 统计结果标识 String
statos_name 统计结果名称 String
description 描述 Text
statistics_id 统计计算标识 String
equipment_id 设备标识 String
data 采集数据 text
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.25.5. 删除Statos

调用接口:

属性
url /api/statos/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
statos_id 消息标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.26. User(用户)

1.7.26.1. 编辑User

调用接口:

url /api/user/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
user_id 用户标识 String
username 用户名称 String
is_super 是否超级管理员 Boolean 1:是,0:否
description 描述 Text
authentication 用户密码 String
authorization 授权:admin,pro,exp,app String
customer_id 所属客户标识 String
mobile 手机 String
email 邮箱 String
address 地址 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.27. UserCustomer(用户与客户)

1.7.27.1. 查询UserCustomer列表

调用接口:

属性
url /api/user_customer/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["user_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 2,
        "data": [
            {
                "user_id": 998,
                "customer_id": 1002,
                "template": null,
                "script": null,
                "reference": "",
                "created": "2018-11-28 11:04:18",
                "is_available": 1,
                "boss_sync": 0
            },
            {
                "user_id": 998,
                "customer_id": 1001,
                "template": null,
                "script": null,
                "reference": "",
                "created": "2018-11-28 10:40:31",
                "is_available": 1,
                "boss_sync": 0
            }
        ]
    }
}

1.7.27.2. 查询UserCustomer指定记录

调用接口:

属性
url /api/user_customer/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
user_id 用户标识 String
customer_id 客户标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "user_id": 998,
        "customer_id": 1001,
        "template": null,
        "script": null,
        "reference": "",
        "created": "2018-11-28 10:40:31",
        "is_available": 1,
        "boss_sync": 0
    }
}

1.7.27.3. 查询UserCustomer关注列表

调用接口:

属性
url /api/user_customer/get_customer_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
user_id 用户标识 String
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 2,
        "data": [
            {
                "user_id": 998,
                "customer_id": 1001,
                "template": null,
                "script": null,
                "reference": "",
                "created": "2018-11-28 10:40:31",
                "is_available": 1,
                "boss_sync": 0
            }
        ]
    }
}

1.7.27.4. 添加user_customer

调用接口:

属性
url /api/user_customer/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
user_id 用户标识 String
customer_id 客户标识 String
secret 授权码 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.27.5. 编辑user_customer

调用接口:

属性
url /api/user_customer/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
user_id 用户标识 String
customer_id 客户标识 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.27.6. 删除user_customer

调用接口:

属性
url /api/user_customer/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
user_id 用户标识 String
customer_id 客户标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.27.7. 多选删除

调用接口:

属性
url /api/user_customer/multi_delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
user_id 用户标识 String
customer_id 客户标识 Json ["10001", "10002"]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.28. (用户与设备)

1.7.28.1. 查询UserEquipment所有列表

调用接口:

属性
url /api/user_equipment/get_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
condition 查询条件 Json LIKE模糊搜索条件
start_time 开始时间 Datetime 按创建时间搜索的开始时间和结束时间
end_time 结束时间 Datetime

condition参数:

格式

[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]

举例

[["user_id", "=", "1001"]]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 2,
        "data": [
            {
                "user_id": 998,
                "equipment_id": 1001,
                "template": null,
                "script": null,
                "reference": "",
                "created": "2018-09-20 20:35:07",
                "is_available": 1,
                "boss_sync": 0
            },
            {
                "user_id": 998,
                "equipment_id": 1002,
                "template": null,
                "script": null,
                "reference": "",
                "created": null,
                "is_available": 1,
                "boss_sync": 0
            }
        ]
    }
}

1.7.28.2. 指定记录

调用接口:

属性
url /api/user_equipment/get
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
user_id 用户标识 String
equipment_id 设备标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "user_id": 998,
        "equipment_id": 1001,
        "template": null,
        "script": null,
        "reference": "",
        "created": "2018-09-20 20:35:07",
        "is_available": 1,
        "boss_sync": 0
    }
}

1.7.28.3. 关注设备列表

调用接口:

属性
url /api/user_equipment/get_equipment_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
user_id 用户标识 String
page_index 查询页码 Integer 大于 0,如果为空,则默认从第一页显示
page_size 每页记录数 Integer 大于 0,如果为空,则默认为 20
is_all 是否返回所有数据 Boolean 1:是,0:否;如果为空,则默认0

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 2,
        "data": [
            {
                "user_id": 998,
                "equipment_id": 1004,
                "equipment_name": "智物联设备",
                "model": "927",
                "customer_id": 1002,
                "created": "2018-09-18 19:35:17",
                "description": "",
                "customer_name": "智物联"
            },
            {
                "user_id": 998,
                "equipment_id": 1005,
                "equipment_name": "pro设备",
                "model": "测试设备5",
                "customer_id": 1003,
                "created": "2018-08-30 18:24:19",
                "description": "",
                "customer_name": "PRO"
            }
        ]
    }
}

1.7.28.4. 用户标识列表

调用接口:

属性
url /api/user_equipment/user_list
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_list 设备标识列表 String "1001,1002"

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "user_list": "1001,998"
    }
}

1.7.28.5. 用户标识列表-按设备分组

调用接口:

属性
url /api/user_equipment//user_list_by_equipment
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
equipment_list 设备标识列表 String "1001,1002"

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 结果 Json

返回数据举例:

{
    "code": 200,
    "msg": "查询成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": {
        "data": [
            {
                "equipment_id": 1001,
                "user_id": "1001"
            },
            {
                "equipment_id": 1002,
                "user_id": "998,1000"
            }
        ]
    }
}

1.7.28.6. 添加user_equipment

调用接口:

属性
url /api/user_equipment/add
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
user_id 用户标识 String
equipment_id 设备标识 String
secret 授权码 String
template 模板/样式 text
script 脚本 text
reference 参考号 String
is_available 是否有效 Boolean 1:是,0:否

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "添加成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.28.7. 编辑user_equipment

调用接口:

属性
url /api/user_equipment/edit
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
user_id 用户标识 String
equipment_id 设备标识 String
template 模板/样式 text
script 脚本 text
reference 参考号 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "编辑成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.28.8. 删除user_equipment

调用接口:

属性
url /api/user_equipment/delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
user_id 用户标识 String
equipment_id 设备标识 String

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.7.28.9. 多选删除user_equipment

调用接口:

属性
url /api/user_equipment/multi_delete
http方法 post
Content-Type application/json或application/x-www-form-urlencoded

请求参数:

字段 字段名称 字段类型 说明 是否必传
user_id 用户标识 String
equipment_id 设备标识 Json ["10001", "10002"]

返回参数:

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功 500:失败
msg 提示信息 String
result 返回结果 Json

返回示例:

{
    "code": 200,
    "msg": "删除成功",
    "mix_code":130001,
    "mix_msg":"",
    "mix_ext":"",
    "result": []
}

1.8. 附录

MIXIOT平台所有接口按照统一标准格式返回数据(包括返回码),支持对接系统的语言国际化;其中,MIXIOT ADMIN和APIQ的返回码范围为130000-139999和230000-239999。

其中:

mix_code 为 MixIOT唯一编码,表示固定含义;如130001,表示接口请求成功

mix_msg 为 详细说明信息

mix_ext 为 调用第三方服务说明信息

zh_ch 为 中文说明,提供翻译参考(接口不返回)

1.8.1. 通用编码

mix_code mix_msg mix_ext zh_ch
130001/230001 接口请求成功/失败
130002/230002 登录成功/失败
130003/230003 Ticket校验成功/失败
130004/230004 重置密码成功/失败
130005/230005 上传文件成功/失败
130006/230006 下载文件成功/失败
130007/230007 查询版本信息成功/失败
130008/230008 查询EXP列表成功/失败
130009/230009 启动成功/失败
130010/230010 停止成功/失败
230011 请求参数错误
230012 请求BOSS网络错误
230013 适配器未备案或已激活 适配器备案校验不通过
230014 Toekn超时,请重新登录
230015 接口请求太频繁,请稍后访问
230016 服务错误,请联系管理员
230017 用户不存在
230018 密码不正确
230019 应用不存在
230020 用户没有权限
230021 原密码错误
230022 用户名已存在
230023 手机号已存在
230024 超级管理员不能删除

1.8.2. Activity(作业)

mix_code mix_msg mix_ext zh_ch
131001/231001 添加 作业 成功/失败
131002/231002 编辑 作业 成功/失败
131003/231003 删除 作业 成功/失败
131004/231004 查询 作业 成功/失败

1.8.3. Alert(报警)

mix_code mix_msg mix_ext zh_ch
131101/231101 添加 报警 成功/失败
131102/231102 编辑 报警 成功/失败
131103/231103 删除 报警 成功/失败
131104/231104 查询 报警 成功/失败

1.8.4. AlertMosaic(报警挂板)

mix_code mix_msg mix_ext zh_ch
131201/231201 添加 报警挂板 成功/失败
131202/231202 编辑 报警挂板 成功/失败
131203/231203 删除 报警挂板 成功/失败
131204/231204 查询 报警挂板 成功/失败

1.8.5. Aprus(适配器)

mix_code mix_msg mix_ext zh_ch
131301/231301 添加 适配器 成功/失败
131302/231302 编辑 适配器 成功/失败
131303/231303 删除 适配器 成功/失败
131304/231304 查询 适配器 成功/失败

1.8.6. AprusType(适配器类型)

mix_code mix_msg mix_ext zh_ch
131401/231401 添加 适配器类型 成功/失败
131402/231402 编辑 适配器类型 成功/失败
131403/231403 删除 适配器类型 成功/失败
131404/231404 查询 适配器类型 成功/失败

1.8.7. Codebase(代码库)

mix_code mix_msg mix_ext zh_ch
131501/231501 添加 代码库 成功/失败
131502/231502 编辑 代码库 成功/失败
131503/231503 删除 代码库 成功/失败
131504/231504 查询 代码库 成功/失败

1.8.8. Collect(离线数据类型)

mix_code mix_msg mix_ext zh_ch
131601/231601 添加 离线数据类型 成功/失败
131602/231602 编辑 离线数据类型 成功/失败
131603/231603 删除 离线数据类型 成功/失败
131604/231604 查询 离线数据类型 成功/失败

1.8.9. Collectos(离线数据结果)

mix_code mix_msg mix_ext zh_ch
131701/231701 添加 离线数据结果 成功/失败
131702/231702 编辑 离线数据结果 成功/失败
131703/231703 删除 离线数据结果 成功/失败
131704/231704 查询 离线数据结果 成功/失败

1.8.10. Config(适配器配置)

mix_code mix_msg mix_ext zh_ch
131801/231801 添加 适配器配置 成功/失败
131802/231802 编辑 适配器配置 成功/失败
131803/231803 删除 适配器配置 成功/失败
131804/231804 查询 适配器配置 成功/失败

1.8.11. Customer(客户)

mix_code mix_msg mix_ext zh_ch
131901/231901 添加 客户 成功/失败
131902/231902 编辑 客户 成功/失败
131903/231903 删除 客户 成功/失败
131904/231904 查询 客户 成功/失败

1.8.12. Dashboard(显示板)

mix_code mix_msg mix_ext zh_ch
132001/232001 添加 显示板 成功/失败
132002/232002 编辑 显示板 成功/失败
132003/232003 删除 显示板 成功/失败
132004/232004 查询 显示板 成功/失败

1.8.13. Datasheet(数据表)

mix_code mix_msg mix_ext zh_ch
132101/232101 添加 数据表 成功/失败
132102/232102 编辑 数据表 成功/失败
132103/232103 删除 数据表 成功/失败
132104/232104 查询 数据表 成功/失败

1.8.14. Equipment(设备)

mix_code mix_msg mix_ext zh_ch
132201/232201 添加 设备 成功/失败
132202/232202 编辑 设备 成功/失败
132203/232203 删除 设备 成功/失败
132204/232204 查询 设备 成功/失败

1.8.15. EquipmentGroup(设备组)

mix_code mix_msg mix_ext zh_ch
132301/232301 添加 设备组 成功/失败
132302/232302 编辑 设备组 成功/失败
132303/232303 删除 设备组 成功/失败
132304/232304 查询 设备组 成功/失败

1.8.16. EquipmentType(设备类型)

mix_code mix_msg mix_ext zh_ch
132401/232401 添加 设备类型 成功/失败
132402/232402 编辑 设备类型 成功/失败
132403/232403 删除 设备类型 成功/失败
132404/232404 查询 设备类型 成功/失败

1.8.17. Event(事件)

mix_code mix_msg mix_ext zh_ch
132501/232501 添加 事件 成功/失败
132502/232502 编辑 事件 成功/失败
132503/232503 删除 事件 成功/失败
132504/232504 查询 事件 成功/失败

1.8.18. Fault(故障)

mix_code mix_msg mix_ext zh_ch
132601/232601 添加 故障 成功/失败
132602/232602 编辑 故障 成功/失败
132603/232603 删除 故障 成功/失败
132604/232604 查询 故障 成功/失败

1.8.19. FaultMosaic(故障挂板)

mix_code mix_msg mix_ext zh_ch
132701/232701 添加 故障挂板 成功/失败
132702/232702 编辑 故障挂板 成功/失败
132703/232703 删除 故障挂板 成功/失败
132704/232704 查询 故障挂板 成功/失败

1.8.20. InterfaceLog(适配器接口鉴权日志)

mix_code mix_msg mix_ext zh_ch
132801/232801 添加 鉴权日志 成功/失败
132802/232802 编辑 鉴权日志 成功/失败
132803/232803 删除 鉴权日志 成功/失败
132804/232804 查询 鉴权日志 成功/失败

1.8.21. Log(系统日志)

mix_code mix_msg mix_ext zh_ch
132901/232901 添加 系统日志 成功/失败
132902/232902 编辑 系统日志 成功/失败
132903/232903 删除 系统日志 成功/失败
132904/232904 查询 系统日志 成功/失败

1.8.22. Mappingg(映射表)

mix_code mix_msg mix_ext zh_ch
133001/233001 添加 映射表 成功/失败
133002/233002 编辑 映射表 成功/失败
133003/233003 删除 映射表 成功/失败
133004/233004 查询 映射表 成功/失败

1.8.23. Message(消息)

mix_code mix_msg mix_ext zh_ch
133101/233101 添加 消息 成功/失败
133102/233102 编辑 消息 成功/失败
133103/233103 删除 消息 成功/失败
133104/233104 查询 消息 成功/失败

1.8.24. Normal(设备状态)

mix_code mix_msg mix_ext zh_ch
133201/233201 添加 设备状态 成功/失败
133202/233202 编辑 设备状态 成功/失败
133203/233203 删除 设备状态 成功/失败
133204/233204 查询 设备状态 成功/失败

1.8.25. Service(服务)

mix_code mix_msg mix_ext zh_ch
133301/233301 添加 服务 成功/失败
133302/233302 编辑 服务 成功/失败
133303/233303 删除 服务 成功/失败
133304/233304 查询 服务 成功/失败

1.8.26. Setting(系统设置)

mix_code mix_msg mix_ext zh_ch
133401/233401 添加 系统设置 成功/失败
133402/233402 编辑 系统设置 成功/失败
133403/233403 删除 系统设置 成功/失败
133404/233404 查询 系统设置 成功/失败

1.8.27. Statistics(统计计算类型)

mix_code mix_msg mix_ext zh_ch
133501/233501 添加 统计计算类型 成功/失败
133502/233502 编辑 统计计算类型 成功/失败
133503/233503 删除 统计计算类型 成功/失败
133504/233504 查询 统计计算类型 成功/失败

1.8.28. Statos(统计计算结果)

mix_code mix_msg mix_ext zh_ch
133601/233601 添加 统计计算结果 成功/失败
133602/233602 编辑 统计计算结果 成功/失败
133603/233603 删除 统计计算结果 成功/失败
133604/233604 查询 统计计算结果 成功/失败

1.8.29. User(用户)

mix_code mix_msg mix_ext zh_ch
133701/233701 添加 用户 成功/失败
133702/233702 编辑 用户 成功/失败
133703/233703 删除 用户 成功/失败
133704/233704 查询 用户 成功/失败

1.8.30. UserCustomer(用户关注客户)

mix_code mix_msg mix_ext zh_ch
133701/233701 添加 用户 成功/失败
133702/233702 编辑 用户 成功/失败
133703/233703 删除 用户 成功/失败
133704/233704 查询 用户 成功/失败

1.8.31. UserCustomer(用户关注设备)

mix_code mix_msg mix_ext zh_ch
133801/233801 添加 关注客户 成功/失败
133802/233802 编辑 关注客户 成功/失败
133803/233803 删除 关注客户 成功/失败
133804/233804 查询 关注客户 成功/失败

1.8.32. MappingStatistics(映射表与统计计算类型)

mix_code mix_msg mix_ext zh_ch
134001/234001 添加 对应记录 成功/失败
134002/234002 编辑 对应记录 成功/失败
134003/234003 删除 对应记录 成功/失败
134004/234004 查询 对应记录 成功/失败
© Mixlinker all right reserved,powered by Gitbook文件修订时间: 2021-01-13 11:21:58

results matching ""

    No results matching ""