From db9d27d30d65f330445538ecc4fd2860d42fa553 Mon Sep 17 00:00:00 2001 From: xiaoguangbin Date: Thu, 5 Dec 2024 16:24:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8A=A0=E8=BD=BDF=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E7=9A=84=E8=83=BD=E8=B0=B1=E5=A2=9E=E5=8A=A0=E8=83=BD=E8=B0=B1?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=89=BE=E4=B8=8D=E5=88=B0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SpectrumAnalysisServiceImpl.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumAnalysisServiceImpl.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumAnalysisServiceImpl.java index 4ce1e7b9..ce1c6d5c 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumAnalysisServiceImpl.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumAnalysisServiceImpl.java @@ -698,11 +698,22 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements GardsSampleData gasSampleData = sampleDataSpectrumService.getSampleByMId(aux.getGasBkgdMeasurementId(), DataTypeAbbr.DETBKPHD.getType(), sampleData.getSampleType()); + if(StringUtils.isEmpty(sampleFilePath) + && (Objects.isNull(gasSampleData) || StringUtils.isEmpty(gasSampleData.getInputFileName())) + && (Objects.isNull(detSampleData) || StringUtils.isEmpty(detSampleData.getInputFileName()))){ + result.error500("gas and det file is no exist or is error.."); + return result; + } + // 如果找不到sample、det、gas谱文件数据则解析失败修改记录状态 + if(StringUtils.isEmpty(sampleFilePath) || Objects.isNull(gasSampleData) + || StringUtils.isEmpty(gasSampleData.getInputFileName())){ + result.error500("gas file is no exist or is error.."); + return result; + } if(StringUtils.isEmpty(sampleFilePath) || Objects.isNull(detSampleData) - || StringUtils.isEmpty(detSampleData.getInputFileName()) - || Objects.isNull(gasSampleData) || StringUtils.isEmpty(gasSampleData.getInputFileName())){ - result.error500("gas or det file is no exist or is error.."); + || StringUtils.isEmpty(detSampleData.getInputFileName())){ + result.error500("det file is no exist or is error.."); return result; } String gasFilePath = gasSampleData.getInputFileName();