|
@@ -2,7 +2,10 @@ package com.persagy.apm.energyalarmstarter.alarmdata.model.dto.alarmrecord;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
|
|
+import com.google.common.collect.Lists;
|
|
|
|
+import com.google.common.collect.Sets;
|
|
import com.persagy.apm.energyalarmstarter.alarmdata.enums.EnumAlarmListType;
|
|
import com.persagy.apm.energyalarmstarter.alarmdata.enums.EnumAlarmListType;
|
|
|
|
+import com.persagy.apm.energyalarmstarter.alarmdata.enums.EnumAlarmTreatMode;
|
|
import com.persagy.apm.energyalarmstarter.alarmdata.model.dto.common.UrlParamDTO;
|
|
import com.persagy.apm.energyalarmstarter.alarmdata.model.dto.common.UrlParamDTO;
|
|
import com.persagy.apm.energyalarmstarter.alarmdata.utils.DateUtils;
|
|
import com.persagy.apm.energyalarmstarter.alarmdata.utils.DateUtils;
|
|
import lombok.AccessLevel;
|
|
import lombok.AccessLevel;
|
|
@@ -13,6 +16,7 @@ import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Set;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 报警记录
|
|
* 报警记录
|
|
@@ -61,6 +65,10 @@ public class QueryAlarmRecordDTO extends UrlParamDTO {
|
|
*/
|
|
*/
|
|
private List<Integer> state;
|
|
private List<Integer> state;
|
|
/**
|
|
/**
|
|
|
|
+ * 当前/历史报警
|
|
|
|
+ */
|
|
|
|
+ private Integer alarmState;
|
|
|
|
+ /**
|
|
* 报警性质
|
|
* 报警性质
|
|
*/
|
|
*/
|
|
private List<Integer> nature;
|
|
private List<Integer> nature;
|
|
@@ -145,4 +153,20 @@ public class QueryAlarmRecordDTO extends UrlParamDTO {
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 对处理方式特殊处理,查询屏蔽关闭的报警需要查询处理方式为忽略、关闭、屏蔽关闭三种处理方式的报警
|
|
|
|
+ *
|
|
|
|
+ * @Author lixing
|
|
|
|
+ * @Date 2022/9/9 10:49
|
|
|
|
+ */
|
|
|
|
+ public List<Integer> getTreatMode() {
|
|
|
|
+ Set<Integer> treatModeSet = Sets.newHashSet(this.treatMode);
|
|
|
|
+ if (treatModeSet.contains(EnumAlarmTreatMode.BLOCK_OBJ.getType())) {
|
|
|
|
+ treatModeSet.add(EnumAlarmTreatMode.IGNORE.getType());
|
|
|
|
+ treatModeSet.add(EnumAlarmTreatMode.CLOSE.getType());
|
|
|
|
+ }
|
|
|
|
+ return Lists.newArrayList(treatModeSet);
|
|
|
|
+ }
|
|
}
|
|
}
|