Commit 4aa4b586 authored by KeYong's avatar KeYong

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

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