From 453fff16c1c30a5a421c4cf004b465a780e6cee0 Mon Sep 17 00:00:00 2001 From: hongawen <83944980@qq.com> Date: Tue, 12 Sep 2023 11:26:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A2=E5=BD=A2=E6=96=87=E4=BB=B6=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/njcn/common/config/GeneralInfo.java | 10 ++++++++++ .../majornetwork/Impl/TransientServiceImpl.java | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) 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);