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