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;
......
......@@ -255,7 +255,7 @@
boundaryGap: false, //控制日期是否在中间显示
axisLabel: {
show: true, //是否显示日期
interval: 'auto', //强制显示全部
interval: 'auto', //强制显示全部
rotate: 40,//倾斜的角度
textStyle: {
color: '#000', //日期的颜色
......@@ -351,7 +351,7 @@
boundaryGap: false, //控制日期是否在中间显示
axisLabel: {
show: true, //是否显示日期
interval: 'auto', //强制显示全部
interval: 'auto', //强制显示全部
rotate: 40,//倾斜的角度
textStyle: {
color: '#000', //日期的颜色
......@@ -443,7 +443,7 @@
boundaryGap: false, //控制日期是否在中间显示
axisLabel: {
show: true, //是否显示日期
// interval: 0, //强制显示全部
// interval: 0, //强制显示全部
rotate: 40,//倾斜的角度
textStyle: {
color: '#000', //日期的颜色
......@@ -517,7 +517,7 @@
boundaryGap: false, //控制日期是否在中间显示
axisLabel: {
show: true, //是否显示日期
// interval: 0, //强制显示全部
// interval: 0, //强制显示全部
rotate: 40,//倾斜的角度
textStyle: {
color: '#000', //日期的颜色
......@@ -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;
......@@ -608,8 +612,8 @@
if("4" == deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.PRESSUREGAGE, this.form,"false")
}
var getData1 = [];
var getData2 = [];
......@@ -619,17 +623,18 @@
var getData6 = [];
var getData7 = [];
//先进行赋值
for (let i = 0; i < this.form.deviceReportDataList.length; i++) {
getData1.push( this.form.deviceReportDataList[i].standardConditionFlow)
getData2.push(this.form.deviceReportDataList[i].workingConditionFlow)
getData3.push(this.dateFtt("hh:mm:ss",new Date(this.form.deviceReportDataList[i].createTime)))
getData4.push(this.form.deviceReportDataList[i].standardConditionAccumulation)
getData5.push(this.form.deviceReportDataList[i].workingConditionAccumulation)
getData6.push(this.form.deviceReportDataList[i].temperature)
getData7.push(this.form.deviceReportDataList[i].pressure)
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)
getData3.push(this.dateFtt("hh:mm:ss",new Date(this.form.deviceReportDataList[i].createTime)))
getData4.push(this.form.deviceReportDataList[i].standardConditionAccumulation)
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);
......@@ -657,22 +662,22 @@
}
});
},
dateFtt(fmt,date) { //author: meizz
var o = {
"M+" : date.getMonth()+1, //月份
"d+" : date.getDate(), //日
"h+" : date.getHours(), //小时
"m+" : date.getMinutes(), //分
"s+" : date.getSeconds(), //秒
"q+" : Math.floor((date.getMonth()+3)/3), //季度
"S" : date.getMilliseconds() //毫秒
};
if(/(y+)/.test(fmt))
fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length));
for(var k in o)
if(new RegExp("("+ k +")").test(fmt))
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
return fmt;
dateFtt(fmt,date) { //author: meizz
var o = {
"M+" : date.getMonth()+1, //月份
"d+" : date.getDate(), //日
"h+" : date.getHours(), //小时
"m+" : date.getMinutes(), //分
"s+" : date.getSeconds(), //秒
"q+" : Math.floor((date.getMonth()+3)/3), //季度
"S" : date.getMilliseconds() //毫秒
};
if(/(y+)/.test(fmt))
fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length));
for(var k in o)
if(new RegExp("("+ k +")").test(fmt))
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
return fmt;
}
}
......
......@@ -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