Commit 896f3ccf authored by KeYong's avatar KeYong

修稿告警监测告警数据统计查询bug

parent 7f712862
...@@ -1450,6 +1450,7 @@ ...@@ -1450,6 +1450,7 @@
LEFT JOIN wl_equipment_specific wes ON wes.id = wlesal.equipment_specific_id LEFT JOIN wl_equipment_specific wes ON wes.id = wlesal.equipment_specific_id
LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET( fs.id, wlesal.system_ids ) LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET( fs.id, wlesal.system_ids )
<where> <where>
fs.system_type_code IS NOT NULL
<if test="bizOrgCode != null and bizOrgCode != ''"> <if test="bizOrgCode != null and bizOrgCode != ''">
and wlesal.biz_org_code like concat(#{bizOrgCode},'%') and wlesal.biz_org_code like concat(#{bizOrgCode},'%')
</if> </if>
...@@ -1463,7 +1464,7 @@ ...@@ -1463,7 +1464,7 @@
AND DATE_FORMAT( #{endDate}, '%Y-%m-%d %H:%i:%s' ) >= wlesal.create_date AND DATE_FORMAT( #{endDate}, '%Y-%m-%d %H:%i:%s' ) >= wlesal.create_date
</if> </if>
<if test="systemCode != null and systemCode != ''"> <if test="systemCode != null and systemCode != ''">
and fs.code = #{systemCode} and fs.system_type = #{systemCode}
</if> </if>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and wlesal.equipment_specific_name like concat('%', #{name},'%') and wlesal.equipment_specific_name like concat('%', #{name},'%')
......
...@@ -7208,13 +7208,14 @@ ...@@ -7208,13 +7208,14 @@
<select id="getSystemAlarmNum" resultType="Map"> <select id="getSystemAlarmNum" resultType="Map">
SELECT SELECT
wlesal.id AS `key`, fs.system_type AS `key`,
SUM(IF( wlesal.`status` = 1, 1, 0 )) AS `value`, SUM(IF( wlesal.`status` = 1, 1, 0 )) AS `value`,
fs.name AS `name` fs.name AS `name`
FROM FROM
wl_equipment_specific_alarm_log wlesal wl_equipment_specific_alarm_log wlesal
LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET( fs.id, wlesal.system_ids ) <![CDATA[<>]]> 0 LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET( fs.id, wlesal.system_ids ) <![CDATA[<>]]> 0
<where> <where>
fs.system_type_code IS NOT NULL
<if test="bizOrgCode!=null and bizOrgCode!=''"> <if test="bizOrgCode!=null and bizOrgCode!=''">
AND wlesal.biz_org_code LIKE CONCAT(#{bizOrgCode},'%') AND wlesal.biz_org_code LIKE CONCAT(#{bizOrgCode},'%')
</if> </if>
......
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