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
f0e2e4e5
Commit
f0e2e4e5
authored
Apr 17, 2023
by
wang.wenrong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tsp_index
parent
e2a22fde
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
tsp_dao.py
unify_api/modules/tsp_water/dao/tsp_dao.py
+2
-1
tsp_service.py
unify_api/modules/tsp_water/service/tsp_service.py
+3
-3
tsp.py
unify_api/modules/tsp_water/views/tsp.py
+1
-1
No files found.
unify_api/modules/tsp_water/dao/tsp_dao.py
View file @
f0e2e4e5
...
...
@@ -12,7 +12,8 @@ TSP_15MIN = "poweriot_tsp_15min"
async
def
meterdata_tsp_current
(
tsp_id
):
"""根据tsp_id获取redis实时数据"""
res
=
await
RedisUtils
()
.
hget
(
TSP_CURRENT
,
tsp_id
)
return
json
.
loads
(
res
)
res
=
json
.
loads
(
res
)
if
res
else
{}
return
res
async
def
tsp_histogram_tsp_id
(
date_start
,
date_end
,
tsp_id
,
interval
):
...
...
unify_api/modules/tsp_water/service/tsp_service.py
View file @
f0e2e4e5
...
...
@@ -39,9 +39,9 @@ async def real_time_service(tsp_id):
tsp_ts
=
tsp_dic
[
"timestamp"
]
if
now_ts
-
tsp_ts
>
constants
.
REAL_EXP_TIME
:
return
DtResp
()
pm2_5
=
tsp_dic
.
get
(
"pm25"
)
pm10
=
tsp_dic
.
get
(
"pm10"
)
tsp
=
tsp_dic
.
get
(
"tsp"
)
pm2_5
=
tsp_dic
.
get
(
"pm25"
,
""
)
pm10
=
tsp_dic
.
get
(
"pm10"
,
""
)
tsp
=
tsp_dic
.
get
(
"tsp"
,
""
)
return
DtResp
(
pm2_5
=
pm2_5
,
pm10
=
pm10
,
tsp
=
tsp
)
...
...
unify_api/modules/tsp_water/views/tsp.py
View file @
f0e2e4e5
...
...
@@ -69,7 +69,7 @@ async def post_tsp_contrast_deviation(req, body: TisReq) -> TcdResp:
start
=
body
.
start
end
=
body
.
end
# return await tsp_contrast_deviation_service(tsp_id, start, end)
return
TcdResp
()
return
TcdResp
(
pm2_5
=
{},
pm10
=
{}
)
@
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