暂降区域统计修改暂态事件统计类型:暂降改成不是录波
This commit is contained in:
@@ -32,8 +32,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,9 +53,11 @@ public class AreaAnalysisServiceImpl implements AreaAnalysisService {
|
|||||||
private final EventDetailService eventDetailService;
|
private final EventDetailService eventDetailService;
|
||||||
@Override
|
@Override
|
||||||
public AreaAnalysisVO getEventReason(DeviceInfoParam.BusinessParam deviceInfoParam) {
|
public AreaAnalysisVO getEventReason(DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||||
|
//根据单体系统这里只要不为录波的都统计
|
||||||
//获取暂降字典信息
|
//获取暂降字典信息
|
||||||
DictData voltageData = dicDataFeignClient.getDicDataByCode(DicDataEnum.VOLTAGE_DIP.getCode()).getData();
|
DictData recordingWaveData = dicDataFeignClient.getDicDataByCode(DicDataEnum.RECORDING_WAVE.getCode()).getData();
|
||||||
if(ObjectUtil.isNull(voltageData)){
|
|
||||||
|
if(ObjectUtil.isNull(recordingWaveData)){
|
||||||
throw new BusinessException(DeviceResponseEnum.DIC_GET_EMPTY);
|
throw new BusinessException(DeviceResponseEnum.DIC_GET_EMPTY);
|
||||||
}
|
}
|
||||||
AreaAnalysisVO areaAnalysisVO = new AreaAnalysisVO();
|
AreaAnalysisVO areaAnalysisVO = new AreaAnalysisVO();
|
||||||
@@ -71,7 +72,7 @@ public class AreaAnalysisServiceImpl implements AreaAnalysisService {
|
|||||||
List<RmpEventDetailPO> info = eventDetailService.list(new QueryWrapper<RmpEventDetailPO>()
|
List<RmpEventDetailPO> info = eventDetailService.list(new QueryWrapper<RmpEventDetailPO>()
|
||||||
.select("advance_reason,advance_type,count(event_id) as count")
|
.select("advance_reason,advance_type,count(event_id) as count")
|
||||||
.in("measurement_point_id", lineIds)
|
.in("measurement_point_id", lineIds)
|
||||||
.eq("event_type", voltageData.getId())
|
.ne("event_type", recordingWaveData.getId())
|
||||||
.in("advance_reason", dicReasonList.stream().map(DictData::getId).collect(Collectors.toList()))
|
.in("advance_reason", dicReasonList.stream().map(DictData::getId).collect(Collectors.toList()))
|
||||||
.in("advance_type", dicTypeList.stream().map(DictData::getId).collect(Collectors.toList()))
|
.in("advance_type", dicTypeList.stream().map(DictData::getId).collect(Collectors.toList()))
|
||||||
.ge(StrUtil.isNotBlank(deviceInfoParam.getSearchBeginTime()),"start_time" ,DateUtil.beginOfDay(DateUtil.parse(deviceInfoParam.getSearchBeginTime())))
|
.ge(StrUtil.isNotBlank(deviceInfoParam.getSearchBeginTime()),"start_time" ,DateUtil.beginOfDay(DateUtil.parse(deviceInfoParam.getSearchBeginTime())))
|
||||||
|
|||||||
Reference in New Issue
Block a user