Commit aefb679a authored by KeYong's avatar KeYong

Merge remote-tracking branch 'origin/develop_station' into develop_station

parents 524473a8 6148016a
...@@ -1256,7 +1256,7 @@ ...@@ -1256,7 +1256,7 @@
xhsanhj, xhsanhj,
xhsangz, xhsangz,
xhsanpb, xhsanpb,
xhszc, (xhszc - noZcTotal) AS xhszc,
xhsan xhsan
FROM FROM
( (
...@@ -1313,58 +1313,56 @@ ...@@ -1313,58 +1313,56 @@
OR s.equipment_index_key = 'FAS_FireHydrantButton_Fault' OR s.equipment_index_key = 'FAS_FireHydrantButton_Fault'
OR s.equipment_index_key = 'FAS_FireHydrantButton_Shield' OR s.equipment_index_key = 'FAS_FireHydrantButton_Shield'
) )
) AS xhszc ) AS xhszc,
(
SELECT
count(
DISTINCT equipment_specific_id
)
FROM
`wl_equipment_specific_index` s
WHERE
(
s.`value` = 'true'
)
AND (
s.equipment_index_key = 'FAS_FireHydrantButton_FireAlarm'
OR s.equipment_index_key = 'FAS_FireHydrantButton_Fault'
OR s.equipment_index_key = 'FAS_FireHydrantButton_Shield'
)
) AS noZcTotal
) AS hydrant ) AS hydrant
</select> </select>
<select id="fireWaterSysCollectingDevice" resultType="java.util.Map"> <select id="fireWaterSysCollectingDevice" resultType="java.util.Map">
SELECT SELECT
sbfcjzzyc, sbfcjzzyc,
sbfcjzzbs, sbfcjzzbs,
sbfcjzzzc, ( sbfcjzzzc - noZcTotal ) AS sbfcjzzzc,
sbfcjzz sbfcjzz
FROM FROM
( (
SELECT SELECT
( SELECT count( 1 ) FROM `wl_equipment_specific_index` s WHERE s.equipment_index_key = 'FHS_CollectingDevice_DeviceAbnormal' AND s.`value` = 'true' ) AS sbfcjzzyc,
( SELECT count( 1 ) FROM `wl_equipment_specific_index` s WHERE s.equipment_index_key = 'FHS_CollectingDevice_DeviceLock' AND s.`value` = 'true' ) AS sbfcjzzbs,
( (
SELECT SELECT
count(1) count( DISTINCT equipment_specific_id )
FROM FROM
`wl_equipment_specific_index` s `wl_equipment_specific_index` s
WHERE WHERE
s.equipment_index_key = 'FHS_CollectingDevice_DeviceAbnormal' ( s.`value` = 'false' OR s.`value` IS NULL )
AND s.`value` = 'true' AND ( s.equipment_index_key = 'FHS_CollectingDevice_DeviceAbnormal' )
) AS sbfcjzzyc,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FHS_CollectingDevice_DeviceLock'
AND s.`value` = 'true'
) AS sbfcjzzbs,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` si
WHERE
si.equipment_index_key = 'FHS_CollectingDevice_DeviceAbnormal'
) AS sbfcjzz, ) AS sbfcjzz,
( (
SELECT SELECT
count( count( DISTINCT equipment_specific_id )
DISTINCT equipment_specific_id
)
FROM FROM
`wl_equipment_specific_index` s `wl_equipment_specific_index` s
WHERE WHERE
( ( s.`value` = 'false' OR s.`value` IS NULL )
s.`value` = 'false'
OR s.`value` IS NULL
)
AND s.equipment_index_key = 'FHS_CollectingDevice_DeviceAbnormal' AND s.equipment_index_key = 'FHS_CollectingDevice_DeviceAbnormal'
) AS sbfcjzzzc ) AS sbfcjzzzc,
( SELECT count( DISTINCT equipment_specific_id ) FROM `wl_equipment_specific_index` s WHERE ( s.`value` = 'true' ) AND s.equipment_index_key = 'FHS_CollectingDevice_DeviceAbnormal' ) AS noZcTotal
) AS collectingDevice ) AS collectingDevice
</select> </select>
<select id="fireWaterSysWaterPump" resultType="java.util.Map"> <select id="fireWaterSysWaterPump" resultType="java.util.Map">
......
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