From 4595fa7b3d849db34958a8699f9c38a7a98c01a6 Mon Sep 17 00:00:00 2001 From: tiger_zhou Date: Mon, 6 Nov 2023 09:03:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/club/joylink/xiannccda/alert/NccAlertInfo.java | 4 ++++ .../xiannccda/repository/impl/AlertRecordRepository.java | 2 +- .../club/joylink/xiannccda/service/AlertRecordService.java | 7 ++++--- 3 files changed, 9 insertions(+), 4 deletions(-) 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) {