IFNULL( rp.output_flow_rate, 0 ) AS outputFlowRate,
IFNULL( rp.output_flow_rate, 0 ) AS outputFlowRate,
-- IFNULL(max( CASE WHEN ei.equipment_index_key = 'FHS_FirePoolDevice_WaterLevel' or ei.equipment_index_key = 'FHS_WirelessliquidDetector_WaterLevel' THEN ei.`value` END ),'--') AS nowLevel,
-- IFNULL(max( CASE WHEN ei.equipment_index_key = 'FHS_FirePoolDevice_WaterLevel' or ei.equipment_index_key = 'FHS_WirelessliquidDetector_WaterLevel' THEN ei.`value` END ),'--') AS nowLevel,
IFNULL((select
IFNULL((select
avg(IFNULL(ei.`value`, 0))
avg(ei.`value`)
from
from
wl_equipment_specific_index ei
wl_equipment_specific_index ei
where
where
...
@@ -4978,7 +4978,7 @@
...
@@ -4978,7 +4978,7 @@
IFNULL( rp.max_water_level, 0 ) AS maxLevel,
IFNULL( rp.max_water_level, 0 ) AS maxLevel,
IFNULL( rp.output_flow_rate, 0 ) AS outputFlowRate,
IFNULL( rp.output_flow_rate, 0 ) AS outputFlowRate,
(select
(select
avg(IFNULL(ei.`value`,0))
avg(ei.`value`)
from
from
wl_equipment_specific_index ei
wl_equipment_specific_index ei
where
where
...
@@ -6998,7 +6998,7 @@
...
@@ -6998,7 +6998,7 @@
*
*
FROM
FROM
(
(
(SELECT count( DISTINCT wei.name_key ) AS indexNum FROM wl_equipment_index wei WHERE wei.is_iot = 1) AS indexNum,
(SELECT count( 1 ) 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 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},'%')