告警保护方案轮询-调整
This commit is contained in:
@ -153,7 +153,7 @@
|
||||
t.ticket_no as ticketNo,
|
||||
t.id
|
||||
from ems_alarm_records t
|
||||
INNER JOIN ems_devices_setting t2 on t.site_id = t2.site_id and t.device_id = t2.device_id
|
||||
LEFT JOIN ems_devices_setting t2 on t.site_id = t2.site_id and t.device_id = t2.device_id
|
||||
where t.site_id = #{siteId}
|
||||
<if test="deviceType != null and deviceType != ''">
|
||||
AND t.device_type = #{deviceType}
|
||||
@ -186,9 +186,9 @@
|
||||
<select id="getFailedRecord" resultMap="EmsAlarmRecordsResult">
|
||||
<include refid="selectEmsAlarmRecordsVo"/>
|
||||
where site_id = #{siteId}
|
||||
and device_id = #{deviceId}
|
||||
and alarm_content = #{content}
|
||||
and status = #{status}
|
||||
and alarm_level = #{level}
|
||||
and status <![CDATA[ != ]]> 1
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
|
||||
@ -115,10 +115,6 @@
|
||||
and `status` = 1
|
||||
</select>
|
||||
|
||||
<update id="updateStatusRunning">
|
||||
update ems_strategy_running set `status`= #{status} where site_id = #{siteId}
|
||||
</update>
|
||||
|
||||
<select id="getPendingPollerStrategy" parameterType="String" resultType="com.xzzn.ems.domain.vo.StrategyRunningVo">
|
||||
select t.id,
|
||||
t.`status`,
|
||||
@ -135,4 +131,20 @@
|
||||
and t.site_id = #{siteId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getRunningStrategy" parameterType="String" resultMap="EmsStrategyRunningResult">
|
||||
<include refid="selectEmsStrategyRunningVo"/>
|
||||
where site_id = #{siteId}
|
||||
and `status` = 1
|
||||
order by update_time desc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="getPendingStrategy" parameterType="String" resultMap="EmsStrategyRunningResult">
|
||||
<include refid="selectEmsStrategyRunningVo"/>
|
||||
where site_id = #{siteId}
|
||||
and `status` in (0, 2)
|
||||
order by update_time desc
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user