🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC=2] ## 获取所有电费电价 >[danger] 注意 > 筛选类型只能有三个选项 day 天 month 月 year 年 > 筛选类型选择之后对应的时间字符串格式也要对应 > day --- 2019-11-12 > month ---- 2019-11 > year ---- 2019 ~~~[api] get:/device_statistics/electricity_bill *string:filter_type=day#筛选类型 *string:filter_date=2019-12-12#时间格式字符串,默认昨天 int:device_type=0#设备类型,不按类型区分可以不填 int:group_id=-1#分组序号,不按照分组筛选可以不填 <<< day { "code": 0, "data": { "list": [ { "peak_E": 0, "valley_E": 0, "flat_E": 0, "fees": 0, "time": 0, "P": 0, "E": 0, "detail_time": "2019-11-14 00:00:00", "label": "00" }, *** { "peak_E": 0, "valley_E": 0, "flat_E": 0, "fees": 0, "time": 23, "P": 0, "E": 0, "detail_time": "2019-11-14 23:00:00", "label": "23" } ] } } <<< month { "code": 0, "data": { "list": [ { "peak_E": 0, "valley_E": 0, "flat_E": 0, "fees": 0, "time": 1, "P": 0, "E": 0, "detail_time": "2019-11-01", "label": "11-01" }, *** { "peak_E": 0, "valley_E": 0, "flat_E": 0, "fees": 0, "time": 30, "P": 0, "E": 0, "detail_time": "2019-11-30", "label": "11-30" } ] } } <<< year { "code": 0, "data": { "list": [ { "peak_E": 0, "valley_E": 0, "flat_E": 0, "fees": 0, "time": 1, "P": 0, "E": 0, "detail_time": "2019-01", "label": "19-01" }, *** { "peak_E": 0, "valley_E": 0, "flat_E": 0, "fees": 0, "time": 12, "P": 0, "E": 0, "detail_time": "2019-12", "label": "19-12" } ] } } <<< error ~~~ ## 所有设备电价导出 ~~~[api] get:/device_statistics/all_battery_export *string:filter_type=day#筛选类型 *string:filter_date=2019-12-12#时间格式字符串,默认昨天 int:device_type=0#设备类型,不按类型区分可以不填 int:group_id=-1#分组序号,不按照分组筛选可以不填 <<< success <<< error ~~~ ## 单个设备电价 ~~~[api] get:/device_statistics/single_battery *string:filter_type=day#筛选类型 *string:filter_date=2019-12-12#时间格式字符串,默认昨天 *string:sn=1111111111#设备序列号 <<< day { "code": 0, "data": { "list": [ { "peak_E": 0, "valley_E": 0, "flat_E": 0, "fees": 0, "time": 0, "P": 0, "E": 0, "detail_time": "2019-11-14 00:00:00", "label": "00" }, *** { "peak_E": 0, "valley_E": 0, "flat_E": 0, "fees": 0, "time": 23, "P": 0, "E": 0, "detail_time": "2019-11-14 23:00:00", "label": "23" } ] } } <<< month { "code": 0, "data": { "list": [ { "peak_E": 0, "valley_E": 0, "flat_E": 0, "fees": 0, "time": 1, "P": 0, "E": 0, "detail_time": "2019-11-01", "label": "11-01" }, *** { "peak_E": 0, "valley_E": 0, "flat_E": 0, "fees": 0, "time": 30, "P": 0, "E": 0, "detail_time": "2019-11-30", "label": "11-30" } ] } } <<< year { "code": 0, "data": { "list": [ { "peak_E": 0, "valley_E": 0, "flat_E": 0, "fees": 0, "time": 1, "P": 0, "E": 0, "detail_time": "2019-01", "label": "19-01" }, *** { "peak_E": 0, "valley_E": 0, "flat_E": 0, "fees": 0, "time": 12, "P": 0, "E": 0, "detail_time": "2019-12", "label": "19-12" } ] } } <<< error ~~~ ## 单个设备电价导出 >[info] export_type 可选值 | 可选值 | 说明 | | --- | --- | | battery | 电量(默认) | | fees | 电费 | ~~~[api] get:/device_statistics/single_battery_export *string:filter_type=day#筛选类型 *string:filter_date=2019-12-12#时间格式字符串,默认昨天 *string:sn=1111111111#设备序列号 string:export_type=battery#导出数据类型 <<< success <<< error ~~~ ## 单个设备详细数据 ~~~[api] get:/device_statistics/single_detail_data *string:filter_date=2019-11-12#默认昨天 *String:sn=1111111#设备序号 <<< day { "code": 0, "data": { "list": [ { "P": 0, "E": 0, "V": 0, "T_RUN": 0, "T_min": 0, "T_agv": 0, "hum_open": null, "temp_status": 0, "T_max": 0, "time": 0, "fees": 0, "detail_time": "2019-11-16 00:00:00", "label": "00" }, *** { "P": 0, "E": 0, "V": 0, "T_RUN": 0, "T_min": 0, "T_agv": 0, "hum_open": null, "temp_status": 0, "T_max": 0, "time": 23, "fees": 0, "detail_time": "2019-11-16 23:00:00", "label": "23" } ] } } <<< error ~~~ ## 详细数据导出 >[info] 暂时只导出温度数据 ~~~[api] get:/device_statistics/detail_export *string:filter_date=2019-11-12#默认昨天 *String:sn=1111111#设备序号 <<< success <<< error ~~~ ## 加热设备排行 ~~~[api] get:/device_statistics/heating_rank *string:filter_type=day#筛选类型 *string:filter_date=2019-12-21#筛选时间 *int:device_type=0#设备类型 *int:group_id=-1#设备分组 id <<< success { "code": 0, "data": { "list": [ { "sn": "746814001072", "num": 0 }, *** { "sn": "748000000460", "num": 0 } ] } } <<< error ~~~ ## 累计在线排行 ~~~[api] get:/device_statistics/online_rank *string:filter_type=day#筛选类型 *string:filter_date=2019-12-21#筛选时间 *int:device_type=0#设备类型 *int:group_id=-1#设备分组 id <<< success { "code": 0, "data": { "list": [ { "sn": "746814001072", "num": 0 }, *** { "sn": "748000000460", "num": 0 } ] } } <<< error ~~~ ## 耗电量排行 ~~~[api] get:/device_statistics/battery_rank *string:filter_type=day#筛选类型 *string:filter_date=2019-12-21#筛选时间 *int:device_type=0#设备类型 *int:group_id=-1#设备分组 id <<< success { "code": 0, "data": { "list": [ { "sn": "746814001072", "num": 0 }, *** { "sn": "748000000460", "num": 0 } ] } } <<< error ~~~ ## 排行数据导出 >[info] export_type 可选值 | 可选值 | 说明 | | --- | --- | | battery | 电量 | | heat | 加热排行 | | online | 在线排行 | ~~~[api] get:/device_statistics/rank_export *string:filter_type=day#筛选类型 *string:filter_date=2019-12-21#筛选时间 *int:device_type=0#设备类型 *int:group_id=-1#设备分组 id string:export_type=battery#导出数据类型 <<< success <<< error ~~~ ## 单个设备计算和数据 ~~~[api] get:/device_statistics/all_detail *string:filter_type=day#筛选类型 *string:filter_date=2019-11-12#默认昨天 *String:sn=1111111#设备序号 <<< success { "code": 0, "data": { "list": [ { "P": 0, "E": 0, "V": 0, "T_RUN": 0, "T_min": 0, "T_agv": 0, "hum_open": -1, "temp_status": 0, "T_max": 0, "time": 0, "detail_time": "2019-11-16 00:00:00", "label": "00" }, *** { "P": 0, "E": 0, "V": 0, "T_RUN": 0, "T_min": 0, "T_agv": 0, "hum_open": -1, "temp_status": 0, "T_max": 0, "time": 23, "detail_time": "2019-11-16 23:00:00", "label": "23" } ] } } <<< error ~~~