Commit fa58127e authored by 李秀明's avatar 李秀明

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

parents 2ca678ee ba16c2c0
......@@ -541,7 +541,7 @@
(
SELECT
temp.id,
temp.NAME,
temp.name,
IF
(
temp.nowPressure = '--',
......@@ -562,14 +562,14 @@
'压力高'
WHEN ( temp.minPressure - temp.nowPressure ) > 0 THEN
'压力低' ELSE '正常'
END AS STATUS,
END AS status,
1 AS type,
temp.updateTime
FROM
(
SELECT
wes.id,
wes.NAME,
wes.name,
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,
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 @@
) temp UNION
SELECT
temp.id,
temp.NAME,
temp.name,
IF
(
temp.nowFlow = '--',
......@@ -608,14 +608,14 @@
'流量高'
WHEN ( IFNULL( temp.minFlow, 0 ) - temp.nowFlow ) > 0 THEN
'流量低' ELSE '正常'
END AS STATUS,
END AS status,
2 AS type,
temp.updateTime
FROM
(
SELECT
wes.id,
wes.NAME,
wes.name,
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,
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 @@
FROM
wl_equipment_specific_alarm_log wlesal
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>
<if test="bizOrgCode != null and bizOrgCode != ''">
and wlesal.biz_org_code like concat(#{bizOrgCode},'%')
......
......@@ -2778,11 +2778,11 @@
LEFT JOIN wl_equipment e ON ed.equipment_id = e.id
LEFT JOIN wl_stock_detail sd ON sd.equipment_detail_id = ed.id
WHERE
ed.production_date IS NOT NULL
ed.delivery_date IS NOT NULL
AND ( (sd.`status` != 3) or (sd.`status` is null) or (sd.`status` = ''))
AND e.expiry_date IS NOT NULL
AND ed.maintenance_cycle IS NOT NULL
AND es.biz_org_code LIKE concat(#{bizOrgCode}, '%')
AND 0 >= DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE )
AND 0 >= DATEDIFF( DATE_ADD( DATE_FORMAT( ed.delivery_date, '%Y-%m-%d' ), INTERVAL ed.maintenance_cycle MONTH ), CURRENT_DATE )
) AS `value` UNION ALL
SELECT
'超期未报废' AS `name`,
......
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