瀏覽代碼

传感器推送数据TM修改空格

lchao 2 年之前
父節點
當前提交
b45a770a96

+ 0 - 3
ruoyi-admin/src/main/java/com/ruoyi/tcp/TcpServer.java

@@ -3,14 +3,11 @@ package com.ruoyi.tcp;
 import cn.hutool.core.io.BufferUtil;
 import cn.hutool.core.io.IORuntimeException;
 import cn.hutool.core.io.IoUtil;
-import cn.hutool.core.lang.Console;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.http.HttpRequest;
 import cn.hutool.socket.nio.NioServer;
 import com.alibaba.fastjson.JSONObject;
-import com.dahuatech.hutool.core.convert.Convert;
 import com.ruoyi.framework.web.service.ConfigService;
-import com.ruoyi.tcp.domain.InputLine;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.boot.CommandLineRunner;

+ 0 - 235
ruoyi-admin/src/main/java/com/ruoyi/tcp/domain/InputLine.java

@@ -1,235 +0,0 @@
-package com.ruoyi.tcp.domain;
-
-import com.alibaba.fastjson.JSONObject;
-import com.ruoyi.common.core.domain.BaseEntity;
-
-public class InputLine extends BaseEntity {
-
-    /** 测站唯一编码 */
-    private String st;
-
-    /** 功能码 */
-    private String fun;
-
-    /** 数据采集时间 */
-    private String tt;
-
-    /** 通讯时间 */
-    private String tm;
-
-    /** 版本 */
-    private Float ver;
-
-    /** 传输标志 */
-    private Integer mark;
-
-    /** 数据包流水号 */
-    private Integer serial;
-
-    /** 测站类型 */
-    private String type;
-
-    /** 设备温度 */
-    private Float dtemp;
-
-    /** 电池电量 */
-    private Integer bat;
-
-    /** 设备通讯信号强度 */
-    private Integer signal;
-
-    /** 设备电池电压 */
-    private Float vt;
-
-    /** 设备编码 */
-    private String deviceCode;
-
-    private String q1;
-
-    private String v1;
-
-    private String z1;
-
-    private String q;
-
-    private String cq1;
-
-
-
-
-    public String getSt() {
-        return st;
-    }
-
-    public void setSt(String st) {
-        this.st = st;
-    }
-
-    public String getFun() {
-        return fun;
-    }
-
-    public void setFun(String fun) {
-        this.fun = fun;
-    }
-
-    public String getTt() {
-        return tt;
-    }
-
-    public void setTt(String tt) {
-        this.tt = tt;
-    }
-
-    public String getTm() {
-        return tm;
-    }
-
-    public void setTm(String tm) {
-        this.tm = tm;
-    }
-
-    public Float getVer() {
-        return ver;
-    }
-
-    public void setVer(Float ver) {
-        this.ver = ver;
-    }
-
-    public Integer getMark() {
-        return mark;
-    }
-
-    public void setMark(Integer mark) {
-        this.mark = mark;
-    }
-
-    public Integer getSerial() {
-        return serial;
-    }
-
-    public void setSerial(Integer serial) {
-        this.serial = serial;
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public Float getDtemp() {
-        return dtemp;
-    }
-
-    public void setDtemp(Float dtemp) {
-        this.dtemp = dtemp;
-    }
-
-    public Integer getBat() {
-        return bat;
-    }
-
-    public void setBat(Integer bat) {
-        this.bat = bat;
-    }
-
-    public Integer getSignal() {
-        return signal;
-    }
-
-    public void setSignal(Integer signal) {
-        this.signal = signal;
-    }
-
-    public Float getVt() {
-        return vt;
-    }
-
-    public void setVt(Float vt) {
-        this.vt = vt;
-    }
-
-    public String getDeviceCode() {
-        return deviceCode;
-    }
-
-    public void setDeviceCode(String deviceCode) {
-        this.deviceCode = deviceCode;
-    }
-
-    public String getQ1() {
-        return q1;
-    }
-
-    public void setQ1(String q1) {
-        this.q1 = q1;
-    }
-
-    public String getV1() {
-        return v1;
-    }
-
-    public void setV1(String v1) {
-        this.v1 = v1;
-    }
-
-    public String getZ1() {
-        return z1;
-    }
-
-    public void setZ1(String z1) {
-        this.z1 = z1;
-    }
-
-    public String getQ() {
-        return q;
-    }
-
-    public void setQ(String q) {
-        this.q = q;
-    }
-
-    public String getCq1() {
-        return cq1;
-    }
-
-    public void setCq1(String cq1) {
-        this.cq1 = cq1;
-    }
-
-    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;
-    }
-}
-