|
|
@@ -2,22 +2,22 @@ package com.usky.rule.vo.action;
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
import com.usky.rule.enums.ActionTypeEnum;
|
|
|
+import com.usky.rule.vo.visualization.AlarmSimpleVO;
|
|
|
+import com.usky.rule.vo.visualization.SimpleVO;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
|
|
|
public class AlarmEventAction implements RuleEngineAction {
|
|
|
@JsonProperty("alarmGrade")
|
|
|
private Integer alarmGrade;
|
|
|
@JsonProperty("productCode")
|
|
|
private String productCode;
|
|
|
- @JsonProperty("deviceId")
|
|
|
- private String deviceId;
|
|
|
- @JsonProperty("deviceName")
|
|
|
- private String deviceName;
|
|
|
@JsonProperty("alarmType")
|
|
|
private String alarmType;
|
|
|
@JsonProperty("alarmAttribute")
|
|
|
private String alarmAttribute;
|
|
|
- @JsonProperty("commAddress")
|
|
|
- private String commAddress;
|
|
|
+ @JsonProperty("devices")
|
|
|
+ private List<AlarmSimpleVO> devices;
|
|
|
|
|
|
public String getType() {
|
|
|
return ActionTypeEnum.ALARM_EVENT.getType();
|
|
|
@@ -34,14 +34,6 @@ public class AlarmEventAction implements RuleEngineAction {
|
|
|
return this.productCode;
|
|
|
}
|
|
|
|
|
|
- public String getDeviceId() {
|
|
|
- return this.deviceId;
|
|
|
- }
|
|
|
-
|
|
|
- public String getDeviceName() {
|
|
|
- return this.deviceName;
|
|
|
- }
|
|
|
-
|
|
|
public String getAlarmType() {
|
|
|
return this.alarmType;
|
|
|
}
|
|
|
@@ -50,8 +42,8 @@ public class AlarmEventAction implements RuleEngineAction {
|
|
|
return this.alarmAttribute;
|
|
|
}
|
|
|
|
|
|
- public String getCommAddress() {
|
|
|
- return this.commAddress;
|
|
|
+ public List<AlarmSimpleVO> getDevices() {
|
|
|
+ return this.devices;
|
|
|
}
|
|
|
|
|
|
@JsonProperty("alarmGrade")
|
|
|
@@ -64,16 +56,6 @@ public class AlarmEventAction implements RuleEngineAction {
|
|
|
this.productCode = productCode;
|
|
|
}
|
|
|
|
|
|
- @JsonProperty("deviceId")
|
|
|
- public void setDeviceId(final String deviceId) {
|
|
|
- this.deviceId = deviceId;
|
|
|
- }
|
|
|
-
|
|
|
- @JsonProperty("deviceName")
|
|
|
- public void setDeviceName(final String deviceName) {
|
|
|
- this.deviceName = deviceName;
|
|
|
- }
|
|
|
-
|
|
|
@JsonProperty("alarmType")
|
|
|
public void setAlarmType(final String alarmType) {
|
|
|
this.alarmType = alarmType;
|
|
|
@@ -84,9 +66,9 @@ public class AlarmEventAction implements RuleEngineAction {
|
|
|
this.alarmAttribute = alarmAttribute;
|
|
|
}
|
|
|
|
|
|
- @JsonProperty("commAddress")
|
|
|
- public void setCommAddress(final String commAddress) {
|
|
|
- this.commAddress = commAddress;
|
|
|
+ @JsonProperty("devices")
|
|
|
+ public void setDevices(final List<AlarmSimpleVO> devices) {
|
|
|
+ this.devices = devices;
|
|
|
}
|
|
|
|
|
|
public boolean equals(final Object o) {
|
|
|
@@ -119,26 +101,6 @@ public class AlarmEventAction implements RuleEngineAction {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- Object this$deviceId = this.getDeviceId();
|
|
|
- Object other$deviceId = other.getDeviceId();
|
|
|
- if (this$deviceId == null) {
|
|
|
- if (other$deviceId != null) {
|
|
|
- return false;
|
|
|
- }
|
|
|
- } else if (!this$deviceId.equals(other$deviceId)) {
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- Object this$deviceName = this.getDeviceName();
|
|
|
- Object other$deviceName = other.getDeviceName();
|
|
|
- if (this$deviceName == null) {
|
|
|
- if (other$deviceName != null) {
|
|
|
- return false;
|
|
|
- }
|
|
|
- } else if (!this$deviceName.equals(other$deviceName)) {
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
Object this$alarmType = this.getAlarmType();
|
|
|
Object other$alarmType = other.getAlarmType();
|
|
|
if (this$alarmType == null) {
|
|
|
@@ -159,13 +121,13 @@ public class AlarmEventAction implements RuleEngineAction {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- Object this$commAddress = this.getCommAddress();
|
|
|
- Object other$commAddress = other.getCommAddress();
|
|
|
- if (this$commAddress == null) {
|
|
|
- if (other$commAddress != null) {
|
|
|
+ Object this$devices = this.getDevices();
|
|
|
+ Object other$devices = other.getDevices();
|
|
|
+ if (this$devices == null) {
|
|
|
+ if (other$devices != null) {
|
|
|
return false;
|
|
|
}
|
|
|
- } else if (!this$commAddress.equals(other$commAddress)) {
|
|
|
+ } else if (!this$devices.equals(other$devices)) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -185,23 +147,18 @@ public class AlarmEventAction implements RuleEngineAction {
|
|
|
result = result * 59 + ($alarmGrade == null ? 43 : $alarmGrade.hashCode());
|
|
|
Object $productCode = this.getProductCode();
|
|
|
result = result * 59 + ($productCode == null ? 43 : $productCode.hashCode());
|
|
|
- Object $deviceId = this.getDeviceId();
|
|
|
- result = result * 59 + ($deviceId == null ? 43 : $deviceId.hashCode());
|
|
|
- Object $deviceName = this.getDeviceName();
|
|
|
- result = result * 59 + ($deviceName == null ? 43 : $deviceName.hashCode());
|
|
|
Object $alarmType = this.getAlarmType();
|
|
|
result = result * 59 + ($alarmType == null ? 43 : $alarmType.hashCode());
|
|
|
Object $alarmAttribute = this.getAlarmAttribute();
|
|
|
result = result * 59 + ($alarmAttribute == null ? 43 : $alarmAttribute.hashCode());
|
|
|
- Object $commAddress = this.getCommAddress();
|
|
|
- result = result * 59 + ($commAddress == null ? 43 : $commAddress.hashCode());
|
|
|
+ Object $devices = this.getDevices();
|
|
|
+ result = result * 59 + ($devices == null ? 43 : $devices.hashCode());
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
public String toString() {
|
|
|
return "AlarmEventAction(alarmGrade=" + this.getAlarmGrade() + ", productCode=" + this.getProductCode()
|
|
|
- + ", deviceId=" + this.getDeviceId() + ", deviceName=" + this.getDeviceName() + ", alarmType="
|
|
|
- + this.getAlarmType() + ", alarmAttribute=" + this.getAlarmAttribute() + ", commAddress="
|
|
|
- + this.getCommAddress() + ")";
|
|
|
+ + ", alarmType="
|
|
|
+ + this.getAlarmType() + ", alarmAttribute=" + this.getAlarmAttribute() + ", devices=" + this.getDevices() + ")";
|
|
|
}
|
|
|
}
|