Commit 7413f4dc authored by ZZH's avatar ZZH

fix homepage2023-6-14

parent 5293d287
...@@ -364,7 +364,7 @@ async def cal_power_factor(cid): ...@@ -364,7 +364,7 @@ async def cal_power_factor(cid):
electric_sql = f"SELECT pid,create_time,pttl_mean,qttl_mean FROM " \ electric_sql = f"SELECT pid,create_time,pttl_mean,qttl_mean FROM " \
f"`point_15min_electric` where create_time in " \ f"`point_15min_electric` where create_time in " \
f"('{str_dt}', '{end_dt}') and pid in %s" f"('{str_dt}', '{end_dt}') and pid in %s"
results = await conn.fetchall(electric_sql, args=(point_ids,)) results = await conn.fetchall(electric_sql, args=(tuple(point_ids),))
point_map = {} point_map = {}
for res in results: for res in results:
point_map.setdefault(res["pid"], []).append( point_map.setdefault(res["pid"], []).append(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment