diff --git a/src/main/java/club/joylink/xiannccda/alert/NccAlertInfo.java b/src/main/java/club/joylink/xiannccda/alert/NccAlertInfo.java index 11a4e6d..43e3bff 100644 --- a/src/main/java/club/joylink/xiannccda/alert/NccAlertInfo.java +++ b/src/main/java/club/joylink/xiannccda/alert/NccAlertInfo.java @@ -16,6 +16,7 @@ public class NccAlertInfo implements AlertInfo { private Integer id; private String level; private LocalDateTime alertTime; + @Setter private AlertType alertType; private Integer alertTipId; private Integer lineId; @@ -30,6 +31,7 @@ public class NccAlertInfo implements AlertInfo { @Setter private Integer alarmStatus; private AlertDeviceType alertDeviceType; +// private AlertType confirmAlertType; public NccAlertInfo(LocalDateTime alertTime, AlertType alertType, Integer lineId, String alertObject, String locatorDeviceId, diff --git a/src/main/java/club/joylink/xiannccda/entity/AlertRecord.java b/src/main/java/club/joylink/xiannccda/entity/AlertRecord.java index d13d42f..095ef6e 100644 --- a/src/main/java/club/joylink/xiannccda/entity/AlertRecord.java +++ b/src/main/java/club/joylink/xiannccda/entity/AlertRecord.java @@ -44,6 +44,7 @@ public class AlertRecord { private String alertDeviceType; private String alertDeviceId; private Boolean mock; + // private String confirmAlertType; public static final String ID = "id"; public static final String ALERT_TYPE = "alert_type"; @@ -62,4 +63,5 @@ public class AlertRecord { public static final String ALERT_DEVICE_TYPE = "alert_device_type"; public static final String ALERT_DEVICE_ID = "alert_device_id"; public static final String MOCK = "mock"; +// public static final String CONFIRM_ALERT_TYPE = "confirm_alert_type"; } diff --git a/src/main/java/club/joylink/xiannccda/service/AlertRecordService.java b/src/main/java/club/joylink/xiannccda/service/AlertRecordService.java index cae19b0..86625ca 100644 --- a/src/main/java/club/joylink/xiannccda/service/AlertRecordService.java +++ b/src/main/java/club/joylink/xiannccda/service/AlertRecordService.java @@ -84,6 +84,7 @@ public class AlertRecordService { this.alertRecordRepository.update(Wrappers.lambdaUpdate(AlertRecord.class) .set(AlertRecord::getAlertTipId, tip.getId()).set(AlertRecord::getAlarmStatus, 1) .set(hasAreaConfigId, AlertRecord::getAlertLocationId, newAreaConfigId) + .set(AlertRecord::getAlertType, tipType) .eq(AlertRecord::getId, recordId).isNull(AlertRecord::getAlarmStatus)); return tip; } @@ -107,6 +108,9 @@ public class AlertRecordService { record.getAlertObject(), "", record.getAlertLocationId(), deviceType); nccAlertInfo.setId(record.getId()); nccAlertInfo.setAlarmStatus(record.getAlarmStatus()); +// if (StringUtils.isNotEmpty(record.getConfirmAlertType())) { +// nccAlertInfo.setAlertType(AlertType.valueOf(record.getConfirmAlertType())); +// } alertInfos.add(nccAlertInfo); }