修改查询
This commit is contained in:
parent
f48807984a
commit
4595fa7b3d
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public class AlertRecordRepository extends ServiceImpl<AlertRecordMapper, AlertR
|
||||
queryWrapper.eq(Objects.nonNull(queryDTO.getLineId()), AlertRecord::getLineId, queryDTO.getLineId());
|
||||
queryWrapper.ge(Objects.nonNull(queryDTO.getBeginDateTime()), AlertRecord::getAlertTime, queryDTO.getBeginDateTime());
|
||||
queryWrapper.le(Objects.nonNull(queryDTO.getEndDateTime()), AlertRecord::getAlertTime, queryDTO.getEndDateTime());
|
||||
queryWrapper.le(Objects.nonNull(queryDTO.getAlertStatus()), AlertRecord::getAlarmStatus, queryDTO.getAlertStatus());
|
||||
queryWrapper.eq(Objects.nonNull(queryDTO.getAlertStatus()), AlertRecord::getAlarmStatus, queryDTO.getAlertStatus());
|
||||
|
||||
queryWrapper.orderByDesc(AlertRecord::getId);
|
||||
queryWrapper.orderByAsc(AlertRecord::getAlarmStatus);
|
||||
|
@ -166,10 +166,11 @@ public class AlertRecordService {
|
||||
|
||||
public void failAlarm(List<Long> 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<NccAlertInfo> changeData(List<AlertRecord> ars) {
|
||||
|
Loading…
Reference in New Issue
Block a user