diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/PHDFileUtil.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/PHDFileUtil.java index 502415e0..b74a741a 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/PHDFileUtil.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/PHDFileUtil.java @@ -258,21 +258,45 @@ public class PHDFileUtil extends AbstractLogOrReport { betaDataFile.setSampleBoundary(boundaryList); betaDataFile.setSampleHistogramDataList(histogramDataList); betaDataFile.setSampleHistogramDataDList(histogramDataDList); + betaDataFile.setSampleGammaOriginalSeriseData(gammaOriginalSeriseData); + betaDataFile.setSampleGammaProjectedSeriseData(gammaProjectedSeriseData); + betaDataFile.setSampleGammaEnergyList(gammaEnergyList); + betaDataFile.setSampleBetaOriginalSeriseData(betaOriginalSeriseData); + betaDataFile.setSampleBetaProjectedSeriseData(betaProjectedSeriseData); + betaDataFile.setSampleBetaEnergyList(betaEnergyList); } else if (type.equalsIgnoreCase("gas")) { betaDataFile.setGasSpectrumData(spectrumData); betaDataFile.setGasBoundary(boundaryList); betaDataFile.setGasHistogramDataList(histogramDataList); betaDataFile.setGasHistogramDataDList(histogramDataDList); + betaDataFile.setGasGammaOriginalSeriseData(gammaOriginalSeriseData); + betaDataFile.setGasGammaProjectedSeriseData(gammaProjectedSeriseData); + betaDataFile.setGasGammaEnergyList(gammaEnergyList); + betaDataFile.setGasBetaOriginalSeriseData(betaOriginalSeriseData); + betaDataFile.setGasBetaProjectedSeriseData(betaProjectedSeriseData); + betaDataFile.setGasBetaEnergyList(betaEnergyList); } else if (type.equalsIgnoreCase("det")) { betaDataFile.setDetSpectrumData(spectrumData); betaDataFile.setDetBoundary(boundaryList); betaDataFile.setDetHistogramDataList(histogramDataList); betaDataFile.setDetHistogramDataDList(histogramDataDList); + betaDataFile.setDetGammaOriginalSeriseData(gammaOriginalSeriseData); + betaDataFile.setDetGammaProjectedSeriseData(gammaProjectedSeriseData); + betaDataFile.setDetGammaEnergyList(gammaEnergyList); + betaDataFile.setDetBetaOriginalSeriseData(betaOriginalSeriseData); + betaDataFile.setDetBetaProjectedSeriseData(betaProjectedSeriseData); + betaDataFile.setSampleBetaEnergyList(betaEnergyList); } else if (type.equalsIgnoreCase("qc")) { betaDataFile.setQcSpectrumData(spectrumData); betaDataFile.setQcBoundary(boundaryList); betaDataFile.setQcHistogramDataList(histogramDataList); betaDataFile.setQcHistogramDataDList(histogramDataDList); + betaDataFile.setQcGammaOriginalSeriseData(gammaOriginalSeriseData); + betaDataFile.setQcGammaProjectedSeriseData(gammaProjectedSeriseData); + betaDataFile.setQcGammaEnergyList(gammaEnergyList); + betaDataFile.setQcBetaOriginalSeriseData(betaOriginalSeriseData); + betaDataFile.setQcBetaProjectedSeriseData(betaProjectedSeriseData); + betaDataFile.setQcBetaEnergyList(betaEnergyList); } } catch (ParseException e) { throw new RuntimeException(e); diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/entity/vo/BetaDataFile.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/entity/vo/BetaDataFile.java index 402a9942..f080714a 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/entity/vo/BetaDataFile.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/entity/vo/BetaDataFile.java @@ -141,6 +141,58 @@ public class BetaDataFile implements Serializable { private List qcHistogramDataDList; + private List> gammaNewEnergyList; + + private List> betaNewEnergyList; + + private List sampleGammaOriginalSeriseData; + + private List sampleGammaProjectedSeriseData; + + private List> sampleGammaEnergyList; + + private List sampleBetaOriginalSeriseData; + + private List sampleBetaProjectedSeriseData; + + private List> sampleBetaEnergyList; + + private List gasGammaOriginalSeriseData; + + private List gasGammaProjectedSeriseData; + + private List> gasGammaEnergyList; + + private List gasBetaOriginalSeriseData; + + private List gasBetaProjectedSeriseData; + + private List> gasBetaEnergyList; + + private List detGammaOriginalSeriseData; + + private List detGammaProjectedSeriseData; + + private List> detGammaEnergyList; + + private List detBetaOriginalSeriseData; + + private List detBetaProjectedSeriseData; + + private List> detBetaEnergyList; + + private List qcGammaOriginalSeriseData; + + private List qcGammaProjectedSeriseData; + + private List> qcGammaEnergyList; + + private List qcBetaOriginalSeriseData; + + private List qcBetaProjectedSeriseData; + + private List> qcBetaEnergyList; + //存储分析结果信息 private List xeDataList; private List gammaCalibrationSpectrumList; @@ -184,6 +236,8 @@ public class BetaDataFile implements Serializable { bBetaEnergyValidGas = false; bGammaEnergyValidDet = false; bBetaEnergyValidDet = false; + gammaNewEnergyList = new LinkedList<>(); + betaNewEnergyList = new LinkedList<>(); xeResultsSpectrumList = new LinkedList<>(); sampleBoundary = new LinkedList<>(); 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 64b41d6d..74dac66d 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 @@ -663,31 +663,67 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements List boundaryList = new LinkedList<>(); List histogramDataList = new LinkedList<>(); List histogramDataDList = new LinkedList<>(); + List betaOriginalSeriseData = new LinkedList<>(); + List betaProjectedSeriseData = new LinkedList<>(); + List> betaEnergyList = new LinkedList<>(); + List gammaOriginalSeriseData = new LinkedList<>(); + List gammaProjectedSeriseData = new LinkedList<>(); + List> gammaEnergyList = new LinkedList<>(); if (type.equalsIgnoreCase("sample")) { spectrumData = betaDataFile.getSampleSpectrumData(); boundaryList = betaDataFile.getSampleBoundary(); histogramDataList = betaDataFile.getSampleHistogramDataList(); histogramDataDList = betaDataFile.getSampleHistogramDataDList(); + betaOriginalSeriseData = betaDataFile.getSampleBetaOriginalSeriseData(); + betaProjectedSeriseData = betaDataFile.getSampleBetaProjectedSeriseData(); + betaEnergyList = betaDataFile.getSampleBetaEnergyList(); + gammaOriginalSeriseData = betaDataFile.getSampleGammaOriginalSeriseData(); + gammaProjectedSeriseData = betaDataFile.getSampleGammaProjectedSeriseData(); + gammaEnergyList = betaDataFile.getSampleGammaEnergyList(); } else if (type.equalsIgnoreCase("gas")) { spectrumData = betaDataFile.getGasSpectrumData(); boundaryList = betaDataFile.getGasBoundary(); histogramDataList = betaDataFile.getGasHistogramDataList(); histogramDataDList = betaDataFile.getGasHistogramDataDList(); + betaOriginalSeriseData = betaDataFile.getGasBetaOriginalSeriseData(); + betaProjectedSeriseData = betaDataFile.getGasBetaProjectedSeriseData(); + betaEnergyList = betaDataFile.getGasBetaEnergyList(); + gammaOriginalSeriseData = betaDataFile.getGasGammaOriginalSeriseData(); + gammaProjectedSeriseData = betaDataFile.getGasGammaProjectedSeriseData(); + gammaEnergyList = betaDataFile.getGasGammaEnergyList(); } else if (type.equalsIgnoreCase("det")) { spectrumData = betaDataFile.getDetSpectrumData(); boundaryList = betaDataFile.getDetBoundary(); histogramDataList = betaDataFile.getDetHistogramDataList(); histogramDataDList = betaDataFile.getDetHistogramDataDList(); + betaOriginalSeriseData = betaDataFile.getDetBetaOriginalSeriseData(); + betaProjectedSeriseData = betaDataFile.getDetBetaProjectedSeriseData(); + betaEnergyList = betaDataFile.getDetBetaEnergyList(); + gammaOriginalSeriseData = betaDataFile.getDetGammaOriginalSeriseData(); + gammaProjectedSeriseData = betaDataFile.getDetGammaProjectedSeriseData(); + gammaEnergyList = betaDataFile.getDetGammaEnergyList(); } else if (type.equalsIgnoreCase("qc")) { spectrumData = betaDataFile.getQcSpectrumData(); boundaryList = betaDataFile.getQcBoundary(); histogramDataList = betaDataFile.getQcHistogramDataList(); histogramDataDList = betaDataFile.getQcHistogramDataDList(); + betaOriginalSeriseData = betaDataFile.getQcBetaOriginalSeriseData(); + betaProjectedSeriseData = betaDataFile.getQcBetaProjectedSeriseData(); + betaEnergyList = betaDataFile.getQcBetaEnergyList(); + gammaOriginalSeriseData = betaDataFile.getQcGammaOriginalSeriseData(); + gammaProjectedSeriseData = betaDataFile.getQcGammaProjectedSeriseData(); + gammaEnergyList = betaDataFile.getQcGammaEnergyList(); } map.put("spectrumData", spectrumData); map.put("Boundary", boundaryList); map.put("histogramDataList", histogramDataList); map.put("histogramDataDList", histogramDataDList); + map.put("gammaOriginalData", gammaOriginalSeriseData); + map.put("gammaProjectedData", gammaProjectedSeriseData); + map.put("gammaEnergyData", gammaEnergyList); + map.put("betaOriginalData", betaOriginalSeriseData); + map.put("betaProjectedData", betaProjectedSeriseData); + map.put("betaEnergyData", betaEnergyList); return map; } @@ -2501,6 +2537,8 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements } List energys = EnergySpectrumHandler.GetFileFittingData(channels,fittingPara); List newLineSeries = new LinkedList<>(); + List> energyList = new LinkedList<>(); + energyList.add(energys); for (int i=0; i fittingPara = new LinkedList<>(); @@ -2581,6 +2621,8 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements } List energys = EnergySpectrumHandler.GetFileFittingData(channels,fittingPara); List newLineSeries = new LinkedList<>(); + List> energyList = new LinkedList<>(); + energyList.add(energys); for (int i=0; i map = new HashMap<>(); //获取当前登陆的用户名 String userName = JwtUtil.getUserNameByToken(request); + //获取当前操作的文件名称 + String currentFileName = analyseData.getCurrentFileName(); //获取缓存信息 Cache cache = betaCache.getBetaCache(); if ("CurrentSpectrum".equals(analyseData.getApplyType())) { - String sampleFileName = analyseData.getSampleFileNames().get(0); - BetaDataFile betaDataFile = cache.getIfPresent(sampleFileName + "-" + userName); + BetaDataFile betaDataFile = cache.getIfPresent(currentFileName + "-" + userName); if (Objects.isNull(betaDataFile)) { result.error500("Load basic file information first!"); return result; @@ -2680,9 +2725,7 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements result.setResult(map); } else if ("AllSpectrum".equals(analyseData.getApplyType())) { //获取当前选中的文件名称 - String currentFileName = analyseData.getCurrentFileName(); - String currentQCFileName = analyseData.getCurrentQCFileName(); - map = BetaGammaAnalyzeAllProcess(analyseData, userName, currentFileName, currentQCFileName); + map = BetaGammaAnalyzeAllProcess(analyseData, userName, currentFileName); if (CollectionUtils.isNotEmpty(map)) { map.put("bProcessed", true); map.put("savedAnalysisResult", true); @@ -2728,12 +2771,30 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements spectrum_group.b_c2e = bc2e; if (analyseData.isSampleData()) { betaDataFile.setBBetaEnergyValidSample(true); + if (CollectionUtils.isNotEmpty(betaDataFile.getBetaNewEnergyList())) { + betaDataFile.setSampleBetaEnergyList(betaDataFile.getBetaNewEnergyList()); + xeMap.put("sampleBetaEnergyData", betaDataFile.getBetaNewEnergyList()); + } } if (analyseData.isGasBgData()) { betaDataFile.setBBetaEnergyValidGas(true); + if (CollectionUtils.isNotEmpty(betaDataFile.getBetaNewEnergyList())) { + betaDataFile.setGasBetaEnergyList(betaDataFile.getBetaNewEnergyList()); + xeMap.put("gasBetaEnergyData", betaDataFile.getBetaNewEnergyList()); + } } if (analyseData.isDetBgData()) { betaDataFile.setBBetaEnergyValidDet(true); + if (CollectionUtils.isNotEmpty(betaDataFile.getBetaNewEnergyList())) { + betaDataFile.setDetBetaEnergyList(betaDataFile.getBetaNewEnergyList()); + xeMap.put("detBetaEnergyData", betaDataFile.getBetaNewEnergyList()); + } + } + if (analyseData.isQcData()) { + if (CollectionUtils.isNotEmpty(betaDataFile.getBetaNewEnergyList())) { + betaDataFile.setQcBetaEnergyList(betaDataFile.getBetaNewEnergyList()); + xeMap.put("qcBetaEnergyData", betaDataFile.getBetaNewEnergyList()); + } } } //判断是否对gamma页面进行过分析 @@ -2750,12 +2811,30 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements spectrum_group.g_c2e = gc2e; if (analyseData.isSampleData()) { betaDataFile.setBGammaEnergyValidSample(true); + if (CollectionUtils.isNotEmpty(betaDataFile.getGammaNewEnergyList())) { + betaDataFile.setSampleGammaEnergyList(betaDataFile.getGammaNewEnergyList()); + xeMap.put("sampleGammaEnergyData", betaDataFile.getGammaNewEnergyList()); + } } if (analyseData.isGasBgData()) { betaDataFile.setBGammaEnergyValidGas(true); + if (CollectionUtils.isNotEmpty(betaDataFile.getGammaNewEnergyList())) { + betaDataFile.setGasGammaEnergyList(betaDataFile.getGammaNewEnergyList()); + xeMap.put("gasGammaEnergyData", betaDataFile.getGammaNewEnergyList()); + } } if (analyseData.isDetBgData()) { betaDataFile.setBGammaEnergyValidDet(true); + if (CollectionUtils.isNotEmpty(betaDataFile.getGammaNewEnergyList())) { + betaDataFile.setDetGammaEnergyList(betaDataFile.getGammaNewEnergyList()); + xeMap.put("detGammaEnergyData", betaDataFile.getGammaNewEnergyList()); + } + } + if (analyseData.isQcData()) { + if (CollectionUtils.isNotEmpty(betaDataFile.getGammaNewEnergyList())) { + betaDataFile.setQcGammaEnergyList(betaDataFile.getGammaNewEnergyList()); + xeMap.put("qcGammaEnergyData", betaDataFile.getGammaNewEnergyList()); + } } } //判断是否勾选了sample @@ -2840,7 +2919,7 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements return xeMap; } - private Map BetaGammaAnalyzeAllProcess(AnalyseData analyseData, String userName, String currentFileName, String currentQCFileName){ + private Map BetaGammaAnalyzeAllProcess(AnalyseData analyseData, String userName, String currentFileName){ //从本地缓存获取beta gamma的数组 Cache cache = betaCache.getBetaCache(); //返回最终结果用的map @@ -2891,12 +2970,30 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements spectrum_group.b_c2e = bc2e; if (analyseData.isSampleData()) { sampleBetaData.setBBetaEnergyValidSample(true); + if (CollectionUtils.isNotEmpty(betaDataFile.getBetaNewEnergyList())) { + sampleBetaData.setSampleBetaEnergyList(betaDataFile.getBetaNewEnergyList()); + xeMap.put("sampleBetaEnergyData", betaDataFile.getBetaNewEnergyList()); + } } if (analyseData.isGasBgData()) { sampleBetaData.setBBetaEnergyValidGas(true); + if (CollectionUtils.isNotEmpty(betaDataFile.getBetaNewEnergyList())) { + sampleBetaData.setGasBetaEnergyList(betaDataFile.getBetaNewEnergyList()); + xeMap.put("gasBetaEnergyData", betaDataFile.getBetaNewEnergyList()); + } } if (analyseData.isDetBgData()) { sampleBetaData.setBBetaEnergyValidDet(true); + if (CollectionUtils.isNotEmpty(betaDataFile.getBetaNewEnergyList())) { + sampleBetaData.setDetBetaEnergyList(betaDataFile.getBetaNewEnergyList()); + xeMap.put("detBetaEnergyData", betaDataFile.getBetaNewEnergyList()); + } + } + if (analyseData.isQcData()) { + if (CollectionUtils.isNotEmpty(betaDataFile.getBetaNewEnergyList())) { + sampleBetaData.setQcBetaEnergyList(betaDataFile.getBetaNewEnergyList()); + xeMap.put("qcBetaEnergyData", betaDataFile.getBetaNewEnergyList()); + } } } if (analyseData.isGammaEnergyValid()) { @@ -2912,12 +3009,30 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements spectrum_group.g_c2e = gc2e; if (analyseData.isSampleData()) { sampleBetaData.setBGammaEnergyValidSample(true); + if (CollectionUtils.isNotEmpty(betaDataFile.getGammaNewEnergyList())) { + sampleBetaData.setSampleGammaEnergyList(betaDataFile.getGammaNewEnergyList()); + xeMap.put("sampleGammaEnergyData", betaDataFile.getGammaNewEnergyList()); + } } if (analyseData.isGasBgData()) { sampleBetaData.setBGammaEnergyValidGas(true); + if (CollectionUtils.isNotEmpty(betaDataFile.getGammaNewEnergyList())) { + sampleBetaData.setGasGammaEnergyList(betaDataFile.getGammaNewEnergyList()); + xeMap.put("gasGammaEnergyData", betaDataFile.getGammaNewEnergyList()); + } } if (analyseData.isDetBgData()) { sampleBetaData.setBGammaEnergyValidDet(true); + if (CollectionUtils.isNotEmpty(betaDataFile.getGammaNewEnergyList())) { + sampleBetaData.setDetGammaEnergyList(betaDataFile.getGammaNewEnergyList()); + xeMap.put("detGammaEnergyData", betaDataFile.getGammaNewEnergyList()); + } + } + if (analyseData.isQcData()) { + if (CollectionUtils.isNotEmpty(betaDataFile.getGammaNewEnergyList())) { + sampleBetaData.setQcGammaEnergyList(betaDataFile.getGammaNewEnergyList()); + xeMap.put("qcGammaEnergyData", betaDataFile.getGammaNewEnergyList()); + } } } spectrum_group.BgCalPara.bApplyNewCalicSample = analyseData.isSampleData();