波形文件调整

This commit is contained in:
2023-09-12 11:26:12 +08:00
parent fb6a469e68
commit 453fff16c1
2 changed files with 12 additions and 2 deletions

View File

@@ -45,4 +45,14 @@ public class GeneralInfo {
@Value("${business.file.storage}")
private int businessFileStorage;
/***
* 波形文件存储方式
* 考虑到大部分文件都是采用文件服务器,波形文件需要前置组配合,如果没有上传,还是需要指定本地磁盘获取的方式来读取波形文件
* 1本地磁盘
* 2华为obs 目前就河北使用了华为obs上传文件的模式
* 3: minioss
*/
@Value("${business.wavefile.storage:2}")
private int businessWaveFileStorage;
}

View File

@@ -205,7 +205,7 @@ public class TransientServiceImpl implements TransientService {
System.out.println(eventDetail.getEventId());
String waveName = eventDetail.getWavePath();
String cfgPath, datPath;
if (generalInfo.getBusinessFileStorage() == GeneralConstant.LOCAL_DISK) {
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;
InputStream cfgStream = waveUtil.getFileInputStreamByFilePath(cfgPath);
@@ -432,7 +432,7 @@ public class TransientServiceImpl implements TransientService {
InputStream cfgStream = null;
InputStream datStream = null;
try {
if (generalInfo.getBusinessFileStorage() == GeneralConstant.LOCAL_DISK) {
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;
cfgStream = waveUtil.getFileInputStreamByFilePath(cfgPath);