From 26089a2727fbe60508d2f7ddec76b105b91c2038 Mon Sep 17 00:00:00 2001 From: wenjy Date: Fri, 25 Mar 2022 16:48:21 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E5=8F=82=E6=95=B0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=B7=BB=E5=8A=A0=E6=8A=A5=E8=AD=A6=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/base/sysParamConfig/add.html | 9 +++++++++ .../templates/base/sysParamConfig/edit.html | 9 +++++++++ .../com/ruoyi/system/domain/SysParamConfig.java | 10 ++++++++++ .../service/impl/BaseAlarmTypeServiceImpl.java | 15 ++++++++++++++- .../mapper/system/BaseAlarmTypeMapper.xml | 4 ---- .../mapper/system/SysParamConfigMapper.xml | 6 +++++- 6 files changed, 47 insertions(+), 6 deletions(-) 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