fs.system_type_code IS NOT NULL AND fs.system_type_code != 'otherSys'
fs.system_type_code IS NOT NULL AND LENGTH(TRIM(fs.system_type_code)) > 0 AND fs.system_type_code != 'otherSys'
<iftest="bizOrgCode!=null and bizOrgCode!=''">
AND fs.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
GROUP BY
`fs`.`id`
ORDER BY
`fs`.`sort`
</select>
<selectid="getCAFSWaterTankInfo"resultType="Map">
...
...
@@ -139,17 +141,18 @@
SELECT temp.name, temp.alarm ,temp.id,
IFNULL((SELECT wesi.value FROM wl_equipment_specific_index wesi WHERE wesi.equipment_specific_id = temp.id AND wesi.equipment_index_key = 'CAFS_CAFSFireGun_FireGunPressure'
ORDER BY wesi.update_date desc LIMIT 1),0) AS value,
IFNULL((SELECT wesi.equipment_index_name FROM wl_equipment_specific_index wesi WHERE wesi.equipment_specific_id = temp.id AND wesi.is_alarm = 1
IFNULL((SELECT CASE WHEN wesi.value_label IS NULL OR trim( wesi.value_label ) = '' THEN (CASE
wesi.`value`
WHEN 'true' THEN
concat( wesi.equipment_index_name, '(是)' )
WHEN 'false' THEN
concat( wesi.equipment_index_name, '(否)' )
END) ELSE wesi.value_label END FROM wl_equipment_specific_index wesi WHERE wesi.equipment_specific_id = temp.id AND wesi.is_alarm = 1
ORDER BY wesi.update_date desc LIMIT 1),'--') AS status,
'--' AS flow
FROM(
SELECT wes.id,wes.name ,
SELECT wes.id,wes.name,
CASE
WHEN ( SELECT is_alarm FROM wl_equipment_specific_index wesi WHERE wesi.equipment_specific_id = wes.id AND wesi.equipment_index_key = wes.realtime_iot_index_key ) = 1
AND wes.realtime_iot_index_value = 'true' THEN
1 ELSE 0
...
...
@@ -160,10 +163,7 @@
wes.equipment_code LIKE concat( '920322', '%' )
AND fire.equipment_id = (SELECT id FROM f_equipment WHERE `code` = #{code})
AND wes.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%' )