Commit 4aa4b586 authored by KeYong's avatar KeYong

修改站告警监测图查询逻辑,去掉告警状态过滤

parent 8cc0af05
...@@ -2286,7 +2286,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -2286,7 +2286,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
return planTaskMapper.queryPatrolInfo(bizOrgCode, startDate, endDate); return planTaskMapper.queryPatrolInfo(bizOrgCode, startDate, endDate);
} }
private float getPercent(double num1, double num2) { private float getPercent(double num1, double num2) {
if (num2 == 0) { if (num2 == 0) {
return 0; return 0;
} }
......
...@@ -5291,13 +5291,16 @@ ...@@ -5291,13 +5291,16 @@
<if test="sortField == 'eligibility'"> <if test="sortField == 'eligibility'">
<choose> <choose>
<when test="sortOrder == 'ascend'"> <when test="sortOrder == 'ascend'">
ORDER BY d.eligibility ASC ORDER BY d.eligibility ASC, CONVERT(c.bizOrgName USING gbk) ASC
</when> </when>
<otherwise> <otherwise>
ORDER BY d.eligibility DESC ORDER BY d.eligibility DESC, CONVERT(c.bizOrgName USING gbk) ASC
</otherwise> </otherwise>
</choose> </choose>
</if> </if>
<if test="sortField == null or sortField == ''">
ORDER BY CONVERT(c.bizOrgName USING gbk) ASC
</if>
</select> </select>
<select id="getWaterInfoByBizOrgName" resultType="java.util.Map"> <select id="getWaterInfoByBizOrgName" resultType="java.util.Map">
...@@ -6047,7 +6050,7 @@ ...@@ -6047,7 +6050,7 @@
</if> </if>
) AS `value` ) AS `value`
FROM FROM
`f_fire_fighting_system` `fs` `f_fire_fighting_system` `fs`
where where
fs.system_type_code IS NOT NULL AND LENGTH(trim(fs.system_type_code)) != 0 AND fs.system_type_code != 'otherSys' fs.system_type_code IS NOT NULL AND LENGTH(trim(fs.system_type_code)) != 0 AND fs.system_type_code != 'otherSys'
</select> </select>
...@@ -6850,10 +6853,10 @@ ...@@ -6850,10 +6853,10 @@
( (
SELECT SELECT
IFNULL(SUM(IF(r.`status` = 0, 1, 0)), 0) AS normalNum, IFNULL(SUM(IF(r.`status` = 0, 1, 0)), 0) AS normalNum,
IFNULL(SUM(IF((r.type = 'BREAKDOWN' AND r.`status` = 1), 1, 0)), 0) AS faultNum, IFNULL(SUM(IF((r.type = 'BREAKDOWN'), 1, 0)), 0) AS faultNum,
IFNULL(SUM(IF((r.type = 'FIREALARM' AND r.`status` = 1), 1, 0)), 0) AS alarmNum, IFNULL(SUM(IF((r.type = 'FIREALARM'), 1, 0)), 0) AS alarmNum,
IFNULL(SUM(IF((r.type = 'SHIELD' AND r.`status` = 1), 1, 0)), 0) AS shieldNum, IFNULL(SUM(IF((r.type = 'SHIELD'), 1, 0)), 0) AS shieldNum,
DATE_FORMAT( r.update_date, '%Y-%m-%d') AS date DATE_FORMAT( r.create_date, '%Y-%m-%d') AS date
FROM FROM
wl_equipment_specific_alarm_log r wl_equipment_specific_alarm_log r
LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET( fs.id, r.system_ids ) LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET( fs.id, r.system_ids )
...@@ -6867,9 +6870,9 @@ ...@@ -6867,9 +6870,9 @@
</if> </if>
</where> </where>
GROUP BY GROUP BY
LEFT ( r.update_date, 10 ) LEFT ( r.create_date, 10 )
ORDER BY ORDER BY
r.update_date r.create_date
) s ) s
) s2 ON s2.date = s1.date ) s2 ON s2.date = s1.date
GROUP BY GROUP BY
...@@ -7221,11 +7224,12 @@ ...@@ -7221,11 +7224,12 @@
<select id="getSystemAlarmNum" resultType="Map"> <select id="getSystemAlarmNum" resultType="Map">
SELECT SELECT
fs.system_type AS `key`, fs.system_type AS `key`,
SUM(IF( wlesal.`status` = 1, 1, 0 )) AS `value`, SUM(IF( wlesal.`status` IS NOT NULL, 1, 0 )) AS `value`,
fs.name AS `name` wlec.`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
LEFT JOIN wl_equipment_category wlec ON fs.system_type = wlec.id
<where> <where>
fs.system_type_code IS NOT NULL fs.system_type_code IS NOT NULL
<if test="bizOrgCode!=null and bizOrgCode!=''"> <if test="bizOrgCode!=null and bizOrgCode!=''">
......
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