From 3686b69437a57f87d023066495d675684990c4eb Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Wed, 22 May 2024 19:05:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9A=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hnac/hzims/alarm/source/service/impl/VideoAlarmServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/VideoAlarmServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/VideoAlarmServiceImpl.java index 0ddbaa9..5eecd34 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/VideoAlarmServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/VideoAlarmServiceImpl.java @@ -28,6 +28,8 @@ import java.util.Date; import java.util.List; import java.util.stream.Collectors; +import static com.hnac.hzims.alarm.config.constants.AlarmConstants.PATTERN_DATETIME_MILLIS; + /** * 华自3000告警实现类 * @@ -99,7 +101,7 @@ public class VideoAlarmServiceImpl implements VideoAlarmService { private AlarmEntity getAlarmEntity(DeviceSoeVO item) { AlarmEntity entity = new AlarmEntity(); entity.setAlarmId(item.getId()); - entity.setAlarmTime(DateUtil.parse(item.getTs(), "yyyy-MM-dd HH:mm:ss.s")); + entity.setAlarmTime(DateUtil.parse(item.getTs(), PATTERN_DATETIME_MILLIS)); entity.setAlarmContext(item.getSoeExplain()); entity.setAlarmType(AlarmHandleConstant.VIDEO_ALARM); entity.setAlarmStatus(Integer.valueOf(item.getSoeStatus()));