Commit d93a0d7d authored by litengwei's avatar litengwei

告警数量统计修改

parent 443533da
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<if test="systemId != null and systemId !=''"> <if test="systemId != null and systemId !=''">
and FIND_IN_SET(#{systemId},a.system_ids) and FIND_IN_SET(#{systemId},a.system_ids)
</if> </if>
and date_format(a.`create_date`,'%Y-%m-%d') = date_format(now(),'%Y-%m-%d')
UNION ALL UNION ALL
SELECT count(*) num, 'wfggj' as code from wl_equipment_specific_alarm_log a where a.`status` = 1 SELECT count(*) num, 'wfggj' as code from wl_equipment_specific_alarm_log a where a.`status` = 1
and a.biz_org_code like concat(#{bizOrgCode}, '%') and a.biz_org_code like concat(#{bizOrgCode}, '%')
...@@ -16,18 +17,21 @@ ...@@ -16,18 +17,21 @@
</if> </if>
UNION ALL UNION ALL
SELECT count(*) num, 'hzgj' as code from wl_equipment_specific_alarm_log a where a.`type` = 'FIREALARM' SELECT count(*) num, 'hzgj' as code from wl_equipment_specific_alarm_log a where a.`type` = 'FIREALARM'
and a.`status` = 1
and a.biz_org_code like concat(#{bizOrgCode}, '%') and a.biz_org_code like concat(#{bizOrgCode}, '%')
<if test="systemId != null and systemId !=''"> <if test="systemId != null and systemId !=''">
and FIND_IN_SET(#{systemId},a.system_ids) and FIND_IN_SET(#{systemId},a.system_ids)
</if> </if>
UNION ALL UNION ALL
SELECT count(*) num, 'gzgj' as code from wl_equipment_specific_alarm_log a where a.`type` = 'BREAKDOWN' SELECT count(*) num, 'gzgj' as code from wl_equipment_specific_alarm_log a where a.`type` = 'BREAKDOWN'
a.`status` = 1
and a.biz_org_code like concat(#{bizOrgCode}, '%') and a.biz_org_code like concat(#{bizOrgCode}, '%')
<if test="systemId != null and systemId !=''"> <if test="systemId != null and systemId !=''">
and FIND_IN_SET(#{systemId},a.system_ids) and FIND_IN_SET(#{systemId},a.system_ids)
</if> </if>
UNION ALL UNION ALL
SELECT count(*) num, 'pbgj' as code from wl_equipment_specific_alarm_log a where a.`type` = 'SHIELD' SELECT count(*) num, 'pbgj' as code from wl_equipment_specific_alarm_log a where a.`type` = 'SHIELD'
and a.`status` = 1
and a.biz_org_code like concat(#{bizOrgCode}, '%') and a.biz_org_code like concat(#{bizOrgCode}, '%')
<if test="systemId != null and systemId !=''"> <if test="systemId != null and systemId !=''">
and FIND_IN_SET(#{systemId},a.system_ids) and FIND_IN_SET(#{systemId},a.system_ids)
......
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