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
91a67783
Commit
91a67783
authored
May 15, 2023
by
ZZH
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix shidianu ele behavior curve 2023-5-15
parent
6412c059
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
output_result.py
unify_api/modules/shidianu/procedures/output_result.py
+3
-1
No files found.
unify_api/modules/shidianu/procedures/output_result.py
View file @
91a67783
...
@@ -33,6 +33,7 @@ from unify_api.modules.shidianu.service.open_data_service import get_token
...
@@ -33,6 +33,7 @@ from unify_api.modules.shidianu.service.open_data_service import get_token
from
unify_api.modules.shidianu.service.paramAnaly
import
paramAnalysis
,
params_mining
from
unify_api.modules.shidianu.service.paramAnaly
import
paramAnalysis
,
params_mining
from
unify_api.modules.users.procedures.user_product_auth
import
get_product_auth
from
unify_api.modules.users.procedures.user_product_auth
import
get_product_auth
from
unify_api.utils.time_format
import
last_n_day
,
srv_time
from
unify_api.utils.time_format
import
last_n_day
,
srv_time
from
unify_api.utils.taos_new
import
parse_td_columns
async
def
output_result
(
sid
,
meter_sn
,
date_time
):
async
def
output_result
(
sid
,
meter_sn
,
date_time
):
...
@@ -210,8 +211,9 @@ async def get_curve_p(mtid, meter_sn, start, end, time_slots):
...
@@ -210,8 +211,9 @@ async def get_curve_p(mtid, meter_sn, start, end, time_slots):
if
not
status
:
if
not
status
:
return
[]
return
[]
datas
=
{}
datas
=
{}
head
=
parse_td_columns
(
results
)
for
one
in
results
.
get
(
'data'
):
for
one
in
results
.
get
(
'data'
):
data
=
dict
(
zip
(
results
.
get
(
'head'
),
one
))
data
=
dict
(
zip
(
head
,
one
))
slot
=
str
(
data
[
'ts'
])[
11
:
16
]
slot
=
str
(
data
[
'ts'
])[
11
:
16
]
datas
[
slot
]
=
data
[
p_field
]
datas
[
slot
]
=
data
[
p_field
]
p_list
=
[]
p_list
=
[]
...
...
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