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} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +