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();