Commit ae75eee4 authored by 李秀明's avatar 李秀明

fix: 消防系统异常类型数统计错误

parent db5fc2ec
...@@ -6922,7 +6922,7 @@ ...@@ -6922,7 +6922,7 @@
t1.id AS id, t1.id AS id,
t2.name AS name, t2.name AS name,
t1.system_type_code, t1.system_type_code,
(SELECT count(1) FROM wl_equipment_specific_alarm_log t WHERE 0 <![CDATA[<>]]> find_in_set( t1.id, t.system_ids ) ) AS value (SELECT count(1) FROM wl_equipment_specific_alarm_log t WHERE 0 <![CDATA[<>]]> find_in_set( t1.id, t.system_ids ) AND t.clean_time IS NULL) AS value
FROM FROM
f_fire_fighting_system t1 f_fire_fighting_system t1
LEFT JOIN wl_equipment_category t2 on t1.system_type = t2.id LEFT JOIN wl_equipment_category t2 on t1.system_type = t2.id
...@@ -6954,7 +6954,7 @@ ...@@ -6954,7 +6954,7 @@
`fs`.`name` AS `name`, `fs`.`name` AS `name`,
fs.system_type_code, fs.system_type_code,
fs.biz_org_name AS bizOrgName, fs.biz_org_name AS bizOrgName,
( SELECT count( 1 ) FROM `wl_equipment_specific_alarm_log` WHERE 0 <![CDATA[<>]]> find_in_set( `fs`.`id`, `wl_equipment_specific_alarm_log`.`system_ids` ) ) AS `value`, ( SELECT count( 1 ) FROM wl_equipment_specific_alarm_log t WHERE 0 <![CDATA[<>]]> find_in_set( `fs`.`id`, t.system_ids ) AND t.clean_time IS NULL) AS `value`,
(SELECT COUNT(DISTINCT wesal.equipment_specific_id) FROM wl_equipment_specific_alarm_log wesal WHERE 0 <![CDATA[<>]]> find_in_set(`fs`.`id`, wesal.`system_ids`)) AS equips (SELECT COUNT(DISTINCT wesal.equipment_specific_id) FROM wl_equipment_specific_alarm_log wesal WHERE 0 <![CDATA[<>]]> find_in_set(`fs`.`id`, wesal.`system_ids`)) AS equips
FROM FROM
`f_fire_fighting_system` `fs` `f_fire_fighting_system` `fs`
......
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