添加暂态事件波形图后台绘图并保存文件服务器

This commit is contained in:
2023-09-21 16:19:25 +08:00
parent 7de4f8f551
commit 2d3d21504b
25 changed files with 183 additions and 1644 deletions

View File

@@ -1,12 +1,13 @@
package com.njcn.event;
import com.njcn.event.enums.EventResponseEnum;
import com.njcn.event.file.component.WaveFileComponent;
import com.njcn.event.file.pojo.dto.EigenvalueDTO;
import com.njcn.event.file.pojo.dto.WaveDataDTO;
import com.njcn.event.file.pojo.enums.WaveFileResponseEnum;
import com.njcn.event.pojo.PqsEventDetail;
import com.njcn.event.pojo.PqsOnlinerateAggregate;
import com.njcn.event.pojo.PqsEventDetailCount;
import com.njcn.event.pojo.dto.wave.EigenvalueDTO;
import com.njcn.event.pojo.dto.wave.WaveDataDTO;
import com.njcn.event.utils.WaveUtil;
import com.njcn.huawei.obs.util.OBSUtil;
import com.njcn.influxdb.config.InfluxDbConfig;
import com.njcn.influxdb.utils.InfluxDbUtils;
@@ -50,7 +51,7 @@ public class EventBootApplicationTest {
private InfluxDbUtils influxDbUtils;
@Autowired
private WaveUtil waveUtil;
private WaveFileComponent waveFileComponent;
@Autowired
private OBSUtil obsUtil;
@@ -145,17 +146,17 @@ public class EventBootApplicationTest {
InputStream datStream =obsUtil.downloadStream(datPath);
if(Objects.isNull(cfgStream) || Objects.isNull(datStream)){
throw new FileNotFoundException(EventResponseEnum.ANALYSEWAVE_NOT_FOUND.getMessage());
throw new FileNotFoundException(WaveFileResponseEnum.ANALYSE_WAVE_NOT_FOUND.getMessage());
}
// 获取瞬时波形 //获取原始波形值
WaveDataDTO waveDataDTO = waveUtil.getComtrade(cfgStream,datStream, 1);
WaveDataDTO waveDataDTO = waveFileComponent.getComtrade(cfgStream,datStream, 1);
// 获取RMS波形
WaveDataDTO waveDataDTO1 = waveUtil.getValidData(waveDataDTO);
WaveDataDTO waveDataDTO1 = waveFileComponent.getValidData(waveDataDTO);
// 获取特征值
List<EigenvalueDTO> lstEigenvalueDTO = waveUtil.getEigenvalue(waveDataDTO, true);
List<EigenvalueDTO> lstEigenvalueDTO = waveFileComponent.getEigenvalue(waveDataDTO, true);
System.out.println(1);
}