END) ELSE wesi.value_label END FROM wl_equipment_specific_index wesi
LEFT JOIN wl_equipment_index wei on wesi.equipment_index_id = wei.id
WHERE wesi.equipment_specific_id = temp.id AND wei.is_trend = 0
WHERE wesi.equipment_specific_id = temp.id AND wesi.is_alarm = 1
ORDER BY wesi.update_date desc LIMIT 1),'--') AS status,
'0' AS flow
FROM(
...
...
@@ -391,7 +391,7 @@
wes.id,
wes.NAME,
concat_ws( '-', ws.full_name, ed.area ) area,
IFNULL( ( SELECT VALUE FROM wl_equipment_specific_index wesi WHERE wesi.equipment_specific_id = wes.id AND equipment_index_key = 'FHS_FirePoolDevice_WaterFlow' ), '--' ) AS nowFlow,
IFNULL( ( SELECT VALUE FROM wl_equipment_specific_index wesi WHERE wesi.equipment_specific_id = wes.id AND equipment_index_key = 'FHS_FirePoolDevice_InfluentFlow' ), '--' ) AS nowFlow,
IFNULL( ( SELECT field_value FROM wl_form_instance_equip WHERE instance_id = wes.id AND field_name = 'maxFlow' ), 0 ) AS maxFlow,
IFNULL( ( SELECT field_value FROM wl_form_instance_equip WHERE instance_id = wes.id AND field_name = 'minFlow' ), 0 ) AS minFlow