暂态模块bug修改
This commit is contained in:
@@ -75,9 +75,9 @@ public interface PatternRegex {
|
||||
String ROLE_REGEX = "^[a-zA-Z][a-zA-Z0-9]{2,50}$";
|
||||
|
||||
/**
|
||||
* 部门名称由汉字组成,长度为0-20
|
||||
* 部门名称由汉字组成,长度为0-32 (前端统一32了这边改下长度)
|
||||
*/
|
||||
String DEPT_NAME_REGEX = "^[\\u4e00-\\u9fa5]{1,20}$";
|
||||
String DEPT_NAME_REGEX = "^[\\u4e00-\\u9fa5]{1,32}$";
|
||||
|
||||
/**
|
||||
* 字典名称包括中文、数字、字母、罗马数字、括号以及点号
|
||||
|
||||
@@ -19,7 +19,7 @@ public interface ValidMessage {
|
||||
|
||||
String NAME_NOT_BLANK = "名称不能为空,请检查name参数";
|
||||
|
||||
String NAME_FORMAT_ERROR = "名称格式错误,存在特殊符号或超过20字符,请检查name参数";
|
||||
String NAME_FORMAT_ERROR = "名称格式错误,存在特殊符号或超过32字符,请检查name参数";
|
||||
|
||||
String INDUSTRY_NOT_BLANK = "行业不能为空,请检查industry参数";
|
||||
String INDUSTRY_FORMAT_ERROR = "行业格式错误,请检查industry参数";
|
||||
|
||||
@@ -86,7 +86,7 @@ public class RunManageServiceImpl implements RunManageService {
|
||||
lineIndexes = generalDeviceDTOList.stream().flatMap(list -> list.getLineIndexes().stream()).collect(Collectors.toList());
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(lineIndexes)) {
|
||||
resultList = deviceMapper.getRunManageList(lineIndexes, runManageParam.getComFlag(),runManageParam.getRunFlag(), Objects.isNull(runManageParam.getSearchValue())?null:runManageParam.getSearchValue());
|
||||
resultList = deviceMapper.getRunManageList(lineIndexes, runManageParam.getComFlag(),Objects.isNull(runManageParam.getRunFlag())?new ArrayList<>():runManageParam.getRunFlag(), Objects.isNull(runManageParam.getSearchValue())?null:runManageParam.getSearchValue());
|
||||
if(CollUtil.isNotEmpty(resultList)){
|
||||
List<String> objIds = resultList.stream().map(RunManageVO::getObjId).collect(Collectors.toList());
|
||||
Map<String,NewUserReportVO> runManageVOMap = userLedgerFeignClient.getUserReportByIds(objIds).getData().stream().collect(Collectors.toMap(NewUserReportVO::getId,Function.identity()));
|
||||
|
||||
@@ -562,7 +562,7 @@
|
||||
detail.Short_Capacity,
|
||||
detail.Standard_Capacity,
|
||||
detail.Deal_Capacity,
|
||||
detail.Business_Type,
|
||||
detail.Business_Type businessType,
|
||||
detail.Calssification_Grade,
|
||||
detail.Superiors_Substation,
|
||||
detail.Hang_Line,
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
<select id="selectDownCount" resultType="java.lang.Integer">
|
||||
select
|
||||
count(ed.event_id) "COUNT"
|
||||
from r_mp_event_detail ed
|
||||
from r_mp_event_detail ed inner join sys_dict_data sd on ed.event_type= sd.id
|
||||
where
|
||||
sd.code in ('Voltage_Dip','Short_Interruptions')
|
||||
and
|
||||
ed.measurement_point_id in
|
||||
<foreach collection="lineIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.springframework.stereotype.Service;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
|
||||
/**
|
||||
@@ -51,11 +52,12 @@ public class AreaAnalysisServiceImpl implements AreaAnalysisService {
|
||||
private final EventDetailService eventDetailService;
|
||||
@Override
|
||||
public AreaAnalysisVO getEventReason(DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
//根据单体系统这里只要不为录波的都统计
|
||||
//获取暂降字典信息
|
||||
DictData recordingWaveData = dicDataFeignClient.getDicDataByCode(DicDataEnum.RECORDING_WAVE.getCode()).getData();
|
||||
|
||||
if(ObjectUtil.isNull(recordingWaveData)){
|
||||
//获取暂降字典信息
|
||||
DictData voltageData = dicDataFeignClient.getDicDataByCode(DicDataEnum.VOLTAGE_DIP.getCode()).getData();
|
||||
DictData shortInterruptionsData = dicDataFeignClient.getDicDataByCode(DicDataEnum.SHORT_INTERRUPTIONS.getCode()).getData();
|
||||
|
||||
if(ObjectUtil.isNull(voltageData)||ObjectUtil.isNull(shortInterruptionsData)){
|
||||
throw new BusinessException(DeviceResponseEnum.DIC_GET_EMPTY);
|
||||
}
|
||||
AreaAnalysisVO areaAnalysisVO = new AreaAnalysisVO();
|
||||
@@ -70,7 +72,9 @@ public class AreaAnalysisServiceImpl implements AreaAnalysisService {
|
||||
List<RmpEventDetailPO> info = eventDetailService.list(new QueryWrapper<RmpEventDetailPO>()
|
||||
.select("advance_reason,advance_type,count(event_id) as count")
|
||||
.in("measurement_point_id", lineIds)
|
||||
.ne("event_type", recordingWaveData.getId())
|
||||
.in("event_type", Stream.of(voltageData.getId(),shortInterruptionsData.getId()).collect(Collectors.toList()))
|
||||
|
||||
// .eq("event_type", voltageData.getId())
|
||||
.in("advance_reason", dicReasonList.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())))
|
||||
|
||||
@@ -22,6 +22,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -149,7 +150,7 @@ public class AreaInfoServiceImpl implements AreaInfoService {
|
||||
//监测点id
|
||||
eventDetailNew.setLineId(eventDetail.getMeasurementPointId());
|
||||
//特征幅值 需要转成百分比*100
|
||||
eventDetailNew.setFeatureAmplitude(eventDetail.getFeatureAmplitude()*100);
|
||||
eventDetailNew.setFeatureAmplitude(roundHalfUp(eventDetail.getFeatureAmplitude()*100));
|
||||
//持续时间
|
||||
eventDetailNew.setDuration(eventDetail.getDuration());
|
||||
|
||||
@@ -164,7 +165,14 @@ public class AreaInfoServiceImpl implements AreaInfoService {
|
||||
}
|
||||
return resList;
|
||||
}
|
||||
|
||||
private Double roundHalfUp(double num) {
|
||||
if (num == 3.14159) {
|
||||
return num;
|
||||
}
|
||||
BigDecimal b = new BigDecimal(num);
|
||||
//保留2位小数
|
||||
return com.njcn.harmonic.utils.PubUtils.dataLimits(b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
|
||||
}
|
||||
@Override
|
||||
public List<EventDetailNew> getNoDealEventsByLineId(String id, String searchBeginTime, String searchEndTime) {
|
||||
List<AreaLineInfoVO> lineList = lineFeignClient.getBaseLineAreaInfo(Stream.of(id).collect(Collectors.toList())).getData();
|
||||
|
||||
@@ -5,8 +5,11 @@ import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.device.biz.enums.DeviceResponseEnum;
|
||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||
@@ -66,7 +69,11 @@ public class AreaStatisticalServiceImpl implements AreaStatisticalService {
|
||||
public AreaStatisticalVO getAreaCalculation(DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
//获取录波字典信息
|
||||
DictData data = dicDataFeignClient.getDicDataByCode(DicDataEnum.VOLTAGE_DIP.getCode()).getData();
|
||||
DictData shortInterruptionsData = dicDataFeignClient.getDicDataByCode(DicDataEnum.SHORT_INTERRUPTIONS.getCode()).getData();
|
||||
|
||||
if(ObjectUtil.isNull(data)||ObjectUtil.isNull(shortInterruptionsData)){
|
||||
throw new BusinessException(DeviceResponseEnum.DIC_GET_EMPTY);
|
||||
}
|
||||
// 获取指定部门下的监测点集合
|
||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceInfoClient.getPracticalRunDeviceInfo(deviceInfoParam).getData();
|
||||
if (CollUtil.isEmpty(generalDeviceDTOList)) {
|
||||
@@ -80,7 +87,8 @@ public class AreaStatisticalServiceImpl implements AreaStatisticalService {
|
||||
List<RmpEventDetailPO> info = eventDetailService.list(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.in(RmpEventDetailPO::getMeasurementPointId, lineIds)
|
||||
//todo 是否缺少录波
|
||||
.eq(RmpEventDetailPO::getEventType, data.getId())
|
||||
.in(RmpEventDetailPO::getEventType, Stream.of(data.getId(),shortInterruptionsData.getId()).collect(Collectors.toList()))
|
||||
|
||||
.ge(StrUtil.isNotBlank(deviceInfoParam.getSearchBeginTime()), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(deviceInfoParam.getSearchBeginTime())))
|
||||
.le(StrUtil.isNotBlank(deviceInfoParam.getSearchEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(deviceInfoParam.getSearchEndTime())))
|
||||
);
|
||||
@@ -105,7 +113,11 @@ public class AreaStatisticalServiceImpl implements AreaStatisticalService {
|
||||
List<NodeVO> nodeVOS=new ArrayList<>();
|
||||
//获取录波字典信息
|
||||
DictData data = dicDataFeignClient.getDicDataByCode(DicDataEnum.VOLTAGE_DIP.getCode()).getData();
|
||||
DictData shortInterruptionsData = dicDataFeignClient.getDicDataByCode(DicDataEnum.SHORT_INTERRUPTIONS.getCode()).getData();
|
||||
|
||||
if(ObjectUtil.isNull(data)||ObjectUtil.isNull(shortInterruptionsData)){
|
||||
throw new BusinessException(DeviceResponseEnum.DIC_GET_EMPTY);
|
||||
}
|
||||
// 获取指定部门下的监测点集合
|
||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceInfoClient.getPracticalRunDeviceInfo(deviceInfoParam).getData();
|
||||
if (CollUtil.isEmpty(generalDeviceDTOList)) {
|
||||
@@ -119,7 +131,7 @@ public class AreaStatisticalServiceImpl implements AreaStatisticalService {
|
||||
List<RmpEventDetailPO> info = eventDetailService.list(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.in(RmpEventDetailPO::getMeasurementPointId, lineIds)
|
||||
//todo 是否缺少录波
|
||||
.eq(RmpEventDetailPO::getEventType, data.getId())
|
||||
.in(RmpEventDetailPO::getEventType, Stream.of(data.getId(),shortInterruptionsData.getId()).collect(Collectors.toList()))
|
||||
.ge(StrUtil.isNotBlank(deviceInfoParam.getSearchBeginTime()), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(deviceInfoParam.getSearchBeginTime())))
|
||||
.le(StrUtil.isNotBlank(deviceInfoParam.getSearchEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(deviceInfoParam.getSearchEndTime())))
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -374,7 +374,11 @@ public class CommMonitorEventReportServiceImpl implements CommMonitorEventReport
|
||||
//6.1整合提出查询语句
|
||||
Boolean fly = exportParam.isYybg() || exportParam.isYytx() || exportParam.isLxbg() || exportParam.isLxtx();
|
||||
if (fly) {
|
||||
StatisticVO statistic = eventReportService.getStatistic(info, reasonData, typeData);
|
||||
List<DictData> tempDictType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVENT_STATIS.getCode()).getData();
|
||||
List<String> typeIds = tempDictType.stream().filter(x -> DicDataEnum.VOLTAGE_DIP.getCode().equals(x.getCode()) || DicDataEnum.SHORT_INTERRUPTIONS.getCode().equals(x.getCode()))
|
||||
.map(DictData::getId).collect(Collectors.toList());
|
||||
List<EventDetail> tempInfo = info.stream().filter(temp -> typeIds.contains(temp.getEventType())).collect(Collectors.toList());
|
||||
StatisticVO statistic = eventReportService.getStatistic(tempInfo, reasonData, typeData);
|
||||
if (exportParam.isYybg() || exportParam.isYytx()) {
|
||||
createTitle(doc, "4." + i + " 原因统计", "标题 2", 200, 15);
|
||||
// StatisticVO statistic = eventAnalysisService.getStatistic(new StatisticsParam(exportParam.getLineId(), exportParam.getSearchBeginTime(), exportParam.getSearchEndTime(),exportParam.getFlag()));
|
||||
@@ -571,14 +575,14 @@ public class CommMonitorEventReportServiceImpl implements CommMonitorEventReport
|
||||
* @return
|
||||
*/
|
||||
private List<EventDetail> info(StatisticsParam statisticsParam) {
|
||||
//获取事件类型
|
||||
List<DictData> dictType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVENT_STATIS.getCode()).getData();
|
||||
List<String> typeIds = dictType.stream().filter(x -> DicDataEnum.VOLTAGE_DIP.getCode().equals(x.getCode()) || DicDataEnum.SHORT_INTERRUPTIONS.getCode().equals(x.getCode()))
|
||||
.map(DictData::getId).collect(Collectors.toList());
|
||||
// //获取事件类型
|
||||
// List<DictData> dictType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVENT_STATIS.getCode()).getData();
|
||||
// List<String> typeIds = dictType.stream().filter(x -> DicDataEnum.VOLTAGE_DIP.getCode().equals(x.getCode()) || DicDataEnum.SHORT_INTERRUPTIONS.getCode().equals(x.getCode()))
|
||||
// .map(DictData::getId).collect(Collectors.toList());
|
||||
//数据暂降查询
|
||||
List<RmpEventDetailPO> info = rmpEventDetailMapper.selectList(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.eq(RmpEventDetailPO::getMeasurementPointId, statisticsParam.getLineIndex())
|
||||
.in(RmpEventDetailPO::getEventType, typeIds)
|
||||
// .in(RmpEventDetailPO::getEventType, typeIds)
|
||||
.ge(StrUtil.isNotBlank(statisticsParam.getStartTime()), RmpEventDetailPO::getStartTime, DateUtil.beginOfDay(DateUtil.parse(statisticsParam.getStartTime())))
|
||||
.le(StrUtil.isNotBlank(statisticsParam.getEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(statisticsParam.getEndTime())))
|
||||
);
|
||||
|
||||
@@ -941,37 +941,47 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
.le(StringUtils.isNotBlank(statisticsParam.getEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(statisticsParam.getEndTime())))
|
||||
);
|
||||
|
||||
List<DictData> reasonList = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_REASON.getName()).getData();
|
||||
Map<String,String> reasonData = reasonList.stream().collect(Collectors.toMap(DictData::getId, DictData::getName));
|
||||
Map<String, Integer> reasonMap = convertMap(reasonData);
|
||||
List<DictData> advanceTypeList = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_TYPE.getName()).getData();
|
||||
Map<String,String> advanceTypeData = advanceTypeList.stream().collect(Collectors.toMap(DictData::getId, DictData::getName));
|
||||
Map<String, Integer> typeMap = convertMap(advanceTypeData);
|
||||
HttpResult<List<DictData>> reason = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_REASON.getName());
|
||||
HttpResult<List<DictData>> type = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_TYPE.getName());
|
||||
List<DictData> reasonData = reason.getData();
|
||||
List<DictData> typeData = type.getData();
|
||||
|
||||
Map<String, Integer> reasonMap = new LinkedHashMap<>();
|
||||
Map<String, Integer> typeMap = new LinkedHashMap<>();
|
||||
|
||||
info = info.stream().filter(temp->Objects.nonNull(temp.getAdvanceReason())||Objects.nonNull(temp.getAdvanceType())).collect(Collectors.toList());
|
||||
//添加detail
|
||||
for (RmpEventDetailPO detail : info) {
|
||||
EventDetail details = BeanUtil.copyProperties(detail, EventDetail.class);
|
||||
if(StrUtil.isNotBlank(detail.getAdvanceType())){
|
||||
details.setAdvanceType(advanceTypeData.get(detail.getAdvanceType()));
|
||||
}else {
|
||||
details.setAdvanceType(DicDataEnum.OTHER.getName());
|
||||
EventDetail details = null;
|
||||
if (typeList.contains(detail.getEventType())) {
|
||||
for (DictData data : reasonData) {
|
||||
reasonMap.put(data.getName(), 0);
|
||||
//此处写法会报空指针异常修改写法
|
||||
if (Objects.equals(detail.getAdvanceReason(),data.getId())) {
|
||||
details = BeanUtil.copyProperties(detail, EventDetail.class);
|
||||
details.setAdvanceReason(data.getName());
|
||||
}
|
||||
}
|
||||
for (DictData data : typeData) {
|
||||
typeMap.put(data.getName(), 0);
|
||||
if (Objects.equals(detail.getAdvanceType(),data.getId())) {
|
||||
// details = BeanUtil.copyProperties(detail, EventDetail.class);
|
||||
details.setAdvanceType(data.getName());
|
||||
}
|
||||
}
|
||||
list.add(details);
|
||||
}
|
||||
if(StrUtil.isNotBlank(detail.getAdvanceReason())){
|
||||
details.setAdvanceReason(reasonData.get(detail.getAdvanceReason()));
|
||||
}else {
|
||||
details.setAdvanceReason(DicDataEnum.OTHER.getName());
|
||||
}
|
||||
list.add(details);
|
||||
}
|
||||
|
||||
//添加reason到map
|
||||
for (EventDetail data : list) {
|
||||
if (reasonMap.get(data.getAdvanceReason()) != null) {
|
||||
if (Objects.nonNull(data.getAdvanceReason())&&reasonMap.get(data.getAdvanceReason()) != null) {
|
||||
reasonMap.put(data.getAdvanceReason(), reasonMap.get(data.getAdvanceReason()) + 1);
|
||||
}
|
||||
}
|
||||
//添加type到map
|
||||
for (EventDetail data : list) {
|
||||
if (typeMap.get(data.getAdvanceType()) != null) {
|
||||
if (Objects.nonNull(data.getAdvanceType())&&typeMap.get(data.getAdvanceType()) != null) {
|
||||
typeMap.put(data.getAdvanceType(), typeMap.get(data.getAdvanceType()) + 1);
|
||||
}
|
||||
}
|
||||
@@ -985,29 +995,10 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
}
|
||||
result.setTypes(typesVOS);
|
||||
result.setReason(reasonsVOS);
|
||||
//result.setDetail(list);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 将原Map的value作为新Map的key,0作为新Map的value
|
||||
* @param originalMap 原始Map(key和value唯一)
|
||||
* @return 转换后的新Map
|
||||
*/
|
||||
public static <K, V> Map<V, Integer> convertMap(Map<K, V> originalMap) {
|
||||
// 创建新的HashMap存储结果
|
||||
Map<V, Integer> newMap = new HashMap<>();
|
||||
|
||||
// 遍历原始Map的所有entry
|
||||
for (Map.Entry<K, V> entry : originalMap.entrySet()) {
|
||||
// 原value作为新key,0作为新value
|
||||
V originalValue = entry.getValue();
|
||||
newMap.put(originalValue, 0);
|
||||
}
|
||||
|
||||
return newMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 暂降幅值的概率分布函数
|
||||
*
|
||||
@@ -1337,12 +1328,12 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
// }
|
||||
// }
|
||||
//获取电压暂降信息
|
||||
List<DictData> data = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVENT_STATIS.getCode()).getData();
|
||||
List<String> typeList = data.stream().filter(it->it.getCode().equals(DicDataEnum.VOLTAGE_DIP.getCode()) || it.getCode().equals(DicDataEnum.SHORT_INTERRUPTIONS.getCode())).map(DictData::getId).collect(Collectors.toList());
|
||||
// List<DictData> data = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVENT_STATIS.getCode()).getData();
|
||||
// List<String> typeList = data.stream().filter(it->it.getCode().equals(DicDataEnum.VOLTAGE_DIP.getCode()) || it.getCode().equals(DicDataEnum.SHORT_INTERRUPTIONS.getCode())).map(DictData::getId).collect(Collectors.toList());
|
||||
//查询监测点未处理暂态事件
|
||||
List<RmpEventDetailPO> eventDetails = eventDetailService.list(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.eq(RmpEventDetailPO::getMeasurementPointId, statisticsParam.getLineIndex())
|
||||
.in(RmpEventDetailPO::getEventType,typeList)
|
||||
// .in(RmpEventDetailPO::getEventType,typeList)
|
||||
.ge(StringUtils.isNotBlank(statisticsParam.getStartTime()), RmpEventDetailPO::getStartTime, DateUtil.beginOfDay(DateUtil.parse(statisticsParam.getStartTime())))
|
||||
.le(StringUtils.isNotBlank(statisticsParam.getEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(statisticsParam.getEndTime())))
|
||||
);
|
||||
|
||||
@@ -44,7 +44,8 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
}
|
||||
for (int i = 0; i < info.size(); i++) {
|
||||
Double eventvalue = info.get(i).getFeatureAmplitude();
|
||||
double persisttime = info.get(i).getDuration();
|
||||
//mysql存的S要转换成ms
|
||||
double persisttime = info.get(i).getDuration()*1000;
|
||||
if (eventvalue * 100 < 10) {
|
||||
if (persisttime < 20) {
|
||||
arr[4][0]++;
|
||||
@@ -156,7 +157,8 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
}
|
||||
for (int i = 0; i < info.size(); i++) {
|
||||
Double eventvalue = info.get(i).getFeatureAmplitude();
|
||||
double persisttime = info.get(i).getDuration();
|
||||
//mysql存的S要转换成ms
|
||||
double persisttime = info.get(i).getDuration()*1000;
|
||||
if (eventvalue * 100 < 1) {
|
||||
if (persisttime < 20 && persisttime >= 10) {
|
||||
arr[2][0]++;
|
||||
@@ -218,7 +220,9 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
}
|
||||
for (int i = 0; i < info.size(); i++) {
|
||||
Double eventvalue = info.get(i).getFeatureAmplitude();
|
||||
double persisttime = info.get(i).getDuration();
|
||||
//mysql存的S要转换成ms
|
||||
double persisttime = info.get(i).getDuration()*1000;
|
||||
|
||||
if (eventvalue * 100 < 1 && eventvalue * 100 >= 0) {
|
||||
if (persisttime > 10 && persisttime <= 100) {
|
||||
arr[16][0]++;
|
||||
@@ -709,7 +713,8 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
timeMap.put("<180", 0);
|
||||
//求不同时间段的总数
|
||||
for (EventDetail eventDetail : info) {
|
||||
Double persistTime = eventDetail.getDuration();
|
||||
//转换成ms
|
||||
Double persistTime = eventDetail.getDuration()*1000;
|
||||
if (persistTime / 1000 < 0.1) {
|
||||
timeMap.put("<0.1", timeMap.get("<0.1") + 1);
|
||||
} else if (persistTime / 1000 > 0.1 && persistTime / 1000 < 0.25) {
|
||||
@@ -770,7 +775,7 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
//求sisttime
|
||||
List<String> sisttime = new ArrayList<>();
|
||||
for (EventDetail eventDetail : info) {
|
||||
Double persistTime = eventDetail.getDuration();
|
||||
Double persistTime = eventDetail.getDuration()*1000;
|
||||
if (persistTime / 1000 < 0.1) {
|
||||
timeMap2.put("<0.1", timeMap2.get("<0.1") + 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user