fix:Bug Fix

This commit is contained in:
nieziyan 2023-09-12 10:10:01 +08:00
parent f74a2a8358
commit 7b9ce715fb
7 changed files with 82 additions and 10 deletions

View File

@ -1,9 +1,7 @@
package org.jeecg.modules.base.bizVo; package org.jeecg.modules.base.bizVo;
import lombok.Data; import lombok.Data;
import org.jeecg.modules.entity.vo.TableAssociation; import org.jeecg.modules.entity.vo.*;
import org.jeecg.modules.entity.vo.TablePeakFit;
import org.jeecg.modules.entity.vo.TableResult;
import java.util.List; import java.util.List;
@ -74,13 +72,13 @@ public class GammaRLR {
private List<TableResult> Result; private List<TableResult> Result;
// #NuclideRatios // #NuclideRatios
private List<NuclideRatios> NuclideRatios;
// #g_CoincidenceCorrection // #g_CoincidenceCorrection
private List<GCoincidenceCorrection> g_CoincidenceCorrection;
// #MDA // #MDA
private List<Mda> mda;
// #Conclusions // #Conclusions
private String conclusion_person; private String conclusion_person;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -61,8 +61,11 @@ ${Reference_physical}
${Result_act_ref} ${Result_conc_ref} ${Result_act_ref} ${Result_conc_ref}
${Result} ${Result}
#NuclideRatios #NuclideRatios
${NuclideRatios}
#g_CoincidenceCorrection #g_CoincidenceCorrection
${g_CoincidenceCorrection}
#MDA #MDA
${mda}
#Conclusions #Conclusions
${conclusion_person} ${conclusion_person}
~IDCSummary ~IDCSummary

View File

@ -1892,8 +1892,10 @@ public class GammaServiceImpl implements IGammaService {
} }
} }
item.setStandard(standard); item.setStandard(standard);
if(StrUtil.equals(name, "Xe133-MDC (uBq/m3)")) if(StrUtil.equals(name, "Xe133-MDC (uBq/m3)")){
qcResultList.add(0, item); qcResultList.add(0, item);
continue;
}
qcResultList.add(item); qcResultList.add(item);
} }
result.setSuccess(true); result.setSuccess(true);
@ -2076,8 +2078,10 @@ public class GammaServiceImpl implements IGammaService {
// 正则表达式匹配${}中的内容 // 正则表达式匹配${}中的内容
String regex = "\\$\\{([^}]+)}"; String regex = "\\$\\{([^}]+)}";
List<String> newLines = new ArrayList<>(); List<String> newLines = new ArrayList<>();
List<String> list = ListUtil.toList("peakFit","Association","Result"); List<String> list = ListUtil.toList("peakFit", "Association", "Result",
List<String> skip = ListUtil.toList("${peakFit}","${Association}","${Result}"); "NuclideRatios", "g_CoincidenceCorrection", "mda");
List<String> skip = ListUtil.toList("${peakFit}", "${Association}", "${Result}",
"${NuclideRatios}", "${g_CoincidenceCorrection}", "${mda}");
for (String line : lines) { for (String line : lines) {
if (StrUtil.isBlank(line)) continue; if (StrUtil.isBlank(line)) continue;
List<String> fieldNames = ReUtil.findAllGroup1(regex, line); List<String> fieldNames = ReUtil.findAllGroup1(regex, line);
@ -2102,6 +2106,15 @@ public class GammaServiceImpl implements IGammaService {
case "Result": case "Result":
lineList = ClassUtil.objsStr((List<TableResult>)value); lineList = ClassUtil.objsStr((List<TableResult>)value);
break; break;
case "NuclideRatios":
lineList = ClassUtil.objsStr((List<NuclideRatios>)value);
break;
case "g_CoincidenceCorrection":
lineList = ClassUtil.objsStr((List<GCoincidenceCorrection>)value);
break;
case "mda":
lineList = ClassUtil.objsStr((List<Mda>)value);
break;
default: default:
break; break;
} }

View File

@ -134,7 +134,7 @@ public class SpectrumFileServiceImpl implements ISpectrumFileService {
if (StrUtil.isNotBlank(name)){ if (StrUtil.isNotBlank(name)){
String[] names = name.split(comma); String[] names = name.split(comma);
ftpFiles = ftpFiles.stream() ftpFiles = ftpFiles.stream()
.filter(file -> StrUtil.containsAnyIgnoreCase(file.getName(),names)) .filter(file -> containsAllIgnoreCase(file.getName(),names))
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
for (FTPFile ftpFile : ftpFiles) { for (FTPFile ftpFile : ftpFiles) {
@ -180,4 +180,12 @@ public class SpectrumFileServiceImpl implements ISpectrumFileService {
} }
return String.format("%.2f", fileSize) + StringPool.SPACE + units[index]; 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;
}
} }