WHEN ( temp.minPressure - temp.nowPressure ) > 0 THEN
WHEN ( temp.minPressure - temp.nowPressure ) > 0 THEN
'压力低' ELSE '正常'
'压力低' ELSE '正常'
END AS STATUS,
END AS status,
1 AS type,
1 AS type,
temp.updateTime
temp.updateTime
FROM
FROM
(
(
SELECT
SELECT
wes.id,
wes.id,
wes.NAME,
wes.name,
concat_ws( '-', ws.full_name, ed.area ) area,
concat_ws( '-', ws.full_name, ed.area ) area,
( SELECT update_date FROM wl_equipment_specific_index wesi WHERE wesi.equipment_specific_id = wes.id AND equipment_index_key = 'FHS_PipePressureDetector_PipePressure' ) AS updateTime,
( SELECT update_date FROM wl_equipment_specific_index wesi WHERE wesi.equipment_specific_id = wes.id AND equipment_index_key = 'FHS_PipePressureDetector_PipePressure' ) AS updateTime,
IFNULL( ( SELECT VALUE FROM wl_equipment_specific_index wesi WHERE wesi.equipment_specific_id = wes.id AND equipment_index_key = 'FHS_PipePressureDetector_PipePressure' ), '--' ) AS nowPressure,
IFNULL( ( SELECT VALUE FROM wl_equipment_specific_index wesi WHERE wesi.equipment_specific_id = wes.id AND equipment_index_key = 'FHS_PipePressureDetector_PipePressure' ), '--' ) AS nowPressure,
...
@@ -586,7 +586,7 @@
...
@@ -586,7 +586,7 @@
) temp UNION
) temp UNION
SELECT
SELECT
temp.id,
temp.id,
temp.NAME,
temp.name,
IF
IF
(
(
temp.nowFlow = '--',
temp.nowFlow = '--',
...
@@ -608,14 +608,14 @@
...
@@ -608,14 +608,14 @@
'流量高'
'流量高'
WHEN ( IFNULL( temp.minFlow, 0 ) - temp.nowFlow ) > 0 THEN
WHEN ( IFNULL( temp.minFlow, 0 ) - temp.nowFlow ) > 0 THEN
'流量低' ELSE '正常'
'流量低' ELSE '正常'
END AS STATUS,
END AS status,
2 AS type,
2 AS type,
temp.updateTime
temp.updateTime
FROM
FROM
(
(
SELECT
SELECT
wes.id,
wes.id,
wes.NAME,
wes.name,
concat_ws( '-', ws.full_name, ed.area ) area,
concat_ws( '-', ws.full_name, ed.area ) area,
( SELECT update_date FROM wl_equipment_specific_index wesi WHERE wesi.equipment_specific_id = wes.id AND equipment_index_key = 'FHS_FirePoolDevice_InfluentFlow' ) AS updateTime,
( SELECT update_date FROM wl_equipment_specific_index wesi WHERE wesi.equipment_specific_id = wes.id AND equipment_index_key = 'FHS_FirePoolDevice_InfluentFlow' ) AS updateTime,
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 VALUE FROM wl_equipment_specific_index wesi WHERE wesi.equipment_specific_id = wes.id AND equipment_index_key = 'FHS_FirePoolDevice_InfluentFlow' ), '--' ) AS nowFlow,
...
@@ -1445,7 +1445,7 @@
...
@@ -1445,7 +1445,7 @@
FROM
FROM
wl_equipment_specific_alarm_log wlesal
wl_equipment_specific_alarm_log wlesal
LEFT JOIN wl_equipment_specific wes ON wes.id = wlesal.equipment_specific_id
LEFT JOIN wl_equipment_specific wes ON wes.id = wlesal.equipment_specific_id
LEFT JOIN f_fire_fighting_system fs ON fs.id = wes.system_id
LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET( fs.id, wlesal.system_ids )
<where>
<where>
<iftest="bizOrgCode != null and bizOrgCode != ''">
<iftest="bizOrgCode != null and bizOrgCode != ''">
and wlesal.biz_org_code like concat(#{bizOrgCode},'%')
and wlesal.biz_org_code like concat(#{bizOrgCode},'%')