|
@@ -1,11 +1,18 @@
|
|
|
package com.zksy.cockpit.point;
|
|
package com.zksy.cockpit.point;
|
|
|
|
|
|
|
|
|
|
+import com.zksy.cockpit.foundation.CockpitCoordinateValidation;
|
|
|
|
|
+import com.zksy.cockpit.foundation.CockpitCoordinateValidator;
|
|
|
|
|
+
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
public class CockpitMonitoringPointDeviceSnapshot {
|
|
public class CockpitMonitoringPointDeviceSnapshot {
|
|
|
private final String deviceCode;
|
|
private final String deviceCode;
|
|
|
private final String deviceName;
|
|
private final String deviceName;
|
|
|
private final String deviceTypeName;
|
|
private final String deviceTypeName;
|
|
|
|
|
+ private final BigDecimal longitude;
|
|
|
|
|
+ private final BigDecimal latitude;
|
|
|
|
|
+ private final CockpitCoordinateValidation coordinateValidation;
|
|
|
private final boolean online;
|
|
private final boolean online;
|
|
|
private final boolean alarm;
|
|
private final boolean alarm;
|
|
|
private final boolean warning;
|
|
private final boolean warning;
|
|
@@ -16,9 +23,29 @@ public class CockpitMonitoringPointDeviceSnapshot {
|
|
|
public CockpitMonitoringPointDeviceSnapshot(String deviceCode, String deviceName, String deviceTypeName,
|
|
public CockpitMonitoringPointDeviceSnapshot(String deviceCode, String deviceName, String deviceTypeName,
|
|
|
boolean online, boolean alarm, boolean warning, boolean workOrderInProgress,
|
|
boolean online, boolean alarm, boolean warning, boolean workOrderInProgress,
|
|
|
List<String> statusReasons, String statusTime) {
|
|
List<String> statusReasons, String statusTime) {
|
|
|
|
|
+ this(deviceCode, deviceName, deviceTypeName, null, null, false,
|
|
|
|
|
+ online, alarm, warning, workOrderInProgress, statusReasons, statusTime);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public CockpitMonitoringPointDeviceSnapshot(String deviceCode, String deviceName, String deviceTypeName,
|
|
|
|
|
+ BigDecimal longitude, BigDecimal latitude, boolean coordinateVerified,
|
|
|
|
|
+ boolean online, boolean alarm, boolean warning, boolean workOrderInProgress,
|
|
|
|
|
+ List<String> statusReasons, String statusTime) {
|
|
|
|
|
+ this(deviceCode, deviceName, deviceTypeName, longitude, latitude,
|
|
|
|
|
+ CockpitCoordinateValidator.validate(longitude, latitude, coordinateVerified),
|
|
|
|
|
+ online, alarm, warning, workOrderInProgress, statusReasons, statusTime);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public CockpitMonitoringPointDeviceSnapshot(String deviceCode, String deviceName, String deviceTypeName,
|
|
|
|
|
+ BigDecimal longitude, BigDecimal latitude, CockpitCoordinateValidation coordinateValidation,
|
|
|
|
|
+ boolean online, boolean alarm, boolean warning, boolean workOrderInProgress,
|
|
|
|
|
+ List<String> statusReasons, String statusTime) {
|
|
|
this.deviceCode = deviceCode;
|
|
this.deviceCode = deviceCode;
|
|
|
this.deviceName = deviceName;
|
|
this.deviceName = deviceName;
|
|
|
this.deviceTypeName = deviceTypeName;
|
|
this.deviceTypeName = deviceTypeName;
|
|
|
|
|
+ this.longitude = longitude;
|
|
|
|
|
+ this.latitude = latitude;
|
|
|
|
|
+ this.coordinateValidation = coordinateValidation;
|
|
|
this.online = online;
|
|
this.online = online;
|
|
|
this.alarm = alarm;
|
|
this.alarm = alarm;
|
|
|
this.warning = warning;
|
|
this.warning = warning;
|
|
@@ -30,6 +57,9 @@ public class CockpitMonitoringPointDeviceSnapshot {
|
|
|
public String getDeviceCode() { return deviceCode; }
|
|
public String getDeviceCode() { return deviceCode; }
|
|
|
public String getDeviceName() { return deviceName; }
|
|
public String getDeviceName() { return deviceName; }
|
|
|
public String getDeviceTypeName() { return deviceTypeName; }
|
|
public String getDeviceTypeName() { return deviceTypeName; }
|
|
|
|
|
+ public BigDecimal getLongitude() { return longitude; }
|
|
|
|
|
+ public BigDecimal getLatitude() { return latitude; }
|
|
|
|
|
+ public CockpitCoordinateValidation getCoordinateValidation() { return coordinateValidation; }
|
|
|
public boolean isOnline() { return online; }
|
|
public boolean isOnline() { return online; }
|
|
|
public boolean isAlarm() { return alarm; }
|
|
public boolean isAlarm() { return alarm; }
|
|
|
public boolean isWarning() { return warning; }
|
|
public boolean isWarning() { return warning; }
|