Commit e17e8ecc authored by zhangsen's avatar zhangsen

bug修改

parent 70c4b44d
...@@ -277,11 +277,13 @@ ...@@ -277,11 +277,13 @@
<select id="getAllEquipAlarmInfoAnalysisByStationType" resultType="java.util.Map"> <select id="getAllEquipAlarmInfoAnalysisByStationType" resultType="java.util.Map">
SELECT SELECT
( SELECT POINT_NAME FROM ${tableName2} WHERE GATEWAY_ID = a.GATEWAY_ID AND INDEX_ADDRESS = a.INDEX_ADDRESS ) AS pointName, <!-- ( SELECT POINT_NAME FROM ${tableName2} WHERE GATEWAY_ID = a.GATEWAY_ID AND INDEX_ADDRESS = a.INDEX_ADDRESS ) AS pointName,-->
b.POINT_NAME as pointName,
a.WARNING_NAME as warningName, a.WARNING_NAME as warningName,
count(1) as num count(1) as num
FROM FROM
${tableName} a ${tableName} a
LEFT JOIN ${tableName2} b on b.GATEWAY_ID = a.GATEWAY_ID and b.INDEX_ADDRESS = a.INDEX_ADDRESS
<where> <where>
<if test="areaCode != null and areaCode != ''"> <if test="areaCode != null and areaCode != ''">
a.ARAE like concat('%', #{areaCode}, '%') a.ARAE like concat('%', #{areaCode}, '%')
...@@ -299,33 +301,35 @@ ...@@ -299,33 +301,35 @@
FROM FROM
( (
SELECT SELECT
( SELECT POINT_NAME FROM idx_biz_pv_point_process_variable_classification WHERE GATEWAY_ID = idx_biz_pv_warning_record.GATEWAY_ID AND INDEX_ADDRESS = idx_biz_pv_warning_record.INDEX_ADDRESS ) AS pointName, wr.WARNING_NAME AS warningName,
WARNING_NAME AS warningName, vc.POINT_NAME AS pointName,
count( 1 ) AS num count( 1 ) AS num
FROM FROM
idx_biz_pv_warning_record idx_biz_pv_warning_record wr
LEFT JOIN idx_biz_pv_point_process_variable_classification vc on vc.GATEWAY_ID = wr.GATEWAY_ID and vc.INDEX_ADDRESS = wr.INDEX_ADDRESS
<where> <where>
<if test="areaCode != null and areaCode != ''"> <if test="areaCode != null and areaCode != ''">
ARAE like concat('%', #{areaCode}, '%') wr.ARAE like concat('%', #{areaCode}, '%')
</if> </if>
</where> </where>
GROUP BY GROUP BY
pointName, pointName,
WARNING_NAME UNION ALL warningName UNION ALL
SELECT SELECT
( SELECT POINT_NAME FROM idx_biz_fan_point_process_variable_classification WHERE GATEWAY_ID = idx_biz_fan_warning_record.GATEWAY_ID AND INDEX_ADDRESS = idx_biz_fan_warning_record.INDEX_ADDRESS ) AS pointName, wr.WARNING_NAME AS warningName,
WARNING_NAME AS warningName, vc.POINT_NAME AS pointName,
count( 1 ) AS num count( 1 ) AS num
FROM FROM
idx_biz_fan_warning_record idx_biz_fan_warning_record wr
LEFT JOIN idx_biz_fan_point_process_variable_classification vc on vc.GATEWAY_ID = wr.GATEWAY_ID and vc.INDEX_ADDRESS = wr.INDEX_ADDRESS
<where> <where>
<if test="areaCode != null and areaCode != ''"> <if test="areaCode != null and areaCode != ''">
ARAE like concat('%', #{areaCode}, '%') wr.ARAE like concat('%', #{areaCode}, '%')
</if> </if>
</where> </where>
GROUP BY GROUP BY
pointName, pointName,
WARNING_NAME warningName
) a ) a
WHERE WHERE
a.pointName IS NOT NULL a.pointName IS NOT NULL
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
AND a.GATEWAY_ID = #{stationId} AND a.GATEWAY_ID = #{stationId}
</if> </if>
</where> </where>
order by REC_DATE DESC
limit #{current}, #{size} limit #{current}, #{size}
</select> </select>
......
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