告警优化
This commit is contained in:
parent
b1ec3216a3
commit
2fecf821e9
@ -181,7 +181,7 @@ public class DeviceAlarmRecordServiceImpl extends ServiceImpl<DeviceAlarmRecordM
|
||||
.set(DeviceAlarmRecord::getStatus, "09")
|
||||
.set(DeviceAlarmRecord::getFixTime, LocalDateTime.now());
|
||||
//故障消除时间
|
||||
deviceAlarmRecordMapper.update(null, queryWrapper);
|
||||
this.update(null, queryWrapper);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ public class WeatherLogController {
|
||||
@Resource
|
||||
private IWeatherLogService weatherLogService;
|
||||
|
||||
@GetMapping("/getWeatherLogList")
|
||||
@GetMapping("/getWeatherLog")
|
||||
@ApiOperation("查询环境信息")
|
||||
public ResponseResult getWeatherLogList(String stationId) {
|
||||
|
||||
|
@ -59,9 +59,10 @@ public class AlarmLogController {
|
||||
if (StrUtil.isBlank(stationId)) {
|
||||
return ResponseResult.error("未传变电站信息");
|
||||
}
|
||||
List<String> idList = Arrays.asList(stationId.split(","));
|
||||
//TODO 整合辅控告警
|
||||
LambdaQueryWrapper<AlarmLog> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.in(AlarmLog::getStationId, idList).eq(AlarmLog::getDatastatus, "1").eq(AlarmLog::getCheckFlag, 0).select(AlarmLog::getId,
|
||||
queryWrapper.eq(AlarmLog::getStationId, stationId).eq(AlarmLog::getDatastatus, "1").eq(AlarmLog::getCheckFlag
|
||||
, 0).select(AlarmLog::getId,
|
||||
AlarmLog::getContent, AlarmLog::getAlarmLevel, AlarmLog::getAlarmDate, AlarmLog::getStationName).orderByDesc(AlarmLog::getAlarmDate);
|
||||
List<Map<String, Object>> maps = alarmLogService.listMaps(queryWrapper);
|
||||
return ResponseResult.successData(maps);
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yfd.platform.modules.patroltask.domain.AlarmLog;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -34,10 +35,11 @@ public interface AlarmLogMapper extends BaseMapper<AlarmLog> {
|
||||
* 参数说明 monitorType
|
||||
* 参数说明 startDate
|
||||
* 参数说明 endDate
|
||||
* 返回值说明: com.baomidou.mybatisplus.extension.plugins.pagination.Page<java.util.Map<java.lang.String,java.lang.Object>>
|
||||
* 返回值说明: com.baomidou.mybatisplus.extension.plugins.pagination.Page<java.util.Map<java.lang.String,java.lang
|
||||
* .Object>>
|
||||
***********************************/
|
||||
Page<Map<String, Object>> getAlarmListPage(Page<Map<String, Object>> page, String patrolDeviceCode, String monitorType, String startDate, String endDate);
|
||||
|
||||
Page<Map<String, Object>> getAlarmListPage(Page<Map<String, Object>> page, String patrolDeviceCode,
|
||||
String monitorType, String startDate, String endDate);
|
||||
|
||||
/**********************************
|
||||
* 用途说明: 告警准确率统计
|
||||
@ -46,4 +48,10 @@ public interface AlarmLogMapper extends BaseMapper<AlarmLog> {
|
||||
***********************************/
|
||||
Map<String, Object> getConfirmationRate(String stationId);
|
||||
|
||||
/**********************************
|
||||
* 用途说明: 查询报警信息
|
||||
* 参数说明 stationId
|
||||
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
|
||||
***********************************/
|
||||
List<Map<String, Object>> getAlarmLogList(String stationId);
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import com.yfd.platform.modules.patroltask.domain.AlarmLog;
|
||||
import com.yfd.platform.modules.patroltask.domain.TaskResult;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -69,4 +70,11 @@ public interface IAlarmLogService extends IService<AlarmLog> {
|
||||
***********************************/
|
||||
Map<String, Object> getConfirmationRate(String stationId);
|
||||
|
||||
/**********************************
|
||||
* 用途说明: 查询报警信息
|
||||
* 参数说明 stationId
|
||||
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
|
||||
***********************************/
|
||||
List<Map<String, Object>> getAlarmLogList(String stationId);
|
||||
|
||||
}
|
||||
|
@ -403,6 +403,16 @@ public class AlarmLogServiceImpl extends ServiceImpl<AlarmLogMapper, AlarmLog> i
|
||||
return alarmLogMapper.getConfirmationRate(stationId);
|
||||
}
|
||||
|
||||
/**********************************
|
||||
* 用途说明: 查询报警信息
|
||||
* 参数说明 stationId
|
||||
* 返回值说明: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
|
||||
***********************************/
|
||||
@Override
|
||||
public List<Map<String, Object>> getAlarmLogList(String stationId) {
|
||||
return alarmLogMapper.getAlarmLogList(stationId);
|
||||
}
|
||||
|
||||
/**********************************
|
||||
* 用途说明: 设置任务结果数据
|
||||
* 参数说明 taskResult
|
||||
|
@ -74,4 +74,25 @@
|
||||
AND station_id = #{stationId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getAlarmLogList" resultType="java.util.Map">
|
||||
(
|
||||
SELECT
|
||||
record_id AS id,
|
||||
station_id,
|
||||
alarm_message AS content,
|
||||
alarm_time AS alarm_date
|
||||
FROM `fk_device_alarm_record`
|
||||
)
|
||||
UNION ALL
|
||||
(
|
||||
SELECT
|
||||
id,
|
||||
station_id,
|
||||
content,
|
||||
alarm_date
|
||||
FROM iis_alarm_log
|
||||
)
|
||||
|
||||
ORDER BY alarm_date DESC;
|
||||
</select>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user