|
@@ -4,18 +4,17 @@
|
|
|
|
|
|
<sql id="alarmConfig">
|
|
|
item_id
|
|
|
- ,alarm_level_id,alarm_type,low_low_alarm,low_low_text,
|
|
|
+ ,alarm_level_id,alarm_type,alarm_value_type,low_low_alarm,low_low_text,
|
|
|
low_alarm,low_text,high_alarm,high_text,high_high_alarm,high_high_text,switch_type,open_text,close_text,is_start,create_time
|
|
|
</sql>
|
|
|
|
|
|
<insert id="addAlarmConfig">
|
|
|
-insert into t_alarm_config (item_id, alarm_level_id, alarm_type, low_low_alarm, low_low_text,
|
|
|
- low_alarm, low_text, high_alarm, high_text, high_high_alarm, high_high_text,
|
|
|
- switch_type, open_text, close_text,
|
|
|
- is_start, create_time)
|
|
|
- VALUE (#{itemId}, #{alarmLevelId},#{alarmType},#{lowLowAlarm}, #{lowLowText},
|
|
|
- #{lowAlarm}, #{lowText},#{highAlarm}, #{highText}, #{highHighAlarm}, #{highHighText},
|
|
|
- #{switchType},#{openText},#{closeText},#{isStart},now())
|
|
|
+ insert into t_alarm_config (item_id, alarm_level_id, alarm_type, alarm_value_type, low_low_alarm, low_low_text,
|
|
|
+ low_alarm, low_text, high_alarm, high_text, high_high_alarm, high_high_text,
|
|
|
+ switch_type, open_text, close_text, is_start, create_time)
|
|
|
+ VALUE (#{itemId}, #{alarmLevelId},#{alarmType},#{alarmValueType},#{lowLowAlarm}, #{lowLowText},
|
|
|
+ #{lowAlarm}, #{lowText},#{highAlarm}, #{highText}, #{highHighAlarm}, #{highHighText},
|
|
|
+ #{switchType},#{openText},#{closeText},#{isStart},now())
|
|
|
</insert>
|
|
|
|
|
|
<insert id="addAlarmLogList">
|
|
@@ -31,6 +30,7 @@ insert into t_alarm_config (item_id, alarm_level_id, alarm_type, low_low_alarm,
|
|
|
update t_alarm_config
|
|
|
set alarm_level_id=#{alarmLevelId},
|
|
|
alarm_type=#{alarmType},
|
|
|
+ alarm_value_type=#{alarmValueType},
|
|
|
low_low_alarm=#{lowLowAlarm},
|
|
|
low_low_text=#{lowLowText},
|
|
|
low_alarm=#{lowAlarm},
|
|
@@ -274,14 +274,15 @@ insert into t_alarm_config (item_id, alarm_level_id, alarm_type, low_low_alarm,
|
|
|
|
|
|
<insert id="addAlarmConfigForExcel">
|
|
|
<foreach collection="itemList" item="item" index="index" separator=";">
|
|
|
- insert into t_alarm_config (item_id, alarm_level_id, alarm_type, low_low_alarm, low_low_text,
|
|
|
+ insert into t_alarm_config (item_id, alarm_level_id, alarm_type, alarm_value_type, low_low_alarm, low_low_text,
|
|
|
low_alarm, low_text, high_alarm, high_text, high_high_alarm, high_high_text,
|
|
|
switch_type, open_text, close_text,is_start, create_time)
|
|
|
- VALUE (#{item.itemId}, #{item.alarmLevelId},#{item.alarmType},#{item.lowLowAlarm}, #{item.lowLowText},
|
|
|
+ VALUE (#{item.itemId}, #{item.alarmLevelId},#{item.alarmType},#{item.alarmValueType},#{item.lowLowAlarm}, #{item.lowLowText},
|
|
|
#{item.lowAlarm}, #{item.lowText},#{item.highAlarm}, #{item.highText}, #{item.highHighAlarm}, #{item.highHighText},
|
|
|
#{item.switchType},#{item.openText},#{item.closeText},#{item.isStart},now())
|
|
|
ON DUPLICATE KEY UPDATE alarm_level_id=#{item.alarmLevelId},
|
|
|
alarm_type=#{item.alarmType},
|
|
|
+ alarm_value_type=#{item.alarmValueType},
|
|
|
low_low_alarm=#{item.lowLowAlarm},
|
|
|
low_low_text=#{item.lowLowText},
|
|
|
low_alarm=#{item.lowAlarm},
|