[关闭]
@cfygaoyang 2020-07-17T09:46:35.000000Z 字数 53427 阅读 544

API接口文档

未分类


API接口请求规则

  1. {
  2. "Content-Type": "application/json",
  3. "Authorization": "Token 1234567890"
  4. }
  5. 备注: 1234567890 access_token 的值

账号体系

获取Token

POST /admin/auth/access_token/

参数 类型 必填 说明
area string 手机区号
account string 手机或邮箱
password string 密码
参数 类型 必有 说明
access_token string 用于请求Header中的Token值
refresh_token string 用于刷新Token信息
expires_at string access_token有效截止时间
expires_in string access_token有效时间,单位:秒
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "access_token": "lRnCFDxpK6PhpT44YaaLMwHmvI97GCIQvxazlNSQC4XxjDBCAV",
  6. "refresh_token": "aQ4XO33CSez6aSXEaiptgD10NzbWMu42xh3Wvb3YI2pgpD1raD",
  7. "expires_at": "2019-05-29 18:22:30",
  8. "expires_in": 604800
  9. }
  10. }

刷新Token

POST /admin/auth/refresh_token/

参数 类型 必填 说明
refresh_token string 刷新Token
参数 类型 必有 说明
access_token string 用于请求Header中的Token值
refresh_token string 用于刷新Token信息
expires_at string access_token有效截止时间
expires_in string access_token有效时间,单位:秒
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "access_token": "lRnCFDxpK6PhpT44YaaLMwHmvI97GCIQvxazlNSQC4XxjDBCAV",
  6. "refresh_token": "aQ4XO33CSez6aSXEaiptgD10NzbWMu42xh3Wvb3YI2pgpD1raD",
  7. "expires_at": "2019-05-29 18:22:30",
  8. "expires_in": 604800
  9. }
  10. }

销毁Token

POST /admin/auth/destroy_token/

  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

获取个人信息

GET /admin/personal/info/

参数 类型 必有 说明
logo string logo地址
id int 用户ID
area string 手机区号
phone string 手机号
email string 邮箱
role int 用户角色,0:普通用户
role_name string 角色名称
username string 用户名
is_active bool 是否已激活
created_at string 创建时间
updated_at string 更新时间
nickname string 昵称
avatar string 头像地址
gender int 性别,0:女,1:男,2:保密
birthday string 生日日期,如:2019-02-22
address string 地址
last_login_ip string 最后登陆IP
last_login_time string 最后登陆时间
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 8,
  6. "logo": "http://127.0.0.1/logo.png",
  7. "area": "86",
  8. "phone": "18656660930",
  9. "email": "",
  10. "open_id": "HuTfdXc8mENtNULFPBVt233cN2gzZ9lKqAcoUKed",
  11. "role": 0,
  12. "username": "18656660930",
  13. "is_active": true,
  14. "app_id": "",
  15. "created_at": "2019-05-22 18:20:45",
  16. "updated_at": "2019-05-22 18:20:45",
  17. "nickname": "",
  18. "avatar": "",
  19. "gender": 2,
  20. "birthday": "",
  21. "address": "",
  22. "permissions": [
  23. "1",
  24. "2",
  25. "3",
  26. "4",
  27. "5",
  28. "6",
  29. "7",
  30. "8",
  31. "9",
  32. "10",
  33. "10-1",
  34. "10-2",
  35. "11",
  36. "11-1",
  37. "11-2",
  38. "11-3"
  39. ]
  40. }
  41. }

编辑个人信息

PUT /admin/personal/info/

参数 类型 必填 说明
nickname string 昵称
avatar string 头像地址
gender int 性别:0女,1男,2保密
birthday string 生日: 格式要求示例(1991-03-08)
address string 住址
参数 类型 必有 说明
id int 用户ID
area string 手机区号
phone string 手机号
email string 邮箱
role int 用户角色,0:普通用户
username string 用户名
is_active bool 是否已激活
created_at string 创建时间
updated_at string 更新时间
nickname string 昵称
avatar string 头像地址
gender int 性别,0:女,1:男,2:保密
birthday string 生日日期,如:2019-02-22
address string 地址
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 8,
  6. "area": "86",
  7. "phone": "18656660930",
  8. "email": "",
  9. "open_id": "HuTfdXc8mENtNULFPBVt233cN2gzZ9lKqAcoUKed",
  10. "role": 0,
  11. "username": "18656660930",
  12. "is_active": true,
  13. "app_id": "",
  14. "created_at": "2019-05-22 18:20:45",
  15. "updated_at": "2019-05-22 18:20:45",
  16. "nickname": "",
  17. "avatar": "",
  18. "gender": 2,
  19. "birthday": "",
  20. "address": ""
  21. }
  22. }

FAQ服务

添加FAQ

POST /admin/faq/

参数 类型 必填 说明
title string 标题
content string 内容
category string 类型
external_link string 外链
参数 类型 必有 说明
id int faq信息id
title string 标题
content string 内容
category string 类型
external_link string 外链
created_at string 创建时间
updated_at string 更新时间
app_id string 厂商标识
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 2,
  6. "app_id": "",
  7. "created_at": "2019-05-23 18:17:16",
  8. "updated_at": "2019-05-23 18:17:16",
  9. "title": "标题",
  10. "content": "内容",
  11. "category": "",
  12. "external_link": ""
  13. }
  14. }

编辑FAQ

PUT /admin/faq/{id}/

参数 类型 必填 说明
id int faq信息id
title string 标题
content string 内容
category string 类型
external_link string 外链
参数 类型 必有 说明
id int faq信息id
title string 标题
content string 内容
category string 类型
external_link string 外链
created_at string 创建时间
updated_at string 更新时间
app_id string 厂商标识
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 2,
  6. "app_id": "",
  7. "created_at": "2019-05-23 18:17:16",
  8. "updated_at": "2019-05-23 18:17:16",
  9. "title": "标题",
  10. "content": "内容",
  11. "category": "",
  12. "external_link": ""
  13. }
  14. }

删除FAQ

DELETE /admin/faq/{id}/

参数 类型 必填 说明
id int faq信息id
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

获取FAQ详情

GET /admin/faq/{id}/

参数 类型 必填 说明
id int faq信息id
参数 类型 必有 说明
id int faq信息id
title string 标题
content string 内容
category string 类型
external_link string 外链
created_at string 创建时间
updated_at string 更新时间
app_id string 厂商标识
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 2,
  6. "app_id": "",
  7. "created_at": "2019-05-23 18:17:16",
  8. "updated_at": "2019-05-23 18:17:16",
  9. "title": "标题",
  10. "content": "内容",
  11. "category": "",
  12. "external_link": ""
  13. }
  14. }

获取FAQ列表

GET /admin/faq/

参数 类型 必有 说明
id int faq信息id
title string 标题
content string 内容
category string 类型
external_link string 外链
created_at string 创建时间
updated_at string 更新时间
app_id string 厂商标识
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "total": 1,
  6. "pages": 1,
  7. "current_page": 1,
  8. "page_size": 20,
  9. "data": [
  10. {
  11. "id": 2,
  12. "app_id": "",
  13. "created_at": "2019-05-23 18:17:16",
  14. "updated_at": "2019-05-23 18:17:16",
  15. "title": "标题",
  16. "content": "内容",
  17. "category": "",
  18. "external_link": ""
  19. }
  20. ]
  21. }
  22. }

意见反馈

添加反馈类型

POST /admin/feedback_category/

参数 类型 必填 说明
name string 名称
description string 描述
参数 类型 必有 说明
id int 反馈类型id
name string 反馈类型名称
description string 反馈类型描述
created_at string 创建时间
updated_at string 更新时间
app_id string 厂商标识
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 2,
  6. "app_id": "",
  7. "created_at": "2019-05-24 11:28:43",
  8. "updated_at": "2019-05-24 11:28:43",
  9. "name": "设备",
  10. "description": "其他"
  11. }
  12. }

编辑反馈类型

PUT /admin/feedback_category/{id}/

参数 类型 必填 说明
id int 反馈类型id
name string 名称
description string 描述
参数 类型 必有 说明
id int 反馈类型id
name string 反馈类型名称
description string 反馈类型描述
created_at string 创建时间
updated_at string 更新时间
app_id string 厂商标识
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 2,
  6. "app_id": "",
  7. "created_at": "2019-05-24 11:28:43",
  8. "updated_at": "2019-05-24 11:28:43",
  9. "name": "设备",
  10. "description": "其他"
  11. }
  12. }

删除反馈类型

DELETE /admin/feedback_category/{id}/

参数 类型 必填 说明
id int 反馈类型id
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

获取反馈类型详情

GET /admin/feedback_category/{id}/

参数 类型 必填 说明
id int 反馈类型id
参数 类型 必有 说明
id int 反馈类型id
name string 反馈类型名称
description string 反馈类型描述
created_at string 创建时间
updated_at string 更新时间
app_id string 厂商标识
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 2,
  6. "app_id": "",
  7. "created_at": "2019-05-24 11:28:43",
  8. "updated_at": "2019-05-24 11:28:43",
  9. "name": "设备",
  10. "description": "其他"
  11. }
  12. }

获取反馈类型列表

GET /admin/feedback_category/

  1. {
  2. "Content-Type": "application/json; charset=utf-8",
  3. "Authorization": "Token xxxxxx"
  4. }
参数 类型 必填 说明
page_no int 分页数:默认1
page_size int 数据量:默认20
参数 类型 必有 说明
id int 反馈类型id
name string 反馈类型名称
description string 反馈类型描述
created_at string 创建时间
updated_at string 更新时间
app_id string 厂商标识
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "total": 1,
  6. "pages": 1,
  7. "current_page": 1,
  8. "page_size": 20,
  9. "data": [
  10. {
  11. "id": 1,
  12. "app_id": "",
  13. "created_at": "2019-05-24 11:28:08",
  14. "updated_at": "2019-05-24 11:30:57",
  15. "name": "app",
  16. "description": "app"
  17. }
  18. ]
  19. }
  20. }

获取意见反馈列表

GET /admin/feedback/

参数 类型 必填 说明
page_no int 分页数:默认1
page_size int 数据量:默认20
start_time int 起始时间戳
end_time int 结束时间戳
username string 用户名
参数 类型 必有 说明
id int 反馈类型id
name string 反馈类型名称
description string 反馈类型描述
created_at string 创建时间
updated_at string 更新时间
app_id string 厂商标识
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "total": 2,
  6. "pages": 1,
  7. "current_page": 1,
  8. "page_size": 20,
  9. "data": [
  10. {
  11. "id": 3,
  12. "app_id": "",
  13. "created_at": "2019-05-24 11:48:47",
  14. "updated_at": "2019-05-24 11:48:47",
  15. "feedback_content": "反馈内容",
  16. "feedback_status": 0,
  17. "feedback_category_id": 1,
  18. "contact_phone": "18656660930",
  19. "user_id": 2,
  20. "username": "admin"
  21. },
  22. {
  23. "id": 2,
  24. "app_id": "",
  25. "created_at": "2019-05-24 11:47:43",
  26. "updated_at": "2019-05-24 11:47:43",
  27. "feedback_content": "反馈内容",
  28. "feedback_status": 1,
  29. "feedback_category_id": 1,
  30. "contact_phone": "18656660930",
  31. "user_id": 2,
  32. "username": "admin"
  33. }
  34. ]
  35. }
  36. }

删除意见反馈

DELETE /admin/feedback/{id}/

参数 类型 必填 说明
id int 反馈意见id
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

获取意见反馈回复内容

GET /admin/feedback/reply/{feedback_id}/

参数 类型 必填 说明
feedback_id int 反馈意见id
参数 类型 必有 说明
id string 反馈类型id
reply_content string 回复内容
is_read bool 是否已读
created_at string 创建时间
updated_at string 更新时间
app_id string 厂商标识
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 2,
  6. "app_id": "",
  7. "created_at": "2019-05-24 14:02:44",
  8. "updated_at": "2019-05-24 14:02:44",
  9. "reply_content": "回复内容",
  10. "manager_id": 2,
  11. "feedback_id": 3,
  12. "is_read": false
  13. }
  14. }

在线文档

创建在线文档

POST /admin/document/

参数 类型 必填 说明
doc_name string 文档名称
doc_content string 文档内容
path_name string 路径名称
参数 类型 必有 说明
id int 文档id
created_at string 创建时间
updated_at string 更新时间
app_id string 厂商标识
doc_name string 文档名称
doc_content string 文档内容
doc_url string 文档地址
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 1,
  6. "path_name": "1",
  7. "app_id": "",
  8. "created_at": "2019-08-27 16:14:46",
  9. "updated_at": "2019-08-27 16:14:46",
  10. "doc_name": "使用说明书",
  11. "doc_content": "**************",
  12. "doc_url": "http://39.105.60.207:8101/document/1"
  13. }
  14. }

获取文档列表

GET /admin/document/

参数 类型 必填 说明
page_no int 分页数:默认1
page_size int 数据量:默认20
参数 类型 必有 说明
id int 文档id
created_at string 创建时间
updated_at string 更新时间
app_id string 厂商标识
doc_name string 文档名称
doc_content string 文档内容
doc_url string 文档地址
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "total": 1,
  6. "pages": 1,
  7. "current_page": 1,
  8. "page_size": 20,
  9. "data": [
  10. {
  11. "id": 1,
  12. "path_name": "1",
  13. "app_id": "",
  14. "created_at": "2019-08-27 16:14:46",
  15. "updated_at": "2019-08-27 16:14:46",
  16. "doc_name": "使用说明书",
  17. "doc_content": "**************",
  18. "doc_url": "http://39.105.60.207:8101/document/1"
  19. }
  20. ]
  21. }
  22. }

编辑在线文档

PUT /admin/document/[id]/

参数 类型 必填 说明
id int 文档id
doc_name string 文档名称
doc_content string 文档内容
path_name string 路径名称
参数 类型 必有 说明
id int 文档id
created_at string 创建时间
updated_at string 更新时间
app_id string 厂商标识
doc_name string 文档名称
doc_content string 文档内容
doc_url string 文档地址
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 1,
  6. "path_name": "1",
  7. "app_id": "",
  8. "created_at": "2019-08-27 16:14:46",
  9. "updated_at": "2019-08-27 16:14:46",
  10. "doc_name": "使用说明书",
  11. "doc_content": "**************",
  12. "doc_url": "http://39.105.60.207:8101/document/1"
  13. }
  14. }

编辑在线文档

DELETE /admin/document/[id]/

参数 类型 必填 说明
id int 文档id
参数 类型 必有 说明
id int 文档id
created_at string 创建时间
updated_at string 更新时间
app_id string 厂商标识
doc_name string 文档名称
doc_content string 文档内容
doc_url string 文档地址
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

在线文档详情

GET /admin/document/[id]/

参数 类型 必填 说明
id int 文档id
参数 类型 必有 说明
id int 文档id
created_at string 创建时间
updated_at string 更新时间
app_id string 厂商标识
doc_name string 文档名称
doc_content string 文档内容
doc_url string 文档地址
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 1,
  6. "path_name": "1",
  7. "app_id": "",
  8. "created_at": "2019-08-27 16:14:46",
  9. "updated_at": "2019-08-27 16:14:46",
  10. "doc_name": "使用说明书",
  11. "doc_content": "**************",
  12. "doc_url": "http://39.105.60.207:8101/document/1"
  13. }
  14. }

角色管理

获取角色配置清单

GET /admin/config/roles/

参数 类型 必有 说明
title string 菜单名称
key string 菜单唯一标识
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "roles": [
  6. {
  7. "title": "系统管理",
  8. "key": "1",
  9. "children": [
  10. {
  11. "title": "账号管理",
  12. "key": "1-1"
  13. },
  14. {
  15. "title": "角色管理",
  16. "key": "1-2"
  17. },
  18. {
  19. "title": "日志管理",
  20. "key": "1-3"
  21. }
  22. ]
  23. },
  24. {
  25. "title": "配置管理",
  26. "key": "2",
  27. "children": [
  28. {
  29. "title": "在线文档",
  30. "key": "2-1"
  31. },
  32. {
  33. "title": "FAQ",
  34. "key": "1-2"
  35. }
  36. ]
  37. },
  38. {
  39. "title": "MQTT服务",
  40. "key": "3",
  41. "children": [
  42. {
  43. "title": "产品管理",
  44. "key": "3-1"
  45. },
  46. {
  47. "title": "设备管理",
  48. "key": "3-2"
  49. }
  50. ]
  51. }
  52. ]
  53. }
  54. }

获取角色列表

GET /admin/role/

参数 类型 必填 说明
page_no int 分页数:默认1
page_size int 数据量:默认20
参数 类型 必有 说明
id string 数据id
created_at string 创建时间
updated_at string 设备名称
role_name string 角色名称
role_permissions list 角色权限
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 1,
  6. "role_permissions": [
  7. "1-1",
  8. "2-2"
  9. ],
  10. "app_id": "",
  11. "created_at": "2019-09-01 14:28:56",
  12. "updated_at": "2019-09-01 15:04:22",
  13. "role_name": "技术人员"
  14. }
  15. }

创建角色

POST /admin/role/

参数 类型 必填 说明
role_name string 角色名称
role_permissions list 角色权限, 参考角色配置清单,选中的children中的key列表
参数 类型 必有 说明
id string 数据id
created_at string 创建时间
updated_at string 设备名称
role_name string 角色名称
role_permissions list 角色权限
  1. {
  2. "role_name": "技术人员",
  3. "role_permissions": ['1-1', '2-2']
  4. }
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 1,
  6. "role_permissions": [
  7. "1-1",
  8. "2-2"
  9. ],
  10. "app_id": "",
  11. "created_at": "2019-09-01 14:28:56",
  12. "updated_at": "2019-09-01 14:28:56",
  13. "role_name": "技术人员"
  14. }
  15. }

获取角色详情

GET /admin/role/[id]/

参数 类型 必有 说明
id string 数据id
created_at string 创建时间
updated_at string 设备名称
role_name string 角色名称
role_permissions list 角色权限
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 1,
  6. "role_permissions": [
  7. "1-1",
  8. "2-2"
  9. ],
  10. "app_id": "",
  11. "created_at": "2019-09-01 14:28:56",
  12. "updated_at": "2019-09-01 14:28:56",
  13. "role_name": "技术人员"
  14. }
  15. }

编辑角色

PUT /admin/role/[id]/

参数 类型 必填 说明
role_name string 角色名称
role_permissions list 角色权限, 参考角色配置清单,选中的children中的key列表
参数 类型 必有 说明
id string 数据id
created_at string 创建时间
updated_at string 设备名称
role_name string 角色名称
role_permissions list 角色权限
  1. {
  2. "role_name": "技术人员",
  3. "role_permissions": ['1-1', '2-2']
  4. }
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 1,
  6. "role_permissions": [
  7. "1-1",
  8. "2-2"
  9. ],
  10. "app_id": "",
  11. "created_at": "2019-09-01 14:28:56",
  12. "updated_at": "2019-09-01 14:28:56",
  13. "role_name": "技术人员"
  14. }
  15. }

删除角色

DELETE /admin/role/[id]/

参数 类型 必填 说明
id string 角色id
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

公司管理

添加公司

POST /admin/app/

参数 类型 必填 说明
company string 公司名称
address string 公司地址
contact_name string 联系人
phone string 电话
email string 邮箱
password string 密码
logo string logo
参数 类型 必有 说明
id int 公司信息id
company string 公司名称
address string 公司地址
contact_name string 联系人
phone string 电话
email string 邮箱
app_id string 公司信息标识符
created_at string 创建时间
updated_at string 更新时间
logo string logo
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 3,
  6. "app_id": "5d73209e228c90634547aaf5",
  7. "created_at": "2019-09-07 11:14:38",
  8. "updated_at": "2019-09-07 11:14:38",
  9. "company": "上海xxxx科技有限公司",
  10. "contact_name": "xxx",
  11. "address": "",
  12. "phone": "18656660932",
  13. "email": ""
  14. }
  15. }

获取公司列表

GET /admin/app/

参数 类型 必填 说明
page_no int 分页数:默认1
page_size int 数据量:默认20
company string 公司名称
参数 类型 必有 说明
id int 公司信息id
company string 公司名称
address string 公司地址
contact_name string 联系人
phone string 电话
email string 邮箱
app_id string 公司信息标识符
created_at string 创建时间
updated_at string 更新时间
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "total": 2,
  6. "pages": 1,
  7. "current_page": 1,
  8. "page_size": 20,
  9. "data": [
  10. {
  11. "id": 3,
  12. "app_id": "5d73209e228c90634547aaf5",
  13. "created_at": "2019-09-07 11:14:38",
  14. "updated_at": "2019-09-07 11:14:38",
  15. "company": "上海xxx",
  16. "contact_name": "xxx",
  17. "address": "",
  18. "phone": "1865666xxxx",
  19. "email": ""
  20. },
  21. {
  22. "id": 2,
  23. "app_id": "5d73205d228c90634547aaf4",
  24. "created_at": "2019-09-07 11:13:33",
  25. "updated_at": "2019-09-07 11:13:33",
  26. "company": "上海xxxx科技有限公司",
  27. "contact_name": "xxx",
  28. "address": "",
  29. "phone": "18656660931",
  30. "email": ""
  31. }
  32. ]
  33. }
  34. }

编辑公司

PUT /admin/app/[id]/

参数 类型 必填 说明
company string 公司名称
contact_name string 联系人
phone string 电话
email string 邮箱
password string 密码
logo string logo
参数 类型 必有 说明
id int 公司信息id
company string 公司名称
address string 公司地址
contact_name string 联系人
phone string 电话
email string 邮箱
app_id string 公司信息标识符
created_at string 创建时间
updated_at string 更新时间
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 3,
  6. "app_id": "5d73209e228c90634547aaf5",
  7. "created_at": "2019-09-07 11:14:38",
  8. "updated_at": "2019-09-07 11:14:38",
  9. "company": "上海xxxx科技有限公司",
  10. "contact_name": "高杨",
  11. "address": "",
  12. "phone": "18656660932",
  13. "email": ""
  14. }
  15. }

获取公司详情

GET /admin/app/[id]/

参数 类型 必填 说明
id int 公司信息id
参数 类型 必有 说明
id int 公司信息id
company string 公司名称
address string 公司地址
contact_name string 联系人
phone string 电话
email string 邮箱
app_id string 公司信息标识符
created_at string 创建时间
updated_at string 更新时间
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 3,
  6. "app_id": "5d73209e228c90634547aaf5",
  7. "created_at": "2019-09-07 11:14:38",
  8. "updated_at": "2019-09-07 11:14:38",
  9. "company": "上海xxxx科技有限公司",
  10. "contact_name": "高杨",
  11. "address": "",
  12. "phone": "18656660932",
  13. "email": ""
  14. }
  15. }

获取公司详情

DELETE /admin/app/[id]/

参数 类型 必填 说明
id int 公司信息id
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

产品管理

添加产品

POST /admin/product/

参数 类型 必填 说明
product_name string 产品名称
参数 类型 必有 说明
product_name string 产品名称
product_key string 产品标识符
product_secret string 产品秘钥
created string 创建时间
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "_id": "5d7609dfe1508d2dfb31c91c",
  6. "product_name": "小系统",
  7. "product_key": "bOZVf6DNvE",
  8. "product_secret": "JvSTO0JQz3oBVIWMFwSU7lK8Eo2vmpsA",
  9. "created": "2019-09-09 16:14:23"
  10. }
  11. }

获取产品列表

GET /admin/product/

参数 类型 必有 说明
product_name string 产品名称
product_key string 产品标识符
product_secret string 产品秘钥
created string 创建时间
all_device_count int 所有设备数量
online_device_count int 在线设备数量
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "total": 2,
  6. "pages": 1,
  7. "current_page": 1,
  8. "page_size": 20,
  9. "data": [
  10. {
  11. "_id": "5d6f719ecb25ac82f5103fc9",
  12. "product_name": "test",
  13. "product_key": "hnbSRfI21N",
  14. "product_secret": "WJ1HHwVhixisjyeCR5hGTH6iVk1gele2",
  15. "created": "2019-09-04 16:11:10"
  16. },
  17. {
  18. "_id": "5d7609dfe1508d2dfb31c91c",
  19. "product_name": "小系统",
  20. "product_key": "bOZVf6DNvE",
  21. "product_secret": "JvSTO0JQz3oBVIWMFwSU7lK8Eo2vmpsA",
  22. "created": "2019-09-09 16:14:23"
  23. }
  24. ]
  25. }
  26. }

获取产品详情

GET /admin/product/[product_key]/

参数 类型 必填 说明
product_key string 产品标识符
参数 类型 必有 说明
product_name string 产品名称
product_key string 产品标识符
product_secret string 产品秘钥
created string 创建时间
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "_id": "5d7609dfe1508d2dfb31c91c",
  6. "product_name": "小系统",
  7. "product_key": "bOZVf6DNvE",
  8. "product_secret": "JvSTO0JQz3oBVIWMFwSU7lK8Eo2vmpsA",
  9. "created": "2019-09-09 16:14:23"
  10. }
  11. }

编辑产品详情

PUT /admin/product/[product_key]/

参数 类型 必填 说明
product_key string 产品标识符
product_name string 产品名称
参数 类型 必有 说明
product_name string 产品名称
product_key string 产品标识符
product_secret string 产品秘钥
created string 创建时间
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "_id": "5d7609dfe1508d2dfb31c91c",
  6. "product_name": "小系统",
  7. "product_key": "bOZVf6DNvE",
  8. "product_secret": "JvSTO0JQz3oBVIWMFwSU7lK8Eo2vmpsA",
  9. "created": "2019-09-09 16:14:23"
  10. }
  11. }

删除产品

DELETE /admin/product/[product_key]/

参数 类型 必填 说明
product_key string 产品标识符
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

电站管理

电价/充放电策略列表

GET /admin/strategy/

  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "charge_discharge": [
  6. {
  7. "_id": "5dc4de33972397c218d0b054",
  8. "name": "测试"
  9. }
  10. ],
  11. "power_price": [
  12. {
  13. "_id": "5dc12eedb37d13ebc87c04fe",
  14. "name": "xxxxxx"
  15. },
  16. {
  17. "_id": "5dc3df554366fea9299cd5a6",
  18. "name": "111"
  19. },
  20. {
  21. "_id": "5dc3dfad85454b369f9cd278",
  22. "name": "11"
  23. }
  24. ]
  25. }
  26. }

添加电站

POST /admin/device/

参数 类型 必填 说明
device_name string 电站名称
device_address string 电站地址
installed_power string 装机功率(单位MW)
installed_capacity string 装机容量(MWh)
voltage_level string 电压等级(kV)
operation_time string 投运时间
contact_name string 联系人
contact_phone string 联系电话
app_id string 公司信息app_id标识符
address_province string 省份
address_city string 市区
sn string 设备序列号
pack_num int pack数量
cell_num int cell数量
power_price_id string 电价策略_id
charge_discharge_id string 充放电策略_id
inverter_sn string 逆变器序列号
inverter_power string 逆变器功率
number_4g string 4G手机号
remarks string 备注
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "app_id": "5d7330d4a0aa8b5f8630c52d",
  6. "device_name": "test",
  7. "device_address": "xxxx",
  8. "contact_name": "jerry",
  9. "contact_phone": "18656660930",
  10. "installed_power": 100,
  11. "installed_capacity": 100,
  12. "voltage_level": 4,
  13. "company": "xxxxxxx"
  14. "operation_time": "2019-09-07 10:00:00",
  15. "product_key": "hnbSRfI21N",
  16. "device_key": "5d7335cc10671a7ef6880ed2",
  17. "device_secret": "cs47vvrWX8VgECwoeNrBJLwsO0rQsqKK",
  18. "_id": "5d7335cc10671a7ef6880ed3",
  19. "created": "2019-09-07 12:45:00",
  20. "sn": "xxxxxx"
  21. }
  22. }

获取电站列表

GET /admin/device/

参数 类型 必填 说明
page_no int 分页数:默认1
page_size int 数据量:默认20
device_name string 电站名称
company string 所属企业
app_id string 公司标识
open_id string 用户标识
参数 类型 必有 说明
device_name string 电站名称
device_address string 电站地址
installed_power string 装机功率(单位MW)
installed_capacity string 装机容量(MWh)
voltage_level string 电压等级(kV)
operation_time string 投运时间
contact_name string 联系人
contact_phone string 联系电话
company string 所属企业
power_price_id string 电价策略_id
charge_discharge_id string 充放电策略_id
number_4g string 4G手机号
inverter_sn string 逆变器序列号
inverter_power string 逆变器功率
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "total": 13,
  6. "pages": 1,
  7. "current_page": 1,
  8. "page_size": 20,
  9. "data": [
  10. {
  11. "_id": "5d7335cc10671a7ef6880ed3",
  12. "app_id": "5d7330d4a0aa8b5f8630c52d",
  13. "device_name": "test",
  14. "device_address": "xxxx",
  15. "contact_name": "jerry",
  16. "contact_phone": "18656660930",
  17. "installed_power": 100,
  18. "installed_capacity": 100,
  19. "voltage_level": 4,
  20. "company": "xxxxxxx"
  21. "operation_time": "2019-09-07 10:00:00",
  22. "product_key": "hnbSRfI21N",
  23. "device_key": "5d7335cc10671a7ef6880ed2",
  24. "device_secret": "cs47vvrWX8VgECwoeNrBJLwsO0rQsqKK",
  25. "created": "2019-09-07 12:45:00"
  26. }
  27. ]
  28. }
  29. }

获取电站下拉筛选列表

GET /admin/device/select/list/

参数 类型 必填 说明
page_no int 分页数:默认1
page_size int 数据量:默认20
device_name string 电站名称
company string 所属企业
app_id string 公司标识
open_id string 用户标识
参数 类型 必有 说明
device_name string 电站名称
device_address string 电站地址
installed_power string 装机功率(单位MW)
installed_capacity string 装机容量(MWh)
voltage_level string 电压等级(kV)
operation_time string 投运时间
contact_name string 联系人
contact_phone string 联系电话
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "data": [
  6. {
  7. "_id": "5d7335cc10671a7ef6880ed3",
  8. "app_id": "5d7330d4a0aa8b5f8630c52d",
  9. "device_name": "test",
  10. "device_address": "xxxx",
  11. "contact_name": "jerry",
  12. "contact_phone": "18656660930",
  13. "installed_power": 100,
  14. "installed_capacity": 100,
  15. "voltage_level": 4,
  16. "operation_time": "2019-09-07 10:00:00",
  17. "product_key": "hnbSRfI21N",
  18. "device_key": "5d7335cc10671a7ef6880ed2",
  19. "device_secret": "cs47vvrWX8VgECwoeNrBJLwsO0rQsqKK",
  20. "created": "2019-09-07 12:45:00"
  21. }
  22. ]
  23. }
  24. }

编辑电站详情

PUT /admin/device/[device_key]/

参数 类型 必填 说明
device_key string 电站标识
device_name string 电站名称
device_address string 电站地址
installed_power string 装机功率(单位MW)
installed_capacity string 装机容量(MWh)
voltage_level string 电压等级(kV)
operation_time string 投运时间
contact_name string 联系人
contact_phone string 联系电话
app_id string 公司信息app_id标识符
sn string 设备序列号
pack_num int pack数量
cell_num int cell数量
power_price_id string 电价策略_id
charge_discharge_id string 充放电策略_id
number_4g string 4G手机号
inverter_sn string 逆变器序列号
inverter_power string 逆变器功率
remarks string 备注
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "app_id": "5d7330d4a0aa8b5f8630c52d",
  6. "device_name": "test",
  7. "device_address": "xxxx",
  8. "contact_name": "jerry",
  9. "contact_phone": "18656660930",
  10. "installed_power": 100,
  11. "installed_capacity": 100,
  12. "voltage_level": 4,
  13. "company": "xxxxxxx"
  14. "operation_time": "2019-09-07 10:00:00",
  15. "product_key": "hnbSRfI21N",
  16. "device_key": "5d7335cc10671a7ef6880ed2",
  17. "device_secret": "cs47vvrWX8VgECwoeNrBJLwsO0rQsqKK",
  18. "_id": "5d7335cc10671a7ef6880ed3",
  19. "created": "2019-09-07 12:45:00"
  20. }
  21. }

获取电站详情

GET /admin/device/[device_key]/

参数 类型 必填 说明
device_key string 电站标识
参数 类型 必有 说明
device_name string 电站名称
device_address string 电站地址
installed_power string 装机功率(单位MW)
installed_capacity string 装机容量(MWh)
voltage_level string 电压等级(kV)
operation_time string 投运时间
contact_name string 联系人
contact_phone string 联系电话
company string 所属企业
warning_count int 今日新增故障数量
yesterday_income float 昨日收益
this_month_income float 本月收益
all_income float 累计收益
SOC int SOC百分比
TDisEnergy int 累计放电量
TChgEnergy int 累计充电量
AvailableDischargeEnergy int 可用放电量
AvailableChargeEnergy int 可用充电量
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "_id": "5d8b35c4a0d168685f7a66b7",
  6. "app_id": "5d8ef2f8beba9b969c6a2e7e",
  7. "product_key": "eXvrimn2mr",
  8. "device_name": "测试电站1",
  9. "address_province": "山东省",
  10. "address_city": "青岛市",
  11. "device_address": "金沙江路2222号",
  12. "contact_name": "jerry",
  13. "contact_phone": "18656660930",
  14. "installed_power": 100,
  15. "installed_capacity": 100,
  16. "voltage_level": 3,
  17. "operation_time": "2019-09-26 17:39:13",
  18. "device_key": "5d8b35c4a0d168685f7a66b6",
  19. "device_secret": "qpr6bBgSUjHwODUIvAUqIwLxIjHK2cEL",
  20. "status": 0,
  21. "created": "2019-09-25 17:39:16",
  22. "company": "上海创好智能科技有限公司",
  23. "warning_count": 0,
  24. "yesterday_income": 0,
  25. "this_month_income": 0,
  26. "all_income": 0,
  27. "SOC": 0,
  28. "TDisEnergy": 0,
  29. "TChgEnergy": 0,
  30. "AvailableDischargeEnergy": 0,
  31. "AvailableChargeEnergy": 0
  32. }
  33. }

删除电站

DELETE /admin/device/[device_key]/

参数 类型 必填 说明
device_key string 电站标识
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

电站监测

GET /admin/device/monitor/[device_key]/

参数 类型 必填 说明
device_key string 电站标识
参数 类型 必有 说明
SOC int SOC
TDisEnergy int 累计放电量
TChgEnergy string 累计充电量
AvailableDischargeEnergy int 可用放电量
AvailableChargeEnergy int 可用充电量
TodayDischargeEnergy int 今日放电量
TodayChargeEnergy int 今日充电量
efficiency int 电站效率
yesterday_income float 昨日收益
all_income float 累计收益
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "SOC": 0,
  6. "TDisEnergy": 0,
  7. "TChgEnergy": 0,
  8. "AvailableDischargeEnergy": 0,
  9. "AvailableChargeEnergy": 0,
  10. "TodayDischargeEnergy": 0,
  11. "TodayChargeEnergy": 0,
  12. "efficiency": 0,
  13. "yesterday_income": 0,
  14. "all_income": 0
  15. }
  16. }

绑定电站

POST /admin/bind/device/

参数 类型 必填 说明
open_id string 用户标识符
sn string 设备序列号
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

历史数据下拉属性选择

GET /admin/history/attributes/

  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "Voltage": "电池电压",
  6. "Current": "电池电流",
  7. "Power": "电池功率",
  8. "SOC": "电池SOC",
  9. "VolLow": "电池包中最低电压",
  10. "VolLowID": "最低电压模块ID",
  11. "VolHigh": "电池包中最高电压",
  12. "VolHighID": "最高电压模块ID",
  13. "TemperLow": "电池包中最低温度",
  14. "TemperHigh": "电池包中最高温度",
  15. "PTotalPEnergy": "当前正向有功总电能",
  16. "PJPEnergy": "当前正向有功尖电能",
  17. "PFPEnergy": "当前正向有功峰电能",
  18. "PPPEnergy": "当前正向有功平电能",
  19. "PGPEnergy": "当前正向有功谷电能",
  20. "RTotalPEnergy": "当前反向有功总电能",
  21. "RJPEnergy": "当前反向有功尖电能",
  22. "RFPEnergy": "当前反向有功峰电能",
  23. "RPPEnergy": "当前反向有功平电能",
  24. "RGPEnergy": "当前反向有功谷电能",
  25. "DC1Current": "DC1电流",
  26. "DC1Voltage": "DC1电压",
  27. "DC2Current": "DC2电流",
  28. "DC2Voltage": "DC2电压",
  29. "VRgrid": "R相电网电压",
  30. "IRgrid": "R相电网电流",
  31. "FRgrid": "R相电网频率",
  32. "VSgrid": "S相电网电压",
  33. "ISgrid": "S相电网电流",
  34. "FSgrid": "S相电网频率",
  35. "VTgrid": "T相电网电压",
  36. "ITgrid": "T相电网电流",
  37. "FTgrid": "T相电网频率",
  38. "Temper": "温度",
  39. "Pgrid": "电网功率",
  40. "Pload": "负载功率",
  41. "Pdc": "功率",
  42. "FedGridEnergy": "逆变器馈网电量",
  43. "SupplyGridEnergy": "电网取电量",
  44. "LoadEnergy": "负载用电量"
  45. }
  46. }

历史数据曲线

GET /admin/history/attributes/chart/

参数 类型 必填 说明
start_time int 开始时间戳(单位:秒)
end_time int 结束时间戳(单位:秒)
device_key string 电站标识
param_1 string 电站属性
param_2 string 电站属性
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "name_1": "当前正向有功尖电能",
  6. "name_2": "",
  7. "charts": [
  8. {
  9. "value_1": 122,
  10. "value_2": 0,
  11. "date_time": "2019-09-27 15:18"
  12. },
  13. {
  14. "value_1": 122,
  15. "value_2": 0,
  16. "date_time": "2019-09-27 15:18"
  17. },
  18. {
  19. "value_1": 122,
  20. "value_2": 0,
  21. "date_time": "2019-09-27 15:19"
  22. }
  23. ]
  24. }
  25. }

账号管理

获取账号列表

GET /admin/manager/

参数 类型 必填 说明
page_no int 分页数:默认1
page_size int 数据量:默认20
username string 用户名
phone string 手机号
参数 类型 必有 说明
username string 用户名
phone string 手机号
real_name string 真实姓名)
created_at string 创建时间)
last_login_ip string 最后登陆IP
last_login_time string 最后登陆时间
role int 角色ID
role_name string 角色名称
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "total": 1,
  6. "pages": 1,
  7. "current_page": 1,
  8. "page_size": 20,
  9. "data": [
  10. {
  11. "id": 1,
  12. "username": "admin",
  13. "phone": "18656660930",
  14. "email": "",
  15. "real_name": "",
  16. "avatar": "",
  17. "is_superuser": 1,
  18. "created_at": "2019-09-07 11:04:55",
  19. "last_login_ip": "",
  20. "last_login_time": "2019-09-11 16:42:08",
  21. "role_name": "超级管理员",
  22. "role": 1
  23. }
  24. ]
  25. }
  26. }

添加账号

POST /admin/manager/

参数 类型 必填 说明
username string 用户名
phone string 手机号
real_name string 真实姓名)
password string 密码,默认:88888888
role string 角色ID
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

编辑账号

PUT /admin/manager/[id]/

参数 类型 必填 说明
id int 用户ID
username string 用户名
phone string 手机号
real_name string 真实姓名)
password string 密码,默认:88888888
role string 角色ID
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

删除账号

DELETE /admin/manager/[id]/

参数 类型 必填 说明
id int 用户ID
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

获取账号详情

GET /admin/manager/[id]/

参数 类型 必填 说明
id int 用户ID
参数 类型 必有 说明
id int 用户ID
area string 手机区号
phone string 手机号
email string 邮箱
role int 角色ID
role_name string 角色名称
username string 用户名
is_active bool 是否已激活
created_at string 创建时间
updated_at string 更新时间
nickname string 昵称
avatar string 头像地址
gender int 性别,0:女,1:男,2:保密
birthday string 生日日期,如:2019-02-22
address string 地址
last_login_ip string 最后登陆IP
last_login_time string 最后登陆时间
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "id": 5,
  6. "username": "13917709594",
  7. "phone": "13917709594",
  8. "email": "",
  9. "real_name": "",
  10. "avatar": "",
  11. "is_superuser": 1,
  12. "created_at": "2019-09-07 12:23:48",
  13. "last_login_ip": "",
  14. "last_login_time": "2019-09-11 16:42:08.954072",
  15. "role_name": "超级管理员",
  16. "role": 1
  17. }
  18. }

告警记录

获取记录列表

GET /admin/warning/

参数 类型 必填 说明
page_no int 分页数:默认1
page_size int 数据量:默认20
code string 告警码
level string 告警等级
start_time int 查询开始时间戳
end_time int 查询结束时间戳
sn string 设备序列号
参数 类型 必有 说明
code string 告警码
level string 告警等级
time string 告警发生时间
zh_desc string 告警中文描述
en_desc string 告警英文描述
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "total": 3,
  6. "pages": 1,
  7. "current_page": 1,
  8. "page_size": 20,
  9. "data": [
  10. {
  11. "_id": "5d81c43b964709a2d225f923",
  12. "msg_type": "event",
  13. "sn": "1234567890",
  14. "identifier": "warning",
  15. "items": {
  16. "code": "E01",
  17. "level": 1,
  18. "time": "2019-09-17T20:00:00",
  19. "GRID_STA": "1",
  20. "PCS_STA:": "2",
  21. "BAT_STA": "4",
  22. "en_desc": "DciOutRangeWarning",
  23. "zh_desc": "DCI超出范围告警"
  24. },
  25. "product_key": "hnbSRfI21N",
  26. "device_key": "5d7355b6ff828faf31256eed",
  27. "created": "2019-09-18 13:44:27"
  28. },
  29. {
  30. "_id": "5d81c43b964709a2d225f924",
  31. "msg_type": "event",
  32. "sn": "1234567890",
  33. "identifier": "warning",
  34. "items": {
  35. "code": "E01",
  36. "level": 1,
  37. "time": "2019-09-17T20:00:00",
  38. "GRID_STA": "1",
  39. "PCS_STA:": "2",
  40. "BAT_STA": "4",
  41. "en_desc": "DciOutRangeWarning",
  42. "zh_desc": "DCI超出范围告警"
  43. },
  44. "product_key": "hnbSRfI21N",
  45. "device_key": "5d7355b6ff828faf31256eed",
  46. "created": "2019-09-18 13:44:27"
  47. },
  48. {
  49. "_id": "5d81c43b964709a2d225f925",
  50. "msg_type": "event",
  51. "sn": "1234567890",
  52. "identifier": "warning",
  53. "items": {
  54. "code": "E01",
  55. "level": 1,
  56. "time": "2019-09-17T20:00:00",
  57. "GRID_STA": "1",
  58. "PCS_STA:": "2",
  59. "BAT_STA": "4",
  60. "en_desc": "DciOutRangeWarning",
  61. "zh_desc": "DCI超出范围告警"
  62. },
  63. "product_key": "hnbSRfI21N",
  64. "device_key": "5d7355b6ff828faf31256eed",
  65. "created": "2019-09-18 13:44:27"
  66. }
  67. ]
  68. }
  69. }

位置分布

获取位置分布数量

GET /admin/address/statistics/

参数 类型 必有 说明
count int 电站数量
city string 城市
location json 经纬度
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "address": [
  6. {
  7. "count": 1,
  8. "city": "北京市",
  9. "location": {"lng": 0, "lat": 0}
  10. }
  11. ]
  12. }
  13. }

电价策略

添加电价策略

POST /admin/power/price/

参数 类型 必填 说明
device_key string 设备标识
start_time int 开始时间戳
end_time int 结束时间戳
a json 尖时段信息
b json 峰时段信息
c json 平时段信息
d json 谷时段信息
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "start_time": "2019-09-22 09:53:47",
  6. "end_time": "2019-09-23 13:40:27",
  7. "device_key": "5d85b6f4540cd75be16e8a8b",
  8. "a": {
  9. "timer": [
  10. [
  11. "01:00",
  12. "05:00"
  13. ],
  14. [
  15. "05:00",
  16. "08:00"
  17. ]
  18. ],
  19. "price": 1
  20. },
  21. "b": {
  22. "timer": [],
  23. "price": 0
  24. },
  25. "c": {
  26. "timer": [],
  27. "price": 0
  28. },
  29. "d": {
  30. "timer": [],
  31. "price": 0
  32. },
  33. "status": false,
  34. "_id": "5d86dded262d6d953b031fac",
  35. "created": "2019-09-22 10:35:25"
  36. }
  37. }

获取电价列表

GET /admin/power/price/

参数 类型 必填 说明
device_key string 设备标识
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "prices": [
  6. {
  7. "_id": "5d86de71554565d92f031fad",
  8. "start_time": "2019-09-22T09:53:47",
  9. "end_time": "2019-09-23T13:40:27",
  10. "device_key": "5d85b6f4540cd75be16e8a8b",
  11. "a": {
  12. "timer": [
  13. [
  14. "01:00",
  15. "05:00"
  16. ],
  17. [
  18. "05:00",
  19. "08:00"
  20. ]
  21. ],
  22. "price": 1
  23. },
  24. "b": {
  25. "timer": [],
  26. "price": 0
  27. },
  28. "c": {
  29. "timer": [],
  30. "price": 0
  31. },
  32. "d": {
  33. "timer": [],
  34. "price": 0
  35. },
  36. "status": false,
  37. "created": "2019-09-22T10:37:37.976000"
  38. }
  39. ]
  40. }
  41. }

添加电价策略(新)

POST /admin/power/price/new/

参数 类型 必填 说明
name string 电价策略名称
start_time string 开始日期,格式如:09-01
end_time string 开始日期,格式如:11-01
a json 尖时段信息
b json 峰时段信息
c json 平时段信息
d json 谷时段信息
  1. {
  2. "name": "xxxxxx",
  3. "configs": [
  4. {
  5. "start_time": "09-01",
  6. "end_time": "10-01",
  7. "a": {
  8. "timer": [["01:00", "05:00"], ["05:00", "08:00"]],
  9. "price": 1.0
  10. },
  11. "b": {
  12. "timer": [],
  13. "price": 0
  14. },
  15. "c": {
  16. "timer": [],
  17. "price": 0
  18. },
  19. "d": {
  20. "timer": [],
  21. "price": 0
  22. }
  23. }
  24. ]
  25. }

获取电价列表(新)

GET /admin/power/price/new/

参数 类型 必填 说明
page_no int 分页数:默认1
page_size int 数据量:默认20
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "total": 1,
  6. "pages": 1,
  7. "current_page": 1,
  8. "page_size": 20,
  9. "data": [
  10. {
  11. "_id": "5dc12a6d35731de7351f5514",
  12. "name": "xxxxxx",
  13. "configs": [
  14. {
  15. "start_time": "09-01",
  16. "end_time": "10-01",
  17. "a": {
  18. "timer": [
  19. [
  20. "01:00",
  21. "05:00"
  22. ],
  23. [
  24. "05:00",
  25. "08:00"
  26. ]
  27. ],
  28. "price": 1
  29. },
  30. "b": {
  31. "timer": [],
  32. "price": 0
  33. },
  34. "c": {
  35. "timer": [],
  36. "price": 0
  37. },
  38. "d": {
  39. "timer": [],
  40. "price": 0
  41. }
  42. }
  43. ],
  44. "created": "2019-11-05 15:53:17"
  45. }
  46. ]
  47. }
  48. }

编辑电价策略(新)

PUT /admin/power/price/new/[_id]/

参数 类型 必填 说明
name string 电价策略名称
start_time string 开始日期,格式如:09-01
end_time string 开始日期,格式如:11-01
a json 尖时段信息
b json 峰时段信息
c json 平时段信息
d json 谷时段信息
  1. {
  2. "name": "xxxxxx",
  3. "configs": [
  4. {
  5. "start_time": "09-01",
  6. "end_time": "10-01",
  7. "a": {
  8. "timer": [["01:00", "05:00"], ["05:00", "08:00"]],
  9. "price": 1.0
  10. },
  11. "b": {
  12. "timer": [],
  13. "price": 0
  14. },
  15. "c": {
  16. "timer": [],
  17. "price": 0
  18. },
  19. "d": {
  20. "timer": [],
  21. "price": 0
  22. }
  23. }
  24. ]
  25. }
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "name": "xxxxxx",
  6. "configs": [
  7. {
  8. "start_time": "09-01",
  9. "end_time": "10-01",
  10. "a": {
  11. "timer": [
  12. [
  13. "01:00",
  14. "05:00"
  15. ],
  16. [
  17. "05:00",
  18. "08:00"
  19. ]
  20. ],
  21. "price": 1
  22. },
  23. "b": {
  24. "timer": [],
  25. "price": 0
  26. },
  27. "c": {
  28. "timer": [],
  29. "price": 0
  30. },
  31. "d": {
  32. "timer": [],
  33. "price": 0
  34. }
  35. }
  36. ],
  37. "_id": "5dc12a6d35731de7351f5514",
  38. "created": "2019-11-05 15:53:17"
  39. }
  40. }

电价策略详情(新)

GET /admin/power/price/new/[_id]/

  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "name": "xxxxxx",
  6. "configs": [
  7. {
  8. "start_time": "09-01",
  9. "end_time": "10-01",
  10. "a": {
  11. "timer": [
  12. [
  13. "01:00",
  14. "05:00"
  15. ],
  16. [
  17. "05:00",
  18. "08:00"
  19. ]
  20. ],
  21. "price": 1
  22. },
  23. "b": {
  24. "timer": [],
  25. "price": 0
  26. },
  27. "c": {
  28. "timer": [],
  29. "price": 0
  30. },
  31. "d": {
  32. "timer": [],
  33. "price": 0
  34. }
  35. }
  36. ],
  37. "_id": "5dc12a6d35731de7351f5514",
  38. "created": "2019-11-05 15:53:17"
  39. }
  40. }

充放电策略

获取充放电策略

GET /admin/charge_discharge/[device_key]/

参数 类型 必有 说明
timer list 时段
power int 功率
action int 动作:1充电,0放电
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "_id": "5d86eca0132480bfb3db926f",
  6. "device_key": "5d85b6f4540cd75be16e8a8b",
  7. "strategy": [
  8. {
  9. "timer": [
  10. "01:00",
  11. "05:00"
  12. ],
  13. "power": 25,
  14. "action": 1
  15. },
  16. {
  17. "timer": [
  18. "05:00",
  19. "10:00"
  20. ],
  21. "power": 20,
  22. "action": 0
  23. }
  24. ],
  25. "created": "2019-09-22 11:38:08"
  26. }
  27. }

编辑充放电策略

PUT /admin/charge_discharge/[device_key]/

参数 类型 必填 说明
strategy list 策略信息
start_time int 生效时间戳
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

添加充放电策略(新)

POST /admin/charge_discharge/1/new/

参数 类型 必填 说明
name string 策略名称
start_time string 开始日期,格式如:09-01
end_time string 开始日期,格式如:11-01
a json 充电信息
b json 放电信息
c json 待机信息
  1. {
  2. "name": "xxxxxx",
  3. "configs": [
  4. {
  5. "start_time": "09-01",
  6. "end_time": "10-01",
  7. "a": {
  8. "timer": [["01:00", "05:00"], ["05:00", "08:00"]],
  9. "power": 1.0
  10. },
  11. "b": {
  12. "timer": [],
  13. "power": 0
  14. },
  15. "c": {
  16. "timer": [],
  17. "power": 0
  18. }
  19. }
  20. ]
  21. }

获取充放电列表(新)

GET /admin/charge_discharge/1/new/

参数 类型 必填 说明
page_no int 分页数:默认1
page_size int 数据量:默认20
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "total": 1,
  6. "pages": 1,
  7. "current_page": 1,
  8. "page_size": 20,
  9. "data": [
  10. {
  11. "_id": "5dc12a6d35731de7351f5514",
  12. "name": "xxxxxx",
  13. "configs": [
  14. {
  15. "start_time": "09-01",
  16. "end_time": "10-01",
  17. "a": {
  18. "timer": [
  19. [
  20. "01:00",
  21. "05:00"
  22. ],
  23. [
  24. "05:00",
  25. "08:00"
  26. ]
  27. ],
  28. "price": 1
  29. },
  30. "b": {
  31. "timer": [],
  32. "price": 0
  33. },
  34. "c": {
  35. "timer": [],
  36. "price": 0
  37. }
  38. }
  39. ],
  40. "created": "2019-11-05 15:53:17"
  41. }
  42. ]
  43. }
  44. }

编辑充放电策略(新)

PUT /admin/charge_discharge/new/[_id]/

参数 类型 必填 说明
name string 电价策略名称
start_time string 开始日期,格式如:09-01
end_time string 开始日期,格式如:11-01
a json 充电信息
b json 放电信息
c json 待机信息
  1. {
  2. "name": "xxxxxx",
  3. "configs": [
  4. {
  5. "start_time": "09-01",
  6. "end_time": "10-01",
  7. "a": {
  8. "timer": [["01:00", "05:00"], ["05:00", "08:00"]],
  9. "power": 1.0
  10. },
  11. "b": {
  12. "timer": [],
  13. "power": 0
  14. },
  15. "c": {
  16. "timer": [],
  17. "power": 0
  18. }
  19. }
  20. ]
  21. }
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "name": "xxxxxx",
  6. "configs": [
  7. {
  8. "start_time": "09-01",
  9. "end_time": "10-01",
  10. "a": {
  11. "timer": [
  12. [
  13. "01:00",
  14. "05:00"
  15. ],
  16. [
  17. "05:00",
  18. "08:00"
  19. ]
  20. ],
  21. "power": 1
  22. },
  23. "b": {
  24. "timer": [],
  25. "power": 0
  26. },
  27. "c": {
  28. "timer": [],
  29. "power": 0
  30. }
  31. }
  32. ],
  33. "_id": "5dc12a6d35731de7351f5514",
  34. "created": "2019-11-05 15:53:17"
  35. }
  36. }

充放电策略详情(新)

GET /admin/charge_discharge/new/[_id]/

  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "name": "xxxxxx",
  6. "configs": [
  7. {
  8. "start_time": "09-01",
  9. "end_time": "10-01",
  10. "a": {
  11. "timer": [
  12. [
  13. "01:00",
  14. "05:00"
  15. ],
  16. [
  17. "05:00",
  18. "08:00"
  19. ]
  20. ],
  21. "power": 1
  22. },
  23. "b": {
  24. "timer": [],
  25. "power": 0
  26. },
  27. "c": {
  28. "timer": [],
  29. "power": 0
  30. }
  31. }
  32. ],
  33. "_id": "5dc12a6d35731de7351f5514",
  34. "created": "2019-11-05 15:53:17"
  35. }
  36. }

数据统计

首页数据统计

GET /admin/dashboard/

参数 类型 必有 说明
product_percent list 产品占比
device_status_percent list 设备状态占比
count int 数量
product_key string 产品标识
product_name string 产品名称
status int 设备状态:0离线1运行2故障3检修
installed_power int 总装机功率
installed_capacity int 总装机容量
yesterday_income int 昨日收益
this_month_income int 本月收益
all_income int 累计收益
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "product_percent": [
  6. {
  7. "count": 2,
  8. "product_key": "eXvrimn2mr",
  9. "product_name": "小系统"
  10. }
  11. ],
  12. "device_status_percent": [
  13. {
  14. "count": 2,
  15. "status": 0
  16. }
  17. ],
  18. "device_attributes": {
  19. "installed_power": 110,
  20. "installed_capacity": 110
  21. },
  22. "device_income": {
  23. "yesterday_income": 0,
  24. "this_month_income": 0,
  25. "all_income": 0
  26. }
  27. }
  28. }

电站效率/充放电量统计(最近N日/月的数据)

GET /admin/statistics/efficiency/

参数 类型 必填 说明
category int 类型:日(day)月(month)
size int 获取的数据的数量
device_key string 电站标识
参数 类型 必有 说明
DischargeEnergy int 累计放电量
ChargeEnergy int 累计充电量
efficiency float 电站效率
date_time string 日期
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "statistics": [
  6. {
  7. "DischargeEnergy": 0,
  8. "ChargeEnergy": 0,
  9. "efficiency": 0,
  10. "date_time": "2019-10-01"
  11. },
  12. {
  13. "DischargeEnergy": 0,
  14. "ChargeEnergy": 0,
  15. "efficiency": 0,
  16. "date_time": "2019-10-02"
  17. },
  18. {
  19. "DischargeEnergy": 0,
  20. "ChargeEnergy": 0,
  21. "efficiency": 0,
  22. "date_time": "2019-10-03"
  23. },
  24. {
  25. "DischargeEnergy": 0,
  26. "ChargeEnergy": 0,
  27. "efficiency": 0,
  28. "date_time": "2019-10-04"
  29. },
  30. {
  31. "DischargeEnergy": 0,
  32. "ChargeEnergy": 0,
  33. "efficiency": 0,
  34. "date_time": "2019-10-05"
  35. },
  36. {
  37. "DischargeEnergy": 0,
  38. "ChargeEnergy": 0,
  39. "efficiency": 0,
  40. "date_time": "2019-10-06"
  41. },
  42. {
  43. "DischargeEnergy": 0,
  44. "ChargeEnergy": 0,
  45. "efficiency": 0,
  46. "date_time": "2019-10-07"
  47. },
  48. {
  49. "DischargeEnergy": 0,
  50. "ChargeEnergy": 0,
  51. "efficiency": 0,
  52. "date_time": "2019-10-08"
  53. },
  54. {
  55. "DischargeEnergy": 0,
  56. "ChargeEnergy": 0,
  57. "efficiency": 0,
  58. "date_time": "2019-10-09"
  59. }
  60. ]
  61. }
  62. }

电站效率/充放电量统计(自定义时间的数据)

GET /admin/statistics/efficiency_by_time_line/

参数 类型 必填 说明
start_time int 开始时间戳(单位:秒)
end_time int 结束时间戳()
device_key string 电站标识
参数 类型 必有 说明
DischargeEnergy int 累计放电量
ChargeEnergy int 累计充电量
efficiency float 电站效率
date_time string 日期
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "statistics": [
  6. {
  7. "DischargeEnergy": 0,
  8. "ChargeEnergy": 0,
  9. "efficiency": 0,
  10. "date_time": "2019-10-01"
  11. },
  12. {
  13. "DischargeEnergy": 0,
  14. "ChargeEnergy": 0,
  15. "efficiency": 0,
  16. "date_time": "2019-10-02"
  17. },
  18. {
  19. "DischargeEnergy": 0,
  20. "ChargeEnergy": 0,
  21. "efficiency": 0,
  22. "date_time": "2019-10-03"
  23. },
  24. {
  25. "DischargeEnergy": 0,
  26. "ChargeEnergy": 0,
  27. "efficiency": 0,
  28. "date_time": "2019-10-04"
  29. },
  30. {
  31. "DischargeEnergy": 0,
  32. "ChargeEnergy": 0,
  33. "efficiency": 0,
  34. "date_time": "2019-10-05"
  35. },
  36. {
  37. "DischargeEnergy": 0,
  38. "ChargeEnergy": 0,
  39. "efficiency": 0,
  40. "date_time": "2019-10-06"
  41. },
  42. {
  43. "DischargeEnergy": 0,
  44. "ChargeEnergy": 0,
  45. "efficiency": 0,
  46. "date_time": "2019-10-07"
  47. },
  48. {
  49. "DischargeEnergy": 0,
  50. "ChargeEnergy": 0,
  51. "efficiency": 0,
  52. "date_time": "2019-10-08"
  53. },
  54. {
  55. "DischargeEnergy": 0,
  56. "ChargeEnergy": 0,
  57. "efficiency": 0,
  58. "date_time": "2019-10-09"
  59. }
  60. ]
  61. }
  62. }

收益统计(最近N日/月的数据)

GET /admin/statistics/income/

参数 类型 必填 说明
category int 类型:日(day)月(month)
size int 获取的数据的数量
device_key string 电站标识
参数 类型 必有 说明
income float 收益(单位:元)
date_time string 日期
JPIncome float 尖收益(单位:元)
FPIncome float 峰收益(单位:元)
PPIncome float 平收益(单位:元)
GPIncome float 谷收益(单位:元)
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "statistics": [
  6. {
  7. "income": 0,
  8. 'JPIncome': 0,
  9. 'FPIncome': 0,
  10. 'PPIncome': 0,
  11. 'GPIncome': 0,
  12. "date_time": "2019-10-01"
  13. },
  14. {
  15. "income": 0,
  16. 'JPIncome': 0,
  17. 'FPIncome': 0,
  18. 'PPIncome': 0,
  19. 'GPIncome': 0,
  20. "date_time": "2019-10-02"
  21. },
  22. {
  23. "income": 0,
  24. 'JPIncome': 0,
  25. 'FPIncome': 0,
  26. 'PPIncome': 0,
  27. 'GPIncome': 0,
  28. "date_time": "2019-10-03"
  29. },
  30. {
  31. "income": 0,
  32. "date_time": "2019-10-04"
  33. },
  34. {
  35. "income": 0,
  36. "date_time": "2019-10-05"
  37. },
  38. {
  39. "income": 0,
  40. 'JPIncome': 0,
  41. 'FPIncome': 0,
  42. 'PPIncome': 0,
  43. 'GPIncome': 0,
  44. "date_time": "2019-10-06"
  45. },
  46. {
  47. "income": 0,
  48. "date_time": "2019-10-07"
  49. },
  50. {
  51. "income": 0,
  52. 'JPIncome': 0,
  53. 'FPIncome': 0,
  54. 'PPIncome': 0,
  55. 'GPIncome': 0,
  56. "date_time": "2019-10-08"
  57. },
  58. {
  59. "income": 0,
  60. 'JPIncome': 0,
  61. 'FPIncome': 0,
  62. 'PPIncome': 0,
  63. 'GPIncome': 0,
  64. "date_time": "2019-10-09"
  65. },
  66. {
  67. "income": 0,
  68. 'JPIncome': 0,
  69. 'FPIncome': 0,
  70. 'PPIncome': 0,
  71. 'GPIncome': 0,
  72. "date_time": "2019-10-10"
  73. }
  74. ]
  75. }
  76. }

收益统计(自定义时间的数据)

GET /admin/statistics/income_by_time_line/

参数 类型 必填 说明
start_time int 开始时间戳(单位:秒)
end_time int 结束时间戳()
device_key string 电站标识
参数 类型 必有 说明
income float 收益(单位:元)
date_time string 日期
JPIncome float 尖收益(单位:元)
FPIncome float 峰收益(单位:元)
PPIncome float 平收益(单位:元)
GPIncome float 谷收益(单位:元)
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "statistics": [
  6. {
  7. "income": 0,
  8. 'JPIncome': 0,
  9. 'FPIncome': 0,
  10. 'PPIncome': 0,
  11. 'GPIncome': 0,
  12. "date_time": "2019-10-01"
  13. },
  14. {
  15. "income": 0,
  16. 'JPIncome': 0,
  17. 'FPIncome': 0,
  18. 'PPIncome': 0,
  19. 'GPIncome': 0,
  20. "date_time": "2019-10-02"
  21. },
  22. {
  23. "income": 0,
  24. "date_time": "2019-10-03"
  25. },
  26. {
  27. "income": 0,
  28. 'JPIncome': 0,
  29. 'FPIncome': 0,
  30. 'PPIncome': 0,
  31. 'GPIncome': 0,
  32. "date_time": "2019-10-04"
  33. },
  34. {
  35. "income": 0,
  36. 'JPIncome': 0,
  37. 'FPIncome': 0,
  38. 'PPIncome': 0,
  39. 'GPIncome': 0,
  40. "date_time": "2019-10-05"
  41. },
  42. {
  43. "income": 0,
  44. 'JPIncome': 0,
  45. 'FPIncome': 0,
  46. 'PPIncome': 0,
  47. 'GPIncome': 0,
  48. "date_time": "2019-10-06"
  49. },
  50. {
  51. "income": 0,
  52. 'JPIncome': 0,
  53. 'FPIncome': 0,
  54. 'PPIncome': 0,
  55. 'GPIncome': 0,
  56. "date_time": "2019-10-07"
  57. },
  58. {
  59. "income": 0,
  60. 'JPIncome': 0,
  61. 'FPIncome': 0,
  62. 'PPIncome': 0,
  63. 'GPIncome': 0,
  64. "date_time": "2019-10-08"
  65. },
  66. {
  67. "income": 0,
  68. 'JPIncome': 0,
  69. 'FPIncome': 0,
  70. 'PPIncome': 0,
  71. 'GPIncome': 0,
  72. "date_time": "2019-10-09"
  73. },
  74. {
  75. "income": 0,
  76. 'JPIncome': 0,
  77. 'FPIncome': 0,
  78. 'PPIncome': 0,
  79. 'GPIncome': 0,
  80. "date_time": "2019-10-10"
  81. }
  82. ]
  83. }
  84. }

电网/负荷/充放电功率曲线图(最近N日/月的数据)

GET /admin/statistics/power/chart/

参数 类型 必填 说明
category int 类型:日(day)月(month)
size int 获取的数据的数量
device_key string 电站标识
参数 类型 必有 说明
Pgrid float 电网功率
Pload float 负荷功率
Pdc float 充放电功率
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "statistics": [
  6. {
  7. "date_time": "2019-11-01",
  8. "Pgrid": 60900,
  9. "Pload": 29877,
  10. "Pdc": 2862078
  11. },
  12. {
  13. "date_time": "2019-11-02",
  14. "Pgrid": 40500,
  15. "Pload": 40500,
  16. "Pdc": 28155
  17. },
  18. {
  19. "Pgrid": 0,
  20. "Pload": 0,
  21. "Pdc": 0,
  22. "date_time": "2019-11-03"
  23. },
  24. {
  25. "Pgrid": 0,
  26. "Pload": 0,
  27. "Pdc": 0,
  28. "date_time": "2019-11-04"
  29. },
  30. {
  31. "Pgrid": 0,
  32. "Pload": 0,
  33. "Pdc": 0,
  34. "date_time": "2019-11-05"
  35. },
  36. {
  37. "date_time": "2019-11-06",
  38. "Pgrid": 0,
  39. "Pload": 0,
  40. "Pdc": 0
  41. },
  42. {
  43. "date_time": "2019-11-07",
  44. "Pgrid": 42450,
  45. "Pload": 7823,
  46. "Pdc": 32663
  47. },
  48. {
  49. "date_time": "2019-11-08",
  50. "Pgrid": 94950,
  51. "Pload": 62121,
  52. "Pdc": 32478
  53. },
  54. {
  55. "date_time": "2019-11-09",
  56. "Pgrid": 53550,
  57. "Pload": 19342,
  58. "Pdc": 32594
  59. },
  60. {
  61. "date_time": "2019-11-10",
  62. "Pgrid": 160500,
  63. "Pload": 160500,
  64. "Pdc": 232
  65. }
  66. ]
  67. }
  68. }

电网/负荷/充放电功率曲线图(自定义时间的数据)

GET /admin/statistics/power/chart_by_time_line/

参数 类型 必填 说明
start_time int 开始时间戳(单位:秒)
end_time int 结束时间戳()
device_key string 电站标识
参数 类型 必有 说明
Pgrid float 电网功率
Pload float 负荷功率
Pdc float 充放电功率
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "statistics": [
  6. {
  7. "date_time": "2019-11-01",
  8. "Pgrid": 60900,
  9. "Pload": 29877,
  10. "Pdc": 2862078
  11. },
  12. {
  13. "date_time": "2019-11-02",
  14. "Pgrid": 40500,
  15. "Pload": 40500,
  16. "Pdc": 28155
  17. },
  18. {
  19. "Pgrid": 0,
  20. "Pload": 0,
  21. "Pdc": 0,
  22. "date_time": "2019-11-03"
  23. },
  24. {
  25. "Pgrid": 0,
  26. "Pload": 0,
  27. "Pdc": 0,
  28. "date_time": "2019-11-04"
  29. },
  30. {
  31. "Pgrid": 0,
  32. "Pload": 0,
  33. "Pdc": 0,
  34. "date_time": "2019-11-05"
  35. },
  36. {
  37. "date_time": "2019-11-06",
  38. "Pgrid": 0,
  39. "Pload": 0,
  40. "Pdc": 0
  41. },
  42. {
  43. "date_time": "2019-11-07",
  44. "Pgrid": 42450,
  45. "Pload": 7823,
  46. "Pdc": 32663
  47. },
  48. {
  49. "date_time": "2019-11-08",
  50. "Pgrid": 94950,
  51. "Pload": 62121,
  52. "Pdc": 32478
  53. },
  54. {
  55. "date_time": "2019-11-09",
  56. "Pgrid": 53550,
  57. "Pload": 19342,
  58. "Pdc": 32594
  59. },
  60. {
  61. "date_time": "2019-11-10",
  62. "Pgrid": 160500,
  63. "Pload": 160500,
  64. "Pdc": 232
  65. }
  66. ]
  67. }
  68. }

获取实时功率

GET /admin/statistics/power/

  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "power": 0
  6. }
  7. }

获取收益电站排名

GET /admin/statistics/income_ranking/

  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "statistics": [
  6. {
  7. "income": 0,
  8. "device_key": "5d9c34b897427bd1333638cc",
  9. "device_name": "何勤"
  10. },
  11. {
  12. "income": 0,
  13. "device_key": "5da01b82891de0440d6c1e37",
  14. "device_name": "测试电站3"
  15. }
  16. ]
  17. }
  18. }

推送配置

获取推送配置

GET /admin/push/config/[app_id]/

参数 类型 必有 说明
app_id string 公司唯一标识
name string 姓名
phone list 手机号
E01 string 故障码
des list 英文描述和中文描述
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "sms": [
  6. {
  7. "name": "jerry",
  8. "phone": "18888888888"
  9. }
  10. ],
  11. "warning_codes": {
  12. "E01": {
  13. "desc": [
  14. "DciOutRangeWarning",
  15. "DCI超出范围告警"
  16. ],
  17. "switch": true
  18. },
  19. "E02": {
  20. "desc": [
  21. "ConsistentWarning",
  22. "一致告警"
  23. ],
  24. "switch": false
  25. },
  26. "E03": {
  27. "desc": [
  28. "ConsistentGfciWarning",
  29. "GFCI永久性故障"
  30. ],
  31. "switch": false
  32. },
  33. "E04": {
  34. "desc": [
  35. "CurrSensorDeviceWarning",
  36. "电流传感器装置告警"
  37. ],
  38. "switch": false
  39. },
  40. "E05": {
  41. "desc": [
  42. "InvOverCurrWarning",
  43. "逆变过流告警"
  44. ],
  45. "switch": false
  46. },
  47. "E06": {
  48. "desc": [
  49. "GfciCurrWarning",
  50. "GFCI电流告警"
  51. ],
  52. "switch": false
  53. },
  54. "E07": {
  55. "desc": [
  56. "GfciDeviceWarning",
  57. "GFCI装置告警"
  58. ],
  59. "switch": false
  60. },
  61. "E08": {
  62. "desc": [
  63. "IsolationWarning",
  64. "绝缘告警"
  65. ],
  66. "switch": false
  67. },
  68. "E09": {
  69. "desc": [
  70. "RelayWarning",
  71. "继电器告警"
  72. ],
  73. "switch": false
  74. },
  75. "E10": {
  76. "desc": [
  77. "GridVoltWarning",
  78. "市电电压告警"
  79. ],
  80. "switch": false
  81. },
  82. "E11": {
  83. "desc": [
  84. "GridFreqWarning",
  85. "市电频率告警"
  86. ],
  87. "switch": false
  88. },
  89. "E12": {
  90. "desc": [
  91. "MeterAbnormalWarning",
  92. "电表异常告警"
  93. ],
  94. "switch": false
  95. },
  96. "E13": {
  97. "desc": [
  98. "NoUtilityWarning",
  99. "市电异常告警"
  100. ],
  101. "switch": false
  102. },
  103. "E14": {
  104. "desc": [
  105. "PvOverVoltWarning",
  106. "PV过压告警"
  107. ],
  108. "switch": false
  109. },
  110. "E15": {
  111. "desc": [
  112. "InternalComWarning",
  113. "内部通讯告警"
  114. ],
  115. "switch": false
  116. },
  117. "E16": {
  118. "desc": [
  119. "PvOverTempWarning",
  120. "PV过温告警"
  121. ],
  122. "switch": false
  123. },
  124. "E17": {
  125. "desc": [
  126. "ConsistentVoltWarning",
  127. "电压永久性故障"
  128. ],
  129. "switch": false
  130. },
  131. "E18": {
  132. "desc": [
  133. "ConsistentDciWarning",
  134. "DCI永久性故障"
  135. ],
  136. "switch": false
  137. },
  138. "E20": {
  139. "desc": [
  140. "BusSoftTimeoutWarning",
  141. "母线软启超时"
  142. ],
  143. "switch": false
  144. },
  145. "E21": {
  146. "desc": [
  147. "InvSoftTimeoutWarning",
  148. "逆变软启超时"
  149. ],
  150. "switch": false
  151. },
  152. "E22": {
  153. "desc": [
  154. "BusLowWarning",
  155. "母线电压过低告警"
  156. ],
  157. "switch": false
  158. },
  159. "E23": {
  160. "desc": [
  161. "BusHighWarning",
  162. "母线电压过高告警"
  163. ],
  164. "switch": false
  165. },
  166. "E24": {
  167. "desc": [
  168. "ConsistentFreqWarning",
  169. "频率永久性故障"
  170. ],
  171. "switch": false
  172. },
  173. "E25": {
  174. "desc": [
  175. "PvBoostOverCurrWarning",
  176. "PV侧升压过流告警"
  177. ],
  178. "switch": false
  179. },
  180. "E26": {
  181. "desc": [
  182. "BatOverVoltWarning",
  183. "电池过压告警"
  184. ],
  185. "switch": false
  186. },
  187. "E28": {
  188. "desc": [
  189. "BatBoostOverCurrWarning",
  190. "电池侧升压过流告警"
  191. ],
  192. "switch": false
  193. },
  194. "E29": {
  195. "desc": [
  196. "PvFanLockWarning",
  197. "PV风扇锁告警"
  198. ],
  199. "switch": false
  200. },
  201. "E30": {
  202. "desc": [
  203. "BatFanLockWarning",
  204. "电池风扇锁告警"
  205. ],
  206. "switch": false
  207. },
  208. "E31": {
  209. "desc": [
  210. "Reserved",
  211. "预留"
  212. ],
  213. "switch": false
  214. },
  215. "E32": {
  216. "desc": [
  217. "Reserved",
  218. "预留"
  219. ],
  220. "switch": false
  221. },
  222. "E33": {
  223. "desc": [
  224. "Reserved",
  225. "预留"
  226. ],
  227. "switch": false
  228. },
  229. "E34": {
  230. "desc": [
  231. "Reserved",
  232. "预留"
  233. ],
  234. "switch": false
  235. },
  236. "E35": {
  237. "desc": [
  238. "Reserved",
  239. "预留"
  240. ],
  241. "switch": false
  242. },
  243. "E36": {
  244. "desc": [
  245. "Reserved",
  246. "预留"
  247. ],
  248. "switch": false
  249. },
  250. "E37": {
  251. "desc": [
  252. "Reserved",
  253. "预留"
  254. ],
  255. "switch": false
  256. },
  257. "E38": {
  258. "desc": [
  259. "Reserved",
  260. "预留"
  261. ],
  262. "switch": false
  263. },
  264. "E39": {
  265. "desc": [
  266. "Reserved",
  267. "预留"
  268. ],
  269. "switch": false
  270. },
  271. "E40": {
  272. "desc": [
  273. "Reserved",
  274. "预留"
  275. ],
  276. "switch": false
  277. },
  278. "E41": {
  279. "desc": [
  280. "BatcommunicationFailure",
  281. "电池侧通讯故障"
  282. ],
  283. "switch": false
  284. },
  285. "E42": {
  286. "desc": [
  287. "MetercommunicationFailure",
  288. "电表通讯故障"
  289. ],
  290. "switch": false
  291. },
  292. "E43": {
  293. "desc": [
  294. "BMScommunication failure",
  295. "电池bms通讯故障"
  296. ],
  297. "switch": false
  298. },
  299. "E44": {
  300. "desc": [
  301. "Reserved",
  302. "预留"
  303. ],
  304. "switch": false
  305. },
  306. "E45": {
  307. "desc": [
  308. "TotalOverVolFirstFault",
  309. "总压过压一级故障"
  310. ],
  311. "switch": false
  312. },
  313. "E46": {
  314. "desc": [
  315. "TotalOverVolSecondFault",
  316. "总压过压二级故障"
  317. ],
  318. "switch": false
  319. },
  320. "E47": {
  321. "desc": [
  322. "TotalOverVolThirdFault",
  323. "总压过压三级故障"
  324. ],
  325. "switch": false
  326. },
  327. "E48": {
  328. "desc": [
  329. "TotalUnderVolFirstFault",
  330. "总压欠压一级故障"
  331. ],
  332. "switch": false
  333. },
  334. "E49": {
  335. "desc": [
  336. "TotalUnderVolSecondFault",
  337. "总压欠压二级故障"
  338. ],
  339. "switch": false
  340. },
  341. "E50": {
  342. "desc": [
  343. "TotalUnderVolThirdFault",
  344. "总压欠压三级故障"
  345. ],
  346. "switch": false
  347. },
  348. "E51": {
  349. "desc": [
  350. "DischargeOverCurFirstFault",
  351. "放电过流一级故障"
  352. ],
  353. "switch": false
  354. },
  355. "E52": {
  356. "desc": [
  357. "DischargeOverCurSecondFault",
  358. "放电过流二级故障"
  359. ],
  360. "switch": false
  361. },
  362. "E53": {
  363. "desc": [
  364. "DischargeOverCurThirdFault",
  365. "放电过流三级故障"
  366. ],
  367. "switch": false
  368. },
  369. "E54": {
  370. "desc": [
  371. "ChargeOverCurFirstFault",
  372. "充电过流一级故障"
  373. ],
  374. "switch": false
  375. },
  376. "E55": {
  377. "desc": [
  378. "ChargeOverCurSecondFault",
  379. "充电过流二级故障"
  380. ],
  381. "switch": false
  382. },
  383. "E56": {
  384. "desc": [
  385. "ChargeOverCurThirdFault",
  386. "充电过流三级故障"
  387. ],
  388. "switch": false
  389. },
  390. "E57": {
  391. "desc": [
  392. "CellOverVolFirstFault",
  393. "单体过压一级故障"
  394. ],
  395. "switch": false
  396. },
  397. "E58": {
  398. "desc": [
  399. "CellOverVolSecondFault",
  400. "单体过压二级故障"
  401. ],
  402. "switch": false
  403. },
  404. "E59": {
  405. "desc": [
  406. "CellOverVolThirdFault",
  407. "单体过压三级故障"
  408. ],
  409. "switch": false
  410. },
  411. "E60": {
  412. "desc": [
  413. "CellUnderVolFirstFault",
  414. "单体欠压一级故障"
  415. ],
  416. "switch": false
  417. },
  418. "E61": {
  419. "desc": [
  420. "CellUnderVolSecondFault",
  421. "单体欠压二级故障"
  422. ],
  423. "switch": false
  424. },
  425. "E62": {
  426. "desc": [
  427. "CellUnderVolThirdFault",
  428. "单体欠压三级故障"
  429. ],
  430. "switch": false
  431. },
  432. "E63": {
  433. "desc": [
  434. "CellDifferFirstFault",
  435. "压差过大一级故障"
  436. ],
  437. "switch": false
  438. },
  439. "E64": {
  440. "desc": [
  441. "CellDifferSecondFault",
  442. "压差过大二级故障"
  443. ],
  444. "switch": false
  445. },
  446. "E65": {
  447. "desc": [
  448. "CellDifferThirdFault",
  449. "压差过大三级故障"
  450. ],
  451. "switch": false
  452. },
  453. "E66": {
  454. "desc": [
  455. "TempHighFirstFault",
  456. "温度过高一级故障"
  457. ],
  458. "switch": false
  459. },
  460. "E67": {
  461. "desc": [
  462. "TempHighSecondFault",
  463. "温度过高二级故障"
  464. ],
  465. "switch": false
  466. },
  467. "E68": {
  468. "desc": [
  469. "TempHighThirdFault",
  470. "温度过高三级故障"
  471. ],
  472. "switch": false
  473. },
  474. "E69": {
  475. "desc": [
  476. "TempLowFirstFault",
  477. "温度过低一级故障"
  478. ],
  479. "switch": false
  480. },
  481. "E70": {
  482. "desc": [
  483. "TempLowSecondFault",
  484. "温度过低二级故障"
  485. ],
  486. "switch": false
  487. },
  488. "E71": {
  489. "desc": [
  490. "TempLowThirdFault",
  491. "温度过低三级故障"
  492. ],
  493. "switch": false
  494. },
  495. "E72": {
  496. "desc": [
  497. "TempDifferFirstFault",
  498. "温差过大一级故障"
  499. ],
  500. "switch": false
  501. },
  502. "E73": {
  503. "desc": [
  504. "TempDifferSecondFault",
  505. "温差过大二级故障"
  506. ],
  507. "switch": false
  508. },
  509. "E74": {
  510. "desc": [
  511. "TempDifferThirdFault",
  512. "温差过大三级故障"
  513. ],
  514. "switch": false
  515. },
  516. "E75": {
  517. "desc": [
  518. "SOCLowFirstFault",
  519. "SOC过低一级故障"
  520. ],
  521. "switch": false
  522. },
  523. "E76": {
  524. "desc": [
  525. "SOCLowSecondFault",
  526. "SOC过低二级故障"
  527. ],
  528. "switch": false
  529. },
  530. "E77": {
  531. "desc": [
  532. "SOCLowThirdFault",
  533. "SOC过低三级故障"
  534. ],
  535. "switch": false
  536. },
  537. "E78": {
  538. "desc": [
  539. "InsulationLowFirstFault",
  540. "绝缘过低一级故障"
  541. ],
  542. "switch": false
  543. },
  544. "E79": {
  545. "desc": [
  546. "InsulationLowSecondFault",
  547. "绝缘过低二级故障"
  548. ],
  549. "switch": false
  550. },
  551. "E80": {
  552. "desc": [
  553. "InsulationLowThirdFault",
  554. "绝缘过低三级故障"
  555. ],
  556. "switch": false
  557. },
  558. "E81": {
  559. "desc": [
  560. "CurCollFirstFault",
  561. "电流采集一级故障"
  562. ],
  563. "switch": false
  564. },
  565. "E82": {
  566. "desc": [
  567. "CurCollSecondFault",
  568. "电流采集二级故障"
  569. ],
  570. "switch": false
  571. },
  572. "E83": {
  573. "desc": [
  574. "CurCollThirdFault",
  575. "电流采集三级故障"
  576. ],
  577. "switch": false
  578. },
  579. "E84": {
  580. "desc": [
  581. "TotalVolCollFirstFault",
  582. "总压采集一级故障"
  583. ],
  584. "switch": false
  585. },
  586. "E85": {
  587. "desc": [
  588. "TotalVolCollSecondFault",
  589. "总压采集二级故障"
  590. ],
  591. "switch": false
  592. },
  593. "E86": {
  594. "desc": [
  595. "TotalVolCollThirdFault",
  596. "总压采集三级故障"
  597. ],
  598. "switch": false
  599. },
  600. "E87": {
  601. "desc": [
  602. "CellVolCollFirstFault",
  603. "单体电压采集一级故障"
  604. ],
  605. "switch": false
  606. },
  607. "E88": {
  608. "desc": [
  609. "CellVolCollSecondFault",
  610. "单体电压采集二级故障"
  611. ],
  612. "switch": false
  613. },
  614. "E89": {
  615. "desc": [
  616. "CellVolCollThirdFault",
  617. "单体电压采集三级故障"
  618. ],
  619. "switch": false
  620. },
  621. "E90": {
  622. "desc": [
  623. "TempCollFirstFault",
  624. "电池温度采集一级故障"
  625. ],
  626. "switch": false
  627. },
  628. "E91": {
  629. "desc": [
  630. "TempCollSecondFault",
  631. "电池温度采集二级故障"
  632. ],
  633. "switch": false
  634. },
  635. "E92": {
  636. "desc": [
  637. "TempCollThirdFault",
  638. "电池温度采集三级故障"
  639. ],
  640. "switch": false
  641. },
  642. "E93": {
  643. "desc": [
  644. "TotalPositiveRelayStuckFault",
  645. "总正继电器粘连故障"
  646. ],
  647. "switch": false
  648. },
  649. "E94": {
  650. "desc": [
  651. "TotalPositiveRelayOpenCircuitFault",
  652. "总正继电器断路故障"
  653. ],
  654. "switch": false
  655. },
  656. "E95": {
  657. "desc": [
  658. "TotalNegativeRelayStuckFault",
  659. "总负继电器粘连故障"
  660. ],
  661. "switch": false
  662. },
  663. "E96": {
  664. "desc": [
  665. "TotalNegativeRelayOpenCircuitFault",
  666. "总负继电器断路故障"
  667. ],
  668. "switch": false
  669. },
  670. "E97": {
  671. "desc": [
  672. "InternalCommunicationFault",
  673. "内部通讯故障"
  674. ],
  675. "switch": false
  676. },
  677. "E98": {
  678. "desc": [
  679. "SmokeAlarm",
  680. "烟感报警"
  681. ],
  682. "switch": false
  683. },
  684. "E99": {
  685. "desc": [
  686. "SmokeAlarmCommunicationFault",
  687. "烟感报警器通讯故障"
  688. ],
  689. "switch": false
  690. },
  691. "E100": {
  692. "desc": [
  693. "MeteringMeterCommunicationFault",
  694. "计量电表通讯故障"
  695. ],
  696. "switch": false
  697. },
  698. "E101": {
  699. "desc": [
  700. "ComDspCommunicationFault",
  701. "通讯板和逆变器通讯故障"
  702. ],
  703. "switch": false
  704. },
  705. "E102": {
  706. "desc": [
  707. "Reserved",
  708. "预留"
  709. ],
  710. "switch": false
  711. },
  712. "E103": {
  713. "desc": [
  714. "Reserved",
  715. "预留"
  716. ],
  717. "switch": false
  718. },
  719. "E104": {
  720. "desc": [
  721. "Reserved",
  722. "预留"
  723. ],
  724. "switch": false
  725. },
  726. "E105": {
  727. "desc": [
  728. "Reserved",
  729. "预留"
  730. ],
  731. "switch": false
  732. },
  733. "E106": {
  734. "desc": [
  735. "Reserved",
  736. "预留"
  737. ],
  738. "switch": false
  739. },
  740. "E107": {
  741. "desc": [
  742. "Reserved",
  743. "预留"
  744. ],
  745. "switch": false
  746. },
  747. "E108": {
  748. "desc": [
  749. "Reserved",
  750. "预留"
  751. ],
  752. "switch": false
  753. },
  754. "E109": {
  755. "desc": [
  756. "Reserved",
  757. "预留"
  758. ],
  759. "switch": false
  760. },
  761. "E110": {
  762. "desc": [
  763. "Reserved",
  764. "预留"
  765. ],
  766. "switch": false
  767. }
  768. }
  769. }
  770. }

推送配置

PUT /admin/push/config/[app_id]/

参数 类型 必有 说明
app_id string 公司唯一标识
sms list 姓名和手机号
warning_codes list 设置开启的故障码
  1. {
  2. "sms": [
  3. {"name": "jerry", "phone": "18888888888"}
  4. ],
  5. "warning_codes": ["E01", "E01"]
  6. }
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

调度管理

调度使能列表

GET /admin/dispatch/

  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

添加调度使能

POST /admin/dispatch/

参数 类型 必有 说明
device_key string 设备唯一标识
power int 功率
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

添加调度使能

PUT /admin/dispatch/[device_key]/

参数 类型 必有 说明
device_key string 设备唯一标识
power int 功率
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

删除调度使能

DELETE /admin/dispatch/[device_key]/

  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {}
  5. }

数据报表

逆变器数据列表

GET /admin/report/form/[device_key]/

参数 类型 必有 说明
device_key string 设备唯一标识
category string 类型:month , day
start_time int 开始时间戳,单位:秒
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "total": 2,
  6. "pages": 1,
  7. "current_page": 1,
  8. "page_size": 20,
  9. "data": [{
  10. "DC1Voltage": 0,
  11. "DC1Current": 0,
  12. "DC2Voltage": 0,
  13. "DC2Current": 0,
  14. "IRgrid": 0,
  15. "ISgrid": 0,
  16. "ITgrid": 0,
  17. "VRgrid": 0,
  18. "VSgrid": 0,
  19. "VTgrid": 0,
  20. "Pdc": 0,
  21. "Pgrid": 0,
  22. "TodayChargeEnergy": 3.0,
  23. "TChgEnergy": 3.0,
  24. "FedGridEnergy": 0,
  25. "SupplyGridEnergy": 0,
  26. "SOC": 0,
  27. "CellvolHighest": 0,
  28. "CellvolLowest": 0,
  29. "CelltempHighest": 0,
  30. "CelltempLowest": 0,
  31. "updated": "2019-10-27 15:03:43"
  32. }, {
  33. "DC1Voltage": 0,
  34. "DC1Current": 0,
  35. "DC2Voltage": 0,
  36. "DC2Current": 0,
  37. "IRgrid": 0,
  38. "ISgrid": 0,
  39. "ITgrid": 0,
  40. "VRgrid": 0,
  41. "VSgrid": 0,
  42. "VTgrid": 0,
  43. "Pdc": 0,
  44. "Pgrid": 0,
  45. "TodayChargeEnergy": 3.0,
  46. "TChgEnergy": 3.0,
  47. "FedGridEnergy": 0,
  48. "SupplyGridEnergy": 0,
  49. "SOC": 0,
  50. "CellvolHighest": 0,
  51. "CellvolLowest": 0,
  52. "CelltempHighest": 0,
  53. "CelltempLowest": 0,
  54. "updated": "2019-10-27 15:03:14"
  55. }]
  56. }
  57. }

逆变器数据CSV下载文件地址

GET /admin/report/form/csv/[device_key]/

参数 类型 必有 说明
device_key string 设备唯一标识
category string 类型:month , day
start_time int 开始时间戳,单位:秒
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "path": "http://47.101.71.76/public/csv/20191028120050556134.csv"
  6. }
  7. }

单体电压数据CSV下载文件地址

GET /admin/report/form/cell_vol/csv/[device_key]/

参数 类型 必有 说明
device_key string 设备唯一标识
category string 类型:month , day
start_time int 开始时间戳,单位:秒
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "path": "http://47.101.71.76/public/csv/20191028120050556134.csv"
  6. }
  7. }

单体温度数据CSV下载文件地址

GET /admin/report/form/cell_temp/csv/[device_key]/

参数 类型 必有 说明
device_key string 设备唯一标识
category string 类型:month , day
start_time int 开始时间戳,单位:秒
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "path": "http://47.101.71.76/public/csv/20191028120050556134.csv"
  6. }
  7. }

运营分析数据列表

GET /admin/report/form/operate/[device_key]/

参数 类型 必有 说明
device_key string 设备唯一标识
category string 类型:month , day
start_time int 开始时间戳,单位:秒
参数 类型 必有 说明
DischargeEnergy int 累计放电量
ChargeEnergy int 累计充电量
efficiency float 电站效率
income float 电站收益
date_time string 日期
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "total": 30,
  6. "pages": 2,
  7. "current_page": 1,
  8. "page_size": 20,
  9. "data": [
  10. {
  11. "income": 0,
  12. "date_time": "2019-10-05",
  13. "DischargeEnergy": 0,
  14. "ChargeEnergy": 0,
  15. "efficiency": 0
  16. },
  17. {
  18. "income": 0,
  19. "date_time": "2019-10-06",
  20. "DischargeEnergy": 0,
  21. "ChargeEnergy": 0,
  22. "efficiency": 0
  23. },
  24. {
  25. "income": 0,
  26. "date_time": "2019-10-07",
  27. "DischargeEnergy": 0,
  28. "ChargeEnergy": 0,
  29. "efficiency": 0
  30. },
  31. {
  32. "income": 0,
  33. "date_time": "2019-10-08",
  34. "DischargeEnergy": 0,
  35. "ChargeEnergy": 0,
  36. "efficiency": 0
  37. },
  38. {
  39. "income": 0,
  40. "date_time": "2019-10-09",
  41. "DischargeEnergy": 0,
  42. "ChargeEnergy": 0,
  43. "efficiency": 0
  44. },
  45. {
  46. "income": 0,
  47. "date_time": "2019-10-10",
  48. "DischargeEnergy": 0,
  49. "ChargeEnergy": 0,
  50. "efficiency": 0
  51. },
  52. {
  53. "income": 0,
  54. "date_time": "2019-10-11",
  55. "DischargeEnergy": 0,
  56. "ChargeEnergy": 0,
  57. "efficiency": 0
  58. },
  59. {
  60. "income": 0,
  61. "date_time": "2019-10-12",
  62. "DischargeEnergy": 0,
  63. "ChargeEnergy": 0,
  64. "efficiency": 0
  65. },
  66. {
  67. "income": 0,
  68. "date_time": "2019-10-13",
  69. "DischargeEnergy": 0,
  70. "ChargeEnergy": 0,
  71. "efficiency": 0
  72. },
  73. {
  74. "income": 0,
  75. "date_time": "2019-10-14",
  76. "DischargeEnergy": 0,
  77. "ChargeEnergy": 0,
  78. "efficiency": 0
  79. },
  80. {
  81. "income": 0,
  82. "date_time": "2019-10-15",
  83. "DischargeEnergy": 0,
  84. "ChargeEnergy": 0,
  85. "efficiency": 0
  86. },
  87. {
  88. "income": 0,
  89. "date_time": "2019-10-16",
  90. "DischargeEnergy": 0,
  91. "ChargeEnergy": 0,
  92. "efficiency": 0
  93. },
  94. {
  95. "income": 0,
  96. "date_time": "2019-10-17",
  97. "DischargeEnergy": 0,
  98. "ChargeEnergy": 0,
  99. "efficiency": 0
  100. },
  101. {
  102. "income": 0,
  103. "date_time": "2019-10-18",
  104. "DischargeEnergy": 0,
  105. "ChargeEnergy": 0,
  106. "efficiency": 0
  107. },
  108. {
  109. "income": 0,
  110. "date_time": "2019-10-19",
  111. "DischargeEnergy": 0,
  112. "ChargeEnergy": 0,
  113. "efficiency": 0
  114. },
  115. {
  116. "income": 0,
  117. "date_time": "2019-10-20",
  118. "DischargeEnergy": 0,
  119. "ChargeEnergy": 0,
  120. "efficiency": 0
  121. },
  122. {
  123. "income": 0,
  124. "date_time": "2019-10-21",
  125. "DischargeEnergy": 0,
  126. "ChargeEnergy": 0,
  127. "efficiency": 0
  128. },
  129. {
  130. "income": 0,
  131. "date_time": "2019-10-22",
  132. "DischargeEnergy": 0,
  133. "ChargeEnergy": 0,
  134. "efficiency": 0
  135. },
  136. {
  137. "income": 0,
  138. "date_time": "2019-10-23",
  139. "DischargeEnergy": 0,
  140. "ChargeEnergy": 0,
  141. "efficiency": 0
  142. },
  143. {
  144. "income": 0,
  145. "date_time": "2019-10-24",
  146. "DischargeEnergy": 0,
  147. "ChargeEnergy": 0,
  148. "efficiency": 0
  149. }
  150. ]
  151. }
  152. }

运营分析数据CSV下载文件地址

GET /admin/report/form/operate/csv/[device_key]/

参数 类型 必有 说明
device_key string 设备唯一标识
category string 类型:month , day
start_time int 开始时间戳,单位:秒
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "path": "http://47.101.71.76/public/csv/20191103094735234816.csv"
  6. }
  7. }

电池运维簇列表

GET /admin/report/form/cluster/[device_key]/

参数 类型 必有 说明
device_key string 设备唯一标识
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "cluster": [
  6. {
  7. "key": 1,
  8. "name": "第1簇"
  9. }
  10. ]
  11. }
  12. }

电池运维数据列表和图标数据

GET /admin/report/form/cell/[device_key]/

参数 类型 必有 说明
device_key string 设备唯一标识
cluster int 电池簇对应的 key
time1 int 时间点(一)
time2 int 时间点(二)
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "headers": [
  6. {
  7. "0": ""
  8. },
  9. {
  10. "1": "pack1"
  11. },
  12. {
  13. "2": "pack2"
  14. }
  15. ],
  16. "data": [
  17. [
  18. {
  19. "0": 1,
  20. "1": 0,
  21. "2": 0
  22. },
  23. {
  24. "0": 2,
  25. "1": 0,
  26. "2": 0
  27. },
  28. {
  29. "0": "max",
  30. "1": 0,
  31. "2": 0
  32. },
  33. {
  34. "0": "min",
  35. "1": 0,
  36. "2": 0
  37. },
  38. {
  39. "0": "avg",
  40. "1": 0,
  41. "2": 0
  42. }
  43. ],
  44. [
  45. {
  46. "0": 1,
  47. "1": 0,
  48. "2": 0
  49. },
  50. {
  51. "0": 2,
  52. "1": 0,
  53. "2": 0
  54. },
  55. {
  56. "0": "max",
  57. "1": 0,
  58. "2": 0
  59. },
  60. {
  61. "0": "min",
  62. "1": 0,
  63. "2": 0
  64. },
  65. {
  66. "0": "avg",
  67. "1": 0,
  68. "2": 0
  69. }
  70. ]
  71. ],
  72. "chart": [
  73. [
  74. {
  75. "pack": 1,
  76. "max": 0,
  77. "min": 0,
  78. "avg": 0
  79. },
  80. {
  81. "pack": 2,
  82. "max": 0,
  83. "min": 0,
  84. "avg": 0
  85. }
  86. ],
  87. [
  88. {
  89. "pack": 1,
  90. "max": 0,
  91. "min": 0,
  92. "avg": 0
  93. },
  94. {
  95. "pack": 2,
  96. "max": 0,
  97. "min": 0,
  98. "avg": 0
  99. }
  100. ]
  101. ]
  102. }
  103. }

电池运维数据CSV下载文件地址

GET /admin/report/form/cell/csv/[device_key]/

参数 类型 必有 说明
device_key string 设备唯一标识
cluster int 电池簇对应的 key
time1 int 时间点(一)
time2 int 时间点(二)
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "path": "http://47.101.71.76/public/csv/20191103112924299922.csv"
  6. }
  7. }

历史数据导出

GET /admin/history/attributes/export/

参数 类型 必填 说明
start_time int 开始时间戳(单位:秒)
end_time int 结束时间戳(单位:秒)
device_key string 电站标识
param_1 string 电站属性
param_2 string 电站属性
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "path": "http://47.101.71.76/public/csv/20191103112924299922.csv"
  6. }
  7. }

集装箱电站ips

GET /admin/device/ips/[device_key]/

参数 类型 必填 说明
device_key string 电站标识
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "ips": []
  6. }
  7. }

文件上传

文件上传

POST /admin/upload/

参数 类型 必填 说明
file_name 文件 文件名称
  1. {
  2. "code": 0,
  3. "message": "success",
  4. "data": {
  5. "file_path": "http://127.0.0.1/logo.png"
  6. }
  7. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注