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
b26c194c
Commit
b26c194c
authored
Apr 17, 2023
by
wang.wenrong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wwr' into 'develop'
fix_tsp See merge request
!24
parents
ae1fa328
d59ec61e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
4 deletions
+33
-4
tsp.py
unify_api/modules/tsp_water/views/tsp.py
+33
-4
No files found.
unify_api/modules/tsp_water/views/tsp.py
View file @
b26c194c
...
@@ -13,7 +13,7 @@ from unify_api.modules.tsp_water.service.tsp_service import \
...
@@ -13,7 +13,7 @@ from unify_api.modules.tsp_water.service.tsp_service import \
async
def
post_real_time
(
req
,
body
:
DtReq
)
->
DtResp
:
async
def
post_real_time
(
req
,
body
:
DtReq
)
->
DtResp
:
tsp_id
=
body
.
tsp_id
tsp_id
=
body
.
tsp_id
# return await real_time_service(tsp_id)
# return await real_time_service(tsp_id)
return
DtResp
(
pm2_5
=
0
,
pm10
=
0
,
tsp
=
0
)
return
DtResp
(
pm2_5
=
None
,
pm10
=
None
,
tsp
=
None
)
@
summary
(
"TSP信息-历史曲线"
)
@
summary
(
"TSP信息-历史曲线"
)
...
@@ -22,9 +22,38 @@ async def post_tsp_history(req, body: ThReq) -> ThResp:
...
@@ -22,9 +22,38 @@ async def post_tsp_history(req, body: ThReq) -> ThResp:
start
=
body
.
start
start
=
body
.
start
end
=
body
.
end
end
=
body
.
end
# return await tsp_history_service(tsp_id, start, end)
# return await tsp_history_service(tsp_id, start, end)
return
ThResp
(
pm2_5
=
{},
pm10
=
{},
tsp
=
{},
time_slots
=
[],
pm2_5_predict
=
{},
return
ThResp
(
pm10_contrast
=
{},
tsp_predict
=
{},
pm2_5_contrast
=
{},
pm2_5
=
{
pm10_predict
=
{})
"threshold"
:
75
,
"value_slots"
:
[]
},
pm10
=
{
"threshold"
:
150
,
"value_slots"
:
[]
},
tsp
=
{
"threshold"
:
300
,
"value_slots"
:
[]
},
time_slots
=
[
"string"
],
pm2_5_predict
=
{
"value_slots"
:
[]
},
pm10_predict
=
{
"value_slots"
:
[]
},
tsp_predict
=
{
"value_slots"
:
[]
},
pm2_5_contrast
=
{
"value_slots"
:
[]
},
pm10_contrast
=
{
"value_slots"
:
[]
}
)
@
summary
(
"TSP信息-指标统计"
)
@
summary
(
"TSP信息-指标统计"
)
...
...
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