diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/GammaFileUtil.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/GammaFileUtil.java index e612255a..18febbd2 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/GammaFileUtil.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/GammaFileUtil.java @@ -2721,16 +2721,27 @@ public class GammaFileUtil { return data; } + public List DoubleLimit_I(List _data) { + List rdata = new LinkedList<>(); + for(int pos=0;pos<_data.size();pos++) { + Double value = _data.get(pos); + if(Objects.isNull(value)) { + rdata.add("NULL"); + } else { + rdata.add(String.valueOf(value)); + } + } + return rdata; + } + public List DoubleLimit_G(List _data) { List rdata = new LinkedList<>(); for(int pos=0;pos<_data.size();pos++) { Double value = _data.get(pos); if(Objects.isNull(value)) { rdata.add("NULL"); - } else if (value > 0){ - rdata.add(String.format("%.10g", value)); } else { - rdata.add(String.valueOf(value)); + rdata.add(String.format("%.10g", value)); } } return rdata; @@ -3167,7 +3178,7 @@ public class GammaFileUtil { dvctComments.add(t_comment); dvctNuclide_name.add(StringUtils.join(fileAnlyse.getVPeak().get(m).nuclides, ";")); } - middleData.peaks_idPeak =DoubleLimit_G(dvctIDPEAK); + middleData.peaks_idPeak =DoubleLimit_I(dvctIDPEAK); middleData.peaks_peakCentroid =DoubleLimit_G(dvctCENTROIDCHANNEL); middleData.peaks_uncpeakCentroid =DoubleLimit_G(dvctUNCCENTROIDCHANNEL); middleData.peaks_Energy =DoubleLimit_G(dvctENERGY); @@ -3240,7 +3251,7 @@ public class GammaFileUtil { dvctUNCACTIVITY.add(itor.getValue().getAct_err()); dvctEFFIC.add(itor.getValue().getEfficiency()); dvctUNEFFIC.add(itor.getValue().getEffi_err()); - dvctMDA.add(String.format("%e", itor.getValue().getMda())); + dvctMDA.add(itor.getValue().getMda()>0?String.format("%e", itor.getValue().getMda()):"0.0"); // dvctKEY_FLAG.add(itor.value().vYield.get(m)); dvctCSC_RATIO.add(1.0); dvctCSC_RATIO_ERR.add(0.0); @@ -3254,7 +3265,7 @@ public class GammaFileUtil { dvctCONCENTRATION.add(String.format("%e", itor.getValue().getConcentration())); } nucl_lines_ided_data.nuclideFullname = svctNUCLIDEFULLNAME; - nucl_lines_ided_data.idPeak =DoubleLimit_G(dvctIDPEAK); + nucl_lines_ided_data.idPeak =DoubleLimit_I(dvctIDPEAK); nucl_lines_ided_data.Energy =DoubleLimit_G(dvctENERGY); nucl_lines_ided_data.uncEnergy =DoubleLimit_G(dvctUNCENERGY); nucl_lines_ided_data.Abundance =DoubleLimit_G(dvctABUNDANCE); @@ -3298,7 +3309,7 @@ public class GammaFileUtil { dvctACTIV_KEY.add(itor_v.getValue().getActivity()); dvctACTIV_KEY_ERR.add(itor_v.getValue().getAct_err()); dvctMDA.add(String.format("%e", itor_v.getValue().getMda())); - dvctMDC.add(String.format("%e", itor_v.getValue().getMdc())); + dvctMDC.add(itor_v.getValue().getMdc()>0?String.format("%e", itor_v.getValue().getMdc()):"0.0"); dvctCONCENTRATION.add(String.format("%e", itor_v.getValue().getConcentration())); dvctCSC_RATIO.add(1.0); dvctCSC_RATIO_ERR.add(0.0); 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 c32634f8..06107427 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 @@ -1962,7 +1962,6 @@ public class GammaServiceImpl implements IGammaService { return; } String reportContent = gammaFileUtil.GetReportContent(phd, false); -// String reportContent = gammaFileUtil.GetReportContent(phd, true); OutputStream fos = null; try { //设置响应类型