Commit e0e81eef authored by lcn's avatar lcn

测试一下

parent 95ca2f1d
......@@ -773,10 +773,7 @@ async def elec_index_service_new15(cid, point_id, start, end):
"freq_dev_mean", "freq_dev_min", "freq_dev_max"]
datas = await get_electric_datas_dao(table_name, point_id, start, end)
if not datas:
return ElecIndexResponse(
ctnum=ctnum, common_indexes=[],
elec_qual_indexes=[]
)
return ctnum, [], []
df = pd.DataFrame(list(datas))
# 常规参数统计
common_indexes = []
......@@ -865,10 +862,7 @@ async def elec_index_service_new15(cid, point_id, start, end):
avg=value.get("mean_value") or '',
)
)
return ElecIndexResponse(
ctnum=ctnum, common_indexes=common_indexes,
elec_qual_indexes=elec_qual_indexes
)
return ctnum, common_indexes, elec_qual_indexes
async def elec_current_service_new15(point_id):
# 获取mtid
......
......@@ -475,11 +475,12 @@ async def post_elec_index(req, body: PageRequest) -> ElecIndexResponse:
log.error("param error, ranges is NULL")
raise ParamException(message="param error, ranges is NULL")
# return await elec_index_service(cid, point_id, date_start, date_end)
ctnum, common_indexes, elec_qual_indexes = \
await elec_index_service_new15(cid, point_id, date_start, date_end)
return ElecIndexResponse(
ctnum=3, common_indexes=[],
elec_qual_indexes=[]
ctnum=ctnum, common_indexes=common_indexes,
elec_qual_indexes=elec_qual_indexes
)
# return await elec_index_service_new15(cid, point_id, date_start, date_end)
@summary("电能质量-历史曲线")
......
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