diff --git a/ruoyi-admin/src/main/resources/templates/base/sysParamConfig/add.html b/ruoyi-admin/src/main/resources/templates/base/sysParamConfig/add.html index aa0b8ad..dec6e7b 100644 --- a/ruoyi-admin/src/main/resources/templates/base/sysParamConfig/add.html +++ b/ruoyi-admin/src/main/resources/templates/base/sysParamConfig/add.html @@ -32,6 +32,15 @@ +
+ +
+ +
+
diff --git a/ruoyi-admin/src/main/resources/templates/base/sysParamConfig/edit.html b/ruoyi-admin/src/main/resources/templates/base/sysParamConfig/edit.html index 305f5d5..1a3c26d 100644 --- a/ruoyi-admin/src/main/resources/templates/base/sysParamConfig/edit.html +++ b/ruoyi-admin/src/main/resources/templates/base/sysParamConfig/edit.html @@ -33,6 +33,15 @@
+
+ +
+ +
+
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysParamConfig.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysParamConfig.java index 059cda6..9476657 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysParamConfig.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysParamConfig.java @@ -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) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseAlarmTypeServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseAlarmTypeServiceImpl.java index 2bded4a..4505640 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseAlarmTypeServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseAlarmTypeServiceImpl.java @@ -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 + */ + public List getParamType(){ + List baseAlarmTypes = baseAlarmTypeMapper.selectBaseAlarmTypeList(new BaseAlarmType()); + return baseAlarmTypes.stream().filter(x->!x.getParentId().isEmpty()).collect(Collectors.toList()); + } } diff --git a/ruoyi-system/src/main/resources/mapper/system/BaseAlarmTypeMapper.xml b/ruoyi-system/src/main/resources/mapper/system/BaseAlarmTypeMapper.xml index 8486936..198ecf3 100644 --- a/ruoyi-system/src/main/resources/mapper/system/BaseAlarmTypeMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/BaseAlarmTypeMapper.xml @@ -28,10 +28,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and alarmType_Name like concat('%', #{alarmtypeName}, '%') and parent_Id = #{parentId} and Enable_Flag = #{enableFlag} - and Create_By = #{createBy} - and Create_Time = #{createTime} - and Update_By = #{updateBy} - and Update_Time = #{updateTime} order by parent_Id diff --git a/ruoyi-system/src/main/resources/mapper/system/SysParamConfigMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysParamConfigMapper.xml index 355df3e..afcb167 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysParamConfigMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysParamConfigMapper.xml @@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -19,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - 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