ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC=2] ## 分组分类环图数据 ~~~[api] get:/device_statistics_v3/get_ring_data *string:filter_type=type#筛选数据类型 <<< success 参数和三个设备参数解析一致 分组 多了一个 group_id // 分组 id 类型 多了一个 type // 设备类型 <<< group { "code": 0, "data": { "list": [ { "peak_E": 42.1, "peak_fee": 36.38, "valley_E": 20.44, "valley_fee": 3.4, "flat_E": 363.79, "flat_fee": 93.48, "E_fee": 133.26, "E": 426.33, "group_id": 6, "name": "办公室" }, ] } } <<< type { "code": 0, "data": { "list": [ { "peak_E": 42.09, "peak_fee": 36.37, "valley_E": 20.44, "valley_fee": 3.4, "flat_E": 363.72, "flat_fee": 93.47, "E_fee": 133.24, "E": 426.25, "type": 6, "name": "智能开关" }, ] } } <<< error ~~~ ## 所有设备电量电费 ~~~[api] get:/device_statistics_v3/all_electricity_charge *string:filter_type=day#筛选类型 *string:filter_date=2019-02-02#筛选时间 <<< success 数据结构和单个设备一致 <<< error ~~~ ## 设备类型电量、电费 ~~~[api] get:/device_statistics_v3/type_electricity_charge *int:type=0#设备类型 0 为全部设备类型 *string:filter_type=day#筛选类型 *string:filter_date=2019-02-02#筛选时间 <<< success 数据结构和单个设备一致 <<< error ~~~ ## 分组设备电量、电费 ~~~[api] get:/device_statistics_v3/group_electricity_charge *string:filter_type=day#筛选类型 *string:filter_date=2019-02-02#筛选时间 <<< success 数据结构和单个设备一致 <<< error ~~~ 和单个设备一样返回数据只是没有电价 ## 单个设备电量、电费 | 参数 | 可选值 | | --- | --- | | filter_type | <p>day 天</p><p>month 月</p><p>year 年</p><p>years 年份</p> | ~~~[api] get:/device_statistics_v3/single_electricity_charge *string:sn=850300000531#设备序列号 *string:filter_type=day#筛选类型 *string:filter_date=2020-04-04#默认昨天 <<< success day 返回 00 ~ 23 点的数据 month 返回对应月份的数据 1 ~ 31 号 year 返回 1 ~ 12 月的数据 years 返回已上报的数据的年份数据 返回字段说明 peak_fee // 峰段电费(元) peak_E // 峰段电量(kW·h) valley_fee // 谷段电费(元) valley_E // 谷段电量(kW·h) flat_fee // 平段电费(元) flat_E // 平段电量(kW·h) unit_price // 电费单价(元) E_fee // 累计电费(元) E // 累计电量(kW·h) time // 时间 天是时刻 月是每天 年是每月 年份是每年 detail_time // 详细的时间 label // 时间简写 <<< day { "code": 0, "data": { "list": [ { "peak_fee": 0, "peak_E": 0, "valley_fee": 0, "valley_E": 0, "flat_fee": 0, "flat_E": 0, "unit_price": 1, "E_fee": 0, "E": 0, "time": 0, "detail_time": "2019-11-26 00:00:00", "label": "00" }, { "peak_fee": 0, "peak_E": 0, "valley_fee": 0, "valley_E": 0, "flat_fee": 0, "flat_E": 0, "unit_price": 1, "E_fee": 0, "E": 0, "time": 23, "detail_time": "2019-11-26 23:00:00", "label": "23" } ] } } <<< month { "code": 0, "data": { "list": [ { "peak_fee": 0, "peak_E": 0, "valley_fee": 0, "valley_E": 0, "flat_fee": 0, "flat_E": 0, "unit_price": 0, "E_fee": 0, "E": 0, "time": 1, "detail_time": "2019-11-01", "label": "11-01" }, { "peak_fee": 0, "peak_E": 0, "valley_fee": 0.01, "valley_E": 0.07, "flat_fee": 0, "flat_E": 0, "unit_price": 0, "E_fee": 0.01, "E": 0.07, "time": 29, "detail_time": "2019-11-29", "label": "11-29" } ] } } <<< year { "code": 0, "data": { "list": [ { "peak_fee": 0, "peak_E": 0, "valley_fee": 0, "valley_E": 0, "flat_fee": 0, "flat_E": 0, "unit_price": 0, "E_fee": 0, "E": 0, "time": 1, "detail_time": "2019-01", "label": "19-01" }, { "peak_fee": 0.01, "peak_E": 0.01, "valley_fee": 0.08, "valley_E": 0.53, "flat_fee": 0.06, "flat_E": 0.2, "unit_price": 0, "E_fee": 0.15, "E": 0.74, "time": 12, "detail_time": "2019-12", "label": "19-12" } ] } } <<< years { "code": 0, "data": { "list": [ { "peak_fee": 0.01, "peak_E": 0.01, "valley_fee": 0.14, "valley_E": 0.9, "flat_fee": 0.09, "flat_E": 0.35, "unit_price": 0, "E_fee": 0.24, "E": 1.26, "time": "2019", "detail_time": "2019", "label": "2019" }, { "peak_fee": 0, "peak_E": 0, "valley_fee": 0.19, "valley_E": 1.16, "flat_fee": 0.22, "flat_E": 0.68, "unit_price": 0, "E_fee": 0.41, "E": 1.84, "time": "2020", "detail_time": "2020", "label": "2020" } ] } } <<< error { "code": -1, "msg": "筛选类型不能为空" } ~~~