From 7b9ce715fbf031cafc949263b5865a3097ac45ea Mon Sep 17 00:00:00 2001 From: nieziyan Date: Tue, 12 Sep 2023 10:10:01 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9ABug=20Fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeecg/modules/base/bizVo/GammaRLR.java | 10 ++++------ .../entity/vo/GCoincidenceCorrection.java | 16 +++++++++++++++ .../java/org/jeecg/modules/entity/vo/Mda.java | 14 +++++++++++++ .../modules/entity/vo/NuclideRatios.java | 20 +++++++++++++++++++ .../main/resources/excelTemplate/Gamma.RLR | 3 +++ .../service/impl/GammaServiceImpl.java | 19 +++++++++++++++--- .../service/impl/SpectrumFileServiceImpl.java | 10 +++++++++- 7 files changed, 82 insertions(+), 10 deletions(-) create mode 100644 jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/GCoincidenceCorrection.java create mode 100644 jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/Mda.java create mode 100644 jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/NuclideRatios.java diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/bizVo/GammaRLR.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/bizVo/GammaRLR.java index 017c8e7e..d68d6f4c 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/bizVo/GammaRLR.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/bizVo/GammaRLR.java @@ -1,9 +1,7 @@ package org.jeecg.modules.base.bizVo; import lombok.Data; -import org.jeecg.modules.entity.vo.TableAssociation; -import org.jeecg.modules.entity.vo.TablePeakFit; -import org.jeecg.modules.entity.vo.TableResult; +import org.jeecg.modules.entity.vo.*; import java.util.List; @@ -74,13 +72,13 @@ public class GammaRLR { private List Result; // #NuclideRatios - + private List NuclideRatios; // #g_CoincidenceCorrection - + private List g_CoincidenceCorrection; // #MDA - + private List mda; // #Conclusions private String conclusion_person; diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/GCoincidenceCorrection.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/GCoincidenceCorrection.java new file mode 100644 index 00000000..767e01c1 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/GCoincidenceCorrection.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.entity.vo; + +import lombok.Data; +import java.io.Serializable; + +@Data +public class GCoincidenceCorrection implements Serializable { + + private String nuclide; + + private String energy; + + private String correctionFactor; + + private String uncertainty; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/Mda.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/Mda.java new file mode 100644 index 00000000..86063056 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/Mda.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.entity.vo; + +import lombok.Data; +import java.io.Serializable; + +@Data +public class Mda implements Serializable { + + private String nuclide; + + private String mda; + + private String mdc; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/NuclideRatios.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/NuclideRatios.java new file mode 100644 index 00000000..85e0334a --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/entity/vo/NuclideRatios.java @@ -0,0 +1,20 @@ +package org.jeecg.modules.entity.vo; + +import lombok.Data; +import java.io.Serializable; + +@Data +public class NuclideRatios implements Serializable { + + private String nuclide1; + + private String nuclide2; + + private String ratio; + + private String ratioErr; + + private String referenceTime; + + private String zeroTime; +} diff --git a/jeecg-boot-base-core/src/main/resources/excelTemplate/Gamma.RLR b/jeecg-boot-base-core/src/main/resources/excelTemplate/Gamma.RLR index c6c127bf..f9c683cf 100644 --- a/jeecg-boot-base-core/src/main/resources/excelTemplate/Gamma.RLR +++ b/jeecg-boot-base-core/src/main/resources/excelTemplate/Gamma.RLR @@ -61,8 +61,11 @@ ${Reference_physical} ${Result_act_ref} ${Result_conc_ref} ${Result} #NuclideRatios +${NuclideRatios} #g_CoincidenceCorrection +${g_CoincidenceCorrection} #MDA +${mda} #Conclusions ${conclusion_person} ~IDCSummary 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 161032b8..a05ebb09 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 @@ -1892,8 +1892,10 @@ public class GammaServiceImpl implements IGammaService { } } item.setStandard(standard); - if(StrUtil.equals(name, "Xe133-MDC (uBq/m3)")) + if(StrUtil.equals(name, "Xe133-MDC (uBq/m3)")){ qcResultList.add(0, item); + continue; + } qcResultList.add(item); } result.setSuccess(true); @@ -2076,8 +2078,10 @@ public class GammaServiceImpl implements IGammaService { // 正则表达式,匹配${}中的内容 String regex = "\\$\\{([^}]+)}"; List newLines = new ArrayList<>(); - List list = ListUtil.toList("peakFit","Association","Result"); - List skip = ListUtil.toList("${peakFit}","${Association}","${Result}"); + List list = ListUtil.toList("peakFit", "Association", "Result", + "NuclideRatios", "g_CoincidenceCorrection", "mda"); + List skip = ListUtil.toList("${peakFit}", "${Association}", "${Result}", + "${NuclideRatios}", "${g_CoincidenceCorrection}", "${mda}"); for (String line : lines) { if (StrUtil.isBlank(line)) continue; List fieldNames = ReUtil.findAllGroup1(regex, line); @@ -2102,6 +2106,15 @@ public class GammaServiceImpl implements IGammaService { case "Result": lineList = ClassUtil.objsStr((List)value); break; + case "NuclideRatios": + lineList = ClassUtil.objsStr((List)value); + break; + case "g_CoincidenceCorrection": + lineList = ClassUtil.objsStr((List)value); + break; + case "mda": + lineList = ClassUtil.objsStr((List)value); + break; default: break; } diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java index af99c9a5..e5a45a54 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java @@ -134,7 +134,7 @@ public class SpectrumFileServiceImpl implements ISpectrumFileService { if (StrUtil.isNotBlank(name)){ String[] names = name.split(comma); ftpFiles = ftpFiles.stream() - .filter(file -> StrUtil.containsAnyIgnoreCase(file.getName(),names)) + .filter(file -> containsAllIgnoreCase(file.getName(),names)) .collect(Collectors.toList()); } for (FTPFile ftpFile : ftpFiles) { @@ -180,4 +180,12 @@ public class SpectrumFileServiceImpl implements ISpectrumFileService { } return String.format("%.2f", fileSize) + StringPool.SPACE + units[index]; } + + private boolean containsAllIgnoreCase(String string, CharSequence... testStrs){ + for (CharSequence testStr : testStrs) { + if (!StrUtil.containsIgnoreCase(string, testStr)) + return false; + } + return true; + } }