Commit 2223c204 authored by zhangsen's avatar zhangsen

修改 td

parent cfd3c83e
...@@ -636,7 +636,7 @@ public class TDBigScreenAnalyseController extends BaseController { ...@@ -636,7 +636,7 @@ public class TDBigScreenAnalyseController extends BaseController {
equipmentName = java.net.URLDecoder.decode(equipmentName,"UTF-8"); equipmentName = java.net.URLDecoder.decode(equipmentName,"UTF-8");
StationBasic stationBasic = stationBasicMapper.selectById(stationId); StationBasic stationBasic = stationBasicMapper.selectById(stationId);
// List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getPvHealthInfoBySubSystem(equipmentName, stationBasic.getFanGatewayId()); // List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getPvHealthInfoBySubSystem(equipmentName, stationBasic.getFanGatewayId());
List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getPvWarningInfoBySubSystem(equipmentName, stationBasic.getFanGatewayId()); List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getPvWarningInfoBySubSystemTd(equipmentName, stationBasic.getFanGatewayId());
Map<Object, String> equipmentHealthIndexMap = healthListInfo.stream().collect(Collectors.toMap(t -> t.get("pointName"), t -> t.get("warningName").toString())); Map<Object, String> equipmentHealthIndexMap = healthListInfo.stream().collect(Collectors.toMap(t -> t.get("pointName"), t -> t.get("warningName").toString()));
List<Map<String, Object>> pointNameList = idxBizFanHealthIndexMapper.getPvPointNameListBySumSystem(stationBasic.getFanGatewayId(), equipmentName); List<Map<String, Object>> pointNameList = idxBizFanHealthIndexMapper.getPvPointNameListBySumSystem(stationBasic.getFanGatewayId(), equipmentName);
pointNameList.forEach(item -> { pointNameList.forEach(item -> {
......
...@@ -86,6 +86,8 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn ...@@ -86,6 +86,8 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
List<Map<String, Object>> getPvHealthInfoBySubSystem(@Param("equipmentName") String equipmentName, @Param("gatewayId") String gatewayId); List<Map<String, Object>> getPvHealthInfoBySubSystem(@Param("equipmentName") String equipmentName, @Param("gatewayId") String gatewayId);
List<Map<String, Object>> getPvWarningInfoBySubSystem(@Param("equipmentName") String equipmentName, @Param("gatewayId") String gatewayId); List<Map<String, Object>> getPvWarningInfoBySubSystem(@Param("equipmentName") String equipmentName, @Param("gatewayId") String gatewayId);
List<Map<String, Object>> getPvWarningInfoBySubSystemTd(@Param("equipmentName") String equipmentName, @Param("gatewayId") String gatewayId);
List<Map<String, Object>> getPvPointNameListBySumSystem(@Param("gatewayId") String gatewayId, @Param("equipmentName") String equipmentName); List<Map<String, Object>> getPvPointNameListBySumSystem(@Param("gatewayId") String gatewayId, @Param("equipmentName") String equipmentName);
......
...@@ -616,7 +616,7 @@ ...@@ -616,7 +616,7 @@
IFNULL( round(AVG( HEALTH_INDEX ), 2), 0 ) AS avgHealthIndex, IFNULL( round(AVG( HEALTH_INDEX ), 2), 0 ) AS avgHealthIndex,
SUBARRAY as subarray SUBARRAY as subarray
FROM FROM
idx_biz_pv_health_index pv_health_index_latest_data
<where> <where>
ANALYSIS_OBJ_TYPE = '子阵' ANALYSIS_OBJ_TYPE = '子阵'
AND ANALYSIS_TYPE = '按天' AND ANALYSIS_TYPE = '按天'
...@@ -634,7 +634,7 @@ ...@@ -634,7 +634,7 @@
CEILING(IFNULL( AVG( HEALTH_INDEX ), 100 )) AS avgHealthIndex, CEILING(IFNULL( AVG( HEALTH_INDEX ), 100 )) AS avgHealthIndex,
EQUIPMENT_NAME AS equipmentName EQUIPMENT_NAME AS equipmentName
FROM FROM
idx_biz_pv_health_index pv_health_index_latest_data
<where> <where>
ANALYSIS_OBJ_TYPE = '设备' ANALYSIS_OBJ_TYPE = '设备'
AND ANALYSIS_TYPE = '按天' AND ANALYSIS_TYPE = '按天'
...@@ -1751,4 +1751,23 @@ ...@@ -1751,4 +1751,23 @@
AND index_address = #{indexAddress} AND index_address = #{indexAddress}
AND gateway_id = #{fanGatewayId} AND gateway_id = #{fanGatewayId}
</select> </select>
<select id="getPvWarningInfoBySubSystemTd" resultType="java.util.Map">
SELECT
point_name as pointName,
warning_name as warningName,
last(ts)
FROM
pv_warning_record
<where>
disposotion_state = '未处置'
<if test="equipmentName != null and equipmentName != ''">
AND equipment_name = #{equipmentName}
</if>
<if test="gatewayId != null and gatewayId != ''">
AND gateway_id = #{gatewayId}
</if>
</where>
group by point_name
</select>
</mapper> </mapper>
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