|
|
|
@ -12,6 +12,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="maxValue" column="Max_Value" />
|
|
|
|
|
<result property="disposeFlag" column="Dispose_Flag" />
|
|
|
|
|
<result property="collectTime" column="Collect_Time" />
|
|
|
|
|
<result property="disposeMode" column="Dispose_Mode" />
|
|
|
|
|
<result property="alarmReason" column="Alarm_Reason" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<resultMap type="RecordAlarmDto" id="RecordAlarmDtoResult">
|
|
|
|
@ -28,10 +30,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="sensorName" column="Sensor_Name" />
|
|
|
|
|
<result property="sensorLocation" column="Sensor_Location" />
|
|
|
|
|
<result property="alarmInfo" column="Alarm_Info" />
|
|
|
|
|
<result property="disposeMode" column="Dispose_Mode" />
|
|
|
|
|
<result property="alarmReason" column="Alarm_Reason" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectRecordAlarmVo">
|
|
|
|
|
select Sensor_Id, AlarmType_Id, Min_Value, Alarm_Value, Max_Value,Dispose_Flag, Collect_Time from record_alarm
|
|
|
|
|
select Sensor_Id, AlarmType_Id, Min_Value, Alarm_Value, Max_Value,Dispose_Flag, Collect_Time,Dispose_Mode,Alarm_Reason from record_alarm
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectRecordAlarmList" parameterType="RecordAlarm" resultMap="RecordAlarmResult">
|
|
|
|
@ -60,6 +64,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="alarmValue != null">Alarm_Value,</if>
|
|
|
|
|
<if test="maxValue != null">Max_Value,</if>
|
|
|
|
|
<if test="collectTime != null">Collect_Time,</if>
|
|
|
|
|
<if test="disposeMode != null">Dispose_Mode,</if>
|
|
|
|
|
<if test="alarmReason != null">Alarm_Reason,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="sensorId != null">#{sensorId},</if>
|
|
|
|
@ -68,6 +74,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="alarmValue != null">#{alarmValue},</if>
|
|
|
|
|
<if test="maxValue != null">#{maxValue},</if>
|
|
|
|
|
<if test="collectTime != null">#{collectTime},</if>
|
|
|
|
|
<if test="disposeMode != null">#{disposeMode},</if>
|
|
|
|
|
<if test="alarmReason != null">#{alarmReason},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -79,6 +87,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="alarmValue != null">Alarm_Value = #{alarmValue},</if>
|
|
|
|
|
<if test="maxValue != null">Max_Value = #{maxValue},</if>
|
|
|
|
|
<if test="collectTime != null">Collect_Time = #{collectTime},</if>
|
|
|
|
|
<if test="disposeMode != null">Dispose_Mode = #{disposeMode},</if>
|
|
|
|
|
<if test="alarmReason != null">Alarm_Reason = #{alarmReason},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where Sensor_Id = #{sensorId}
|
|
|
|
|
</update>
|
|
|
|
@ -98,6 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
select t1.AlarmModule_Id,
|
|
|
|
|
t1.AlarmModule_Text,
|
|
|
|
|
t3.Sensor_Location,
|
|
|
|
|
t3.Sensor_Name,
|
|
|
|
|
t4.Min_Value,
|
|
|
|
|
t4.Max_Value,
|
|
|
|
|
t4.Alarm_Value,
|
|
|
|
|