|
@@ -12,31 +12,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="alarmDate" column="alarm_date" />
|
|
|
<result property="alarmTime" column="alarm_time" />
|
|
|
<result property="alarmCode" column="alarm_code" />
|
|
|
+ <result property="subSystemName" column="sub_system_name"/>
|
|
|
+ <result property="systemCode" column="system_code"/>
|
|
|
<result property="alarmMsg" column="alarm_msg" />
|
|
|
<result property="alarmType" column="alarm_type" />
|
|
|
<result property="alarmState" column="alarm_state" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectAdmOpAlarmVo">
|
|
|
- select id, area_code, obj_type, obj_code, alarm_date, alarm_time, alarm_code, alarm_msg, alarm_type, alarm_state from adm_op_alarm
|
|
|
+ select alarm.id,
|
|
|
+ alarm.area_code,
|
|
|
+ alarm.obj_type,
|
|
|
+ alarm.obj_code,
|
|
|
+ alarm.alarm_date,
|
|
|
+ alarm.alarm_time,
|
|
|
+ alarm.alarm_code,
|
|
|
+ alarm.alarm_msg,
|
|
|
+ alarm.alarm_type,
|
|
|
+ alarm.alarm_state,
|
|
|
+ sub.system_name sub_system_name,
|
|
|
+ alarm.system_code
|
|
|
+ from adm_op_alarm alarm
|
|
|
+ left join adm_ems_subsystem sub on sub.system_code = alarm.system_code
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectAdmOpAlarmList" parameterType="com.ruoyi.ems.domain.AdmOpAlarm" resultMap="AdmOpAlarmResult">
|
|
|
<include refid="selectAdmOpAlarmVo"/>
|
|
|
<where>
|
|
|
- <if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
|
|
|
- <if test="objType != null "> and obj_type = #{objType}</if>
|
|
|
- <if test="objCode != null and objCode != ''"> and obj_code = #{objCode}</if>
|
|
|
- <if test="alarmCode != null and alarmCode != ''"> and alarm_code = #{alarmCode}</if>
|
|
|
- <if test="alarmMsg != null and alarmMsg != ''"> and alarm_msg like concat('%', #{alarmMsg}, '%')</if>
|
|
|
- <if test="alarmType != null "> and alarm_type = #{alarmType}</if>
|
|
|
- <if test="alarmState != null "> and alarm_state = #{alarmState}</if>
|
|
|
+ <if test="areaCode != null and areaCode != ''">and area_code = #{areaCode}</if>
|
|
|
+ <if test="objType != null ">and obj_type = #{objType}</if>
|
|
|
+ <if test="objCode != null and objCode != ''">and obj_code = #{objCode}</if>
|
|
|
+ <if test="alarmCode != null and alarmCode != ''">and alarm_code = #{alarmCode}</if>
|
|
|
+ <if test="systemCode !=null and systemCode != ''">and alarm.system_code = #{systemCode}</if>
|
|
|
+ <if test="alarmMsg != null and alarmMsg != ''">and alarm_msg like concat('%', #{alarmMsg}, '%')</if>
|
|
|
+ <if test="alarmType != null ">and alarm_type = #{alarmType}</if>
|
|
|
+ <if test="alarmState != null ">and alarm_state = #{alarmState}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectAdmOpAlarmById" parameterType="Long" resultMap="AdmOpAlarmResult">
|
|
|
<include refid="selectAdmOpAlarmVo"/>
|
|
|
- where id = #{id}
|
|
|
+ where alarm.id = #{id}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertAdmOpAlarm" parameterType="com.ruoyi.ems.domain.AdmOpAlarm" useGeneratedKeys="true" keyProperty="id">
|
|
@@ -47,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="objCode != null and objCode != ''">obj_code,</if>
|
|
|
<if test="alarmDate != null">alarm_date,</if>
|
|
|
<if test="alarmTime != null">alarm_time,</if>
|
|
|
+ <if test="systemCode !=null">system_code, </if>
|
|
|
<if test="alarmCode != null">alarm_code,</if>
|
|
|
<if test="alarmMsg != null">alarm_msg,</if>
|
|
|
<if test="alarmType != null">alarm_type,</if>
|
|
@@ -58,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="objCode != null and objCode != ''">#{objCode},</if>
|
|
|
<if test="alarmDate != null">#{alarmDate},</if>
|
|
|
<if test="alarmTime != null">#{alarmTime},</if>
|
|
|
+ <if test="systemCode !=null">#{systemCode}, </if>
|
|
|
<if test="alarmCode != null">#{alarmCode},</if>
|
|
|
<if test="alarmMsg != null">#{alarmMsg},</if>
|
|
|
<if test="alarmType != null">#{alarmType},</if>
|
|
@@ -74,6 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="alarmDate != null">alarm_date = #{alarmDate},</if>
|
|
|
<if test="alarmTime != null">alarm_time = #{alarmTime},</if>
|
|
|
<if test="alarmCode != null">alarm_code = #{alarmCode},</if>
|
|
|
+ <if test="systemCode !=null">system_code = #{systemCode},</if>
|
|
|
<if test="alarmMsg != null">alarm_msg = #{alarmMsg},</if>
|
|
|
<if test="alarmType != null">alarm_type = #{alarmType},</if>
|
|
|
<if test="alarmState != null">alarm_state = #{alarmState},</if>
|