| 接口用途 | 获取设备月能耗统计 |
|---|---|
| 请求URL | /tytapi/get_consumption_monthly_data |
| 请求方式 | POST |
参数:
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| token | 是 | string | token |
| device_list | 是 | string | 查询的设备列表,多个设备以,分隔 |
| year | 否 | int | 年 默认为当年 |
| month | 否 | int | 月 默认为当月 |
返回示例
{
"error_code": 0,
"error_msg": "获取数据成功",
"data": [
{
"report_date": "2024-10",
"machine_sn": "83780755002201",
"machine_name": "主电源总进线开关",
"ec_count": "50086.05",
"ec_amount": "40068.96",
"project_id": "7",
"room_id": "13"
},
{
"report_date": "2024-10",
"machine_sn": "83780755002202",
"machine_name": "备电源总进线开关",
"ec_count": "50027.62",
"ec_amount": "40022.05",
"project_id": "7",
"room_id": "13"
}
]
}返回参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| error_code | int | 错误代码 |
| error_msg | string | 信息 |
| data | json | 返回数据 |
data数据结构
| 参数名 | 类型 | 说明 |
|---|---|---|
| report_date | string | 日期 年-月 |
| machine_sn | string | 设备编号 |
| machine_name | string | 设备名称 |
| ec_count | string | 月能耗 kWh |
| ec_amount | string | 月电费 元 需要配置尖峰平谷电价 |
| project_id | string | 项目地编号 |
| room_id | string | 配电室编号 |
作者:vita 创建时间:2025-10-20 10:02
最后编辑:vita 更新时间:2025-10-20 10:02
最后编辑:vita 更新时间:2025-10-20 10:02