Commit 07cd621a authored by 李秀明's avatar 李秀明

fix: 设备数据-告警信息统计的告警数SQL错误处理

parent 7ebf0065
...@@ -10,27 +10,27 @@ ...@@ -10,27 +10,27 @@
</if> </if>
and date_format(a.`create_date`,'%Y-%m-%d') = date_format(now(),'%Y-%m-%d') 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.clean_time IS NULL
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, '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.clean_time IS NULL
and a.`status` = 1 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' and a.clean_time IS NULL
a.`status` = 1 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, '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.clean_time IS NULL
and a.`status` = 1 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 !=''">
......
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