Commit 2ca678ee authored by 李秀明's avatar 李秀明

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

parents a981c2e8 feebf096
...@@ -536,31 +536,42 @@ ...@@ -536,31 +536,42 @@
<select id="selectPressureFlow" resultType="java.util.Map"> <select id="selectPressureFlow" resultType="java.util.Map">
SELECT SELECT
*
FROM
(
SELECT
temp.id, temp.id,
temp.name, temp.NAME,
IF(temp.nowPressure = '--', '--', TRUNCATE(ROUND(temp.nowPressure, 2),2)) AS nowPressure, IF
(
temp.nowPressure = '--',
'--',
TRUNCATE ( ROUND( temp.nowPressure, 2 ), 2 )) AS nowPressure,
temp.area, temp.area,
temp.minPressure AS `minValue`, temp.minPressure AS `minValue`,
temp.maxPressure AS `maxValue`, temp.maxPressure AS `maxValue`,
CASE CASE
WHEN temp.nowPressure = '--' THEN WHEN temp.nowPressure = '--' THEN
'--' '--'
WHEN temp.maxPressure = '' THEN WHEN temp.maxPressure = '' THEN
'--' '--'
WHEN temp.minPressure = '' THEN WHEN temp.minPressure = '' THEN
'--' '--'
WHEN (temp.nowPressure - temp.maxPressure) > 0 THEN WHEN ( temp.nowPressure - temp.maxPressure ) > 0 THEN
'压力高' '压力高'
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
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,
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,
IFNULL( ( SELECT field_value FROM wl_form_instance_equip WHERE instance_id = wes.id AND field_name = 'maxPressure' AND field_value <![CDATA[<>]]> '' ), 1.5 ) AS maxPressure, IFNULL( ( SELECT field_value FROM wl_form_instance_equip WHERE instance_id = wes.id AND field_name = 'maxPressure' AND field_value <![CDATA[<>]]> '' ), 1.5 ) AS maxPressure,
IFNULL( ( SELECT field_value FROM wl_form_instance_equip WHERE instance_id = wes.id AND field_name = 'minPressure' AND field_value <![CDATA[<>]]> '' ), 0.5 ) AS minPressure IFNULL( ( SELECT field_value FROM wl_form_instance_equip WHERE instance_id = wes.id AND field_name = 'minPressure' AND field_value <![CDATA[<>]]> '' ), 0.5 ) AS minPressure
...@@ -572,34 +583,41 @@ ...@@ -572,34 +583,41 @@
LEFT JOIN wl_form_instance_equip fi ON fi.instance_id = wes.id LEFT JOIN wl_form_instance_equip fi ON fi.instance_id = wes.id
WHERE WHERE
wes.equipment_code LIKE concat( '92011000', '%' ) AND wes.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%' ) wes.equipment_code LIKE concat( '92011000', '%' ) AND wes.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%' )
) temp ) temp UNION
UNION
SELECT SELECT
temp.id, temp.id,
temp.name, temp.NAME,
IF(temp.nowFlow = '--', '--', TRUNCATE(ROUND(temp.nowFlow, 2),2)) AS nowFlow, IF
(
temp.nowFlow = '--',
'--',
TRUNCATE ( ROUND( temp.nowFlow, 2 ), 2 )) AS nowFlow,
temp.area, temp.area,
temp.minFlow AS `minValue`, temp.minFlow AS `minValue`,
temp.maxFlow AS `maxValue`, temp.maxFlow AS `maxValue`,
CASE CASE
WHEN temp.nowFlow = '--' THEN WHEN temp.nowFlow = '--' THEN
'--' '--'
WHEN temp.maxFlow = '' THEN WHEN temp.maxFlow = '' THEN
'--' '--'
WHEN temp.minFlow = '' THEN WHEN temp.minFlow = '' THEN
'--' '--'
WHEN (temp.nowFlow - IFNULL(temp.maxFlow, 0)) > 0 THEN WHEN (
temp.nowFlow - IFNULL( temp.maxFlow, 0 )) > 0 THEN
'流量高' '流量高'
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
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,
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,
IFNULL( ( SELECT field_value FROM wl_form_instance_equip WHERE instance_id = wes.id AND field_name = 'maxFlow' AND field_value <![CDATA[<>]]> '' ), 2.4 ) AS maxFlow, IFNULL( ( SELECT field_value FROM wl_form_instance_equip WHERE instance_id = wes.id AND field_name = 'maxFlow' AND field_value <![CDATA[<>]]> '' ), 2.4 ) AS maxFlow,
IFNULL( ( SELECT field_value FROM wl_form_instance_equip WHERE instance_id = wes.id AND field_name = 'minFlow' AND field_value <![CDATA[<>]]> '' ), 0.5 ) AS minFlow IFNULL( ( SELECT field_value FROM wl_form_instance_equip WHERE instance_id = wes.id AND field_name = 'minFlow' AND field_value <![CDATA[<>]]> '' ), 0.5 ) AS minFlow
...@@ -612,6 +630,9 @@ ...@@ -612,6 +630,9 @@
WHERE WHERE
wes.equipment_code LIKE concat( '92010700', '%' ) AND wes.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%' ) wes.equipment_code LIKE concat( '92010700', '%' ) AND wes.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%' )
) temp ) temp
) c
ORDER BY
updateTime DESC
</select> </select>
<select id="selectAlarmAnalysis" resultType="java.util.Map"> <select id="selectAlarmAnalysis" resultType="java.util.Map">
SELECT SELECT
...@@ -1564,7 +1585,7 @@ ...@@ -1564,7 +1585,7 @@
</if> </if>
AND wed.equipment_name is not null AND wed.equipment_name is not null
</where> </where>
ORDER BY CONVERT(bizOrgName USING gbk) ASC, equipStatus DESC ORDER BY CONVERT(bizOrgName USING gbk) ASC, equipStatus DESC, wes.create_date DESC
</select> </select>
<select id="getEquipStatistic" resultType="java.util.Map"> <select id="getEquipStatistic" resultType="java.util.Map">
SELECT SELECT
......
...@@ -2851,6 +2851,7 @@ ...@@ -2851,6 +2851,7 @@
AND 30 >= DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE ) AND 30 >= DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE )
AND DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE ) >= 0 AND DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE ) >= 0
</if> </if>
ORDER BY dayNum DESC
</select> </select>
<select id="selectZJEquipmentSpecificWWXByIds" resultType="java.util.Map"> <select id="selectZJEquipmentSpecificWWXByIds" resultType="java.util.Map">
......
...@@ -140,7 +140,8 @@ ...@@ -140,7 +140,8 @@
biz_org_name, biz_org_name,
design_org, design_org,
design_org_telephone, design_org_telephone,
lead_designer lead_designer,
system_describe
) )
VALUES( VALUES(
#{id}, #{id},
...@@ -171,7 +172,8 @@ ...@@ -171,7 +172,8 @@
#{bizOrgName}, #{bizOrgName},
#{designOrg}, #{designOrg},
#{designOrgTelephone}, #{designOrgTelephone},
#{leadDesigner} #{leadDesigner},
#{systemDescribe}
) )
</insert> </insert>
<insert id="insertFile"> <insert id="insertFile">
...@@ -221,7 +223,8 @@ ...@@ -221,7 +223,8 @@
biz_org_name=#{bizOrgName}, biz_org_name=#{bizOrgName},
design_org = #{designOrg}, design_org = #{designOrg},
lead_designer = #{leadDesigner}, lead_designer = #{leadDesigner},
design_org_telephone = #{designOrgTelephone} design_org_telephone = #{designOrgTelephone},
system_describe = #{systemDescribe}
where id = #{id} where id = #{id}
</update> </update>
<delete id="deleteFilre"> <delete id="deleteFilre">
...@@ -6315,7 +6318,7 @@ ...@@ -6315,7 +6318,7 @@
) )
, 0) AS faultEquipNum, , 0) AS faultEquipNum,
IFNULL(SUM(IF(wlesal.clean_time IS NULL,1,0)), 0) AS unClearNum, IFNULL(SUM(IF(wlesal.clean_time IS NULL,1,0)), 0) AS unClearNum,
IFNULL(SUM(IF(wlesal.confirm_type IS NOT NULL,1,0)), 0) AS handledNum IFNULL(SUM(IF(wlesal.clean_time IS NOT NULL,1,0)), 0) AS handledNum
FROM FROM
wl_equipment_specific_alarm_log wlesal wl_equipment_specific_alarm_log wlesal
LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET( fs.id, wlesal.system_ids ) LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET( fs.id, wlesal.system_ids )
......
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