From 02bf9e9dcbc66023abfac9a881d7d407f64bcc65 Mon Sep 17 00:00:00 2001 From: zhanghan11 Date: Fri, 9 Aug 2024 17:06:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=A0=E6=84=9F=E5=99=A8=E9=87=87=E9=9B=86?= =?UTF-8?q?=E3=80=81=E5=B1=95=E7=A4=BA=E6=95=B0=E6=8D=AE=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modbus/IPCDataUploadSyncThread.java | 1 + .../ipc/domain/IpcBg4gszhp01tempdata.java | 14 +++++++++++ .../com/inspur/ipc/domain/IpcSensorData.java | 25 +++++++++++++++++-- .../impl/IpcDataReceiveServiceImpl.java | 1 + .../src/views/ipc/dataLog/sensorDataLog.vue | 14 +++++++++++ 5 files changed, 53 insertions(+), 2 deletions(-) diff --git a/tzipc-server/tzipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCDataUploadSyncThread.java b/tzipc-server/tzipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCDataUploadSyncThread.java index 0f28165..226c84e 100644 --- a/tzipc-server/tzipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCDataUploadSyncThread.java +++ b/tzipc-server/tzipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCDataUploadSyncThread.java @@ -73,6 +73,7 @@ public class IPCDataUploadSyncThread implements Runnable { // fields.put("vy",vy[new Random().nextInt(8)]); // fields.put("vz",vz[new Random().nextInt(8)]); // fields.put("bat", "90"); +// fields.put("ver", "v0.0.1"); // SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS"); // String format = simpleDateFormat.format(new Date()); // fields.put("insertTime", format); diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/domain/IpcBg4gszhp01tempdata.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/domain/IpcBg4gszhp01tempdata.java index e50a8ff..0a76838 100644 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/domain/IpcBg4gszhp01tempdata.java +++ b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/domain/IpcBg4gszhp01tempdata.java @@ -64,6 +64,12 @@ public class IpcBg4gszhp01tempdata extends BaseEntity @JsonProperty(value="WData") private String WData; + /** 版本号 */ + // TODO 待确认参数名称 + @Excel(name = "版本号") + @JsonProperty(value="Ver") + private String Ver; + public Integer getId() { return id; } @@ -144,6 +150,14 @@ public class IpcBg4gszhp01tempdata extends BaseEntity this.WData = WData; } + public String getVer() { + return Ver; + } + + public void setVer(String ver) { + Ver = ver; + } + @Override public String toString() { return "IpcBg4gszhp01tempdata{" + diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/domain/IpcSensorData.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/domain/IpcSensorData.java index 8542b0a..400f3b5 100644 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/domain/IpcSensorData.java +++ b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/domain/IpcSensorData.java @@ -15,17 +15,22 @@ public class IpcSensorData { private String vy ; @Excel(name = "振动z轴") private String vz ; - + @Excel(name = "版本号") + private String ver ; + @Excel(name = "电池电量") + private String bat; public IpcSensorData() { } - public IpcSensorData(String insertTime, String stime, String ssat, String vx, String vy, String vz) { + public IpcSensorData(String insertTime, String stime, String ssat, String vx, String vy, String vz, String ver, String bat) { this.insertTime = insertTime; this.stime = stime; this.ssat = ssat; this.vx = vx; this.vy = vy; this.vz = vz; + this.ver = ver; + this.bat = bat; } public String getInsertTime() { @@ -76,6 +81,22 @@ public class IpcSensorData { this.vz = vz; } + public String getVer() { + return ver; + } + + public void setVer(String ver) { + this.ver = ver; + } + + public String getBat() { + return bat; + } + + public void setBat(String bat) { + this.bat = bat; + } + @Override public String toString() { return "IpcSensorData{" + diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcDataReceiveServiceImpl.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcDataReceiveServiceImpl.java index 101883d..1b27e0c 100644 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcDataReceiveServiceImpl.java +++ b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcDataReceiveServiceImpl.java @@ -66,6 +66,7 @@ public class IpcDataReceiveServiceImpl implements IIpcDataReceiveService { tags.put("part", ipcMonitorField.get().getFieldValue()); Map fields = new TreeMap(); fields.put("ssat", ipcBg4gszhp01tempdataX.getTemp()); + fields.put("ver", ipcBg4gszhp01tempdataX.getVer()); fields.put("vx", ipcBg4gszhp01tempdataX.getWData()); fields.put("vy", ipcBg4gszhp01tempdataY.getWData()); fields.put("vz", ipcBg4gszhp01tempdataZ.getWData()); diff --git a/tzipc-ui/src/views/ipc/dataLog/sensorDataLog.vue b/tzipc-ui/src/views/ipc/dataLog/sensorDataLog.vue index a061272..734ef6d 100644 --- a/tzipc-ui/src/views/ipc/dataLog/sensorDataLog.vue +++ b/tzipc-ui/src/views/ipc/dataLog/sensorDataLog.vue @@ -123,6 +123,20 @@ prop="vz" show-overflow-tooltip /> + +