Commit 9a516c9d authored by KeYong's avatar KeYong

优化指标展示项

parent f84b3656
...@@ -25,13 +25,15 @@ ...@@ -25,13 +25,15 @@
`f_fire_fighting_system` `fs` `f_fire_fighting_system` `fs`
<where> <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!=''"> <if test="bizOrgCode!=null and bizOrgCode!=''">
AND fs.biz_org_code like concat(#{bizOrgCode}, '%') AND fs.biz_org_code like concat(#{bizOrgCode}, '%')
</if> </if>
</where> </where>
GROUP BY GROUP BY
`fs`.`id` `fs`.`id`
ORDER BY
`fs`.`sort`
</select> </select>
<select id="getCAFSWaterTankInfo" resultType="Map"> <select id="getCAFSWaterTankInfo" resultType="Map">
...@@ -139,17 +141,18 @@ ...@@ -139,17 +141,18 @@
SELECT temp.name, temp.alarm ,temp.id, 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' 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, ORDER BY wesi.update_date desc LIMIT 1),0) AS value,
IFNULL((SELECT CASE WHEN wesi.value_label IS NULL OR trim( wesi.value_label ) = '' THEN (CASE
IFNULL((SELECT wesi.equipment_index_name FROM wl_equipment_specific_index wesi WHERE wesi.equipment_specific_id = temp.id AND wesi.is_alarm = 1 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, ORDER BY wesi.update_date desc LIMIT 1),'--') AS status,
'--' AS flow '--' AS flow
FROM( FROM(
SELECT wes.id,wes.name,
SELECT wes.id,wes.name ,
CASE 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 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 AND wes.realtime_iot_index_value = 'true' THEN
1 ELSE 0 1 ELSE 0
...@@ -160,10 +163,7 @@ ...@@ -160,10 +163,7 @@
wes.equipment_code LIKE concat( '920322', '%' ) wes.equipment_code LIKE concat( '920322', '%' )
AND fire.equipment_id = (SELECT id FROM f_equipment WHERE `code` = #{code}) AND fire.equipment_id = (SELECT id FROM f_equipment WHERE `code` = #{code})
AND wes.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%' ) AND wes.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%' )
) temp ) temp
</select> </select>
<select id="selectFoamTank" resultType="java.util.Map"> <select id="selectFoamTank" resultType="java.util.Map">
SELECT 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