(SELECT count(DISTINCT t.equipment_specific_id) 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
count( t.`status` = 0 OR NULL ) AS `value`,
count( DISTINCT t.`equipment_specific_id` ) AS equips
FROM
`f_fire_fighting_system` `fs`
LEFT JOIN ( SELECT equipment_specific_id, system_ids, max( `status` ) AS `status` FROM wl_equipment_specific_alarm GROUP BY equipment_specific_id, system_ids ) t ON find_in_set( `fs`.`id`, t.system_ids )
WHERE
fs.system_type_code IS NOT NULL
AND LENGTH(
...
...
@@ -7259,6 +7260,8 @@
<iftest="systemType!=null and systemType!=''">
AND fs.system_type_code LIKE CONCAT(#{systemType},'%')