接口用途 获取设备年能耗统计
请求URL /tytapi/get_consumption_yearly_data
请求方式 POST

参数:

参数名 必选 类型 说明
token string token
device_list string 查询的设备列表,多个设备以,分隔
year int 年 默认为当年

返回示例

{
  "error_code": 0,
  "error_msg": "获取数据成功",
  "data": [
    {
      "report_date": "2025",
      "machine_sn": "83780755002201",
      "machine_name": "主电源总进线开关",
      "ec_count": "1281255.06",
      "ec_amount": "1025004.14",
      "project_id": "7",
      "room_id": "13"
    },
    {
      "report_date": "2025",
      "machine_sn": "83780755002202",
      "machine_name": "备电源总进线开关",
      "ec_count": "146011.76",
      "ec_amount": "116809.29",
      "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:03