Commit 91a67783 authored by ZZH's avatar ZZH

fix shidianu ele behavior curve 2023-5-15

parent 6412c059
......@@ -33,6 +33,7 @@ from unify_api.modules.shidianu.service.open_data_service import get_token
from unify_api.modules.shidianu.service.paramAnaly import paramAnalysis, params_mining
from unify_api.modules.users.procedures.user_product_auth import get_product_auth
from unify_api.utils.time_format import last_n_day, srv_time
from unify_api.utils.taos_new import parse_td_columns
async def output_result(sid, meter_sn, date_time):
......@@ -210,8 +211,9 @@ async def get_curve_p(mtid, meter_sn, start, end, time_slots):
if not status:
return []
datas = {}
head = parse_td_columns(results)
for one in results.get('data'):
data = dict(zip(results.get('head'),one))
data = dict(zip(head, one))
slot = str(data['ts'])[11:16]
datas[slot] = data[p_field]
p_list = []
......
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