Commit 6e0c7f24 authored by xulihui's avatar xulihui

修改大屏数据查询统计和报错和无数据显示异常

parent 976ad70b
......@@ -32,6 +32,8 @@ public class DeviceData {
private String iconUrl;
private String enterId;
//下级设备数据封装类数组
private List<SubordinateEquipmentList> subordinateEquipmentList;
......@@ -97,6 +99,14 @@ public class DeviceData {
this.iconUrl = iconUrl;
}
public String getEnterId() {
return enterId;
}
public void setEnterId(String enterId) {
this.enterId = enterId;
}
public List<SubordinateEquipmentList> getSubordinateEquipmentList() {
return subordinateEquipmentList;
}
......
......@@ -43,6 +43,7 @@ public class PipeDate extends BaseEntity {
private int iconType;
private String enterId;
/**
* 管道名称
......@@ -361,6 +362,14 @@ public class PipeDate extends BaseEntity {
this.unitGasUserResCon = unitGasUserResCon;
}
public String getEnterId() {
return enterId;
}
public void setEnterId(String enterId) {
this.enterId = enterId;
}
@Override
public String toString() {
return "PipeDate{" +
......
......@@ -90,6 +90,8 @@ public class TSiteStationInfoData {
private String address;
private String enterId;
public String getAddress() {
return address;
}
......@@ -98,6 +100,14 @@ public class TSiteStationInfoData {
this.address = address;
}
public String getEnterId() {
return enterId;
}
public void setEnterId(String enterId) {
this.enterId = enterId;
}
public String getPictureAddress() {
return pictureAddress;
}
......
......@@ -16,14 +16,14 @@ public interface PipeInterfaceMapper {
* 查询管道数据列表
* @return
*/
List<PipeDate> selectPipeData(String enterId);
List<PipeDate> selectPipeData(@Param("enterId") String enterId);
/**
* 按照名称查询管道数据列表
* @return
*/
List<PipeDate> getPipeForSelect(String enterId);
List<PipeDate> getPipeForSelect(@Param("enterId") String enterId);
/**
* 按照企业id he
......@@ -42,27 +42,27 @@ public interface PipeInterfaceMapper {
* 调压箱数据查询方法
* @return
*/
List<DeviceData> selectDeviceData(String enterId);
List<DeviceData> selectDeviceData(@Param("enterId") String enterId);
/**
* 查询下级设备数据
* @param deviceId
* @return
*/
List<PressureFlow> selectPressureFlow(String deviceId);
List<PressureFlow> selectPressureFlow(@Param("deviceId") String deviceId);
/**
* 场站信息查询方法
* @return
*/
List<TSiteStationInfoData> selectTSiteStationInfoData(String enterId);
List<TSiteStationInfoData> selectTSiteStationInfoData(@Param("enterId") String enterId);
/**
* 查询场站下级数据
* @param siteStationId
* @return
*/
List<PressureFlow> selecttSiteStationInfoDataList(String siteStationId);
List<PressureFlow> selecttSiteStationInfoDataList(@Param("siteStationId") String siteStationId);
/**
* 监控信息查询
......@@ -86,7 +86,7 @@ public interface PipeInterfaceMapper {
* 查询阀门井数据
* @return
*/
List<DeviceData> selectvalveData(String enterId);
List<DeviceData> selectvalveData(@Param("enterId") String enterId);
/**
* 查询下级在线设备数量
......
......@@ -115,27 +115,27 @@
</resultMap>
<!--查询管道数据列表-->
<select id="selectPipeData" parameterType="PipeDate" resultMap="PipeDateResult">
<select id="selectPipeData" resultMap="PipeDateResult">
select format(pipe_length,2)pipe_length,pipe_name,pipe_pressure,beyond_enterprise_id,pipe_id,pipe_diameter,pipe_material,buried_depth,pipe_trend,build_date,pipe_addr,coordinates,remarks,build_unit,beyond_enterprise_name from t_pipe_info
where is_del='0'
<if test="enterId != null and enterId != 0">
<if test="enterId != null">
and beyond_enterprise_id=#{enterId}
</if>
</select>
<!--查询管道数据列表-->
<select id="getPipeForSelect" parameterType="PipeDate" resultMap="PipeDateResult">
<select id="getPipeForSelect" resultMap="PipeDateResult">
select format(pipe_length,2)pipe_length,pipe_pressure,beyond_enterprise_id,pipe_id,pipe_diameter,pipe_material,
buried_depth,pipe_trend,build_date,pipe_addr,coordinates,remarks,build_unit,beyond_enterprise_name,
pipe_name,detaild_address,ind_reg_auth,ind_reg_auth_per,ind_reg_auth_per_con,key_areas_gas_usage,
aff_gas_com,aff_gas_com_sec_per,aff_gas_com_sec_per_con,sec_check_time,unit_gas_user_res,unit_gas_user_res_con from t_pipe_info
where is_del='0' and pipe_name is not null
<if test="enterId != null and enterId != 0">
<if test="enterId != null">
and beyond_enterprise_id=#{enterId}
</if>
</select>
<select id="getPipeBypipeId" parameterType="PipeDate" resultMap="PipeDateResult">
<select id="getPipeBypipeId" resultMap="PipeDateResult">
select format(pipe_length,2)pipe_length,pipe_pressure,beyond_enterprise_id,pipe_id,pipe_diameter,pipe_material,
buried_depth,pipe_trend,build_date,pipe_addr,coordinates,remarks,build_unit,beyond_enterprise_name,
pipe_name,detaild_address,ind_reg_auth,ind_reg_auth_per,ind_reg_auth_per_con,key_areas_gas_usage,
......@@ -144,7 +144,7 @@
</select>
<!--获取分组数据-->
<select id="selectGroupPipeData" parameterType="PipeDate" resultMap="PipeDateResult">
<select id="selectGroupPipeData" resultMap="PipeDateResult">
select beyond_enterprise_id,pipe_id,pipe_diameter,pipe_material,buried_depth,pipe_trend,build_date,pipe_addr,coordinates,remarks,build_unit,beyond_enterprise_name from t_pipe_info
where is_del='0'
group by beyond_enterprise_name
......@@ -154,13 +154,13 @@
<select id="selectDeviceData" resultMap="DeviceDateResult">
select beyond_enterprise_id,icon_url,device_id,device_type,device_name,device_code,device_addr,longitude,latitude,beyond_enterprise_name from t_device_info
where device_type='2' and is_del='0'
<if test="enterId != null and enterId != 0">
<if test="enterId != null">
and beyond_enterprise_id=#{enterId}
</if>
</select>
<!--查询下级设备数据-->
<select id="selectPressureFlow" parameterType="java.util.List" resultMap="PressureFlowResult">
<select id="selectPressureFlow" resultMap="PressureFlowResult">
select device_model,device_type,create_time,relation_device_id,iot_no from t_relation_device_detail_info
where relation_device_type='1' and relation_device_id = #{deviceId}
</select>
......@@ -169,15 +169,15 @@
<select id="selectTSiteStationInfoData" resultMap="TSiteStationInfoDataResult">
select beyond_enterprise_id,picture_address,site_station_id,site_station_name,site_station_type,longitude,latitude,address,create_time,build_unit,beyond_enterprise_name
from t_site_station_info where is_del='0'
<if test="enterId != null and enterId != 0">
<if test="enterId != null">
and beyond_enterprise_id=#{enterId}
</if>
</select>
<!--查询场站下级数据-->
<select id="selecttSiteStationInfoDataList" parameterType="DeviceData" resultMap="PressureFlowResult">
<select id="selecttSiteStationInfoDataList" resultMap="PressureFlowResult">
select device_model,device_type,create_time,relation_device_id from t_relation_device_detail_info
where relation_device_type='2' and relation_device_id = #{deviceId}
where relation_device_type='2' and relation_device_id = #{siteStationId}
</select>
<!--监控信息查询-->
......@@ -201,7 +201,7 @@
<select id="selectvalveData" resultMap="DeviceDateResult">
select beyond_enterprise_id,device_id,icon_url,device_type,device_name,device_code,device_addr,longitude,latitude,beyond_enterprise_name from t_device_info
where device_type='1' and is_del='0'
<if test="enterId != null and enterId != 0">
<if test="enterId != null">
and beyond_enterprise_id=#{enterId}
</if>
</select>
......
......@@ -37,7 +37,7 @@
从业人员数(人)
</div>
<div class="div-p-value">
{{ allNum.peopleNum }}
{{ allNum.peopleNum || 0 }}
</div>
<div></div>
</div>
......@@ -56,7 +56,7 @@
<div class="div-p" @click="$router.push('/regulation/pipe')">
管道长度(m)
</div>
<div class="div-p-value">{{ allNum.allPipeLength }}</div>
<div class="div-p-value">{{ allNum.allPipeLength || 0 }}</div>
</div>
</div>
</div>
......@@ -81,11 +81,11 @@
<div class="titleTex">
<div class="titleTex-item">
<span>已完成巡检</span>
<span class="b">{{ allNum.typeOne }}</span>
<span class="b">{{ allNum.typeOne || 0 }}</span>
</div>
<div class="titleTex-item">
<span>未完成巡检</span>
<span class="b">{{ allNum.typeTwo }}</span>
<span class="b">{{ allNum.typeTwo || 0 }}</span>
</div>
</div>
</div>
......@@ -98,11 +98,11 @@
<div class="titleTex">
<div class="titleTex-item">
<span>已完成整治</span>
<span class="b">{{ allNum.hiddenBookFinish }}</span>
<span class="b">{{ allNum.hiddenBookFinish || 0 }}</span>
</div>
<div class="titleTex-item">
<span>未完成整治</span>
<span class="b">{{ allNum.hiddenBookUnFinish }}</span>
<span class="b">{{ allNum.hiddenBookUnFinish || 0 }}</span>
</div>
</div>
</div>
......@@ -279,7 +279,7 @@ export default {
pieone.setOption({
title: {
text: "总量",
subtext: this.allNum.typeOne + this.allNum.typeTwo || "0",
subtext: (this.allNum.typeOne || 0) + (this.allNum.typeTwo || 0),
left: "center",
top: 25,
textStyle: {
......@@ -334,7 +334,7 @@ export default {
pietwo.setOption({
title: {
text: "总量",
subtext: this.allNum.hiddenBookFinish + this.allNum.hiddenBookUnFinish || "0",
subtext: (this.allNum.hiddenBookFinish || 0) + (this.allNum.hiddenBookUnFinish || 0),
left: "center",
top: 25,
textStyle: {
......
......@@ -608,7 +608,7 @@ export default {
this.enterpriseIds.enterpriseId = val.toString();
selectDeviceNum(this.enterpriseIds).then((response) => {
console.log(response);
this.allNum = response.data;
this.allNum = response.data || {};
this.drawLine();
});
} else {
......
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