Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
U
unify_api2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chaonan
unify_api2
Commits
43ef9b36
Commit
43ef9b36
authored
Jul 03, 2023
by
lcn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
af2f7607
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
scope_analyse_cps.py
...api/modules/scope_analyse/components/scope_analyse_cps.py
+5
-4
scope_analyse_service.py
...pi/modules/scope_analyse/service/scope_analyse_service.py
+2
-2
No files found.
unify_api/modules/scope_analyse/components/scope_analyse_cps.py
View file @
43ef9b36
...
@@ -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
)
...
@@ -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
unify_api/modules/scope_analyse/service/scope_analyse_service.py
View file @
43ef9b36
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment