feat(base): 添加设备参数预警功能

- 添加参数上下限阈值字段 upperLimit 和 lowerLimit
- 添加预警级别字段 alertLevel 支持一般/重要/紧急三级预警
- 添加是否启用预警字段 alertEnabled 支持启用/禁用选项
- 更新 BaseDeviceParam 实体类的 getter 和 setter 方法
- 修改 BaseDeviceParamMapper.xml 映射文件支持新字段的增删改查操作
- 配置 Excel 导入导出功能支持预警相关字段
master
zangch@mesnac.com 1 week ago
parent 12614bd6e3
commit ceee55e8c4

@ -78,6 +78,30 @@ public class BaseDeviceParam extends BaseEntity {
@Excel(name = "读取频率")
private Long readFrequency;
/**
*
*/
@Excel(name = "上限阈值")
private Double upperLimit;
/**
*
*/
@Excel(name = "下限阈值")
private Double lowerLimit;
/**
* (1/2/3)
*/
@Excel(name = "预警级别", readConverterExp = "1=一般,2=重要,3=紧急")
private String alertLevel;
/**
* (0/1)
*/
@Excel(name = "启用预警", readConverterExp = "0=否,1=是")
private String alertEnabled;
/**
*
*/
@ -230,6 +254,38 @@ public class BaseDeviceParam extends BaseEntity {
return updatedTime;
}
public Double getUpperLimit() {
return upperLimit;
}
public void setUpperLimit(Double upperLimit) {
this.upperLimit = upperLimit;
}
public Double getLowerLimit() {
return lowerLimit;
}
public void setLowerLimit(Double lowerLimit) {
this.lowerLimit = lowerLimit;
}
public String getAlertLevel() {
return alertLevel;
}
public void setAlertLevel(String alertLevel) {
this.alertLevel = alertLevel;
}
public String getAlertEnabled() {
return alertEnabled;
}
public void setAlertEnabled(String alertEnabled) {
this.alertEnabled = alertEnabled;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

@ -20,6 +20,10 @@
<result property="updatedTime" column="updated_time"/>
<result property="deviceName" column="device_name"/>
<result property="productLineName" column="PRODUCT_LINE_NAME"/>
<result property="upperLimit" column="upper_limit"/>
<result property="lowerLimit" column="lower_limit"/>
<result property="alertLevel" column="alert_level"/>
<result property="alertEnabled" column="alert_enabled"/>
</resultMap>
<sql id="selectBaseDeviceParamVo">
@ -31,6 +35,10 @@
dp.param_type,
dp.device_code,
dp.read_frequency,
dp.upper_limit,
dp.lower_limit,
dp.alert_level,
dp.alert_enabled,
dp.is_flag,
dp.created_by,
dp.created_time,
@ -96,6 +104,10 @@
<if test="paramType != null">param_type,</if>
<if test="deviceCode != null">device_code,</if>
<if test="readFrequency != null">read_frequency,</if>
<if test="upperLimit != null">upper_limit,</if>
<if test="lowerLimit != null">lower_limit,</if>
<if test="alertLevel != null">alert_level,</if>
<if test="alertEnabled != null">alert_enabled,</if>
<if test="isFlag != null">is_flag,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
@ -111,6 +123,10 @@
<if test="paramType != null">#{paramType},</if>
<if test="deviceCode != null">#{deviceCode},</if>
<if test="readFrequency != null">#{readFrequency},</if>
<if test="upperLimit != null">#{upperLimit},</if>
<if test="lowerLimit != null">#{lowerLimit},</if>
<if test="alertLevel != null">#{alertLevel},</if>
<if test="alertEnabled != null">#{alertEnabled},</if>
<if test="isFlag != null">#{isFlag},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
@ -129,6 +145,10 @@
<if test="paramType != null">param_type = #{paramType},</if>
<if test="deviceCode != null">device_code = #{deviceCode},</if>
<if test="readFrequency != null">read_frequency = #{readFrequency},</if>
<if test="upperLimit != null">upper_limit = #{upperLimit},</if>
<if test="lowerLimit != null">lower_limit = #{lowerLimit},</if>
<if test="alertLevel != null">alert_level = #{alertLevel},</if>
<if test="alertEnabled != null">alert_enabled = #{alertEnabled},</if>
<if test="isFlag != null">is_flag = #{isFlag},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>

Loading…
Cancel
Save