Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pingshan-ranqi
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
yaqizhang
pingshan-ranqi
Commits
92ed692f
Commit
92ed692f
authored
Nov 17, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
右上角报警器数量统计修改
parent
22747988
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
17 deletions
+12
-17
TDetectorInfoController.java
...hong/web/controller/detector/TDetectorInfoController.java
+12
-17
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/detector/TDetectorInfoController.java
View file @
92ed692f
...
...
@@ -144,22 +144,17 @@ public class TDetectorInfoController extends BaseController
try
{
TDetectorInfo
detector
=
new
TDetectorInfo
();
detector
.
setIsDel
(
"0"
);
List
<
TDetectorInfo
>
tDetectorInfoList
=
tDetectorInfoService
.
selectTDetectorInfoList
(
detector
);
detector
.
setDetectorStatus
(
"0"
);
List
<
TDetectorInfo
>
onlineList
=
tDetectorInfoService
.
selectTDetectorInfoList
(
detector
);
int
onlineNum
=
onlineList
.
size
();
List
<
String
>
strList
=
new
ArrayList
<>();
for
(
TDetectorInfo
info
:
tDetectorInfoList
){
strList
.
add
(
info
.
getDetectorCode
());
}
List
<
TDetectorReportData
>
dataList
=
tDetectorReportDataService
.
countDetector
(
strList
);
int
totalNum
=
dataList
.
size
();
detector
.
setDetectorStatus
(
"1"
);
List
<
TDetectorInfo
>
offlineList
=
tDetectorInfoService
.
selectTDetectorInfoList
(
detector
);
int
offlineNum
=
offlineList
.
size
();
int
handledNum
=
0
;
for
(
TDetectorReportData
data
:
dataList
){
if
(!
StringUtils
.
isEmpty
(
data
.
getIsCancelAlarm
())
&&
!
data
.
getIsCancelAlarm
().
equals
(
"0"
)){
++
handledNum
;
}
}
detector
.
setDetectorStatus
(
"2"
);
List
<
TDetectorInfo
>
alarmList
=
tDetectorInfoService
.
selectTDetectorInfoList
(
detector
);
int
alarmNum
=
alarmList
.
size
();
List
<
TDetectorAlarmInfoVO
>
alarmVO
=
tDetectorReportDataService
.
selectTDetectorAlarm
();
for
(
TDetectorAlarmInfoVO
alarm
:
alarmVO
){
...
...
@@ -170,9 +165,9 @@ public class TDetectorInfoController extends BaseController
}
}
map
.
put
(
"
totalNum"
,
total
Num
);
map
.
put
(
"
handledNum"
,
handled
Num
);
map
.
put
(
"
noHandeldNum"
,
totalNum
-
handled
Num
);
map
.
put
(
"
alarmNum"
,
alarm
Num
);
map
.
put
(
"
onlineNum"
,
online
Num
);
map
.
put
(
"
offlineNum"
,
offline
Num
);
map
.
put
(
"pageData"
,
alarmVO
);
}
catch
(
Exception
ie
){
...
...
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