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
2bb7528c
Commit
2bb7528c
authored
Jul 31, 2023
by
ZZH
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new_list_alarm_service add mtid 2023-7-31
parent
5a55d17c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
list_alarm_service.py
...y_api/modules/alarm_manager/service/list_alarm_service.py
+3
-2
No files found.
unify_api/modules/alarm_manager/service/list_alarm_service.py
View file @
2bb7528c
...
...
@@ -43,6 +43,7 @@ async def new_list_alarm_service(cid, storeys, offset, page_size, start, end,
# 3.增加sid返回字段, sdu龙岗客户需求
monitor_point_list
=
await
monitor_point_join_points
(
points
)
point_sid_map
=
{
i
[
"pid"
]:
i
[
"sid"
]
for
i
in
monitor_point_list
}
point_mtid_map
=
{
i
[
"pid"
]:
i
[
"mtid"
]
for
i
in
monitor_point_list
}
rows
=
[]
for
res
in
results
:
es_id
=
res
.
get
(
"id"
)
...
...
@@ -50,7 +51,6 @@ async def new_list_alarm_service(cid, storeys, offset, page_size, start, end,
mode
=
res
.
get
(
"event_mode"
)
type_str
=
constants
.
SDU_EVENT_TYPE_MAP
.
get
(
type
,
type
)
point_id
=
res
.
get
(
"pid"
)
sid
=
point_sid_map
.
get
(
point_id
)
location_id
=
res
.
get
(
"lid"
)
date_time
=
res
.
get
(
"event_datetime"
)
dt
=
time_format
.
convert_to_dt
(
date_time
)
...
...
@@ -85,7 +85,8 @@ async def new_list_alarm_service(cid, storeys, offset, page_size, start, end,
storey_name
=
storey_name
,
room_name
=
room_name
,
storey_room_name
=
storey_name
+
room_name
,
sid
=
sid
sid
=
point_sid_map
.
get
(
point_id
),
mtid
=
point_mtid_map
.
get
(
point_id
)
)
rows
.
append
(
alarm
)
return
ListAlarmResponse
(
total
=
total
,
rows
=
rows
,
point_ids
=
point_ids
)
...
...
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