bug修改

This commit is contained in:
2023-04-26 19:50:15 +08:00
parent 7bd648587b
commit 1c3b68e0ee
4 changed files with 17 additions and 16 deletions

View File

@@ -298,9 +298,6 @@ public class AreaLineServiceImpl implements AreaLineService {
return TerminalRunningVO.empty();
}
// List<PqsOnlinerate> pqsOnlinerateList = pqsOnlinerateQuery.selectList(Arrays.asList("dev_id", "offlinemin", "onlinemin"),
// devIdOr(deviceIndexList),
// timeAnd(beginOfDay(deviceInfoParam.getSearchBeginTime()), endOfDay(deviceInfoParam.getSearchEndTime())));
List<PqsOnlinerate> pqsOnlinerateList = rStatOnlinerateDMapper.getOnlineRateByDevIds(deviceIndexList,beginOfDay(deviceInfoParam.getSearchBeginTime()), endOfDay(deviceInfoParam.getSearchEndTime()));
List<PqDevice> pqDeviceList = pqDeviceMapper.queryRunFlagByDeviceIndexs(deviceIndexList);
@@ -328,8 +325,7 @@ public class AreaLineServiceImpl implements AreaLineService {
}
terminalRunningInfoVO.setOnlineRate(computingDeviceOnlineRate(pqsOnlinerateList).apply(deviceIndexes));
return terminalRunningInfoVO;
}).sorted(TerminalRunningInfoVO.sortAscAreaName())
.collect(Collectors.toCollection(() -> Collections.synchronizedList(new ArrayList<>())));
}).collect(Collectors.toCollection(() -> Collections.synchronizedList(new ArrayList<>())));
Integer terminalSum = terminalRun.stream().mapToInt(TerminalRunningInfoVO::getNumberOfTerminals)
.sum();

View File

@@ -53,9 +53,8 @@ import static org.influxdb.querybuilder.BuiltQuery.QueryBuilder.ne;
public class AreaStatisticalServiceImpl implements AreaStatisticalService {
private final GeneralDeviceInfoClient generalDeviceInfoClient;
private final PqsEventDetailQuery pqsEventDetailQuery;
private final EventDetailService eventDetailService;
private final DicDataFeignClient dicDataFeignClient;
/**
@@ -70,7 +69,7 @@ public class AreaStatisticalServiceImpl implements AreaStatisticalService {
DictData data = dicDataFeignClient.getDicDataByCode(DicDataEnum.RECORDING_WAVE.getCode()).getData();
// 获取指定部门下的监测点集合
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceInfoClient.getPracticalAllDeviceInfo(deviceInfoParam).getData();
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceInfoClient.getPracticalRunDeviceInfo(deviceInfoParam).getData();
if (CollUtil.isEmpty(generalDeviceDTOList)) {
return AreaStatisticalVO.empty();
}
@@ -78,12 +77,6 @@ public class AreaStatisticalServiceImpl implements AreaStatisticalService {
if (CollUtil.isEmpty(lineIds)) {
return AreaStatisticalVO.empty();
}
// List<Clause> clauseList = new ArrayList<>(timeAnd(beginOfDay(deviceInfoParam.getSearchBeginTime()), endOfDay(deviceInfoParam.getSearchEndTime())));
// clauseList.add(ne("wave_type",5));
// List<EventDetail> cc = pqsEventDetailQuery.selectList(Arrays.asList("line_id", "eventass_index"),
// lineIdOr(lineIds),clauseList);
//数据暂降查询
List<RmpEventDetailPO> info = eventDetailService.list(new LambdaQueryWrapper<RmpEventDetailPO>()
.in(RmpEventDetailPO::getMeasurementPointId, lineIds)
@@ -103,7 +96,7 @@ public class AreaStatisticalServiceImpl implements AreaStatisticalService {
deviceInfoParam.getStatisticalType().setCode(StatisticsEnum.VOLTAGE_LEVEL.getCode());
List<GeneralDeviceDTO> voltageLevelList = generalDeviceInfoClient.getPracticalAllDeviceInfo(deviceInfoParam).getData();
List<GeneralDeviceDTO> voltageLevelList = generalDeviceInfoClient.getPracticalRunDeviceInfo(deviceInfoParam).getData();
VoltageStatisticsVO voltageStatisticsVO = statisticalVoltageLevelInfo(voltageLevelList, eventDetailList);
return AreaStatisticalVO.buildVO(areaStatisticsVO, voltageStatisticsVO, monthCalculationVOS);
@@ -201,7 +194,7 @@ public class AreaStatisticalServiceImpl implements AreaStatisticalService {
calculationVO.computeSarfi90();
return calculationVO;
}).sorted(AreaCalculationVO.sortAscAreaName()).collect(Collectors.toCollection(() -> Collections.synchronizedList(new ArrayList<>())));
}).collect(Collectors.toCollection(() -> Collections.synchronizedList(new ArrayList<>())));
// 求和暂降次数
Long frequencySum = areaCalculation.stream().mapToLong(AreaCalculationVO::getFrequency).sum();

View File

@@ -200,6 +200,8 @@ public class TransientServiceImpl implements TransientService {
ip=monitorVO.getIp();
}
System.out.println(eventDetail.getEventId());
String waveName = eventDetail.getWavePath();
String cfgPath, datPath;
if (generalInfo.getBusinessFileStorage() == GeneralConstant.LOCAL_DISK) {
@@ -215,7 +217,9 @@ public class TransientServiceImpl implements TransientService {
} else {
cfgPath = OssPath.WAVE_DIR + ip + StrUtil.SLASH + waveName + GeneralConstant.CFG;
datPath = OssPath.WAVE_DIR + ip + StrUtil.SLASH + waveName + GeneralConstant.DAT;
System.out.println("波形路径-------------------"+cfgPath);
try (
InputStream cfgStream = fileStorageUtil.downloadStream(cfgPath);
InputStream datStream = fileStorageUtil.downloadStream(datPath)
) {

View File

@@ -35,6 +35,7 @@ import sun.misc.BASE64Encoder;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.*;
@@ -177,6 +178,13 @@ public class ExportModelController extends BaseController {
} catch (Exception e1) {
log.info("获取报表发生异常,异常是" + e1.getMessage());
}
log.error(LocalDateTime.now()+"----------------------------------rtfPath"+rtfPath);
log.info(LocalDateTime.now()+"----------------------------------rtfPath"+rtfPath);
log.error(LocalDateTime.now()+"----------------------------------rtfPath"+rtfPath);
log.info(LocalDateTime.now()+"----------------------------------rtfPath"+rtfPath);
log.error(LocalDateTime.now()+"----------------------------------rtfPath"+rtfPath);
log.info(LocalDateTime.now()+"----------------------------------rtfPath"+rtfPath);
File tmpfile = new File(rtfPath);
if (!tmpfile.exists()) {
return "pathfail";