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
1675c09d
Commit
1675c09d
authored
Nov 15, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备状态字段处理
parent
f988dae3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
TDetectorInfoController.java
...hong/web/controller/detector/TDetectorInfoController.java
+8
-0
TDetectorInfoServiceImpl.java
.../zehong/system/service/impl/TDetectorInfoServiceImpl.java
+10
-1
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/detector/TDetectorInfoController.java
View file @
1675c09d
...
@@ -397,6 +397,7 @@ public class TDetectorInfoController extends BaseController
...
@@ -397,6 +397,7 @@ public class TDetectorInfoController extends BaseController
for
(
TDetectorInfoDTO
dto
:
tDetectorInfoDTOList
){
for
(
TDetectorInfoDTO
dto
:
tDetectorInfoDTOList
){
TDetectorInfo
tDetectorInfo
=
new
TDetectorInfo
();
TDetectorInfo
tDetectorInfo
=
new
TDetectorInfo
();
// 家用报警器
if
(!
StringUtils
.
isEmpty
(
dto
.
getDetectorType
())
&&
dto
.
getDetectorType
().
equals
(
"1"
)){
if
(!
StringUtils
.
isEmpty
(
dto
.
getDetectorType
())
&&
dto
.
getDetectorType
().
equals
(
"1"
)){
if
(!
StringUtils
.
isEmpty
(
dto
.
getDetectorStatus
())
&&
dto
.
getDetectorStatus
().
equals
(
"1"
)){
if
(!
StringUtils
.
isEmpty
(
dto
.
getDetectorStatus
())
&&
dto
.
getDetectorStatus
().
equals
(
"1"
)){
tDetectorInfo
.
setDetectorStatus
(
"0"
);
tDetectorInfo
.
setDetectorStatus
(
"0"
);
...
@@ -564,6 +565,13 @@ public class TDetectorInfoController extends BaseController
...
@@ -564,6 +565,13 @@ public class TDetectorInfoController extends BaseController
}
}
List
<
TDetectorReportData
>
alarmVO
=
tDetectorReportDataService
.
selectRealtimeDataList
();
List
<
TDetectorReportData
>
alarmVO
=
tDetectorReportDataService
.
selectRealtimeDataList
();
for
(
TDetectorReportData
data
:
alarmVO
){
if
(
"0"
.
equals
(
data
.
getDetectorStatus
())){
data
.
setDetectorStatus
(
"正常"
);
}
else
{
data
.
setDetectorStatus
(
"报警"
);
}
}
map
.
put
(
"totalNum"
,
totalNum
);
map
.
put
(
"totalNum"
,
totalNum
);
map
.
put
(
"handledNum"
,
handledNum
);
map
.
put
(
"handledNum"
,
handledNum
);
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TDetectorInfoServiceImpl.java
View file @
1675c09d
...
@@ -41,7 +41,16 @@ public class TDetectorInfoServiceImpl implements ITDetectorInfoService
...
@@ -41,7 +41,16 @@ public class TDetectorInfoServiceImpl implements ITDetectorInfoService
@Override
@Override
public
List
<
TDetectorInfo
>
selectTDetectorInfoList
(
TDetectorInfo
tDetectorInfo
)
public
List
<
TDetectorInfo
>
selectTDetectorInfoList
(
TDetectorInfo
tDetectorInfo
)
{
{
return
tDetectorInfoMapper
.
selectTDetectorInfoList
(
tDetectorInfo
);
List
<
TDetectorInfo
>
list
=
tDetectorInfoMapper
.
selectTDetectorInfoList
(
tDetectorInfo
);
for
(
TDetectorInfo
detector
:
list
){
if
(
"0"
.
equals
(
detector
.
getDetectorStatus
())){
detector
.
setDetectorStatus
(
"正常"
);
}
else
if
(
"1"
.
equals
(
detector
.
getDetectorStatus
())){
detector
.
setDetectorStatus
(
"离线"
);
}
}
return
list
;
}
}
/**
/**
...
...
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