(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
(SELECT
and equipment_specific_id IN
sum( n.num )
(SELECT
FROM
id
(
FROM
SELECT
wl_equipment_specific
a.id,
<where>
count( 1 ) AS num
<iftest="bizOrgCode!=null and bizOrgCode!=''">
FROM
AND biz_org_code LIKE CONCAT(#{bizOrgCode},'%')
wl_equipment_specific a
</if>
LEFT JOIN (select m.* from wl_equipment_specific_index m left join wl_equipment_index e on e.id = m.equipment_index_id where e.is_iot = 1) b ON a.id = b.equipment_specific_id
</where>)
<where>
<iftest="bizOrgCode!=null and bizOrgCode!=''">
AND a.biz_org_code LIKE CONCAT(#{bizOrgCode},'%')
</if>
</where>
GROUP BY
a.id
) n
)
) AS indexNum,
) 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},'%')
</if>
</if>
) AS equipNum,
) AS equipNum
(SELECT count(1) AS indexMonitorNum FROM wl_equipment_specific_index wesi LEFT JOIN wl_equipment_specific wes on wesi.equipment_specific_id = wes.id WHERE DATE_FORMAT(wesi.update_date, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d')
<iftest="bizOrgCode!=null and bizOrgCode!=''">
AND wes.biz_org_code LIKE CONCAT(#{bizOrgCode},'%')