|
|
@@ -233,6 +233,8 @@ public class CockpitCurrentEventsSnapshot {
|
|
|
|
|
|
public static class SourceAlarm {
|
|
|
private final String alarmId;
|
|
|
+ /** 业务编号(alarm_no):上屏用它,主键只用于内部关联。 */
|
|
|
+ private final String alarmNo;
|
|
|
private final String warningName;
|
|
|
private final String warningType;
|
|
|
private final Integer level;
|
|
|
@@ -255,6 +257,7 @@ public class CockpitCurrentEventsSnapshot {
|
|
|
/** 报警片区(原始编码,未归一见 {@code CockpitDistrict});无设备/未识别时为 null=未分区。 */
|
|
|
private final Integer district;
|
|
|
|
|
|
+ /** 兼容重载:不传业务编号时退回主键(既有测试/旧适配器用)。 */
|
|
|
public SourceAlarm(
|
|
|
String alarmId,
|
|
|
String warningName,
|
|
|
@@ -277,7 +280,37 @@ public class CockpitCurrentEventsSnapshot {
|
|
|
BigDecimal thresholdMinValue,
|
|
|
BigDecimal thresholdMaxValue,
|
|
|
Integer district) {
|
|
|
+ this(alarmId, null, warningName, warningType, level, status, eventTime, updatedTime,
|
|
|
+ value, unit, deviceCode, deviceName, monitoringPointCode, monitoringPointName,
|
|
|
+ location, typeCode, longitude, latitude, coordinateVerified,
|
|
|
+ thresholdMinValue, thresholdMaxValue, district);
|
|
|
+ }
|
|
|
+
|
|
|
+ public SourceAlarm(
|
|
|
+ String alarmId,
|
|
|
+ String alarmNo,
|
|
|
+ String warningName,
|
|
|
+ String warningType,
|
|
|
+ Integer level,
|
|
|
+ String status,
|
|
|
+ String eventTime,
|
|
|
+ String updatedTime,
|
|
|
+ BigDecimal value,
|
|
|
+ String unit,
|
|
|
+ String deviceCode,
|
|
|
+ String deviceName,
|
|
|
+ String monitoringPointCode,
|
|
|
+ String monitoringPointName,
|
|
|
+ String location,
|
|
|
+ String typeCode,
|
|
|
+ BigDecimal longitude,
|
|
|
+ BigDecimal latitude,
|
|
|
+ boolean coordinateVerified,
|
|
|
+ BigDecimal thresholdMinValue,
|
|
|
+ BigDecimal thresholdMaxValue,
|
|
|
+ Integer district) {
|
|
|
this.alarmId = alarmId;
|
|
|
+ this.alarmNo = alarmNo;
|
|
|
this.warningName = warningName;
|
|
|
this.warningType = warningType;
|
|
|
this.level = level;
|
|
|
@@ -304,6 +337,10 @@ public class CockpitCurrentEventsSnapshot {
|
|
|
return alarmId;
|
|
|
}
|
|
|
|
|
|
+ public String getAlarmNo() {
|
|
|
+ return alarmNo;
|
|
|
+ }
|
|
|
+
|
|
|
public String getWarningName() {
|
|
|
return warningName;
|
|
|
}
|