Commit f2771e3f authored by 高建强's avatar 高建强

item:修改初始化告警、fireTop5

parent 941db9d2
...@@ -7,6 +7,7 @@ public class SafetyExecuteBo { ...@@ -7,6 +7,7 @@ public class SafetyExecuteBo {
private String label; private String label;
private String pointId; private String pointId;
private String type; private String type;
private String alarmType;
private String status;//指标状态 private String status;//指标状态
private String changeDate; private String changeDate;
public Long getId() { public Long getId() {
...@@ -51,4 +52,12 @@ public class SafetyExecuteBo { ...@@ -51,4 +52,12 @@ public class SafetyExecuteBo {
public void setStatus(String status) { public void setStatus(String status) {
this.status = status; this.status = status;
} }
public String getAlarmType() {
return alarmType;
}
public void setAlarmType(String alarmType) {
this.alarmType = alarmType;
}
} }
...@@ -62,33 +62,61 @@ ...@@ -62,33 +62,61 @@
</select> </select>
<select id="getInitAlarm" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo"> <select id="getInitAlarm" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo">
SELECT SELECT
concat(wes.id) as id, concat( wes.id ) AS id,
concat(wes.id) as equipmentSpecificId, concat( wes.id ) AS equipmentSpecificId,
wed.`name`, wes.`name`,
wes.`code`, wes.`code`,
wei.name_key, wes.realtime_iot_es_index_id AS equipmentIndexId,
wei.`name` AS equipmentIndexName, wes.realtime_iot_index_key AS name_key,
wsi.`value`, wes.realtime_iot_index_name AS equipmentIndexName,
wes.realtime_iot_index_value AS `value`,
'equip' AS type 'equip' AS type
FROM FROM
`wl_equipment_specific_index` wsi wl_equipment_specific wes
LEFT JOIN wl_equipment_index wei ON wsi.equipment_index_id = wei.id LEFT JOIN wl_equipment_index ei ON ei.id = wes.realtime_iot_es_index_id
LEFT JOIN wl_equipment_specific wes ON wsi.equipment_specific_id = wes.id WHERE
LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id ei.is_iot = 1
where
wei.is_iot = 1
<if test="value != null and value != ''"> <if test="value != null and value != ''">
AND wsi.`value` = #{value} AND wes.realtime_iot_index_value = #{value}
</if> </if>
<if test="list != null and list.length > 0"> <if test="list != null and list.length > 0">
AND AND
<foreach collection="list" item="item" index="index" open="(" close=")" separator="OR"> <foreach collection="list" item="item" index="index" open="(" close=")" separator="OR">
wei.type_code = #{item} ei.type_code = #{item}
</foreach> </foreach>
</if> </if>
GROUP BY
wsi.equipment_specific_id
ORDER BY ORDER BY
wsi.update_date DESC wes.realtime_iot_index_update_date DESC
</select> </select>
<!-- <select id="getInitAlarm" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo">-->
<!-- SELECT-->
<!-- concat(wes.id) as id,-->
<!-- concat(wes.id) as equipmentSpecificId,-->
<!-- wed.`name`,-->
<!-- wes.`code`,-->
<!-- wei.name_key,-->
<!-- wei.`name` AS equipmentIndexName,-->
<!-- wsi.`value`,-->
<!-- 'equip' AS type-->
<!-- FROM-->
<!-- `wl_equipment_specific_index` wsi-->
<!-- LEFT JOIN wl_equipment_index wei ON wsi.equipment_index_id = wei.id-->
<!-- LEFT JOIN wl_equipment_specific wes ON wsi.equipment_specific_id = wes.id-->
<!-- LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id-->
<!-- where-->
<!-- wei.is_iot = 1 -->
<!-- <if test="value != null and value != ''">-->
<!-- AND wsi.`value` = #{value}-->
<!-- </if>-->
<!-- <if test="list != null and list.length > 0">-->
<!-- AND-->
<!-- <foreach collection="list" item="item" index="index" open="(" close=")" separator="OR">-->
<!-- wei.type_code = #{item}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- GROUP BY-->
<!-- wsi.equipment_specific_id-->
<!-- ORDER BY-->
<!-- wsi.update_date DESC-->
<!-- </select>-->
</mapper> </mapper>
\ No newline at end of file
...@@ -488,7 +488,8 @@ ...@@ -488,7 +488,8 @@
ala.id, ala.id,
ala.equipment_specific_id AS pointId, ala.equipment_specific_id AS pointId,
'monitorEquipment' AS type, 'monitorEquipment' AS type,
spe.CODE, spe.`code`,
ala.type AS alarmType,
ala.equipment_specific_index_name, ala.equipment_specific_index_name,
CONCAT( CONCAT(
ala.equipment_specific_index_name, ala.equipment_specific_index_name,
...@@ -511,7 +512,7 @@ ...@@ -511,7 +512,7 @@
WHERE WHERE
ala.equipment_specific_index_value = 'true' ala.equipment_specific_index_value = 'true'
AND ala.org_code = 10 AND ala.org_code = 10
AND ala.type = 'FIREALARM' AND ( ala.type = 'FIREALARM' OR ala.type = 'BREAKDOWN' )
ORDER BY ORDER BY
ala.create_date DESC ala.create_date DESC
LIMIT 0,5 LIMIT 0,5
......
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