diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/GammaServiceImpl.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/GammaServiceImpl.java index 26ec68ab..8c0937db 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/GammaServiceImpl.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/GammaServiceImpl.java @@ -1461,16 +1461,8 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi for (int j = 0; j < tablePeaksList.size(); j++) { TablePeaks nPeak = tablePeaksList.get(j); PeakInfo peak = phd.getVPeak().get(Integer.valueOf(nPeak.getLab()) - 1); - if (!NumberFormatUtil.numberFormat(String.valueOf(peak.energy)).equals(nPeak.getEnergy()) ) { - peak.energy = Double.parseDouble(nPeak.getEnergy()); - } - if (!NumberFormatUtil.numberFormat(String.valueOf(peak.area)).equals(nPeak.getNetArea())) { - peak.area = Double.parseDouble(nPeak.getNetArea()); - } - if (!NumberFormatUtil.numberFormat(String.valueOf(peak.fwhm)).equals(nPeak.getFwhm())) { - peak.fwhm = Double.parseDouble(nPeak.getFwhm()); - } double dE = CalValuesHandler.calDerivaOut(peak.peakCentroid, phd.getUsedEnerPara().getP()); + peak.energy = Double.parseDouble(nPeak.getEnergy()); if (peak.energy < vE_Rg.get(0) || peak.energy > vE_Rg.get(1)) { result.error500("The energy isn't in the analysis range."); @@ -1479,6 +1471,8 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi List energys = new LinkedList<>(); energys.add(peak.energy); peak.peakCentroid = CalValuesHandler.energyToChannel(energys, phd.getUsedEnerPara().getP()).counts.get(0); + peak.area = Double.parseDouble(nPeak.getNetArea()); + peak.fwhm = Double.parseDouble(nPeak.getFwhm()); peak.stepRatio = Double.valueOf(nPeak.getStep()) / peak.area; peak.BWWidthChan = Double.valueOf(nPeak.getBwGamma()) / dE; if (dE > 0) {