|
@@ -0,0 +1,145 @@
|
|
|
+package com.gyee.neic_service.dao.entity;
|
|
|
+
|
|
|
+import com.gyee.neic_service.model.alarm.AlertSnap;
|
|
|
+import com.gyee.neic_service.util.ToData;
|
|
|
+import lombok.Data;
|
|
|
+import lombok.NoArgsConstructor;
|
|
|
+
|
|
|
+import javax.persistence.Column;
|
|
|
+import javax.persistence.Entity;
|
|
|
+import javax.persistence.Id;
|
|
|
+import javax.persistence.Table;
|
|
|
+import java.io.Serializable;
|
|
|
+import java.util.Date;
|
|
|
+
|
|
|
+@Data
|
|
|
+@Entity
|
|
|
+@NoArgsConstructor
|
|
|
+@Table(name = "ALARMSNAP")
|
|
|
+public class AlertSnapEntity implements ToData<AlertSnap>, Serializable {
|
|
|
+ @Id
|
|
|
+ @Column(name = "id")
|
|
|
+ private long id;
|
|
|
+ @Column(name = "stationid")
|
|
|
+ private String stationId;
|
|
|
+ @Column(name = "projectid")
|
|
|
+ private String projectId;
|
|
|
+ @Column(name = "lineid")
|
|
|
+ private String lineId;
|
|
|
+ @Column(name = "windturbineid")
|
|
|
+ private String windturbineId;
|
|
|
+ @Column(name = "alertvalue")
|
|
|
+ private int alertValue;
|
|
|
+ @Column(name = "category1")
|
|
|
+ private String cateGory1;
|
|
|
+ @Column(name = "category2")
|
|
|
+ private String cateGory2;
|
|
|
+ @Column(name = "category3")
|
|
|
+ private String cateGory3;
|
|
|
+ @Column(name = "rank")
|
|
|
+ private String rank;
|
|
|
+ @Column(name = "isopened")
|
|
|
+ private int isOpened;
|
|
|
+ @Column(name = "isconfirmed")
|
|
|
+ private Integer confirmed;
|
|
|
+ @Column(name = "confirmtime")
|
|
|
+ private Date confirmTime;
|
|
|
+ @Column(name = "confirmperson")
|
|
|
+ private String confirmPerson;
|
|
|
+ @Column(name = "lastupdatetime")
|
|
|
+ private Date lastUpdateTime;
|
|
|
+ @Column(name = "lastupdateperson")
|
|
|
+ private String lastUpdatePerson;
|
|
|
+ @Column(name = "stationname")
|
|
|
+ private String stationName;
|
|
|
+ @Column(name = "projectname")
|
|
|
+ private String projectName;
|
|
|
+ @Column(name = "linename")
|
|
|
+ private String lineName;
|
|
|
+ @Column(name = "windturbinename")
|
|
|
+ private String windturbineName;
|
|
|
+ @Column(name = "alerttext")
|
|
|
+ private String alertText;
|
|
|
+ @Column(name = "modelid")
|
|
|
+ private String modelId;
|
|
|
+ @Column(name = "testingpointkey")
|
|
|
+ private String testingpointKey;
|
|
|
+ @Column(name = "ifixpicture")
|
|
|
+ private String ifixPicture;
|
|
|
+ @Column(name = "ifixtag")
|
|
|
+ private String ifixTag;
|
|
|
+ @Column(name = "lastclosetime")
|
|
|
+ private Date lastCloseTime;
|
|
|
+ @Column(name = "lastcloseperson")
|
|
|
+ private String lastClosePerson;
|
|
|
+ @Column(name = "datainfo")
|
|
|
+ private String dataInfo;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public AlertSnap toData() {
|
|
|
+ AlertSnap alertsnap = new AlertSnap();
|
|
|
+ alertsnap.setId(this.id);
|
|
|
+ alertsnap.setStationId(this.stationId);
|
|
|
+ alertsnap.setProjectId(this.projectId);
|
|
|
+ alertsnap.setLineId(this.lineId);
|
|
|
+ alertsnap.setWindturbineId(this.windturbineId);
|
|
|
+ alertsnap.setAlertValue(this.alertValue);
|
|
|
+ alertsnap.setCategory1(this.cateGory1);
|
|
|
+ alertsnap.setCategory2(this.cateGory2);
|
|
|
+ alertsnap.setCategory3(this.cateGory3);
|
|
|
+ alertsnap.setRank(this.rank);
|
|
|
+ alertsnap.setIsOpened(this.isOpened);
|
|
|
+ alertsnap.setIsConfirmed(this.confirmed);
|
|
|
+ alertsnap.setConfirmTime(this.confirmTime);
|
|
|
+ alertsnap.setConfirmPerson(this.confirmPerson);
|
|
|
+ alertsnap.setLastUpdateTime(this.lastUpdateTime);
|
|
|
+ alertsnap.setLastUpdatePerson(this.lastUpdatePerson);
|
|
|
+ alertsnap.setStationName(this.stationName);
|
|
|
+ alertsnap.setProjectName(this.projectName);
|
|
|
+ alertsnap.setLineName(this.lineName);
|
|
|
+ alertsnap.setWindturbineName(this.windturbineName);
|
|
|
+ alertsnap.setAlertText(this.alertText);
|
|
|
+ alertsnap.setModelId(this.modelId);
|
|
|
+ alertsnap.setTestingpointKey(this.testingpointKey);
|
|
|
+ alertsnap.setIfixPicture(this.ifixPicture);
|
|
|
+ alertsnap.setIfixTag(this.ifixTag);
|
|
|
+ alertsnap.setLastCloseTime(this.lastCloseTime);
|
|
|
+ alertsnap.setLastClosePerson(this.lastClosePerson);
|
|
|
+ alertsnap.setDataInfo(this.dataInfo);
|
|
|
+ return alertsnap;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public AlertSnapEntity(AlertSnap alertsnap) {
|
|
|
+ this.id = alertsnap.getId();
|
|
|
+ this.stationId = alertsnap.getStationId();
|
|
|
+ this.projectId = alertsnap.getProjectId();
|
|
|
+ this.lineId = alertsnap.getLineId();
|
|
|
+ this.windturbineId = alertsnap.getWindturbineId();
|
|
|
+ this.alertValue = alertsnap.getAlertValue();
|
|
|
+ this.cateGory1 = alertsnap.getCategory1();
|
|
|
+ this.cateGory2 = alertsnap.getCategory2();
|
|
|
+ this.cateGory3 = alertsnap.getCategory3();
|
|
|
+ this.rank = alertsnap.getRank();
|
|
|
+ this.isOpened = alertsnap.getIsOpened();
|
|
|
+ this.setConfirmed(alertsnap.getIsConfirmed());
|
|
|
+ this.confirmTime = alertsnap.getConfirmTime();
|
|
|
+ this.confirmPerson = alertsnap.getConfirmPerson();
|
|
|
+ this.lastUpdateTime = alertsnap.getLastUpdateTime();
|
|
|
+ this.lastUpdatePerson = alertsnap.getLastUpdatePerson();
|
|
|
+ this.stationName = alertsnap.getStationName();
|
|
|
+ this.projectName = alertsnap.getProjectName();
|
|
|
+ this.lineName = alertsnap.getLineName();
|
|
|
+ this.windturbineName = alertsnap.getWindturbineName();
|
|
|
+ this.alertText = alertsnap.getAlertText();
|
|
|
+ this.modelId = alertsnap.getModelId();
|
|
|
+ this.testingpointKey = alertsnap.getTestingpointKey();
|
|
|
+ this.ifixPicture = alertsnap.getIfixPicture();
|
|
|
+ this.ifixTag = alertsnap.getIfixTag();
|
|
|
+ this.lastCloseTime = alertsnap.getLastCloseTime();
|
|
|
+ this.lastClosePerson = alertsnap.getLastClosePerson();
|
|
|
+ this.dataInfo = alertsnap.getDataInfo();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+}
|