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 | 414 | .append("<AlarmPriority>" + deviceAlarm.getAlarmPriority() + "</AlarmPriority>\r\n") |
| 415 | 415 | .append("<AlarmMethod>" + deviceAlarm.getAlarmMethod() + "</AlarmMethod>\r\n") |
| 416 | 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 | 418 | .append("<Longitude>" + deviceAlarm.getLongitude() + "</Longitude>\r\n") |
| 419 | 419 | .append("<Latitude>" + deviceAlarm.getLatitude() + "</Latitude>\r\n") |
| 420 | 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 | 69 | deviceAlarm.setAlarmMethod("" + alarmChannelMessage.getAlarmSn()); |
| 70 | 70 | deviceAlarm.setAlarmType("" + alarmChannelMessage.getAlarmType()); |
| 71 | 71 | deviceAlarm.setAlarmPriority("1"); |
| 72 | - deviceAlarm.setAlarmTime(DateUtil.getNowForISO8601()); | |
| 72 | + deviceAlarm.setAlarmTime(DateUtil.getNow()); | |
| 73 | 73 | deviceAlarm.setLongitude(0); |
| 74 | 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 | 23 | import javax.sip.InvalidArgumentException; |
| 24 | 24 | import javax.sip.SipException; |
| 25 | 25 | import java.text.ParseException; |
| 26 | -import java.time.LocalDateTime; | |
| 27 | 26 | import java.util.Arrays; |
| 28 | 27 | import java.util.List; |
| 29 | 28 | |
| ... | ... | @@ -104,7 +103,7 @@ public class AlarmController { |
| 104 | 103 | deviceAlarm.setAlarmDescription("test"); |
| 105 | 104 | deviceAlarm.setAlarmMethod("1"); |
| 106 | 105 | deviceAlarm.setAlarmPriority("1"); |
| 107 | - deviceAlarm.setAlarmTime(DateUtil.formatterISO8601.format(LocalDateTime.now())); | |
| 106 | + deviceAlarm.setAlarmTime(DateUtil.getNow()); | |
| 108 | 107 | deviceAlarm.setAlarmType("1"); |
| 109 | 108 | deviceAlarm.setLongitude(115.33333); |
| 110 | 109 | deviceAlarm.setLatitude(39.33333); | ... | ... |