企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[TOC=2] ## 电量电费功率计算 | 字段 | 可选值 | | --- | --- | | group_id | -1 不筛选 <br/> 0 默认分组 | | filter_date | day 天<br/> sevenDays 当前时间加前六天数据 <br/> week 周一到周日数据<br/>month 月 <br/> year 年 <br/> years 年份 | >[info] 周数据从周一到周日,当前时间是周一的话,仅仅返回周一一条数据 ~~~[api] get:/device_statistics/all_battery int:device_type=0#设备类型 int:group_id=-1#分组 id 可选值见表格 string:filter_type=day#筛选类型 可选值见表格 string:filter_date=""#时间格式字符串,默认昨天 <<< success day { "code": 0, "data": { "list": [ { "peak_E": 0, // 峰段电量 "valley_E": 0, // 谷段电量 "flat_E": 0, // 平段电量 "fees": 0, // 累加电费 "time": 0, // 对应时刻 0 =》 00:00 "P": 0, // 总功率 "E": 0, // 总电量 "detail_time": "2020-03-29 00:00:00", // 详细数据时间 "label": "00" // 用于图表显示 }, { "peak_E": 0, "valley_E": 0, "flat_E": 0, "fees": 0, "time": 23, "P": 0, "E": 0, "detail_time": "2020-03-29 23:00:00", "label": "23" } ], "total_e": 0, // 总电量 "total_fees": 0 // 总电费 } } <<< success sevenDays { "code": 0, "data": { "list": [ { "peak_E": 2.11, "valley_E": 0, "flat_E": 0, "fees": 4.22, "time": "2020-03-23", "P": 8057, "E": 2.11, "detail_time": "2020-03-23", "label": "03-23" }, { "peak_E": 0, "valley_E": 0, "flat_E": 0, "fees": 0, "time": "2020-03-29", "P": 0, "E": 0, "detail_time": "2020-03-29", "label": "03-29" } ], "total_e": 32.32, "total_fees": 64.64 } } <<< success week { "code": 0, "data": { "list": [ { "peak_E": 0, "valley_E": 0, "flat_E": 0, "fees": 0, "time": "2020-03-30", "P": 0, "E": 0, "detail_time": "2020-03-30", "label": "03-30" } ], "total_e": 0, "total_fees": 0 } } <<< success month { "code": 0, "data": { "list": [ { "peak_E": 1.16, "valley_E": 0, "flat_E": 0, "fees": 2.32, "time": 1, "P": 2551, "E": 1.16, "detail_time": "2020-03-01", "label": "03-01" }, { "peak_E": 0, "valley_E": 0, "flat_E": 0, "fees": 0, "time": 30, "P": 0, "E": 0, "detail_time": "2020-03-30", "label": "03-30" } ], "total_e": 87.6, "total_fees": 175.2 } } <<< success year { "code": 0, "data": { "list": [ { "peak_E": 204.7, "valley_E": 0, "flat_E": 0, "fees": 409.4, "time": 1, "P": 711665, "E": 204.7, "detail_time": "2020-01", "label": "20-01" }, { "peak_E": 87.6, "valley_E": 0, "flat_E": 0, "fees": 175.2, "time": 3, "P": 295112, "E": 87.6, "detail_time": "2020-03", "label": "20-03" } ], "total_e": 292.3, "total_fees": 584.6 } } <<< success years { "code": 0, "data": { "list": [ { "peak_E": 637.79, "valley_E": 0, "flat_E": 0, "fees": 1275.58, "time": "2020", "P": 2224382, "E": 637.79, "detail_time": "2020", "label": "2020" } ], "total_e": 637.79, "total_fees": 1275.58 } } <<< error { "code": -1, "msg": "参数错误" } ~~~ >[info] 数据显示内容上面只返回开始 ~ 结束 > 天返回 00:00 ~ 23:00 > 近七天 当前时间往前加六天数据 > 周 周一到周日,当前之后的数据暂时不返回 > 月 1 ~ 31 号的数据 > 年 1 ~ 12 月的数据 > 年份 所有数据按年分组数据