Commit 048a6ce07205960156c61df12ca75e20fbca8736
1 parent
a7c3cf53
优化报警时间
Showing
3 changed files
with
3 additions
and
4 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
| @@ -414,7 +414,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { | @@ -414,7 +414,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { | ||
| 414 | .append("<AlarmPriority>" + deviceAlarm.getAlarmPriority() + "</AlarmPriority>\r\n") | 414 | .append("<AlarmPriority>" + deviceAlarm.getAlarmPriority() + "</AlarmPriority>\r\n") |
| 415 | .append("<AlarmMethod>" + deviceAlarm.getAlarmMethod() + "</AlarmMethod>\r\n") | 415 | .append("<AlarmMethod>" + deviceAlarm.getAlarmMethod() + "</AlarmMethod>\r\n") |
| 416 | .append("<AlarmTime>" + deviceAlarm.getAlarmTime() + "</AlarmTime>\r\n") | 416 | .append("<AlarmTime>" + deviceAlarm.getAlarmTime() + "</AlarmTime>\r\n") |
| 417 | - .append("<AlarmDescription>" + deviceAlarm.getAlarmDescription() + "</AlarmDescription>\r\n") | 417 | + .append("<AlarmDescription>" + DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(deviceAlarm.getAlarmDescription()) + "</AlarmDescription>\r\n") |
| 418 | .append("<Longitude>" + deviceAlarm.getLongitude() + "</Longitude>\r\n") | 418 | .append("<Longitude>" + deviceAlarm.getLongitude() + "</Longitude>\r\n") |
| 419 | .append("<Latitude>" + deviceAlarm.getLatitude() + "</Latitude>\r\n") | 419 | .append("<Latitude>" + deviceAlarm.getLatitude() + "</Latitude>\r\n") |
| 420 | .append("<info>\r\n") | 420 | .append("<info>\r\n") |
src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisAlarmMsgListener.java
| @@ -69,7 +69,7 @@ public class RedisAlarmMsgListener implements MessageListener { | @@ -69,7 +69,7 @@ public class RedisAlarmMsgListener implements MessageListener { | ||
| 69 | deviceAlarm.setAlarmMethod("" + alarmChannelMessage.getAlarmSn()); | 69 | deviceAlarm.setAlarmMethod("" + alarmChannelMessage.getAlarmSn()); |
| 70 | deviceAlarm.setAlarmType("" + alarmChannelMessage.getAlarmType()); | 70 | deviceAlarm.setAlarmType("" + alarmChannelMessage.getAlarmType()); |
| 71 | deviceAlarm.setAlarmPriority("1"); | 71 | deviceAlarm.setAlarmPriority("1"); |
| 72 | - deviceAlarm.setAlarmTime(DateUtil.getNowForISO8601()); | 72 | + deviceAlarm.setAlarmTime(DateUtil.getNow()); |
| 73 | deviceAlarm.setLongitude(0); | 73 | deviceAlarm.setLongitude(0); |
| 74 | deviceAlarm.setLatitude(0); | 74 | deviceAlarm.setLatitude(0); |
| 75 | 75 |
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/alarm/AlarmController.java
| @@ -23,7 +23,6 @@ import org.springframework.web.bind.annotation.*; | @@ -23,7 +23,6 @@ import org.springframework.web.bind.annotation.*; | ||
| 23 | import javax.sip.InvalidArgumentException; | 23 | import javax.sip.InvalidArgumentException; |
| 24 | import javax.sip.SipException; | 24 | import javax.sip.SipException; |
| 25 | import java.text.ParseException; | 25 | import java.text.ParseException; |
| 26 | -import java.time.LocalDateTime; | ||
| 27 | import java.util.Arrays; | 26 | import java.util.Arrays; |
| 28 | import java.util.List; | 27 | import java.util.List; |
| 29 | 28 | ||
| @@ -104,7 +103,7 @@ public class AlarmController { | @@ -104,7 +103,7 @@ public class AlarmController { | ||
| 104 | deviceAlarm.setAlarmDescription("test"); | 103 | deviceAlarm.setAlarmDescription("test"); |
| 105 | deviceAlarm.setAlarmMethod("1"); | 104 | deviceAlarm.setAlarmMethod("1"); |
| 106 | deviceAlarm.setAlarmPriority("1"); | 105 | deviceAlarm.setAlarmPriority("1"); |
| 107 | - deviceAlarm.setAlarmTime(DateUtil.formatterISO8601.format(LocalDateTime.now())); | 106 | + deviceAlarm.setAlarmTime(DateUtil.getNow()); |
| 108 | deviceAlarm.setAlarmType("1"); | 107 | deviceAlarm.setAlarmType("1"); |
| 109 | deviceAlarm.setLongitude(115.33333); | 108 | deviceAlarm.setLongitude(115.33333); |
| 110 | deviceAlarm.setLatitude(39.33333); | 109 | deviceAlarm.setLatitude(39.33333); |