Commit f26fb104 authored by 耿迪迪's avatar 耿迪迪

江苏远睿设备问题修改 gengdidi

parent df2a27bf
......@@ -66,6 +66,9 @@ public class TDeviceReportData extends BaseEntity
@Excel(name = "设备状态")
private String deviceStatus;
/**上报设备名称*/
private String reportDeviceName;
public void setDeviceReportDataId(Long deviceReportDataId)
{
this.deviceReportDataId = deviceReportDataId;
......@@ -175,6 +178,14 @@ public class TDeviceReportData extends BaseEntity
return deviceStatus;
}
public String getReportDeviceName() {
return reportDeviceName;
}
public void setReportDeviceName(String reportDeviceName) {
this.reportDeviceName = reportDeviceName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
......@@ -96,6 +96,9 @@ public class DeviceReportDataVo extends BaseEntity
@Excel(name = "设备状态")
private String deviceStatus;
/**上报设备名称*/
private String reportDeviceName;
public void setDeviceReportDataId(Long deviceReportDataId)
{
this.deviceReportDataId = deviceReportDataId;
......@@ -271,4 +274,11 @@ public class DeviceReportDataVo extends BaseEntity
return deviceStatus;
}
public String getReportDeviceName() {
return reportDeviceName;
}
public void setReportDeviceName(String reportDeviceName) {
this.reportDeviceName = reportDeviceName;
}
}
......@@ -41,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="deviceStatus" column="device_status" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="reportDeviceName" column="report_device_name"></result>
</resultMap>
<sql id="selectTDeviceReportDataVo">
......@@ -63,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t.communication_status,
t.create_time,
t.update_time,
t.device_status AS report_device_name,
d.device_id,
d.device_name,
d.device_code,
......@@ -104,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t.communication_status,
t.create_time,
t.update_time,
t.device_status AS report_device_name,
d.device_id,
d.device_name,
d.device_code,
......@@ -146,7 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectTDeviceReportDataByDeviceNum" parameterType="String" resultMap="TDeviceReportDataResult">
select report_time, device_report_data_id, device_num, standard_condition_accumulation, working_condition_accumulation, residual_quantity, standard_condition_flow, working_condition_flow, temperature, pressure, communication_status, device_status, create_time, update_time
select report_time, device_report_data_id, device_num, standard_condition_accumulation, working_condition_accumulation, residual_quantity, standard_condition_flow, working_condition_flow, temperature, pressure, communication_status, device_status, create_time, update_time,device_status AS reportDeviceName
from t_device_report_data
where device_num = #{deviceNum}
ORDER BY create_time DESC
......
......@@ -39,7 +39,7 @@
<el-table-column label="标况累计量(m³)" align="center" prop="standardConditionAccumulation" />
<el-table-column label="工况累计量(m³)" align="center" prop="workingConditionAccumulation" />
<el-table-column label="剩余量(m³)" align="center" prop="residualQuantity" />
<el-table-column label="标况流量(m³/h)" align="center" prop="standardConditionFlow" />
<el-table-column label="标况流量(m³/h)" align="center" prop="standardConditionFlow" width="150px"/>
<el-table-column label="工况流量(m³/h)" align="center" prop="workingConditionFlow" />
<el-table-column label="温度(℃)" align="center" prop="temperature" />
<el-table-column label="压力(KPa)" align="center" prop="pressure" />
......@@ -136,6 +136,11 @@ export default {
this.loading = true;
console.log();
realtimeData(this.queryParams).then(response => {
for(var i =0;i<response.rows.length;i++){
if("江苏远睿气体腰轮流量计" == response.rows[i].reportDeviceName){
response.rows[i].standardConditionFlow += " (Nm³ /h)";
}
}
this.dataList = response.rows;
this.total = response.total;
this.loading = false;
......
......@@ -584,12 +584,16 @@
getData() {
getData(this.deviceId).then(response => {
if("江苏远睿气体腰轮流量计" == response.data.reportDeviceName){
response.data.standardConditionFlow += " (Nm³ /h)";
}
const { deviceName, deviceCode, deviceType, standardConditionAccumulation,
workingConditionAccumulation, residualQuantity, standardConditionFlow, workingConditionFlow, temperature, pressure, createTime, deviceStatus } = response.data;
const obj1 = { deviceName, deviceCode, deviceType, standardConditionAccumulation };
const obj2 = { workingConditionAccumulation, residualQuantity, standardConditionFlow, workingConditionFlow };
const obj3 = { temperature, pressure, createTime, deviceStatus };
this.dataListdetail1.push(obj1);
this.dataListdetail2.push(obj2);
this.dataListdetail3.push(obj3);
this.form = response.data;
......@@ -619,6 +623,7 @@
var getData6 = [];
var getData7 = [];
//先进行赋值
if(null != this.form.deviceReportDataList){
for (let i = 0; i < this.form.deviceReportDataList.length; i++) {
getData1.push( this.form.deviceReportDataList[i].standardConditionFlow)
getData2.push(this.form.deviceReportDataList[i].workingConditionFlow)
......@@ -627,9 +632,9 @@
getData5.push(this.form.deviceReportDataList[i].workingConditionAccumulation)
getData6.push(this.form.deviceReportDataList[i].temperature)
getData7.push(this.form.deviceReportDataList[i].pressure)
}
}
this.initData(getData1, getData2, getData3);
this.drawPieChart(getData4, getData5, getData3);
this.main3(getData6, getData3);
......
......@@ -59,7 +59,7 @@
<el-table-column label="标况累计量(m³)" align="center" prop="standardConditionAccumulation" />
<el-table-column label="工况累计量(m³)" align="center" prop="workingConditionAccumulation" />
<el-table-column label="剩余量(m³)" align="center" prop="residualQuantity" />
<el-table-column label="标况流量(m³/h)" align="center" prop="standardConditionFlow" />
<el-table-column label="标况流量(m³/h)" align="center" prop="standardConditionFlow" width="150px"/>
<el-table-column label="工况流量(m³/h)" align="center" prop="workingConditionFlow" />
<el-table-column label="温度(℃)" align="center" prop="temperature" />
<el-table-column label="压力(KPa)" align="center" prop="pressure" />
......@@ -146,6 +146,11 @@ export default {
getList() {
this.loading = true;
listData(this.queryParams).then(response => {
for(var i =0;i<response.rows.length;i++){
if("江苏远睿气体腰轮流量计" == response.rows[i].reportDeviceName){
response.rows[i].standardConditionFlow += " (Nm³ /h)";
}
}
this.dataList = response.rows;
this.total = response.total;
this.loading = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment