diff --git a/src/main/java/club/joylink/xiannccda/alert/NccAlertInfo.java b/src/main/java/club/joylink/xiannccda/alert/NccAlertInfo.java index 3e480a2..c2df5a7 100644 --- a/src/main/java/club/joylink/xiannccda/alert/NccAlertInfo.java +++ b/src/main/java/club/joylink/xiannccda/alert/NccAlertInfo.java @@ -123,9 +123,13 @@ public class NccAlertInfo implements AlertInfo { public static class AlertStatus { + //未处理 public final static int NOT_DO = -1; + //确认 public final static int CONFIRM_DO = 1; + //误报 public final static int FAIL_DO = 0; + //人工接警 public final static int PERSON_WARN_DO = 2; } } diff --git a/src/main/java/club/joylink/xiannccda/repository/impl/AlertRecordRepository.java b/src/main/java/club/joylink/xiannccda/repository/impl/AlertRecordRepository.java index 7a3bd1f..b1c86d6 100644 --- a/src/main/java/club/joylink/xiannccda/repository/impl/AlertRecordRepository.java +++ b/src/main/java/club/joylink/xiannccda/repository/impl/AlertRecordRepository.java @@ -36,7 +36,7 @@ public class AlertRecordRepository extends ServiceImpl recordId, Integer status) { BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(CollectionUtils.isNotEmpty(recordId), "请选择对应的报警信息"); - this.alertRecordRepository.update(Wrappers.lambdaUpdate(AlertRecord.class) - .set(AlertRecord::getAlarmStatus, 0).in(AlertRecord::getId, recordId) - .isNull(AlertRecord::getAlarmStatus)); this.alertRecordRepository.remove(Wrappers.lambdaUpdate(AlertRecord.class).eq(AlertRecord::getMock, true).in(AlertRecord::getId, recordId)); + this.alertRecordRepository.update(Wrappers.lambdaUpdate(AlertRecord.class) + .set(AlertRecord::getAlarmStatus, status).in(AlertRecord::getId, recordId) + .eq(AlertRecord::getAlarmStatus, AlertStatus.NOT_DO)); + } private List changeData(List ars) {