|
|
|
@ -42,8 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="collectTime" column="collectTime"/>
|
|
|
|
|
<result property="objId" column="objId"/>
|
|
|
|
|
<result property="alarmStatus" column="alarmStatus"/>
|
|
|
|
|
<result property="cause " column="cause"/>
|
|
|
|
|
|
|
|
|
|
<result property="cause" column="cause"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectT_Alarm_DataVo">
|
|
|
|
@ -70,9 +69,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</where>
|
|
|
|
|
ORDER BY t1.collectTime DESC
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectAlarmPromptList" parameterType="AlarmPromptDTO" resultMap="AlarmPromptDTOResult">
|
|
|
|
|
select a.unitName,a.unitId,COUNT(a.monitorId) as alarmCount from (
|
|
|
|
|
<!--
|
|
|
|
|
select a.unitName,a.unitId,COUNT(a.monitorId) as alarmCount from (
|
|
|
|
|
select t2.unitId,t6.unitName,t4.monitorId,t4.cause
|
|
|
|
|
from sys_user_role t1
|
|
|
|
|
left join sys_finalRole_menu t2 on t1.role_id = t2.roleId
|
|
|
|
@ -83,7 +81,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
group by t2.unitId,t6.unitName,t4.monitorId,t4.cause
|
|
|
|
|
) a
|
|
|
|
|
group by a.unitName,a.unitId
|
|
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
<select id="selectAlarmPromptList" parameterType="AlarmPromptDTO" resultMap="AlarmPromptDTOResult">
|
|
|
|
|
SELECT SUM(IIF(ta.alarmStatus = 1, 1, 0)) alarmCount
|
|
|
|
|
FROM T_Alarm_Data ta
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectAlarmPromptDataList" parameterType="AlarmPromptDTO" resultMap="AlarmPromptDTOResult">
|
|
|
|
@ -101,7 +102,7 @@ group by a.unitName,a.unitId
|
|
|
|
|
t4.cause
|
|
|
|
|
from T_Alarm_Data t4
|
|
|
|
|
left join T_Monitor t5 on t4.monitorId = t5.monitorId
|
|
|
|
|
where t4.collectTime between #{beginTime} and getdate() and t4.alarmStatus = 1
|
|
|
|
|
where t4.alarmStatus = 1
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|