From cf2d3b7c268aba69e96570a299d54b4deca60d00 Mon Sep 17 00:00:00 2001 From: wenjy Date: Wed, 6 Apr 2022 09:45:31 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E4=BB=A3=E7=A0=81=E5=90=88?= =?UTF-8?q?=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-druid.yml | 10 ++++----- .../record/recordAlarm/recordAlarm.html | 8 +++---- .../templates/section/substation.html | 19 +++++----------- .../templates/section/transformer-detail.html | 4 ++-- .../com/ruoyi/system/domain/RecordAlarm.java | 22 +++++++++++++++++++ .../mapper/system/RecordAlarmMapper.xml | 13 ++++++++++- 6 files changed, 50 insertions(+), 26 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index ed3ae52..abaf8f6 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,12 +6,12 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://121.36.58.109:3306/jrm-intelligent-iot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - username: root - password: Haiwei123456 -# url: jdbc:mysql://localhost:3306/jrm-intelligent-iot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# url: jdbc:mysql://121.36.58.109:3306/jrm-intelligent-iot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 # username: root -# password: root +# password: Haiwei123456 + url: jdbc:mysql://localhost:3306/jrm-intelligent-iot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root + password: root # 从库数据源 slave: # 从数据源开关/默认关闭 diff --git a/ruoyi-admin/src/main/resources/templates/record/recordAlarm/recordAlarm.html b/ruoyi-admin/src/main/resources/templates/record/recordAlarm/recordAlarm.html index b089d2c..ccfc22b 100644 --- a/ruoyi-admin/src/main/resources/templates/record/recordAlarm/recordAlarm.html +++ b/ruoyi-admin/src/main/resources/templates/record/recordAlarm/recordAlarm.html @@ -44,7 +44,7 @@
- + 导出 @@ -103,7 +103,7 @@ field: 'collectTime', title: '采集时间' }, - { + /*{ title: '操作', align: 'center', formatter: function(value, row, index) { @@ -112,7 +112,7 @@ actions.push('删除'); return actions.join(''); } - }] + }*/] }; $.table.init(options); }); diff --git a/ruoyi-admin/src/main/resources/templates/section/substation.html b/ruoyi-admin/src/main/resources/templates/section/substation.html index e5d5969..6bf0ede 100644 --- a/ruoyi-admin/src/main/resources/templates/section/substation.html +++ b/ruoyi-admin/src/main/resources/templates/section/substation.html @@ -298,19 +298,6 @@ width: ['10%', '10%', '10%', '30%', '10%', '10%', '10%'], }) - const alertListData = [ - ['01', 'A1', '设备高温', '1#厂区', '无线检测 相对检测值为10°-20°,其值为21°-25°', '越限', '10:00:00', '已处理'], - ['02', 'A1', '设备高温', '1#厂区', '无线检测 相对检测值为10°-20°,其值为21°-25°', '越限', '10:00:00', '未处理'], - ['03', 'A1', '设备高温', '1#厂区', '无线检测 相对检测值为10°-20°,其值为21°-25°', '越限', '10:00:00', '已处理'], - ['04', 'A1', '设备高温', '1#厂区', '无线检测 相对检测值为10°-20°,其值为21°-25°', '越限', '10:00:00', '未处理'], - ['05', 'A1', '设备高温', '1#厂区', '无线检测 相对检测值为10°-20°,其值为21°-25°', '越限', '10:00:00', '已处理'], - ['06', 'A1', '设备高温', '1#厂区', '无线检测 相对检测值为10°-20°,其值为21°-25°', '越限', '10:00:00', '已处理'], - ]; - - alertList.loadData(alertListData, Object.keys(alertListColumns)) - - console.log(alertListData) - //获取告警信息 $(() => { $.ajax({ @@ -320,7 +307,7 @@ success: (res) => { console.log("告警信息:"+res); - alertList.loadData(res.map(value => [value.alarmModuleId.substring(0,2)+"...", value.alarmModuleText,value.sensorLocation,`${"无线检测 相对检测值为:"+value.minValue+"-"+value.maxValue+",其值为:"+value.alarmValue}`, "超限", value.collectTime,`${value.disposeFlag==1?'已处理':'未处理'}`]), Object.keys(alertListColumns)) + alertList.loadData(res.map(value => [value.alarmModuleId.substring(0,2)+"...", value.alarmModuleText,value.sensorLocation,`${"无线检测 相对检测值为:"+value.minValue+"-"+value.maxValue+",其值为:"+value.alarmValue}`, "超限", value.collectTime,`${value.disposeFlag==1?'已处理':'未处理'}`]), Object.keys(alertListColumns)) }, error: () => { @@ -339,6 +326,10 @@ $(() => { resize() }) + + const alarmDispose = function (res) { + console.log("ces:"+res); + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/RecordAlarm.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/RecordAlarm.java index cdfeb50..bf5b53d 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/RecordAlarm.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/RecordAlarm.java @@ -43,6 +43,12 @@ public class RecordAlarm extends BaseEntity /** 处理标识 */ private Long disposeFlag; + /** 处理方式 */ + private String disposeMode; + + /** 告警原因 */ + private String alarmReason; + public void setSensorId(String sensorId) { this.sensorId = sensorId; @@ -106,6 +112,22 @@ public class RecordAlarm extends BaseEntity this.disposeFlag = disposeFlag; } + public String getDisposeMode() { + return disposeMode; + } + + public void setDisposeMode(String disposeMode) { + this.disposeMode = disposeMode; + } + + public String getAlarmReason() { + return alarmReason; + } + + public void setAlarmReason(String alarmReason) { + this.alarmReason = alarmReason; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/ruoyi-system/src/main/resources/mapper/system/RecordAlarmMapper.xml b/ruoyi-system/src/main/resources/mapper/system/RecordAlarmMapper.xml index e3867a1..5430022 100644 --- a/ruoyi-system/src/main/resources/mapper/system/RecordAlarmMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/RecordAlarmMapper.xml @@ -12,6 +12,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -28,10 +30,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + - select Sensor_Id, AlarmType_Id, Min_Value, Alarm_Value, Max_Value,Dispose_Flag, Collect_Time from record_alarm + select Sensor_Id, AlarmType_Id, Min_Value, Alarm_Value, Max_Value,Dispose_Flag, Collect_Time,Dispose_Mode,Alarm_Reason from record_alarm