Commit 4754c324 authored by lcn's avatar lcn

BUG修复

parent b48292d4
...@@ -44,8 +44,11 @@ async def post_list_alarm(req, body: PageRequest) -> ListAlarmResponse: ...@@ -44,8 +44,11 @@ async def post_list_alarm(req, body: PageRequest) -> ListAlarmResponse:
_range = body.filter.ranges[0] _range = body.filter.ranges[0]
_, start, end = _range.field, _range.start, _range.end _, start, end = _range.field, _range.start, _range.end
if body.filter.equals: if body.filter.equals:
_equal = body.filter.equals[0] for equal in body.filter.equals:
point_id = _equal.value if equal.field == 'cid':
cid = equal.value
elif equal.field == 'point_id':
point_id = equal.value
if body.filter.in_groups: if body.filter.in_groups:
for in_group in body.filter.in_groups: for in_group in body.filter.in_groups:
if in_group.field == 'type': if in_group.field == 'type':
......
...@@ -31,7 +31,7 @@ async def post_max_p(req, body: MaxpReq) -> MaxpResp: ...@@ -31,7 +31,7 @@ async def post_max_p(req, body: MaxpReq) -> MaxpResp:
point_id = body.point_id point_id = body.point_id
start = body.start start = body.start
end = body.end end = body.end
max_val, max_val_time = await pttl_max(cid, start, end, point_id=point_id) max_val, max_val_time = await pttl_max_new15(cid, start, end, point_id=point_id)
return MaxpResp(maxp=max_val, date_time=max_val_time) return MaxpResp(maxp=max_val, date_time=max_val_time)
......
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