diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/WisdomScenarioContorller.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/WisdomScenarioContorller.java index 51393ca..57e8e09 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/WisdomScenarioContorller.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/WisdomScenarioContorller.java @@ -174,7 +174,7 @@ public class WisdomScenarioContorller extends BaseController { @GetMapping("/getAlarmByUid") @ResponseBody public String getAlarmByUid(String alarmuid) { - RecordAlarm recordAlarm = recordAlarmService.selectRecordAlarmBySensorId(alarmuid); + RecordAlarmDto recordAlarm = recordAlarmService.selectRecordAlarmBySensorId(alarmuid); return JSONArray.toJSONString(recordAlarm); } diff --git a/ruoyi-admin/src/main/resources/templates/section/substation.html b/ruoyi-admin/src/main/resources/templates/section/substation.html index a14362a..0a4be16 100644 --- a/ruoyi-admin/src/main/resources/templates/section/substation.html +++ b/ruoyi-admin/src/main/resources/templates/section/substation.html @@ -302,7 +302,7 @@ }); //获取监控单元模块 - const alertListColumns = ['告警编号', '告警单元', '告警位置', '告警信息', '类型', '告警时间', '处理情况'] + const alertListColumns = ['告警编号', '告警类型', '告警单元', '告警信息', '告警位置', '告警时间', '处理情况'] const alertList = new AutoScrollTable(document.getElementById("alert-list"), alertListColumns, { width: ['10%', '10%', '10%', '30%', '10%', '10%', '10%'], }) @@ -316,7 +316,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, 4) + "...", value.alarmModuleText, value.monitorUnitName, `${"无线检测 相对检测值为:" + value.minValue + "-" + value.maxValue + ",其值为:" + value.alarmValue}`, value.sensorLocation, value.collectTime, `${value.disposeFlag == 1 ? '' : ''}`]), Object.keys(alertListColumns)) }, error: () => { @@ -347,6 +347,15 @@
+
+ +
++ +
++ +
@@ -377,6 +386,15 @@
+
+ +
++ +
++ +
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/RecordAlarmDto.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/RecordAlarmDto.java index 041b27e..8691ded 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/RecordAlarmDto.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/RecordAlarmDto.java @@ -24,4 +24,6 @@ public class RecordAlarmDto extends RecordAlarm { private String alarmInfo; + private String monitorUnitName; + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecordAlarmMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecordAlarmMapper.java index de52396..6a00578 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecordAlarmMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecordAlarmMapper.java @@ -18,7 +18,7 @@ public interface RecordAlarmMapper * @param sensorId 异常数据记录主键 * @return 异常数据记录 */ - public RecordAlarm selectRecordAlarmBySensorId(String sensorId); + public RecordAlarmDto selectRecordAlarmBySensorId(String sensorId); /** * 查询异常数据记录列表 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IRecordAlarmService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IRecordAlarmService.java index 86a549e..19a3140 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IRecordAlarmService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IRecordAlarmService.java @@ -18,7 +18,7 @@ public interface IRecordAlarmService * @param sensorId 异常数据记录主键 * @return 异常数据记录 */ - public RecordAlarm selectRecordAlarmBySensorId(String sensorId); + public RecordAlarmDto selectRecordAlarmBySensorId(String sensorId); /** * 查询异常数据记录列表 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecordAlarmServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecordAlarmServiceImpl.java index 97fe488..5af45e6 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecordAlarmServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecordAlarmServiceImpl.java @@ -29,7 +29,7 @@ public class RecordAlarmServiceImpl implements IRecordAlarmService * @return 异常数据记录 */ @Override - public RecordAlarm selectRecordAlarmBySensorId(String sensorId) + public RecordAlarmDto selectRecordAlarmBySensorId(String sensorId) { return recordAlarmMapper.selectRecordAlarmBySensorId(sensorId); } diff --git a/ruoyi-system/src/main/resources/mapper/system/RecordAlarmMapper.xml b/ruoyi-system/src/main/resources/mapper/system/RecordAlarmMapper.xml index 926a374..a0c5004 100644 --- a/ruoyi-system/src/main/resources/mapper/system/RecordAlarmMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/RecordAlarmMapper.xml @@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"