change - 参数配置添加报警匹配参数字段

main
wenjy 3 years ago
parent 0e2f032a44
commit 26089a2727

@ -32,6 +32,15 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">报警参数:</label>
<div class="col-sm-8">
<select name="alarmParam" class="form-control m-b" th:with="type=${@alarmTypeService.getParamType()}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.alarmtypeName}" th:value="${dict.alarmtypeId}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">排序标识:</label>
<div class="col-sm-8">

@ -33,6 +33,15 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">报警参数:</label>
<div class="col-sm-8">
<select name="alarmParam" class="form-control m-b" th:with="type=${@alarmTypeService.getParamType()}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.alarmtypeName}" th:value="${dict.alarmtypeId}" th:field="*{alarmParam}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">排序标识:</label>
<div class="col-sm-8">

@ -40,6 +40,8 @@ public class SysParamConfig extends BaseEntity
/** 排序标识 */
private Long orderFlag;
private String alarmParam;
public void setObjId(Long objId)
{
this.objId = objId;
@ -102,6 +104,14 @@ public class SysParamConfig extends BaseEntity
this.orderFlag = orderFlag;
}
public String getAlarmParam() {
return alarmParam;
}
public void setAlarmParam(String alarmParam) {
this.alarmParam = alarmParam;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -2,6 +2,8 @@ package com.ruoyi.system.service.impl;
import java.util.List;
import java.util.ArrayList;
import java.util.stream.Collectors;
import com.ruoyi.common.core.domain.Ztree;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -17,7 +19,7 @@ import com.ruoyi.common.core.text.Convert;
* @author wenjy
* @date 2022-02-14
*/
@Service
@Service("alarmTypeService")
public class BaseAlarmTypeServiceImpl implements IBaseAlarmTypeService
{
@Autowired
@ -118,4 +120,15 @@ public class BaseAlarmTypeServiceImpl implements IBaseAlarmTypeService
}
return ztrees;
}
/**
*
* @author WenJY
* @date 2022/3/25 15:30
* @return java.util.List<com.ruoyi.system.domain.BaseAlarmType>
*/
public List<BaseAlarmType> getParamType(){
List<BaseAlarmType> baseAlarmTypes = baseAlarmTypeMapper.selectBaseAlarmTypeList(new BaseAlarmType());
return baseAlarmTypes.stream().filter(x->!x.getParentId().isEmpty()).collect(Collectors.toList());
}
}

@ -28,10 +28,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="alarmtypeName != null and alarmtypeName != ''"> and alarmType_Name like concat('%', #{alarmtypeName}, '%')</if>
<if test="parentId != null and parentId != ''"> and parent_Id = #{parentId}</if>
<if test="enableFlag != null "> and Enable_Flag = #{enableFlag}</if>
<if test="createBy != null and createBy != ''"> and Create_By = #{createBy}</if>
<if test="createTime != null "> and Create_Time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and Update_By = #{updateBy}</if>
<if test="updateTime != null "> and Update_Time = #{updateTime}</if>
</where>
order by parent_Id
</select>

@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="paramText" column="Param_Text" />
<result property="enableFlag" column="Enable_Flag" />
<result property="visibleFlag" column="Visible_Flag" />
<result property="alarmParam" column="Alarm_Param" />
<result property="orderFlag" column="Order_Flag" />
<result property="createBy" column="Create_By" />
<result property="createTime" column="Create_Time" />
@ -19,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectSysParamConfigVo">
select ObjId, Param_Type, Param_Title, Param_Text, Enable_Flag, Create_By, Create_Time, Update_By, Update_Time,Visible_Flag,Order_Flag from sys_param_config
select ObjId, Param_Type, Param_Title, Param_Text, Enable_Flag, Create_By, Create_Time, Update_By, Update_Time,Visible_Flag,Order_Flag,Alarm_Param from sys_param_config
</sql>
<select id="selectSysParamConfigList" parameterType="SysParamConfig" resultMap="SysParamConfigResult">
@ -46,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="paramText != null">Param_Text,</if>
<if test="enableFlag != null">Enable_Flag,</if>
<if test="visibleFlag != null">Visible_Flag,</if>
<if test="alarmParam != null">Alarm_Param,</if>
<if test="orderFlag != null">Order_Flag,</if>
<if test="createBy != null">Create_By,</if>
<if test="createTime != null">Create_Time,</if>
@ -58,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="paramText != null">#{paramText},</if>
<if test="enableFlag != null">#{enableFlag},</if>
<if test="visibleFlag != null">#{visibleFlag},</if>
<if test="alarmParam != null">#{alarmParam},</if>
<if test="orderFlag != null">#{orderFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
@ -74,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="paramText != null">Param_Text = #{paramText},</if>
<if test="enableFlag != null">Enable_Flag = #{enableFlag},</if>
<if test="visibleFlag != null">Visible_Flag = #{visibleFlag},</if>
<if test="alarmParam != null">Alarm_Param = #{alarmParam},</if>
<if test="orderFlag != null">Order_Flag = #{orderFlag},</if>
<if test="createBy != null">Create_By = #{createBy},</if>
<if test="createTime != null">Create_Time = #{createTime},</if>

Loading…
Cancel
Save