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
57912fea
Commit
57912fea
authored
Nov 25, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
探测器报警时间处理
parent
bfcb8b20
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
TDetectorReportController.java
...ng/web/controller/detector/TDetectorReportController.java
+3
-0
TDetectorInfoMapper.xml
.../src/main/resources/mapper/system/TDetectorInfoMapper.xml
+2
-4
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/detector/TDetectorReportController.java
View file @
57912fea
...
...
@@ -327,6 +327,7 @@ public class TDetectorReportController extends BaseController
tDetectorInfo
.
setDetectorStatus
(
"2"
);
tDetectorInfo
.
setAlarmTime
(
dto
.
getAlarmTime
());
}
tDetectorInfo
.
setUpdateTime
(
new
Date
());
}
// else{
// if(!StringUtils.isEmpty(dto.getDetectorStatus()) && dto.getDetectorStatus().equals("0")){
...
...
@@ -447,6 +448,7 @@ public class TDetectorReportController extends BaseController
if
(!
StringUtils
.
isEmpty
(
tDetectorReportDataForm
.
getDeviceStatusId
())
&&
"1"
.
equals
((
tDetectorReportDataForm
.
getDeviceStatusId
()))){
detectorInfo
.
setDetectorStatus
(
"0"
);
// 设备表状态 0正常,1故障(掉线)
detectorInfo
.
setAlarmTime
(
null
);
detectorInfo
.
setUpdateTime
(
new
Date
());
}
else
{
if
(!
StringUtils
.
isEmpty
(
tDetectorReportDataForm
.
getDeviceType
())
&&
tDetectorReportDataForm
.
getDeviceType
().
equals
(
"1"
)){
if
(!
StringUtils
.
isEmpty
(
tDetectorReportDataForm
.
getDeviceStatusId
())
&&
new
ArrayList
<
String
>(
Arrays
.
asList
(
"7"
,
"9"
)).
contains
((
tDetectorReportDataForm
.
getDeviceStatusId
()))){
...
...
@@ -459,6 +461,7 @@ public class TDetectorReportController extends BaseController
// detectorInfo.setDetectorStatus("2");
// }
detectorInfo
.
setAlarmTime
(
tDetectorReportDataForm
.
getCreateTime
());
detectorInfo
.
setUpdateTime
(
new
Date
());
}
tDetectorInfoService
.
updateTDetectorInfo
(
detectorInfo
);
...
...
gassafety-system/src/main/resources/mapper/system/TDetectorInfoMapper.xml
View file @
57912fea
...
...
@@ -212,9 +212,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim
prefix=
"alarm_time=case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
>
<if
test=
"item.alarmTime != null"
>
when detector_code=#{item.detectorCode} then #{item.alarmTime}
</if>
</foreach>
</trim>
</trim>
...
...
@@ -239,7 +237,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"linkman != null"
>
linkman = #{linkman},
</if>
<if
test=
"phone != null"
>
phone = #{phone},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"alarmTime != null"
>
alarm_time = #{alarmTime},
</if>
alarm_time = #{alarmTime},
<if
test=
"detectorStatus != null"
>
detector_status = #{detectorStatus},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks},
</if>
...
...
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