|
|
@ -1,42 +1,74 @@
|
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.ruoyi.system.mapper.BaseAlarmModuleMapper">
|
|
|
|
<mapper namespace="com.ruoyi.system.mapper.BaseAlarmModuleMapper">
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="BaseAlarmModule" id="BaseAlarmModuleResult">
|
|
|
|
<resultMap type="BaseAlarmModule" id="BaseAlarmModuleResult">
|
|
|
|
<result property="objId" column="ObjId" />
|
|
|
|
<result property="objId" column="ObjId"/>
|
|
|
|
<result property="alarmmoduleId" column="AlarmModule_Id" />
|
|
|
|
<result property="alarmmoduleId" column="AlarmModule_Id"/>
|
|
|
|
<result property="alarmmoduleText" column="AlarmModule_Text" />
|
|
|
|
<result property="alarmmoduleText" column="AlarmModule_Text"/>
|
|
|
|
<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="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"/>
|
|
|
|
<result property="updatedTime" column="UPDATED_TIME" />
|
|
|
|
<result property="updatedTime" column="UPDATED_TIME"/>
|
|
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="BaseAlarmModuleDto" id="BaseAlarmModuleDtoResult">
|
|
|
|
|
|
|
|
<result property="objId" column="ObjId"/>
|
|
|
|
|
|
|
|
<result property="alarmmoduleId" column="AlarmModule_Id"/>
|
|
|
|
|
|
|
|
<result property="alarmmoduleText" column="AlarmModule_Text"/>
|
|
|
|
|
|
|
|
<result property="monitorunitId" column="MonitorUnit_Id"/>
|
|
|
|
|
|
|
|
<result property="alarmTypeId" column="AlarmType_Id"/>
|
|
|
|
|
|
|
|
<result property="alarmTypeName" column="AlarmType_Name"/>
|
|
|
|
|
|
|
|
<result property="monitorunitName" column="MonitorUnit_Name"/>
|
|
|
|
|
|
|
|
<result property="alarmTypeId" column="AlarmType_Id"/>
|
|
|
|
|
|
|
|
<result property="enableFlag" column="Enable_Flag"/>
|
|
|
|
|
|
|
|
<result property="createdBy" column="CREATED_BY"/>
|
|
|
|
|
|
|
|
<result property="createdTime" column="CREATED_TIME"/>
|
|
|
|
|
|
|
|
<result property="updatedBy" column="UPDATED_BY"/>
|
|
|
|
|
|
|
|
<result property="updatedTime" column="UPDATED_TIME"/>
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectBaseAlarmModuleVo">
|
|
|
|
<sql id="selectBaseAlarmModuleVo">
|
|
|
|
select ObjId, AlarmModule_Id, AlarmModule_Text, MonitorUnit_Id,AlarmType_Id, Enable_Flag, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME from base_alarm_module
|
|
|
|
-- select ObjId, AlarmModule_Id, AlarmModule_Text, MonitorUnit_Id,AlarmType_Id, Enable_Flag, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME from base_alarm_module
|
|
|
|
|
|
|
|
select t1.ObjId,
|
|
|
|
|
|
|
|
t1.AlarmModule_Id,
|
|
|
|
|
|
|
|
t1.AlarmModule_Text,
|
|
|
|
|
|
|
|
t1.MonitorUnit_Id,
|
|
|
|
|
|
|
|
t2.MonitorUnit_Name,
|
|
|
|
|
|
|
|
t1.AlarmType_Id,
|
|
|
|
|
|
|
|
t3.AlarmType_Name,
|
|
|
|
|
|
|
|
t1.Enable_Flag,
|
|
|
|
|
|
|
|
t1.CREATED_BY,
|
|
|
|
|
|
|
|
t1.CREATED_TIME,
|
|
|
|
|
|
|
|
t1.UPDATED_BY,
|
|
|
|
|
|
|
|
t1.UPDATED_TIME
|
|
|
|
|
|
|
|
from base_alarm_module t1
|
|
|
|
|
|
|
|
left join base_monitorunit_info t2 on t1.MonitorUnit_Id = t2.MonitorUnit_Id
|
|
|
|
|
|
|
|
left join base_alarm_type t3 on t1.AlarmType_Id = t3.alarmType_Id
|
|
|
|
|
|
|
|
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseAlarmModuleList" parameterType="BaseAlarmModule" resultMap="BaseAlarmModuleResult">
|
|
|
|
<select id="selectBaseAlarmModuleList" parameterType="BaseAlarmModule" resultMap="BaseAlarmModuleDtoResult">
|
|
|
|
<include refid="selectBaseAlarmModuleVo"/>
|
|
|
|
<include refid="selectBaseAlarmModuleVo"/>
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="alarmmoduleId != null and alarmmoduleId != ''"> and AlarmModule_Id = #{alarmmoduleId}</if>
|
|
|
|
<if test="alarmmoduleId != null and alarmmoduleId != ''">and t1.AlarmModule_Id = #{alarmmoduleId}</if>
|
|
|
|
<if test="alarmmoduleText != null and alarmmoduleText != ''"> and AlarmModule_Text = #{alarmmoduleText}</if>
|
|
|
|
<if test="alarmmoduleText != null and alarmmoduleText != ''">and t1.AlarmModule_Text = #{alarmmoduleText}</if>
|
|
|
|
<if test="monitorunitId != null and monitorunitId != ''"> and MonitorUnit_Id = #{monitorunitId}</if>
|
|
|
|
<if test="monitorunitId != null and monitorunitId != ''">and t1.MonitorUnit_Id = #{monitorunitId}</if>
|
|
|
|
<if test="alarmTypeId != null and alarmTypeId != ''"> and AlarmType_Id = #{alarmTypeId}</if>
|
|
|
|
<if test="alarmTypeId != null and alarmTypeId != ''">and t1.AlarmType_Id = #{alarmTypeId}</if>
|
|
|
|
<if test="enableFlag != null "> and Enable_Flag = #{enableFlag}</if>
|
|
|
|
<if test="enableFlag != null ">and t1.Enable_Flag = #{enableFlag}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseAlarmModuleByObjId" parameterType="String" resultMap="BaseAlarmModuleResult">
|
|
|
|
<select id="selectBaseAlarmModuleByObjId" parameterType="String" resultMap="BaseAlarmModuleDtoResult">
|
|
|
|
<include refid="selectBaseAlarmModuleVo"/>
|
|
|
|
<include refid="selectBaseAlarmModuleVo"/>
|
|
|
|
where ObjId = #{objId}
|
|
|
|
where t1.ObjId = #{objId}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertBaseAlarmModule" parameterType="BaseAlarmModule">
|
|
|
|
<insert id="insertBaseAlarmModule" parameterType="BaseAlarmModule">
|
|
|
|
insert into base_alarm_module
|
|
|
|
insert into base_alarm_module
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@ -50,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<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>
|
|
|
|
<if test="updatedTime != null">UPDATED_TIME,</if>
|
|
|
|
<if test="updatedTime != null">UPDATED_TIME,</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="objId != null">#{objId},</if>
|
|
|
|
<if test="objId != null">#{objId},</if>
|
|
|
|
<if test="alarmmoduleId != null">#{alarmmoduleId},</if>
|
|
|
|
<if test="alarmmoduleId != null">#{alarmmoduleId},</if>
|
|
|
@ -62,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="createdTime != null">#{createdTime},</if>
|
|
|
|
<if test="createdTime != null">#{createdTime},</if>
|
|
|
|
<if test="updatedBy != null">#{updatedBy},</if>
|
|
|
|
<if test="updatedBy != null">#{updatedBy},</if>
|
|
|
|
<if test="updatedTime != null">#{updatedTime},</if>
|
|
|
|
<if test="updatedTime != null">#{updatedTime},</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateBaseAlarmModule" parameterType="BaseAlarmModule">
|
|
|
|
<update id="updateBaseAlarmModule" parameterType="BaseAlarmModule">
|
|
|
@ -82,11 +114,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBaseAlarmModuleByObjId" parameterType="String">
|
|
|
|
<delete id="deleteBaseAlarmModuleByObjId" parameterType="String">
|
|
|
|
delete from base_alarm_module where ObjId = #{objId}
|
|
|
|
delete
|
|
|
|
|
|
|
|
from base_alarm_module
|
|
|
|
|
|
|
|
where ObjId = #{objId}
|
|
|
|
</delete>
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBaseAlarmModuleByObjIds" parameterType="String">
|
|
|
|
<delete id="deleteBaseAlarmModuleByObjIds" parameterType="String">
|
|
|
|
delete from base_alarm_module where ObjId in
|
|
|
|
delete from base_alarm_module where ObjId in
|
|
|
|
<foreach item="objId" collection="array" open="(" separator="," close=")">
|
|
|
|
<foreach item="objId" collection="array" open="(" separator="," close=")">
|
|
|
|
#{objId}
|
|
|
|
#{objId}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|