Browse Source

修正:告警时间格式

zhongwei
ty 6 months ago
parent
commit
3686b69437
  1. 4
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/VideoAlarmServiceImpl.java

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

Loading…
Cancel
Save