Commit 43ef9b36 authored by lcn's avatar lcn

bug修复

parent af2f7607
......@@ -9,7 +9,8 @@ from unify_api.modules.zhiwei_u.components.scope_operations_cps import \
@dataclass
class ScopeRecordReq(Model):
cid: int = Int("工厂id").eg(132)
point_id: list = List("监测点id 0表示全部").eg([1019, 1021, 1023, 1025, 1026, 1027, 1020])
point_id: list = List("监测点id 0表示全部").eg(
[1019, 1021, 1023, 1025, 1026, 1027, 1020])
start: str = Opt(Str("开始时间").eg("2021-07-01 00:00:00"))
end: str = Opt(Str("结束时间").eg("2021-07-01 23:59:59"))
page_size: int = Int("每页记录数").eg(20)
......@@ -45,7 +46,7 @@ class ScopeAnalyseResp(Model):
point_id: int = Int("监测点id").eg("12")
point_name: str = Str("监测点 ").eg("1#变压器")
trigger_time: str = Str("触发时间").eg("2021-07-01 23:59:59")
trigger_params: str = Str("触发参数").eg("2021-07-01 23:59:59")
trigger_params: list = List("触发参数").eg([""])
trigger_point: str = Str("触发点").eg("240")
reason: list = List("识别原因和建议")
contents: ScopeContent = ScopeContent
......@@ -63,6 +64,6 @@ class LeakageCurrentResp(Model):
point_name: str = Str("监测点 ").eg("1#变压器")
trigger_time: str = Str("触发时间").eg("2021-07-01 23:59:59")
trigger_point: str = Str("触发点").eg("240")
trigger_params: str = Str("触发参数").eg("2021-07-01 23:59:59")
trigger_params: list = List("触发参数").eg([])
reason: list = List("识别原因和建议")
contents: LeakageCurrent = LeakageCurrent
......@@ -121,7 +121,7 @@ async def scope_analyse_service(pid, create_time):
point_name=point_name["name"],
trigger_time=check_dt,
trigger_point=trigger_point,
trigger_params="-".join(trigger_params),
trigger_params=trigger_params,
reason=reason,
contents=context)
else:
......@@ -156,7 +156,7 @@ async def scope_analyse_service(pid, create_time):
return ScopeAnalyseResp(point_id=pid,
point_name=point_name["name"],
trigger_time=check_dt,
trigger_params="-".join(trigger_params),
trigger_params=trigger_params,
trigger_point=trigger_point,
reason=fina_reason,
contents=context)
......
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