Commit a8eb55c8 authored by zhengjiawei's avatar zhengjiawei

火灾告警 ,故障告警

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