From 548a337a76dfee829bb6723c3e6bf24a6232fe86 Mon Sep 17 00:00:00 2001 From: weitang Date: Mon, 26 May 2025 09:16:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/VoicePatrolLogController.java | 5 +-- .../controller/AlarmLogController.java | 3 +- .../mapper/patroltask/AlarmLogMapper.xml | 44 +++++++++++++++++++ 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/riis-system/src/main/java/com/yfd/platform/modules/basedata/controller/VoicePatrolLogController.java b/riis-system/src/main/java/com/yfd/platform/modules/basedata/controller/VoicePatrolLogController.java index 15e73b5..d11361f 100644 --- a/riis-system/src/main/java/com/yfd/platform/modules/basedata/controller/VoicePatrolLogController.java +++ b/riis-system/src/main/java/com/yfd/platform/modules/basedata/controller/VoicePatrolLogController.java @@ -27,6 +27,7 @@ import javax.annotation.Resource; import java.util.Date; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.TimeUnit; /** *

@@ -48,8 +49,6 @@ public class VoicePatrolLogController { @Resource private ISubstationPatroldeviceService substationPatroldeviceService; @Resource - private HttpRESTfulUtils httpRESTfulUtils; - @Resource private VoiceServerService voiceServerService; @GetMapping("/getVoicePatrolPage") @@ -105,7 +104,7 @@ public class VoicePatrolLogController { if (aBoolean != null && aBoolean) { throw new RuntimeException("当前设备正在录制"); } - redisTemplate.opsForValue().set(id, "1", 5 * 60); + redisTemplate.opsForValue().set(id, "1", 5 * 60, TimeUnit.SECONDS); // 生成日志对象基础信息(同步执行) VoicePatrolLog log = buildBaseLog(substationPatroldevice, duration); // 提交异步任务 diff --git a/riis-system/src/main/java/com/yfd/platform/modules/patroltask/controller/AlarmLogController.java b/riis-system/src/main/java/com/yfd/platform/modules/patroltask/controller/AlarmLogController.java index d412d8a..58d985c 100644 --- a/riis-system/src/main/java/com/yfd/platform/modules/patroltask/controller/AlarmLogController.java +++ b/riis-system/src/main/java/com/yfd/platform/modules/patroltask/controller/AlarmLogController.java @@ -193,14 +193,13 @@ public class AlarmLogController { public ResponseResult getAlarmLogPage(Page> page, String stationCode, String taskAlarmType, String alarmLevel, String checkFlag,String alarmSourceType, String startDate, String endDate) { if (StrUtil.isBlank(stationCode)) { - return ResponseResult.error("未传变电站信息"); + return ResponseResult.successData(page); } Page> alarmList = alarmLogService.getAlarmLogPage(page, stationCode, taskAlarmType, alarmLevel, checkFlag,alarmSourceType, startDate, endDate); List> records = alarmList.getRecords(); records.forEach(r -> { - String patroldeviceCode = r.get("patroldeviceCode").toString(); LambdaQueryWrapper queryWrapper1 = new LambdaQueryWrapper<>(); queryWrapper1.eq(DeviceChannel::getDeviceid, patroldeviceCode).select(DeviceChannel::getDeviceid, diff --git a/riis-system/src/main/resources/mapper/patroltask/AlarmLogMapper.xml b/riis-system/src/main/resources/mapper/patroltask/AlarmLogMapper.xml index b535348..cc45a39 100644 --- a/riis-system/src/main/resources/mapper/patroltask/AlarmLogMapper.xml +++ b/riis-system/src/main/resources/mapper/patroltask/AlarmLogMapper.xml @@ -176,6 +176,50 @@ AND task_alarm_type != '4' AND station_id = #{stationId} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +