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

参数:

参数名 必选 类型 说明
token string token
device_list string 查询的设备列表,多个设备以,分隔
year int 年 默认为当年
month int 月 默认为当月
day int 日 默认为获取当月每一天

注:如要获取指定日的能耗数据,year month day都要指定

返回示例

{
  "error_code": 0,
  "error_msg": "获取数据成功",
  "data": [
    {
      "report_date": "2025-05-01",
      "machine_sn": "83780755002201",
      "machine_name": "主电源总进线开关",
      "ec_count": "11038.30",
      "ec_amount": "8830.63",
      "project_id": "7",
      "room_id": "13"
    },
    {
      "report_date": "2025-05-02",
      "machine_sn": "83780755002201",
      "machine_name": "主电源总进线开关",
      "ec_count": "9917.39",
      "ec_amount": "7933.90",
      "project_id": "7",
      "room_id": "13"
    },
    ...省略
    {
      "report_date": "2025-05-31",
      "machine_sn": "83780755002201",
      "machine_name": "主电源总进线开关",
      "ec_count": "8811.89",
      "ec_amount": "7049.55",
      "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