Commit e17e8ecc authored by zhangsen's avatar zhangsen

bug修改

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