|
@@ -1,269 +1,235 @@
|
|
|
package com.ruoyi.tcp.domain;
|
|
|
|
|
|
-import com.ruoyi.common.annotation.Excel;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ruoyi.common.core.domain.BaseEntity;
|
|
|
-import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
|
-import org.apache.commons.lang3.builder.ToStringStyle;
|
|
|
|
|
|
public class InputLine extends BaseEntity {
|
|
|
|
|
|
-
|
|
|
/** 测站唯一编码 */
|
|
|
private String st;
|
|
|
|
|
|
/** 功能码 */
|
|
|
- @Excel(name = "功能码")
|
|
|
private String fun;
|
|
|
|
|
|
/** 数据采集时间 */
|
|
|
- @Excel(name = "数据采集时间")
|
|
|
private String tt;
|
|
|
|
|
|
/** 通讯时间 */
|
|
|
- @Excel(name = "通讯时间")
|
|
|
private String tm;
|
|
|
|
|
|
/** 版本 */
|
|
|
- @Excel(name = "版本")
|
|
|
- private Long ver;
|
|
|
+ private Float ver;
|
|
|
|
|
|
/** 传输标志 */
|
|
|
- @Excel(name = "传输标志")
|
|
|
- private Long mark;
|
|
|
+ private Integer mark;
|
|
|
|
|
|
/** 数据包流水号 */
|
|
|
- @Excel(name = "数据包流水号")
|
|
|
- private Long serial;
|
|
|
+ private Integer serial;
|
|
|
|
|
|
/** 测站类型 */
|
|
|
- @Excel(name = "测站类型")
|
|
|
private String type;
|
|
|
|
|
|
/** 设备温度 */
|
|
|
- @Excel(name = "设备温度")
|
|
|
- private Long dtemp;
|
|
|
+ private Float dtemp;
|
|
|
|
|
|
/** 电池电量 */
|
|
|
- @Excel(name = "电池电量")
|
|
|
- private Long bat;
|
|
|
+ private Integer bat;
|
|
|
|
|
|
/** 设备通讯信号强度 */
|
|
|
- @Excel(name = "设备通讯信号强度")
|
|
|
- private Long signal;
|
|
|
+ private Integer signal;
|
|
|
|
|
|
/** 设备电池电压 */
|
|
|
- @Excel(name = "设备电池电压")
|
|
|
- private Long vt;
|
|
|
-
|
|
|
+ private Float vt;
|
|
|
|
|
|
+ /** 设备编码 */
|
|
|
+ private String deviceCode;
|
|
|
|
|
|
private String q1;
|
|
|
|
|
|
-
|
|
|
-
|
|
|
private String v1;
|
|
|
|
|
|
-
|
|
|
-
|
|
|
private String z1;
|
|
|
|
|
|
+ private String q;
|
|
|
|
|
|
+ private String cq1;
|
|
|
|
|
|
- private String q;
|
|
|
|
|
|
|
|
|
-// @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
|
|
- private String cq1;
|
|
|
|
|
|
- /** 设备编码 */
|
|
|
- @Excel(name = "设备编码")
|
|
|
- private String deviceCode;
|
|
|
+ public String getSt() {
|
|
|
+ return st;
|
|
|
+ }
|
|
|
|
|
|
- public void setSt(String st)
|
|
|
- {
|
|
|
+ public void setSt(String st) {
|
|
|
this.st = st;
|
|
|
}
|
|
|
|
|
|
- public String getSt()
|
|
|
- {
|
|
|
- return st;
|
|
|
+ public String getFun() {
|
|
|
+ return fun;
|
|
|
}
|
|
|
- public void setFun(String fun)
|
|
|
- {
|
|
|
+
|
|
|
+ public void setFun(String fun) {
|
|
|
this.fun = fun;
|
|
|
}
|
|
|
|
|
|
- public String getFun()
|
|
|
- {
|
|
|
- return fun;
|
|
|
+ public String getTt() {
|
|
|
+ return tt;
|
|
|
}
|
|
|
- public void setTt(String tt)
|
|
|
- {
|
|
|
+
|
|
|
+ public void setTt(String tt) {
|
|
|
this.tt = tt;
|
|
|
}
|
|
|
|
|
|
- public String getTt()
|
|
|
- {
|
|
|
- return tt;
|
|
|
+ public String getTm() {
|
|
|
+ return tm;
|
|
|
}
|
|
|
- public void setTm(String tm)
|
|
|
- {
|
|
|
+
|
|
|
+ public void setTm(String tm) {
|
|
|
this.tm = tm;
|
|
|
}
|
|
|
|
|
|
- public String getTm()
|
|
|
- {
|
|
|
- return tm;
|
|
|
+ public Float getVer() {
|
|
|
+ return ver;
|
|
|
}
|
|
|
- public void setVer(Long ver)
|
|
|
- {
|
|
|
+
|
|
|
+ public void setVer(Float ver) {
|
|
|
this.ver = ver;
|
|
|
}
|
|
|
|
|
|
- public Long getVer()
|
|
|
- {
|
|
|
- return ver;
|
|
|
+ public Integer getMark() {
|
|
|
+ return mark;
|
|
|
}
|
|
|
- public void setMark(Long mark)
|
|
|
- {
|
|
|
+
|
|
|
+ public void setMark(Integer mark) {
|
|
|
this.mark = mark;
|
|
|
}
|
|
|
|
|
|
- public Long getMark()
|
|
|
- {
|
|
|
- return mark;
|
|
|
+ public Integer getSerial() {
|
|
|
+ return serial;
|
|
|
}
|
|
|
- public void setSerial(Long serial)
|
|
|
- {
|
|
|
+
|
|
|
+ public void setSerial(Integer serial) {
|
|
|
this.serial = serial;
|
|
|
}
|
|
|
|
|
|
- public Long getSerial()
|
|
|
- {
|
|
|
- return serial;
|
|
|
+ public String getType() {
|
|
|
+ return type;
|
|
|
}
|
|
|
- public void setType(String type)
|
|
|
- {
|
|
|
+
|
|
|
+ public void setType(String type) {
|
|
|
this.type = type;
|
|
|
}
|
|
|
|
|
|
- public String getType()
|
|
|
- {
|
|
|
- return type;
|
|
|
+ public Float getDtemp() {
|
|
|
+ return dtemp;
|
|
|
}
|
|
|
- public void setDtemp(Long dtemp)
|
|
|
- {
|
|
|
+
|
|
|
+ public void setDtemp(Float dtemp) {
|
|
|
this.dtemp = dtemp;
|
|
|
}
|
|
|
|
|
|
- public Long getDtemp()
|
|
|
- {
|
|
|
- return dtemp;
|
|
|
+ public Integer getBat() {
|
|
|
+ return bat;
|
|
|
}
|
|
|
- public void setBat(Long bat)
|
|
|
- {
|
|
|
+
|
|
|
+ public void setBat(Integer bat) {
|
|
|
this.bat = bat;
|
|
|
}
|
|
|
|
|
|
- public Long getBat()
|
|
|
- {
|
|
|
- return bat;
|
|
|
+ public Integer getSignal() {
|
|
|
+ return signal;
|
|
|
}
|
|
|
- public void setSignal(Long signal)
|
|
|
- {
|
|
|
+
|
|
|
+ public void setSignal(Integer signal) {
|
|
|
this.signal = signal;
|
|
|
}
|
|
|
|
|
|
- public Long getSignal()
|
|
|
- {
|
|
|
- return signal;
|
|
|
+ public Float getVt() {
|
|
|
+ return vt;
|
|
|
}
|
|
|
- public void setVt(Long vt)
|
|
|
- {
|
|
|
+
|
|
|
+ public void setVt(Float vt) {
|
|
|
this.vt = vt;
|
|
|
}
|
|
|
|
|
|
- public Long getVt()
|
|
|
- {
|
|
|
- return vt;
|
|
|
+ public String getDeviceCode() {
|
|
|
+ return deviceCode;
|
|
|
}
|
|
|
- public void setQ1(String q1)
|
|
|
- {
|
|
|
- this.q1 = q1;
|
|
|
+
|
|
|
+ public void setDeviceCode(String deviceCode) {
|
|
|
+ this.deviceCode = deviceCode;
|
|
|
}
|
|
|
|
|
|
- public String getQ1()
|
|
|
- {
|
|
|
+ public String getQ1() {
|
|
|
return q1;
|
|
|
}
|
|
|
- public void setV1(String v1)
|
|
|
- {
|
|
|
- this.v1 = v1;
|
|
|
+
|
|
|
+ public void setQ1(String q1) {
|
|
|
+ this.q1 = q1;
|
|
|
}
|
|
|
|
|
|
- public String getV1()
|
|
|
- {
|
|
|
+ public String getV1() {
|
|
|
return v1;
|
|
|
}
|
|
|
- public void setZ1(String z1)
|
|
|
- {
|
|
|
- this.z1 = z1;
|
|
|
+
|
|
|
+ public void setV1(String v1) {
|
|
|
+ this.v1 = v1;
|
|
|
}
|
|
|
|
|
|
- public String getZ1()
|
|
|
- {
|
|
|
+ public String getZ1() {
|
|
|
return z1;
|
|
|
}
|
|
|
- public void setQ(String q)
|
|
|
- {
|
|
|
- this.q = q;
|
|
|
+
|
|
|
+ public void setZ1(String z1) {
|
|
|
+ this.z1 = z1;
|
|
|
}
|
|
|
|
|
|
- public String getQ()
|
|
|
- {
|
|
|
+ public String getQ() {
|
|
|
return q;
|
|
|
}
|
|
|
- public void setCq1(String cq1)
|
|
|
- {
|
|
|
- this.cq1 = cq1;
|
|
|
+
|
|
|
+ public void setQ(String q) {
|
|
|
+ this.q = q;
|
|
|
}
|
|
|
|
|
|
- public String getCq1()
|
|
|
- {
|
|
|
+ public String getCq1() {
|
|
|
return cq1;
|
|
|
}
|
|
|
- public void setDeviceCode(String deviceCode)
|
|
|
- {
|
|
|
- this.deviceCode = deviceCode;
|
|
|
- }
|
|
|
|
|
|
- public String getDeviceCode()
|
|
|
- {
|
|
|
- return deviceCode;
|
|
|
+ public void setCq1(String cq1) {
|
|
|
+ this.cq1 = cq1;
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public String toString() {
|
|
|
- return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
|
|
- .append("st", getSt())
|
|
|
- .append("fun", getFun())
|
|
|
- .append("tt", getTt())
|
|
|
- .append("tm", getTm())
|
|
|
- .append("ver", getVer())
|
|
|
- .append("mark", getMark())
|
|
|
- .append("serial", getSerial())
|
|
|
- .append("type", getType())
|
|
|
- .append("dtemp", getDtemp())
|
|
|
- .append("bat", getBat())
|
|
|
- .append("signal", getSignal())
|
|
|
- .append("vt", getVt())
|
|
|
- .append("q1", getQ1())
|
|
|
- .append("v1", getV1())
|
|
|
- .append("z1", getZ1())
|
|
|
- .append("q", getQ())
|
|
|
- .append("cq1", getCq1())
|
|
|
- .append("deviceCode", getDeviceCode())
|
|
|
- .toString();
|
|
|
+ public void parseJSONObjectToDomain(JSONObject jsonObject){
|
|
|
+ this.st = jsonObject.get("ST").toString();
|
|
|
+ this.fun = jsonObject.get("FUN").toString();
|
|
|
+ this.tt = jsonObject.get("TT").toString();
|
|
|
+ this.tm = jsonObject.get("TM").toString();
|
|
|
+ this.ver = Float.parseFloat(jsonObject.get("VER").toString());
|
|
|
+ this.mark = Integer.parseInt(jsonObject.get("MARK").toString());
|
|
|
+ this.serial = Integer.parseInt(jsonObject.get("SERIAL").toString());
|
|
|
+ this.type = jsonObject.get("TYPE").toString();
|
|
|
+ this.dtemp = Float.parseFloat(jsonObject.get("DTEMP").toString());
|
|
|
+ this.bat = Integer.parseInt(jsonObject.get("BAT").toString());
|
|
|
+ this.signal = Integer.parseInt(jsonObject.get("SIGNAL").toString());
|
|
|
+ this.vt = Float.parseFloat(jsonObject.get("VT").toString());
|
|
|
+ }
|
|
|
+
|
|
|
+ public void parseJSONObjectToDomain(JSONObject jsonObject,String deviceCode){
|
|
|
+ this.st = jsonObject.get("ST").toString();
|
|
|
+ this.fun = jsonObject.get("FUN").toString();
|
|
|
+ this.tt = jsonObject.get("TT").toString();
|
|
|
+ this.tm = jsonObject.get("TM").toString();
|
|
|
+ this.ver = Float.parseFloat(jsonObject.get("VER").toString());
|
|
|
+ this.mark = Integer.parseInt(jsonObject.get("MARK").toString());
|
|
|
+ this.serial = Integer.parseInt(jsonObject.get("SERIAL").toString());
|
|
|
+ this.type = jsonObject.get("TYPE").toString();
|
|
|
+ this.dtemp = Float.parseFloat(jsonObject.get("DTEMP").toString());
|
|
|
+ this.bat = Integer.parseInt(jsonObject.get("BAT").toString());
|
|
|
+ this.signal = Integer.parseInt(jsonObject.get("SIGNAL").toString());
|
|
|
+ this.vt = Float.parseFloat(jsonObject.get("VT").toString());
|
|
|
+ this.deviceCode = deviceCode;
|
|
|
}
|
|
|
}
|
|
|
|