Commit d7c554ef authored by 王晓倩's avatar 王晓倩

探测器报警时间类型修改

parent 579f8849
......@@ -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{
......
......@@ -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;
}
......
......@@ -37,7 +37,7 @@ public class TDetectorReportDataForm {
//创建时间
@NotEmpty(message="上报时间必填")
private Date createTime;
private String createTime;
}
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment