优化报警时间

pull/783/head
648540858 2023-03-08 11:42:28 +08:00
parent a7c3cf5316
commit 048a6ce072
3 changed files with 3 additions and 4 deletions

View File

@ -414,7 +414,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
.append("<AlarmPriority>" + deviceAlarm.getAlarmPriority() + "</AlarmPriority>\r\n") .append("<AlarmPriority>" + deviceAlarm.getAlarmPriority() + "</AlarmPriority>\r\n")
.append("<AlarmMethod>" + deviceAlarm.getAlarmMethod() + "</AlarmMethod>\r\n") .append("<AlarmMethod>" + deviceAlarm.getAlarmMethod() + "</AlarmMethod>\r\n")
.append("<AlarmTime>" + deviceAlarm.getAlarmTime() + "</AlarmTime>\r\n") .append("<AlarmTime>" + deviceAlarm.getAlarmTime() + "</AlarmTime>\r\n")
.append("<AlarmDescription>" + deviceAlarm.getAlarmDescription() + "</AlarmDescription>\r\n") .append("<AlarmDescription>" + DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(deviceAlarm.getAlarmDescription()) + "</AlarmDescription>\r\n")
.append("<Longitude>" + deviceAlarm.getLongitude() + "</Longitude>\r\n") .append("<Longitude>" + deviceAlarm.getLongitude() + "</Longitude>\r\n")
.append("<Latitude>" + deviceAlarm.getLatitude() + "</Latitude>\r\n") .append("<Latitude>" + deviceAlarm.getLatitude() + "</Latitude>\r\n")
.append("<info>\r\n") .append("<info>\r\n")

View File

@ -69,7 +69,7 @@ public class RedisAlarmMsgListener implements MessageListener {
deviceAlarm.setAlarmMethod("" + alarmChannelMessage.getAlarmSn()); deviceAlarm.setAlarmMethod("" + alarmChannelMessage.getAlarmSn());
deviceAlarm.setAlarmType("" + alarmChannelMessage.getAlarmType()); deviceAlarm.setAlarmType("" + alarmChannelMessage.getAlarmType());
deviceAlarm.setAlarmPriority("1"); deviceAlarm.setAlarmPriority("1");
deviceAlarm.setAlarmTime(DateUtil.getNowForISO8601()); deviceAlarm.setAlarmTime(DateUtil.getNow());
deviceAlarm.setLongitude(0); deviceAlarm.setLongitude(0);
deviceAlarm.setLatitude(0); deviceAlarm.setLatitude(0);

View File

@ -23,7 +23,6 @@ import org.springframework.web.bind.annotation.*;
import javax.sip.InvalidArgumentException; import javax.sip.InvalidArgumentException;
import javax.sip.SipException; import javax.sip.SipException;
import java.text.ParseException; import java.text.ParseException;
import java.time.LocalDateTime;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -104,7 +103,7 @@ public class AlarmController {
deviceAlarm.setAlarmDescription("test"); deviceAlarm.setAlarmDescription("test");
deviceAlarm.setAlarmMethod("1"); deviceAlarm.setAlarmMethod("1");
deviceAlarm.setAlarmPriority("1"); deviceAlarm.setAlarmPriority("1");
deviceAlarm.setAlarmTime(DateUtil.formatterISO8601.format(LocalDateTime.now())); deviceAlarm.setAlarmTime(DateUtil.getNow());
deviceAlarm.setAlarmType("1"); deviceAlarm.setAlarmType("1");
deviceAlarm.setLongitude(115.33333); deviceAlarm.setLongitude(115.33333);
deviceAlarm.setLatitude(39.33333); deviceAlarm.setLatitude(39.33333);