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()));