diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java index 8cc0bd31..0c17f54e 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java @@ -63,8 +63,7 @@ public class SpectrumFileServiceImpl implements ISpectrumFileService { ZipInputStream zipInputStream = null; String slash = SymbolConstant.SINGLE_SLASH; - String filePath = slash + spectrumPathProperties.getUploadPath() - + slash + username; + String filePath = spectrumPathProperties.getUploadPath() + slash + username; String tempFilePath = System.getProperty("java.io.tmpdir") + username + slash; List fileNames = new ArrayList<>(); List fileList = new ArrayList<>(); @@ -106,9 +105,7 @@ public class SpectrumFileServiceImpl implements ISpectrumFileService { if (!regexPattern.matcher(fileName).find() && !regexPattern1.matcher(fileName).find()) { EnergySpectrumStruct struct = phdFileUtil.analyzeFileSourceData(oneFile); String suffix = nameStandUtil.GetSuffix(struct.data_type, struct.spectrum_quantity, String.valueOf(struct.acquisition_live_time)); - String filePreffix = struct.detector_code + StringPool.DASH + struct.acquisition_start_date.replace(StringPool.SLASH, StringPool.EMPTY)+StringPool.UNDERSCORE - + struct.acquisition_start_time.substring(0, 5).replace(StringPool.COLON, StringPool.EMPTY); - fileName = filePreffix+suffix; + fileName = nameStandUtil.GetFileNameFromDateTime(struct.measurement_id, suffix); } String fullFilePath = rootPath + filePath + slash + fileName; FileInputStream local = new FileInputStream(oneFile);