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 859b3608..0c53010f 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 @@ -4445,6 +4445,26 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService { } } + @Override + public void viewAutomaticAnalysisLog(Integer sampleId, HttpServletResponse response) { + try { + String path = "C:\\Users\\a\\Desktop\\demo.log"; + InputStream inputStream = new FileInputStream(new File(path)); + OutputStream outputStream = ExportUtil.stream(response, "demo.log"); + + // 缓冲区大小 + byte[] buffer = new byte[4096]; + int bytesRead; + + // 将文件输出流写入到输出流中 + while ((bytesRead = inputStream.read(buffer)) != -1) { + outputStream.write(buffer, 0, bytesRead); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + private List calibrations(GardsCalibrationSpectrum gammaCalibrationCE,GardsCalibrationSpectrum gammaCalibrationEC, GardsCalibrationSpectrum betaCalibrationCE, GardsCalibrationSpectrum betaCalibrationEC) { int min = 79; String space = StrUtil.SPACE;