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