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
e0e81eef
Commit
e0e81eef
authored
Aug 22, 2022
by
lcn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试一下
parent
95ca2f1d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
electric_service.py
unify_api/modules/electric/service/electric_service.py
+2
-8
electric.py
unify_api/modules/electric/views/electric.py
+4
-3
No files found.
unify_api/modules/electric/service/electric_service.py
View file @
e0e81eef
...
...
@@ -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
...
...
unify_api/modules/electric/views/electric.py
View file @
e0e81eef
...
...
@@ -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
(
"电能质量-历史曲线"
)
...
...
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