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
7ef9a0de
You need to sign in or sign up before continuing.
Commit
7ef9a0de
authored
Apr 24, 2023
by
wang.wenrong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wwr' into 'develop'
search-scope See merge request
!29
parents
17197bca
9f80a08f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
data_es_dao.py
unify_api/modules/zhiwei_u/dao/data_es_dao.py
+6
-6
equipment_operations_pds.py
...i/modules/zhiwei_u/procedures/equipment_operations_pds.py
+1
-1
No files found.
unify_api/modules/zhiwei_u/dao/data_es_dao.py
View file @
7ef9a0de
...
...
@@ -75,17 +75,17 @@ async def get_search_scope(cid, pid, start, end):
where_list
=
[
f
"pid = {pid}"
]
if
cid
:
where_list
.
append
(
f
"cid in
{cid}
"
)
where_list
.
append
(
f
"cid in
%
s
"
)
if
start
and
end
:
where_list
.
append
(
f
"event_datetime
>={start} and event_datetime<={end}
"
)
where_str
=
"
and
"
.
join
(
where_list
)
where_list
.
append
(
f
"event_datetime
>= '{start}' and event_datetime <='{end}'
"
)
where_str
=
"
and
"
.
join
(
where_list
)
sql
=
f
"select * from point_1min_event where {where_str} "
\
f
"ORDER BY event_datetime desc limit 5000"
async
with
MysqlUtil
()
as
conn
:
data
=
await
conn
.
fetchall
(
sql
)
data
=
await
conn
.
fetchall
(
sql
,
args
=
(
cid
,)
)
return
data
################
async
def
query_search_scope
(
cid
,
pid
,
page_num
,
page_size
,
start
,
end
):
query_body
=
{
...
...
@@ -156,7 +156,7 @@ async def get_scope_pids(pids, start, end):
data
=
await
conn
.
fetchall
(
sql
)
return
data
################################
async
def
query_search_scope_pids
(
pids
,
page_num
,
page_size
,
start
,
end
):
query_body
=
{
"from"
:
(
page_num
-
1
)
*
page_size
,
...
...
unify_api/modules/zhiwei_u/procedures/equipment_operations_pds.py
View file @
7ef9a0de
...
...
@@ -10,7 +10,7 @@ from unify_api.constants import EVENT_TYPE_UNIT_MAP
async
def
alarm_setting_pds
(
pid
,
locations
):
"""获取报警设置"""
sql_point
=
f
"""
sql_point
=
"""
SELECT
sd.id,
sd.etype,
...
...
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