Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
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
耿迪迪
gassafety
Commits
9191f390
Commit
9191f390
authored
Aug 09, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报警记录 gengdidi
parent
f6bb8fc8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
TDeviceAlarmController.java
...web/controller/dataMonitoring/TDeviceAlarmController.java
+18
-0
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/dataMonitoring/TDeviceAlarmController.java
View file @
9191f390
...
...
@@ -2,7 +2,10 @@ package com.zehong.web.controller.dataMonitoring;
import
java.util.List
;
import
com.zehong.common.core.domain.entity.SysDictData
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.vo.DeviceAlarmVo
;
import
com.zehong.system.service.ISysDictTypeService
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -35,6 +38,9 @@ public class TDeviceAlarmController extends BaseController
@Autowired
private
ITDeviceAlarmService
tDeviceAlarmService
;
@Autowired
private
ISysDictTypeService
iSysDictTypeService
;
/**
* 查询报警信息列表
*/
...
...
@@ -46,6 +52,18 @@ public class TDeviceAlarmController extends BaseController
List
<
DeviceAlarmVo
>
list
=
null
;
try
{
list
=
tDeviceAlarmService
.
selectTDeviceAlarmList
(
tDeviceAlarm
);
List
<
SysDictData
>
sysDictDataList
=
iSysDictTypeService
.
selectDictDataByType
(
"t_alarm_type"
);
for
(
DeviceAlarmVo
deviceAlarmVo
:
list
){
for
(
SysDictData
sysDictData
:
sysDictDataList
){
if
(
StringUtils
.
isNotEmpty
(
deviceAlarmVo
.
getAlarmType
())){
if
(
deviceAlarmVo
.
getAlarmType
().
equals
(
sysDictData
.
getDictValue
())){
deviceAlarmVo
.
setAlarmType
(
sysDictData
.
getDictLabel
());
}
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
Exception
(
"查询报警信息列表出错"
);
...
...
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