Commit 9a516c9d authored by KeYong's avatar KeYong

优化指标展示项

parent f84b3656
......@@ -25,13 +25,15 @@
`f_fire_fighting_system` `fs`
<where>
-- 此接口要求过滤掉其他系统
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'
<if test="bizOrgCode!=null and bizOrgCode!=''">
AND fs.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
GROUP BY
`fs`.`id`
ORDER BY
`fs`.`sort`
</select>
<select id="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}, '%' )
) temp
</select>
<select id="selectFoamTank" resultType="java.util.Map">
SELECT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment