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
d7c554ef
Commit
d7c554ef
authored
Nov 15, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
探测器报警时间类型修改
parent
579f8849
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
TDetectorReportController.java
...ng/web/controller/detector/TDetectorReportController.java
+3
-0
TDetectorInfo.java
...src/main/java/com/zehong/system/domain/TDetectorInfo.java
+3
-3
TDetectorReportDataForm.java
...om/zehong/system/domain/form/TDetectorReportDataForm.java
+1
-1
TDetectorInfoMapper.xml
.../src/main/resources/mapper/system/TDetectorInfoMapper.xml
+1
-4
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/detector/TDetectorReportController.java
View file @
d7c554ef
...
...
@@ -308,6 +308,7 @@ public class TDetectorReportController extends BaseController
try
{
for
(
TDetectorInfoDTO
dto
:
tDetectorInfoDTOList
){
TDetectorInfo
tDetectorInfo
=
new
TDetectorInfo
();
tDetectorInfo
.
setDetectorCode
(
dto
.
getDeviceCode
());
// 1探测器
if
(!
StringUtils
.
isEmpty
(
dto
.
getDeviceType
())
&&
dto
.
getDeviceType
().
equals
(
"1"
))
{
...
...
@@ -316,8 +317,10 @@ public class TDetectorReportController extends BaseController
tDetectorInfo
.
setAlarmTime
(
null
);
}
else
if
(
new
ArrayList
<
String
>(
Arrays
.
asList
(
"7"
,
"9"
)).
contains
(
dto
.
getDeviceStatus
()))
{
tDetectorInfo
.
setDetectorStatus
(
"1"
);
tDetectorInfo
.
setAlarmTime
(
dto
.
getAlarmTime
());
}
else
{
tDetectorInfo
.
setDetectorStatus
(
"2"
);
tDetectorInfo
.
setAlarmTime
(
dto
.
getAlarmTime
());
}
}
// else{
...
...
gassafety-system/src/main/java/com/zehong/system/domain/TDetectorInfo.java
View file @
d7c554ef
...
...
@@ -69,7 +69,7 @@ public class TDetectorInfo extends BaseEntity
private
Date
creatTime
;
/** 报警时间 */
private
Date
alarmTime
;
private
String
alarmTime
;
/** 设备状态 */
@Excel
(
name
=
"设备状态"
)
...
...
@@ -210,11 +210,11 @@ public class TDetectorInfo extends BaseEntity
this
.
creatTime
=
creatTime
;
}
public
Date
getAlarmTime
()
{
public
String
getAlarmTime
()
{
return
alarmTime
;
}
public
void
setAlarmTime
(
Date
alarmTime
)
{
public
void
setAlarmTime
(
String
alarmTime
)
{
this
.
alarmTime
=
alarmTime
;
}
...
...
gassafety-system/src/main/java/com/zehong/system/domain/form/TDetectorReportDataForm.java
View file @
d7c554ef
...
...
@@ -37,7 +37,7 @@ public class TDetectorReportDataForm {
//创建时间
@NotEmpty
(
message
=
"上报时间必填"
)
private
Date
createTime
;
private
String
createTime
;
}
gassafety-system/src/main/resources/mapper/system/TDetectorInfoMapper.xml
View file @
d7c554ef
...
...
@@ -112,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.userId,jdbcType=INTEGER}, #{item.detectorName,jdbcType=VARCHAR}, #{item.detectorCode,jdbcType=VARCHAR},
#{item.detectorAddr,jdbcType=VARCHAR}, #{item.detectorType,jdbcType=VARCHAR}, #{item.medium,jdbcType=VARCHAR},
#{item.longitude,jdbcType=DECIMAL}, #{item.latitude,jdbcType=DECIMAL}, #{item.linkman,jdbcType=VARCHAR},
#{item.phone,jdbcType=VARCHAR}, #{item.createTime,jdbcType=
VARCHAR
}
#{item.phone,jdbcType=VARCHAR}, #{item.createTime,jdbcType=
TIMESTAMP
}
)
</foreach>
</insert>
...
...
@@ -209,9 +209,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"item.alarmTime != null"
>
when detector_code=#{item.detectorCode} then #{item.alarmTime}
</if>
<if
test=
"item.alarmTime = null"
>
when detector_code=#{item.detectorCode} then null
</if>
</foreach>
</trim>
</trim>
...
...
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