Commit a8eb55c8 authored by zhengjiawei's avatar zhengjiawei

火灾告警 ,故障告警

parent 719ffc15
......@@ -423,19 +423,21 @@
</select>
<select id="getAllFaultAlarm" resultType="com.yeejoin.amos.fas.business.bo.CheckErrorBo">
SELECT
a.id,
a.fire_equipment_point_name as `name`,
fe.equip_type as status,
a.update_date as changeDate
FROM
f_alarm a
LEFT JOIN f_fire_equipment fe ON fe.id = a.fire_equipment_id
WHERE
`status` = TRUE
AND type = 'alarm_type_trouble'
AND a.org_code = #{orgCode}
AND date_format(a.update_date, '%Y-%m-%d') =#{date}
select
ala.id,
ala.equipment_specific_name as name,
cate.name as status,
ala.update_date as changeDate
from
wl_equipment_specific_alarm as ala
left join wl_equipment_specific as spe on ala.equipment_specific_id = spe.id
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
left join wl_equipment as equ on equ.id = det.equipment_id
left join wl_equipment_category as cate on equ.category_id = cate.id
where ala.status = TRUE
AND ala.type = 'alarm_type_trouble'
AND ala.org_code = #{orgCode}
AND date_format(ala.update_date, '%Y-%m-%d') = #{date}
</select>
......@@ -482,21 +484,23 @@
</select>
<select id="getFireAlarmTop5" resultType="com.yeejoin.amos.fas.business.bo.SafetyExecuteBo">
SELECT
a.id,
a.fire_equipment_id as pointId,
a.fire_equipment_code code,
a.fire_equipment_point_name as `label`,
a.update_date as changeDate,
"monitorEquipment" type
FROM
f_alarm a
WHERE
a.`status` = TRUE
AND (a.org_code = #{orgCode} OR a.org_code like CONCAT(#{orgCode},'-%'))
AND a.type = 'alarm_type_fire'
ORDER BY a.update_date DESC
limit 0,5
select
ala.id,
ala.equipment_specific_id as pointId,
equ.code,
ala.equipment_specific_name as label,
ala.update_date as changeDate
from
wl_equipment_specific_alarm as ala
left join wl_equipment_specific as spe on ala.equipment_specific_id = spe.id
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
left join wl_equipment as equ on equ.id = det.equipment_id
left join wl_equipment_category as cate on equ.category_id = cate.id
WHERE ala.status = true
AND (ala.org_code = #{orgCode} OR ala.org_code like CONCAT(#{orgCode},'-%'))
AND ala.type = 'alarm_type_fire'
ORDER BY ala.update_date DESC
limit 0,5
</select>
<select id="getEquipStatusTop5" resultType="com.yeejoin.amos.fas.business.bo.SafetyExecuteBo">
......
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