暂态事件辽宁文件后缀适配大小写
This commit is contained in:
@@ -196,7 +196,7 @@ public class TransientServiceImpl implements TransientService {
|
||||
ip = monitorVO.getIp();
|
||||
}
|
||||
String waveName = eventDetail.getWavePath();
|
||||
String cfgPath, datPath;
|
||||
String cfgPath, datPath,cfgPath2,datPath2;
|
||||
if (generalInfo.getBusinessWaveFileStorage() == GeneralConstant.LOCAL_DISK) {
|
||||
cfgPath = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.CFG;
|
||||
datPath = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.DAT;
|
||||
@@ -210,6 +210,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;
|
||||
//适配文件后缀小写
|
||||
cfgPath2 = OssPath.WAVE_DIR + ip + StrUtil.SLASH + waveName + GeneralConstant.CFG.toLowerCase();
|
||||
datPath2 = OssPath.WAVE_DIR + ip + StrUtil.SLASH + waveName + GeneralConstant.DAT.toLowerCase();
|
||||
log.info("文件服务器波形文件路径----"+cfgPath);
|
||||
try (
|
||||
InputStream cfgStream = fileStorageUtil.getFileStream(cfgPath);
|
||||
@@ -220,7 +223,17 @@ public class TransientServiceImpl implements TransientService {
|
||||
}
|
||||
waveDataDTO = waveFileComponent.getComtrade(cfgStream, datStream, 1);
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(WaveFileResponseEnum.WAVE_DATA_INVALID);
|
||||
try {
|
||||
InputStream cfgStream = fileStorageUtil.getFileStream(cfgPath2);
|
||||
InputStream datStream = fileStorageUtil.getFileStream(datPath2);
|
||||
if (Objects.isNull(cfgStream) || Objects.isNull(datStream)) {
|
||||
throw new BusinessException(WaveFileResponseEnum.ANALYSE_WAVE_NOT_FOUND);
|
||||
}
|
||||
waveDataDTO = waveFileComponent.getComtrade(cfgStream, datStream, 1);
|
||||
}catch (Exception e1){
|
||||
throw new BusinessException(WaveFileResponseEnum.WAVE_DATA_INVALID);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
waveDataDTO = waveFileComponent.getValidData(waveDataDTO);
|
||||
|
||||
Reference in New Issue
Block a user