From 812c734d1bad1143cebb1e6d46303a85f6927114 Mon Sep 17 00:00:00 2001 From: nieziyan Date: Thu, 15 Aug 2024 19:23:31 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9ARRR=E6=8A=A5=E5=91=8A=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jeecg/modules/base/dto/MdcDto.java | 8 +- .../jeecg/modules/entity/vo/CalMDCInfo.java | 39 ++ .../entity/vo/GStoreMiddleProcessData.java | 8 +- .../org/jeecg/common/util/GammaFileUtil.java | 456 +----------------- .../service/impl/GammaServiceImpl.java | 2 +- 5 files changed, 52 insertions(+), 461 deletions(-) diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/dto/MdcDto.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/dto/MdcDto.java index 33e852b5..684dc4f4 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/dto/MdcDto.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/dto/MdcDto.java @@ -1,20 +1,18 @@ package org.jeecg.modules.base.dto; import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; import lombok.Data; import org.jeecg.common.util.NumUtil; import java.text.DecimalFormat; import java.text.NumberFormat; -import java.util.Objects; @Data public class MdcDto { private String nuclideName; - private Double halfLife; + private Double halflife; private Double mdc; @@ -33,8 +31,8 @@ public class MdcDto { } public void format(){ - if (ObjectUtil.isNotNull(halfLife)) - halfLifeStr = halfLifeStr(halfLife); + if (ObjectUtil.isNotNull(halflife)) + halfLifeStr = halfLifeStr(halflife); if (ObjectUtil.isNotNull(mdc)) mdcStr = NumUtil.keep6ScienceStr(mdc); if (ObjectUtil.isNotNull(mda)) diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/CalMDCInfo.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/CalMDCInfo.java index d835bbf9..741c22a9 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/CalMDCInfo.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/CalMDCInfo.java @@ -1,8 +1,12 @@ package org.jeecg.modules.entity.vo; +import cn.hutool.core.util.ObjectUtil; import lombok.Data; +import org.jeecg.common.util.NumUtil; import java.io.Serializable; +import java.text.DecimalFormat; +import java.text.NumberFormat; import java.util.List; @Data @@ -48,4 +52,39 @@ public class CalMDCInfo implements Serializable { */ private Double yield; + private Double mda; + + private String halfLifeStr = ""; + + private String mdcStr = ""; + + private String mdaStr = ""; + + public void format(){ + if (ObjectUtil.isNotNull(halflife)) + halfLifeStr = halfLifeStr(halflife); + if (ObjectUtil.isNotNull(mdc)) + mdcStr = NumUtil.keep6ScienceStr(mdc); + if (ObjectUtil.isNotNull(mda)) + mdaStr = NumUtil.keep6ScienceStr(mda); + } + + private String halfLifeStr(Double halflife){ + String units = "D"; + if (halflife >= 1000) { + halflife = halflife / 365.25; + units = "A"; + } else if (halflife < 0.1 && halflife >= 1.0 / 1440.0) { + halflife = halflife * 1440.0; + units = "M"; + } else if (halflife <= 1.0 / 1440.0 && halflife > 0.0) { + halflife = halflife * 86400.0; + units = "S"; + } + + if (halflife < 1000) + return String.format("%.3f", halflife) + units; + NumberFormat numberFormat = new DecimalFormat("0.###E0"); + return numberFormat.format(halflife) + units; + } } diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/GStoreMiddleProcessData.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/GStoreMiddleProcessData.java index 76faea36..f6ebe59a 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/GStoreMiddleProcessData.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/GStoreMiddleProcessData.java @@ -3,10 +3,7 @@ package org.jeecg.modules.entity.vo; import lombok.Data; import java.io.Serializable; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; +import java.util.*; @Data public class GStoreMiddleProcessData implements Serializable { @@ -231,6 +228,8 @@ public class GStoreMiddleProcessData implements Serializable { //SpecSetup public SpecSetup setting_specSetup; + public List mdcInfos; + public GStoreMiddleProcessData(){ dbWriteFlag = false; dbWriteStatusFlag = ""; @@ -419,6 +418,7 @@ public class GStoreMiddleProcessData implements Serializable { Collection_Station_Comments = ""; NDC_Analysis_General_Comments = ""; setting_specSetup = new SpecSetup(); + mdcInfos = new ArrayList<>(); } } diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java index 599b60a4..1233b1aa 100644 --- a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java @@ -1,5 +1,7 @@ package org.jeecg.common.util; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.ListUtil; import cn.hutool.core.io.FileUtil; import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSON; @@ -17,7 +19,6 @@ import org.jeecg.common.api.vo.Result; import org.jeecg.common.properties.ParameterProperties; import org.jeecg.common.properties.SpectrumPathProperties; import org.jeecg.modules.base.abstracts.AbstractLogOrReport; -import org.jeecg.modules.base.dto.MdcDto; import org.jeecg.modules.base.entity.configuration.GardsNuclLinesLib; import org.jeecg.modules.base.enums.CalName; import org.jeecg.modules.base.enums.CalType; @@ -2314,16 +2315,6 @@ public class GammaFileUtil extends AbstractLogOrReport { } } - public String GetReportContent(PHDFile phd, String userName, boolean bLog, String flag, List mdcDtos) { - GStoreMiddleProcessData middleData = new GStoreMiddleProcessData(); - GetInterMiddlData(phd, userName, middleData, flag); - if(bLog) { - return GetLogContent(middleData); - } else { - return GetReportContent(middleData, mdcDtos); - } - } - public boolean GetInterMiddlData(PHDFile phd, String userName, GStoreMiddleProcessData middleData, String flag) { boolean bRet = true; Map temp = new HashMap<>(); @@ -2821,451 +2812,13 @@ public class GammaFileUtil extends AbstractLogOrReport { //换行 strBuffer.append(System.lineSeparator()); strBuffer.append("#MINIMUM DETECTABLE CONCENTRATION FOR KEY NUCLIDES"); - - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append("#PEAK SEARCH RESULTS"); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(StringPool.SPACE+middleData.peaks_idPeak.size()+" peaks reported:"); - //换行 - strBuffer.append(System.lineSeparator()); - double peaksUsed = 0; - for(int m=0;m0) { - strBuffer.append("#Calibration"); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(" Energy Calibration ["+middleData.calibration_pairs_E_Input+" ]"); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sFunction:%-27s%s", StringPool.SPACE, StringPool.SPACE, middleData.calibration_E_functionTypeDef)); - //换行 - strBuffer.append(System.lineSeparator()); - String[] cellsE4 = new String[]{" E"}; - String[] datasE4 = new String[]{middleData.calibration_E_functionDef}; - //根据固定宽度切割数据 - Map> reportMapE4 = GetReportFixedWidth(cellsE4, datasE4, 30); - List titleE4 = reportMapE4.get("title"); - List contentE4 = reportMapE4.get("content"); - for (int i=0; i< titleE4.size(); i++) { - String title = titleE4.get(i); - String content = contentE4.get(i); - strBuffer.append(rowFormat("%s:%-34s%s", title, StringPool.SPACE, content)); - //换行 - strBuffer.append(System.lineSeparator()); - } - String[] cells4 = new String[]{" P"}; - String[] datas4 = new String[]{middleData.calibration_E_coeff_string}; - //根据固定宽度切割数据 - Map> reportMap4 = GetReportFixedWidth(cells4, datas4, 30); - List title4 = reportMap4.get("title"); - List content4 = reportMap4.get("content"); - for (int i=0; i< title4.size(); i++) { - String title = title4.get(i); - String content = content4.get(i); - strBuffer.append(rowFormat("%s:%-34s%s", title, StringPool.SPACE, content)); - //换行 - strBuffer.append(System.lineSeparator()); - } - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sErr:%-32s%s", StringPool.SPACE, StringPool.SPACE, middleData.calibration_E_uncoeff_string)); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sData:%-31s%s", StringPool.SPACE, StringPool.SPACE, middleData.calibration_pairs_E_Input)); - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - } - if(middleData.calibration_pairs_R_idCalPoint.size()>0) { - strBuffer.append(" Resolution Calibration ["+middleData.calibration_pairs_R_Input+" ]"); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sFunction:%-27s%s", StringPool.SPACE, StringPool.SPACE, middleData.calibration_R_functionTypeDef)); - //换行 - strBuffer.append(System.lineSeparator()); - String[] cellsE5 = new String[]{" E"}; - String[] datasE5 = new String[]{middleData.calibration_R_functionDef}; - //根据固定宽度切割数据 - Map> reportMapE5 = GetReportFixedWidth(cellsE5, datasE5, 30); - List titleE5 = reportMapE5.get("title"); - List contentE5 = reportMapE5.get("content"); - for (int i=0; i< titleE5.size(); i++) { - String title = titleE5.get(i); - String content = contentE5.get(i); - strBuffer.append(rowFormat("%s:%-34s%s", title, StringPool.SPACE, content)); - //换行 - strBuffer.append(System.lineSeparator()); - } - String[] cells5 = new String[]{" P"}; - String[] datas5 = new String[]{middleData.calibration_R_coeff_string}; - //根据固定宽度切割数据 - Map> reportMap5 = GetReportFixedWidth(cells5, datas5, 30); - List title5 = reportMap5.get("title"); - List content5 = reportMap5.get("content"); - for (int i=0; i< title5.size(); i++) { - String title = title5.get(i); - String content = content5.get(i); - strBuffer.append(rowFormat("%s:%-34s%s", title, StringPool.SPACE, content)); - //换行 - strBuffer.append(System.lineSeparator()); - } - strBuffer.append(rowFormat("%sErr:%-32s%s", StringPool.SPACE, StringPool.SPACE, middleData.calibration_R_uncoeff_string)); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sData:%-31s%s", StringPool.SPACE, StringPool.SPACE, middleData.calibration_pairs_R_Input)); - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - } - if(middleData.calibration_pairs_EF_idCalPoint.size()>0) { - strBuffer.append(" Efficiency Calibration ["+middleData.calibration_pairs_EF_Input+" ]"); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sFunction:%-27s%s", StringPool.SPACE, StringPool.SPACE, middleData.calibration_EF_functionTypeDef)); - //换行 - strBuffer.append(System.lineSeparator()); - String[] cellsE6 = new String[]{" E"}; - String[] datasE6 = new String[]{middleData.calibration_EF_functionDef}; - //根据固定宽度切割数据 - Map> reportMapE6 = GetReportFixedWidth(cellsE6, datasE6, 30); - List titleE6 = reportMapE6.get("title"); - List contentE6 = reportMapE6.get("content"); - for (int i=0; i< titleE6.size(); i++) { - String title = titleE6.get(i); - String content = contentE6.get(i); - strBuffer.append(rowFormat("%s:%-34s%s", title, StringPool.SPACE, content)); - //换行 - strBuffer.append(System.lineSeparator()); - } - String[] cells6 = new String[]{" P"}; - String[] datas6 = new String[]{middleData.calibration_EF_coeff_string}; - //根据固定宽度切割数据 - Map> reportMap6 = GetReportFixedWidth(cells6, datas6, 30); - List title6 = reportMap6.get("title"); - List content6 = reportMap6.get("content"); - for (int i=0; i< title6.size(); i++) { - String title = title6.get(i); - String content = content6.get(i); - strBuffer.append(rowFormat("%s:%-34s%s", title, StringPool.SPACE, content)); - //换行 - strBuffer.append(System.lineSeparator()); - } - strBuffer.append(rowFormat("%sErr:%-32s%s", StringPool.SPACE, StringPool.SPACE, middleData.calibration_EF_uncoeff_string)); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sData:%-31s%s", StringPool.SPACE, StringPool.SPACE, middleData.calibration_pairs_EF_Input)); - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - } - if(middleData.calibration_pairs_T_idCalPoint.size()>0) { - strBuffer.append(" Tot_efficiency Calibration ["+middleData.calibration_pairs_T_Input+" ]"); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sFunction:%-27s%s", StringPool.SPACE, StringPool.SPACE, middleData.calibration_T_functionTypeDef)); - //换行 - strBuffer.append(System.lineSeparator()); - String[] cellsE7 = new String[]{" E"}; - String[] datasE7 = new String[]{middleData.calibration_T_functionDef}; - //根据固定宽度切割数据 - Map> reportMapE7 = GetReportFixedWidth(cellsE7, datasE7, 30); - List titleE7 = reportMapE7.get("title"); - List contentE7 = reportMapE7.get("content"); - for (int i=0; i< titleE7.size(); i++) { - String title = titleE7.get(i); - String content = contentE7.get(i); - strBuffer.append(rowFormat("%s:%-34s%s", title, StringPool.SPACE, content)); - //换行 - strBuffer.append(System.lineSeparator()); - } - String[] cells7 = new String[]{" P"}; - String[] datas7 = new String[]{middleData.calibration_T_coeff_string}; - //根据固定宽度切割数据 - Map> reportMap7 = GetReportFixedWidth(cells7, datas7, 30); - List title7 = reportMap7.get("title"); - List content7 = reportMap7.get("content"); - for (int i=0; i< title7.size(); i++) { - String title = title7.get(i); - String content = content7.get(i); - strBuffer.append(rowFormat("%s:%-34s%s", title, StringPool.SPACE, content)); - //换行 - strBuffer.append(System.lineSeparator()); - } - strBuffer.append(rowFormat("%sErr:%-32s%s", StringPool.SPACE, StringPool.SPACE, middleData.calibration_T_uncoeff_string)); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sData:%-31s%s", StringPool.SPACE, StringPool.SPACE, middleData.calibration_pairs_T_Input)); - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - } - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append("#DATA QUALITY FLAGS"); - //换行 - strBuffer.append(System.lineSeparator()); - String qualityTitle = "%-15s%-15s%-15s%-15s"; - strBuffer.append(rowFormat(qualityTitle, " Name", "Pass/Fail", "Value", "Test")); - //换行 - strBuffer.append(System.lineSeparator()); - for (int i=0;i mdcDtos) { - try { - StringBuffer strBuffer = new StringBuffer(); - strBuffer.append(" CNL06 GENERATED REPORT"); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(" "+middleData.analyses_type+" RADIONUCLIDE REPORT"); - //换行 - strBuffer.append(System.lineSeparator()); - if (middleData.sample_Type.equals(SystemType.PARTICULATE.getType())) { - strBuffer.append(" (Particulates Version) "); - } else if (middleData.sample_Type.equals(SystemType.GAMMA.getType())) { - strBuffer.append(" (Noble Gas Version) "); - } - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(" Creation Date "+DateUtils.formatDate(new Date(), "yyyy/MM/dd-HH:mm:ss")); - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append("#SAMPLE INFORMATION"); - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - //报告内容第一部分数据 - strBuffer.append(rowFormat("%sStation ID:%-25s%s", StringPool.SPACE, StringPool.SPACE, middleData.sample_stationID)); - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sDetector ID:%-24s%s", StringPool.SPACE, StringPool.SPACE, middleData.sample_detectID)); - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sSample ID:%-26s%s", StringPool.SPACE, StringPool.SPACE, middleData.sample_id)); - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sSample Geometry:%-20s%s", StringPool.SPACE, StringPool.SPACE, middleData.sample_Geometry)); - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sSample Quantity[m3]:%-16s%s", StringPool.SPACE, StringPool.SPACE, middleData.sample_quantity)); - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sSample Type:%-24s%s", StringPool.SPACE, StringPool.SPACE, middleData.sample_Type)); - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sCollection Start:%-19s%s", StringPool.SPACE, StringPool.SPACE, middleData.sample_collection_start)); - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sCollection Stop:%-20s%s", StringPool.SPACE, StringPool.SPACE, middleData.sample_collection_stop)); - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sSampling Time[h]:%-19s%s", StringPool.SPACE, StringPool.SPACE, middleData.sample_time)); - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sDecay Time[h]:%-22s%s", StringPool.SPACE, StringPool.SPACE, middleData.sample_decay_time)); - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sAcquisition Start:%-18s%s", StringPool.SPACE, StringPool.SPACE, middleData.sample_acquisiton_start)); - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sAcquisition Stop:%-19s%s", StringPool.SPACE, StringPool.SPACE, middleData.sample_acquistion_stop)); - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sAcquisition Time[s]:%-16s%s", StringPool.SPACE, StringPool.SPACE, middleData.sample_acquistion_time)); - strBuffer.append(System.lineSeparator()); - strBuffer.append(rowFormat("%sAvg Flow Rate[m3/h]:%-16s%s", StringPool.SPACE, StringPool.SPACE, middleData.sample_Avg_Flow_Rate)); - strBuffer.append(System.lineSeparator()); - String[] cells1 = new String[]{" Collection Station Comments"}; - String[] datas1 = new String[]{middleData.Collection_Station_Comments}; - //根据固定宽度切割数据 - Map> reportMap1 = GetReportFixedWidth(cells1, datas1, 30); - List title1 = reportMap1.get("title"); - List content1 = reportMap1.get("content"); - for (int i=0; i< title1.size(); i++) { - String title = title1.get(i); - String content = content1.get(i); - strBuffer.append(String.format("%s:%-8s%s", title, StringPool.SPACE, content)); - //换行 - strBuffer.append(System.lineSeparator()); - } - //报告内容第二部分数据 - String[] cell2 = new String[]{" Analysis General Comments"}; - String[] datas2 = new String[]{middleData.NDC_Analysis_General_Comments}; - //根据固定宽度切割数据 - Map> reportMap2 = GetReportFixedWidth(cell2, datas2, 30); - List title2 = reportMap2.get("title"); - List content2 = reportMap2.get("content"); - for (int i=0; i< title2.size(); i++) { - String title = title2.get(i); - String content = content2.get(i); - strBuffer.append(String.format("%s:%-10s%s", title, StringPool.SPACE, content)); - //换行 - strBuffer.append(System.lineSeparator()); - } - //换行 - strBuffer.append(System.lineSeparator()); - //获取核素信息 - String qsNuclidesName = ""; - for(int m=0;m1) { - qsNuclidesName = qsNuclidesName+middleData.nucl_ided_Nuclidename.get(middleData.nucl_ided_Nuclidename.size()-1); - } - strBuffer.append("#ACTIVITY SUMMARY"); - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - //报告内容第三部分数据 - String[] cells3 = new String[]{" Nuclides Identified"}; - String[] datas3 = new String[]{qsNuclidesName}; - //根据固定宽度切割数据 - Map> reportMap3 = GetReportFixedWidth(cells3, datas3, 30); - List title3 = reportMap3.get("title"); - List content3 = reportMap3.get("content"); - for (int i=0; i< title3.size(); i++) { - String title = title3.get(i); - String content = content3.get(i); - strBuffer.append(String.format("%s:%-16s%s", title, StringPool.SPACE, content)); - //换行 - strBuffer.append(System.lineSeparator()); - } - strBuffer.append(String.format("%s:%-4s%s", " Keyline Activities for Nuclides", StringPool.SPACE, "")); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(String.format("%s:%-8s%s", " with defined Reference Line", StringPool.SPACE, "")); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(String.format("%s:%-12s%s", " Activity Reference Time", StringPool.SPACE, middleData.sample_acquisiton_start)); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(String.format("%s:%-7s%s", " Concentration Reference Time", StringPool.SPACE, middleData.sample_collection_start)); - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - String nuclideTitle = "%-15s%-18s%-15s%-15s%-15s%-21s%-15s"; - String[] nuclideData = new String[]{" Nuclide", "Halflife(s)", "Activity(Bq)", "RelErr%", "MDA(Bq)", "Conc(uBq/m^3)", "MDC"}; - strBuffer.append(rowFormat(nuclideTitle, nuclideData)); - strBuffer.append(System.lineSeparator()); - for (int i=0; i mdcInfos = middleData.mdcInfos; String mdcTitle = "%-15s%-18s%-15s%-15s"; String[] mdcData = new String[]{" Nuclide", "Halflife", "MDC", "MDA(Bq)"}; strBuffer.append(rowFormat(mdcTitle, mdcData)); strBuffer.append(System.lineSeparator()); - for (MdcDto mdcDto : mdcDtos) { + for (CalMDCInfo mdcDto : mdcInfos) { mdcDto.format(); strBuffer.append(rowFormat(mdcTitle, StringPool.SPACE + mdcDto.getNuclideName(), mdcDto.getHalfLifeStr(), mdcDto.getMdcStr(), mdcDto.getMdaStr())); @@ -3644,6 +3197,7 @@ public class GammaFileUtil extends AbstractLogOrReport { public boolean GetMiddleData(PHDFile fileAnlyse, String userName,Map nucline,GStoreMiddleProcessData middleData, String type, String flag) throws ParseException { boolean bRet=true; //标准名称规范化 + middleData.mdcInfos = ListUtil.toList(fileAnlyse.getMdcInfoMap().values()); String dataType = fileAnlyse.getMsgInfo().getData_type(); String subDirSavePath = ""; subDirSavePath+=nameStandUtil.GetSysTemSubdir(fileAnlyse.getHeader().getSystem_type()); 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 47a30f60..2f35f52f 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 @@ -4035,7 +4035,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi if (ObjectUtil.isNotNull(analysisId)) mdcDtos = mdcSpectrumService.mdcDtos(analysisId); //生成对应报告内容 - String reportContent = gammaFileUtil.GetReportContent(phd, userName, false, "log", mdcDtos); + String reportContent = gammaFileUtil.GetReportContent(phd, userName, false, "log"); result.setSuccess(true); result.setResult(reportContent); return result;