LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET( fs.id, r.system_ids )
LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET( fs.id, r.system_ids )
<where>
<where>
r.update_date BETWEEN date_sub( now(), INTERVAL 6 MONTH ) AND now()
<iftest="systemCode != null and systemCode != ''">
<iftest="systemCode != null and systemCode != ''">
AND fs.`code` = #{systemCode}
AND fs.`code` = #{systemCode}
</if>
</if>
...
@@ -7158,7 +7157,18 @@
...
@@ -7158,7 +7157,18 @@
*
*
FROM
FROM
(
(
(SELECT count( 1 ) AS indexNum FROM wl_equipment_specific_index a LEFT JOIN wl_equipment_index b ON a.equipment_index_id = b.id WHERE b.is_iot = 1) AS indexNum,
(SELECT count( 1 ) AS indexNum FROM wl_equipment_specific_index a LEFT JOIN wl_equipment_index b ON a.equipment_index_id = b.id WHERE b.is_iot = 1
and equipment_specific_id IN
(SELECT
id
FROM
wl_equipment_specific
<where>
<iftest="bizOrgCode!=null and bizOrgCode!=''">
AND biz_org_code LIKE CONCAT(#{bizOrgCode},'%')
</if>
</where>)
) AS indexNum,
(SELECT count( 1 ) AS equipNum FROM wl_equipment_specific es LEFT JOIN wl_equipment e ON e.`code` = es.equipment_code WHERE e.is_iot = 1
(SELECT count( 1 ) AS equipNum FROM wl_equipment_specific es LEFT JOIN wl_equipment e ON e.`code` = es.equipment_code WHERE e.is_iot = 1
<iftest="bizOrgCode!=null and bizOrgCode!=''">
<iftest="bizOrgCode!=null and bizOrgCode!=''">
AND es.biz_org_code LIKE CONCAT(#{bizOrgCode},'%')
AND es.biz_org_code LIKE CONCAT(#{bizOrgCode},'%')
IFNULL(SUM(IF(t.finish_status = 3, t.point_num, 0)), 0) AS missPointCount,
IFNULL(SUM(IF(t.finish_status = 3, t.point_num, 0)), 0) AS missPointCount,
IFNULL(SUM(IF(t.finish_status = 2, t.point_num, 0)), 0) AS finishCount,
IFNULL(SUM(IF(t.finish_status = 2, t.point_num, 0)), 0) AS finishCount,
IFNULL((SELECT SUM(TIMESTAMPDIFF(MINUTE, t.begin_time, d.executor_date)) FROM p_plan_task_detail d where d.task_no = t.id and t.org_code LIKE LEFT(t.org_code, 18)), 0) AS totalTime