2.4.1.7.14. Equipment(设备)

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

调用接口:

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

请求参数:

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

condition参数:

格式

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

举例

  1. [["equipment_id", "=", "1001"]]

返回参数:

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

返回数据举例:

  1. {
  2. "code": 200,
  3. "msg": "查询成功",
  4. "mix_code":130001,
  5. "mix_msg":"",
  6. "mix_ext":"",
  7. "result": {
  8. "page_index": 1,
  9. "page_size": 20,
  10. "total_pages": 1,
  11. "total_records": 1,
  12. "data": [{
  13. "equipment_id": 1005,
  14. "equipment_name": "设备5",
  15. "description": "设备5",
  16. "customer_id": 1003,
  17. "equipment_sn": "1001",
  18. "model": "设备5",
  19. "type_id": 1001,
  20. "camera_list": "",
  21. "is_group": 0,
  22. "camera_url": "http://hls.open.ys7.com/openlive/9ba56459b9ca4e78b85ebced5c365083.m3u8,https://www.baidu.com",
  23. "datasheet_id": 1001,
  24. "aprus_list": [" A22018083100003 ", "A22018083100002"],
  25. "mapping_id": 1003,
  26. "gis": "",
  27. "secret": "DZHR",
  28. "auth_code": 1234,
  29. "equipment_image": "equipment/2018/09/Desert_VJR97.jpg",
  30. "addition": [{
  31. "title ": "基本信息 ",
  32. "data ": [
  33. ["生产厂家 ", ""],
  34. ["锅炉吨位 ", "10 吨 "],
  35. ["设备尺寸 ", ""],
  36. ["设备重量 ", ""],
  37. ["制造日期 ", ""],
  38. ["启用日期 ", ""]
  39. ]
  40. }],
  41. "created": "2018-08-3018:24:19",
  42. "customer_name": "test",
  43. "status_code": 0,
  44. "status_name": "停止"
  45. }]
  46. }
  47. }

2.4.1.7.14.2. 查询Equipment指定记录

调用接口:

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

请求参数:

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

返回参数:

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

返回示例:

  1. {
  2. "code": 200,
  3. "msg": "查询成功",
  4. "mix_code":130001,
  5. "mix_msg":"",
  6. "mix_ext":"",
  7. "result": {
  8. "equipment_id": 1005,
  9. "equipment_name": "设备5",
  10. "description": "设备5",
  11. "customer_id": 1003,
  12. "equipment_sn": "1001",
  13. "model": "设备5",
  14. "type_id": 1001,
  15. "camera_list": "",
  16. "is_group": 0,
  17. "camera_url": "http://hls.open.ys7.com/openlive/9ba56459b9ca4e78b85ebced5c365083.m3u8,https://www.baidu.com",
  18. "datasheet_id": 1001,
  19. "aprus_list": [" A22018083100003 ", "A22018083100002"],
  20. "mapping_id": 1003,
  21. "gis": "",
  22. "secret": "DZHR",
  23. "auth_code": 1234,
  24. "equipment_image": "equipment/2018/09/Desert_VJR97.jpg",
  25. "addition": [{
  26. "title ": "基本信息 ",
  27. "data ": [
  28. ["生产厂家 ", ""],
  29. ["锅炉吨位 ", "10 吨 "],
  30. ["设备尺寸 ", ""],
  31. ["设备重量 ", ""],
  32. ["制造日期 ", ""],
  33. ["启用日期 ", ""]
  34. ]
  35. }],
  36. "created": "2018-08-3018:24:19",
  37. "customer_name": "test",
  38. "status_code": 0,
  39. "status_name": "停止"
  40. }
  41. }

2.4.1.7.14.3. 添加Equipment

调用接口:

属性
url/api/equipment/add
http方法post
Content-Typeapplication/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格式):

  1. [
  2. {
  3. "title": "锅炉信息",
  4. "data": [
  5. [
  6. "燃料类型",
  7. "天然气"
  8. ],
  9. [
  10. "锅炉重量",
  11. "2吨"
  12. ],
  13. [
  14. "出厂日期",
  15. "2018-03-03"
  16. ]
  17. ]
  18. },
  19. {
  20. "title": "能效指标信息",
  21. "data": [
  22. [
  23. "热效率",
  24. 0.8
  25. ],
  26. [
  27. "燃料热值",
  28. 7000
  29. ],
  30. [
  31. "吨汽燃料指标",
  32. 0.21
  33. ]
  34. ]
  35. }
  36. ]
  37. ```json
  38. 返回参数:
  39. | 字段 | 字段名称 | 字段类型 | 说明 | 是否必传 |
  40. |--------|----------|----------|---------------------|----------|
  41. | code | 返回码 | Integer | 200:成功 500:失败 | 是 |
  42. | msg | 提示信息 | String | | 是 |
  43. | result | 返回结果 | Json | | 是 |
  44. 返回示例:
  45. ```json
  46. {
  47. "code": 200,
  48. "msg": "添加成功",
  49. "mix_code":130001,
  50. "mix_msg":"",
  51. "mix_ext":"",
  52. "result": []
  53. }

2.4.1.7.14.4. 编辑Equipment

调用接口:

属性
url/api/equipment/edit
http方法post
Content-Typeapplication/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格式):

  1. [
  2. {
  3. "title": "锅炉信息",
  4. "data": [
  5. [
  6. "燃料类型",
  7. "天然气"
  8. ],
  9. [
  10. "锅炉重量",
  11. "2吨"
  12. ],
  13. [
  14. "出厂日期",
  15. "2018-03-03"
  16. ]
  17. ]
  18. },
  19. {
  20. "title": "能效指标信息",
  21. "data": [
  22. [
  23. "热效率",
  24. 0.8
  25. ],
  26. [
  27. "燃料热值",
  28. 7000
  29. ],
  30. [
  31. "吨汽燃料指标",
  32. 0.21
  33. ]
  34. ]
  35. }
  36. ]
  37. ```json
  38. 返回参数:
  39. | 字段 | 字段名称 | 字段类型 | 说明 | 是否必传 |
  40. |--------|----------|----------|---------------------|----------|
  41. | code | 返回码 | Integer | 200:成功 500:失败 | 是 |
  42. | msg | 提示信息 | String | | 是 |
  43. | result | 返回结果 | Json | | 是 |
  44. 返回示例:
  45. ```json
  46. {
  47. "code": 200,
  48. "msg": "添加成功",
  49. "mix_code":130001,
  50. "mix_msg":"",
  51. "mix_ext":"",
  52. "result": []
  53. }

2.4.1.7.14.5. 删除Equipment

调用接口:

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

请求参数:

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

返回参数:

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

返回示例:

  1. {
  2. "code": 200,
  3. "msg": "删除成功",
  4. "mix_code":130001,
  5. "mix_msg":"",
  6. "mix_ext":"",
  7. "result": []
  8. }

2.4.1.7.14.6. 查询Equipment反向控制列表

调用接口:

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

请求参数:

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

返回参数:

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

返回示例:

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

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

调用接口:

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

请求参数:

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

返回参数:

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

返回示例:

  1. {
  2. "code": 200,
  3. "msg": "查询成功",
  4. "mix_code":130001,
  5. "mix_msg":"",
  6. "mix_ext":"",
  7. "result": {
  8. "total_records": 3,
  9. "data": [
  10. {
  11. "id": 1002,
  12. "name": "锅炉过热",
  13. "type": "alert",
  14. "description": "Label_En:Oil Separator Blocked;Label_Cn:锅炉过热",
  15. "created": "2018-09-11 17:03:07"
  16. },
  17. {
  18. "id": 1001,
  19. "name": "速度反馈错误",
  20. "type": "fault",
  21. "description": "Label_En:Speed Feedback Error;Label_Cn:速度反馈错误",
  22. "created": "2018-09-03 15:43:32"
  23. },
  24. {
  25. "id": 1002,
  26. "name": "减速过电流",
  27. "type": "fault",
  28. "description": "Label_En:Retarded Overcurrent;Label_Cn:减速过电流",
  29. "created": "2018-09-01 15:43:32"
  30. }
  31. ]
  32. }
  33. }

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

调用接口:

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

请求参数:

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

返回参数:

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

返回示例:

  1. {
  2. "code": 200,
  3. "msg": "查询成功",
  4. "mix_code":130001,
  5. "mix_msg":"",
  6. "mix_ext":"",
  7. "result": {
  8. "total_records": 3,
  9. "data": [
  10. {
  11. "id": 1001,
  12. "name": "施工服务",
  13. "type": "service",
  14. "description": "",
  15. "date": "2018-11-30 09:16:18"
  16. },
  17. {
  18. "id": 1001,
  19. "name": "日常检修",
  20. "type": "activity",
  21. "description": "",
  22. "date": "2018-11-30 09:16:18"
  23. },
  24. {
  25. "id": 1002,
  26. "name": "普通作业",
  27. "type": "activity",
  28. "description": "",
  29. "date": "2018-11-30 09:16:18"
  30. }
  31. ]
  32. }
  33. }

2.4.1.7.14.9. 查询 Equipment APP显示板信息

调用接口:

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

请求参数:

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

返回参数:

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

返回示例:

  1. {
  2. "code": 200,
  3. "msg": "查询成功",
  4. "mix_code":130001,
  5. "mix_msg":"",
  6. "mix_ext":"",
  7. "result": {
  8. "equipment_id": 1001,
  9. "mapping_id": 1001,
  10. "template": [{
  11. "specialParameters": [{
  12. "title": "瞬时流量",
  13. "key": "S01",
  14. "value": "0",
  15. "unit": "Nm³"
  16. }],
  17. "basicParameters": [{
  18. "title": "累计流量",
  19. "key": "S04",
  20. "value": "0",
  21. "unit": "Nm³"
  22. }, {
  23. "title": "供气压力",
  24. "key": "S05",
  25. "value": "0",
  26. "unit": "Mpa"
  27. }],
  28. "moreParameter": [{
  29. "class": "数值监控类",
  30. "data": [{
  31. "title": "瞬时流量",
  32. "key": "S01",
  33. "value": "0",
  34. "unit": "Nm³"
  35. }]
  36. }],
  37. "controlPanel": [{
  38. "title": "远程控制监控5",
  39. "key": "S13",
  40. "value": "0",
  41. "unit": "h",
  42. "max": "50",
  43. "min": "0",
  44. "color": "#ffffff"
  45. }]
  46. }]
  47. }
  48. }

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

调用接口:

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

请求参数:

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

返回参数:

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

返回示例:

  1. {
  2. "code": 200,
  3. "msg": "success",
  4. "mix_code":130001,
  5. "mix_msg":"",
  6. "mix_ext":"",
  7. "result": {
  8. "page_index": 1,
  9. "page_size": 20,
  10. "total_pages": 2,
  11. "total_records": 1,
  12. "data": [
  13. {
  14. "id": 1001,
  15. "name": "速度反馈错误",
  16. "type": "fault",
  17. "code": "7493",
  18. "equipment_id": 1001,
  19. "aprus_id": "A22018083100002",
  20. "description": "Label_En:Speed Feedback Error;Label_Cn:速度反馈错误",
  21. "created": "2018-09-03 15:43:32"
  22. },
  23. {
  24. "id": 1001,
  25. "name": "油分器堵塞",
  26. "type": "alert",
  27. "code": "2514",
  28. "equipment_id": 1002,
  29. "aprus_id": "A22018083100002",
  30. "description": "Label_En:Oil Separator Blocked;Label_Cn:油分器堵塞",
  31. "created": "2018-09-01 15:43:32"
  32. }
  33. ]
  34. }
  35. }

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

调用接口:

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

请求参数:

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

返回参数:

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

返回示例:

  1. {
  2. "code": 200,
  3. "msg": "查询成功",
  4. "mix_code":130001,
  5. "mix_msg":"",
  6. "mix_ext":"",
  7. "result": {
  8. "fidis_var": "S01"
  9. }
  10. }