传感器采集、展示数据添加版本号

This commit is contained in:
zhanghan11 2024-08-09 17:06:07 +08:00
parent 0306205381
commit 02bf9e9dcb
5 changed files with 53 additions and 2 deletions

View File

@ -73,6 +73,7 @@ public class IPCDataUploadSyncThread implements Runnable {
// fields.put("vy",vy[new Random().nextInt(8)]); // fields.put("vy",vy[new Random().nextInt(8)]);
// fields.put("vz",vz[new Random().nextInt(8)]); // fields.put("vz",vz[new Random().nextInt(8)]);
// fields.put("bat", "90"); // fields.put("bat", "90");
// fields.put("ver", "v0.0.1");
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS"); // SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
// String format = simpleDateFormat.format(new Date()); // String format = simpleDateFormat.format(new Date());
// fields.put("insertTime", format); // fields.put("insertTime", format);

View File

@ -64,6 +64,12 @@ public class IpcBg4gszhp01tempdata extends BaseEntity
@JsonProperty(value="WData") @JsonProperty(value="WData")
private String WData; private String WData;
/** 版本号 */
// TODO 待确认参数名称
@Excel(name = "版本号")
@JsonProperty(value="Ver")
private String Ver;
public Integer getId() { public Integer getId() {
return id; return id;
} }
@ -144,6 +150,14 @@ public class IpcBg4gszhp01tempdata extends BaseEntity
this.WData = WData; this.WData = WData;
} }
public String getVer() {
return Ver;
}
public void setVer(String ver) {
Ver = ver;
}
@Override @Override
public String toString() { public String toString() {
return "IpcBg4gszhp01tempdata{" + return "IpcBg4gszhp01tempdata{" +

View File

@ -15,17 +15,22 @@ public class IpcSensorData {
private String vy ; private String vy ;
@Excel(name = "振动z轴") @Excel(name = "振动z轴")
private String vz ; private String vz ;
@Excel(name = "版本号")
private String ver ;
@Excel(name = "电池电量")
private String bat;
public IpcSensorData() { 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.insertTime = insertTime;
this.stime = stime; this.stime = stime;
this.ssat = ssat; this.ssat = ssat;
this.vx = vx; this.vx = vx;
this.vy = vy; this.vy = vy;
this.vz = vz; this.vz = vz;
this.ver = ver;
this.bat = bat;
} }
public String getInsertTime() { public String getInsertTime() {
@ -76,6 +81,22 @@ public class IpcSensorData {
this.vz = vz; 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 @Override
public String toString() { public String toString() {
return "IpcSensorData{" + return "IpcSensorData{" +

View File

@ -66,6 +66,7 @@ public class IpcDataReceiveServiceImpl implements IIpcDataReceiveService {
tags.put("part", ipcMonitorField.get().getFieldValue()); tags.put("part", ipcMonitorField.get().getFieldValue());
Map<String, Object> fields = new TreeMap(); Map<String, Object> fields = new TreeMap();
fields.put("ssat", ipcBg4gszhp01tempdataX.getTemp()); fields.put("ssat", ipcBg4gszhp01tempdataX.getTemp());
fields.put("ver", ipcBg4gszhp01tempdataX.getVer());
fields.put("vx", ipcBg4gszhp01tempdataX.getWData()); fields.put("vx", ipcBg4gszhp01tempdataX.getWData());
fields.put("vy", ipcBg4gszhp01tempdataY.getWData()); fields.put("vy", ipcBg4gszhp01tempdataY.getWData());
fields.put("vz", ipcBg4gszhp01tempdataZ.getWData()); fields.put("vz", ipcBg4gszhp01tempdataZ.getWData());

View File

@ -123,6 +123,20 @@
prop="vz" prop="vz"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column
label="版本号"
align="center"
key="ver"
prop="ver"
show-overflow-tooltip
/>
<el-table-column
label="电池电量"
align="center"
key="bat"
prop="bat"
show-overflow-tooltip
/>
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"