Commit 6e0c7f24 authored by xulihui's avatar xulihui

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

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