|
|
@ -11,6 +11,7 @@
|
|
|
|
<result property="monitorunitId" column="MonitorUnit_Id"/>
|
|
|
|
<result property="monitorunitId" column="MonitorUnit_Id"/>
|
|
|
|
<result property="alarmTypeId" column="AlarmType_Id"/>
|
|
|
|
<result property="alarmTypeId" column="AlarmType_Id"/>
|
|
|
|
<result property="enableFlag" column="Enable_Flag"/>
|
|
|
|
<result property="enableFlag" column="Enable_Flag"/>
|
|
|
|
|
|
|
|
<result property="orderFlag" column="Order_Flag"/>
|
|
|
|
<result property="createdBy" column="CREATED_BY"/>
|
|
|
|
<result property="createdBy" column="CREATED_BY"/>
|
|
|
|
<result property="createdTime" column="CREATED_TIME"/>
|
|
|
|
<result property="createdTime" column="CREATED_TIME"/>
|
|
|
|
<result property="updatedBy" column="UPDATED_BY"/>
|
|
|
|
<result property="updatedBy" column="UPDATED_BY"/>
|
|
|
@ -26,6 +27,7 @@
|
|
|
|
<result property="alarmTypeName" column="AlarmType_Name"/>
|
|
|
|
<result property="alarmTypeName" column="AlarmType_Name"/>
|
|
|
|
<result property="monitorunitName" column="MonitorUnit_Name"/>
|
|
|
|
<result property="monitorunitName" column="MonitorUnit_Name"/>
|
|
|
|
<result property="alarmTypeId" column="AlarmType_Id"/>
|
|
|
|
<result property="alarmTypeId" column="AlarmType_Id"/>
|
|
|
|
|
|
|
|
<result property="orderFlag" column="Order_Flag"/>
|
|
|
|
<result property="enableFlag" column="Enable_Flag"/>
|
|
|
|
<result property="enableFlag" column="Enable_Flag"/>
|
|
|
|
<result property="createdBy" column="CREATED_BY"/>
|
|
|
|
<result property="createdBy" column="CREATED_BY"/>
|
|
|
|
<result property="createdTime" column="CREATED_TIME"/>
|
|
|
|
<result property="createdTime" column="CREATED_TIME"/>
|
|
|
@ -39,16 +41,17 @@
|
|
|
|
t1.AlarmModule_Id,
|
|
|
|
t1.AlarmModule_Id,
|
|
|
|
t1.AlarmModule_Text,
|
|
|
|
t1.AlarmModule_Text,
|
|
|
|
t1.MonitorUnit_Id,
|
|
|
|
t1.MonitorUnit_Id,
|
|
|
|
t2.MonitorUnit_Name,
|
|
|
|
t2.MonitorUnitType_Name as MonitorUnit_Name,
|
|
|
|
t1.AlarmType_Id,
|
|
|
|
t1.AlarmType_Id,
|
|
|
|
t3.AlarmType_Name,
|
|
|
|
t3.AlarmType_Name,
|
|
|
|
t1.Enable_Flag,
|
|
|
|
t1.Enable_Flag,
|
|
|
|
t1.CREATED_BY,
|
|
|
|
t1.CREATED_BY,
|
|
|
|
t1.CREATED_TIME,
|
|
|
|
t1.CREATED_TIME,
|
|
|
|
t1.UPDATED_BY,
|
|
|
|
t1.UPDATED_BY,
|
|
|
|
t1.UPDATED_TIME
|
|
|
|
t1.UPDATED_TIME,
|
|
|
|
|
|
|
|
t1.Order_Flag
|
|
|
|
from base_alarm_module t1
|
|
|
|
from base_alarm_module t1
|
|
|
|
left join base_monitorunit_info t2 on t1.MonitorUnit_Id = t2.MonitorUnit_Id
|
|
|
|
left join base_monitorunit_type t2 on t1.MonitorUnit_Id = t2.MonitorUnitType_Id
|
|
|
|
left join base_alarm_type t3 on t1.AlarmType_Id = t3.alarmType_Id
|
|
|
|
left join base_alarm_type t3 on t1.AlarmType_Id = t3.alarmType_Id
|
|
|
|
|
|
|
|
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
@ -62,6 +65,7 @@
|
|
|
|
<if test="alarmTypeId != null and alarmTypeId != ''">and t1.AlarmType_Id = #{alarmTypeId}</if>
|
|
|
|
<if test="alarmTypeId != null and alarmTypeId != ''">and t1.AlarmType_Id = #{alarmTypeId}</if>
|
|
|
|
<if test="enableFlag != null ">and t1.Enable_Flag = #{enableFlag}</if>
|
|
|
|
<if test="enableFlag != null ">and t1.Enable_Flag = #{enableFlag}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
|
|
|
|
order by t1.order_Flag
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseAlarmModuleByObjId" parameterType="String" resultMap="BaseAlarmModuleDtoResult">
|
|
|
|
<select id="selectBaseAlarmModuleByObjId" parameterType="String" resultMap="BaseAlarmModuleDtoResult">
|
|
|
@ -78,6 +82,7 @@
|
|
|
|
<if test="monitorunitId != null">MonitorUnit_Id,</if>
|
|
|
|
<if test="monitorunitId != null">MonitorUnit_Id,</if>
|
|
|
|
<if test="alarmTypeId != null">AlarmType_Id,</if>
|
|
|
|
<if test="alarmTypeId != null">AlarmType_Id,</if>
|
|
|
|
<if test="enableFlag != null">Enable_Flag,</if>
|
|
|
|
<if test="enableFlag != null">Enable_Flag,</if>
|
|
|
|
|
|
|
|
<if test="orderFlag != null">Order_Flag,</if>
|
|
|
|
<if test="createdBy != null">CREATED_BY,</if>
|
|
|
|
<if test="createdBy != null">CREATED_BY,</if>
|
|
|
|
<if test="createdTime != null">CREATED_TIME,</if>
|
|
|
|
<if test="createdTime != null">CREATED_TIME,</if>
|
|
|
|
<if test="updatedBy != null">UPDATED_BY,</if>
|
|
|
|
<if test="updatedBy != null">UPDATED_BY,</if>
|
|
|
@ -90,6 +95,7 @@
|
|
|
|
<if test="monitorunitId != null">#{monitorunitId},</if>
|
|
|
|
<if test="monitorunitId != null">#{monitorunitId},</if>
|
|
|
|
<if test="alarmTypeId != null">#{alarmTypeId},</if>
|
|
|
|
<if test="alarmTypeId != null">#{alarmTypeId},</if>
|
|
|
|
<if test="enableFlag != null">#{enableFlag},</if>
|
|
|
|
<if test="enableFlag != null">#{enableFlag},</if>
|
|
|
|
|
|
|
|
<if test="orderFlag != null">#{orderFlag},</if>
|
|
|
|
<if test="createdBy != null">#{createdBy},</if>
|
|
|
|
<if test="createdBy != null">#{createdBy},</if>
|
|
|
|
<if test="createdTime != null">#{createdTime},</if>
|
|
|
|
<if test="createdTime != null">#{createdTime},</if>
|
|
|
|
<if test="updatedBy != null">#{updatedBy},</if>
|
|
|
|
<if test="updatedBy != null">#{updatedBy},</if>
|
|
|
@ -105,6 +111,7 @@
|
|
|
|
<if test="monitorunitId != null">MonitorUnit_Id = #{monitorunitId},</if>
|
|
|
|
<if test="monitorunitId != null">MonitorUnit_Id = #{monitorunitId},</if>
|
|
|
|
<if test="alarmTypeId != null">AlarmType_Id = #{alarmTypeId},</if>
|
|
|
|
<if test="alarmTypeId != null">AlarmType_Id = #{alarmTypeId},</if>
|
|
|
|
<if test="enableFlag != null">Enable_Flag = #{enableFlag},</if>
|
|
|
|
<if test="enableFlag != null">Enable_Flag = #{enableFlag},</if>
|
|
|
|
|
|
|
|
<if test="orderFlag != null">Order_Flag = #{orderFlag},</if>
|
|
|
|
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
|
|
|
|
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
|
|
|
|
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
|
|
|
|
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
|
|
|
|
<if test="updatedBy != null">UPDATED_BY = #{updatedBy},</if>
|
|
|
|
<if test="updatedBy != null">UPDATED_BY = #{updatedBy},</if>
|
|
|
@ -127,14 +134,15 @@
|
|
|
|
</delete>
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectAlarmModuleAmountList" parameterType="BaseAlarmModule" resultMap="BaseAlarmModuleDtoResult">
|
|
|
|
<select id="selectAlarmModuleAmountList" parameterType="BaseAlarmModule" resultMap="BaseAlarmModuleDtoResult">
|
|
|
|
select t1.AlarmModule_Text,count(t4.Alarm_Value) as alarmModuleAmount from base_alarm_module t1
|
|
|
|
select t1.AlarmModule_Text,t1.Order_Flag,count(t4.Alarm_Value) as alarmModuleAmount from base_alarm_module t1
|
|
|
|
left join base_monitorunit_info t2 on t2.MonitorUnit_Type = t1.MonitorUnit_Id
|
|
|
|
left join base_monitorunit_info t2 on t2.MonitorUnit_Type = t1.MonitorUnit_Id
|
|
|
|
left join base_sensor_info t3 on t2.MonitorUnit_Id = t3.MonitorUnit_Id
|
|
|
|
left join base_sensor_info t3 on t2.MonitorUnit_Id = t3.MonitorUnit_Id
|
|
|
|
left join record_alarm t4 on t3.Sensor_Id = t4.Sensor_Id and t1.AlarmType_Id = t4.AlarmType_Id
|
|
|
|
left join record_alarm t4 on t3.Sensor_Id = t4.Sensor_Id and t1.AlarmType_Id = t4.AlarmType_Id
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="monitorunitId != null and monitorunitId != ''">and t1.MonitorUnit_Id = #{monitorunitId}</if>
|
|
|
|
<if test="monitorunitId != null and monitorunitId != ''">and t1.MonitorUnit_Id = #{monitorunitId}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
group by t1.AlarmModule_Text
|
|
|
|
group by t1.AlarmModule_Text,t1.Order_Flag
|
|
|
|
|
|
|
|
order by t1.Order_Flag
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|