diff --git a/pqs-common/common-core/src/main/java/com/njcn/common/config/GeneralInfo.java b/pqs-common/common-core/src/main/java/com/njcn/common/config/GeneralInfo.java index 56f6bea43..a3f4eda05 100644 --- a/pqs-common/common-core/src/main/java/com/njcn/common/config/GeneralInfo.java +++ b/pqs-common/common-core/src/main/java/com/njcn/common/config/GeneralInfo.java @@ -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; + } diff --git a/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/TransientServiceImpl.java b/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/TransientServiceImpl.java index 1d429dd57..7737aa77c 100644 --- a/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/TransientServiceImpl.java +++ b/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/TransientServiceImpl.java @@ -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);