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

item:修改初始化告警、fireTop5

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