GammaFileUtil遗漏writeFile方法调用问题修改
This commit is contained in:
parent
3aec8a468a
commit
bc1d9fb90a
|
@ -601,8 +601,6 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RunQC(PHDFile phd) {
|
public void RunQC(PHDFile phd) {
|
||||||
//调用dll库
|
|
||||||
//System.loadLibrary("GammaAnaly");
|
|
||||||
try {
|
try {
|
||||||
//获取phdFile的 采集开始时间
|
//获取phdFile的 采集开始时间
|
||||||
Date start = DateUtils.parseDate(phd.getCollect().getCollection_start_date() + StringPool.SPACE + phd.getCollect().getCollection_start_time());
|
Date start = DateUtils.parseDate(phd.getCollect().getCollection_start_date() + StringPool.SPACE + phd.getCollect().getCollection_start_time());
|
||||||
|
@ -747,7 +745,6 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Double CalculateMDC(PHDFile phd, List<Double> vMdcInfo, Double CCF) {
|
public Double CalculateMDC(PHDFile phd, List<Double> vMdcInfo, Double CCF) {
|
||||||
//System.loadLibrary("GammaAnaly");
|
|
||||||
try {
|
try {
|
||||||
//判断用于计算的数据大小是否小于3 判断集合中最后一个数值是否等于0
|
//判断用于计算的数据大小是否小于3 判断集合中最后一个数值是否等于0
|
||||||
if(vMdcInfo.size() < 3 || vMdcInfo.get(2) == 0) {
|
if(vMdcInfo.size() < 3 || vMdcInfo.get(2) == 0) {
|
||||||
|
@ -2518,14 +2515,14 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
||||||
strBuffer.append(System.lineSeparator());
|
strBuffer.append(System.lineSeparator());
|
||||||
//文本内容第十二部分数据
|
//文本内容第十二部分数据
|
||||||
String data1 = String.format("%s peaks reported", String.valueOf(middleData.peaks_idPeak.size()));
|
String data1 = String.format("%s peaks reported", String.valueOf(middleData.peaks_idPeak.size()));
|
||||||
String data2 = String.format("%s peaks with ID (%s%)", String.valueOf(peaksUsed), String.valueOf(peaksUsed / middleData.peaks_idPeak.size() * 100));
|
String data2 = String.format("%s peaks with ID (%s%%)", String.valueOf(peaksUsed), String.valueOf(peaksUsed / middleData.peaks_idPeak.size() * 100 ) );
|
||||||
String data3 = String.format("%s peaks without ID(%s%)", String.valueOf(middleData.peaks_idPeak.size() - peaksUsed), String.valueOf(Double.valueOf(middleData.peaks_idPeak.size() - peaksUsed) / middleData.peaks_idPeak.size() * 100));
|
String data3 = String.format("%s peaks without ID(%s%%)", String.valueOf(middleData.peaks_idPeak.size() - peaksUsed), String.valueOf(Double.valueOf(middleData.peaks_idPeak.size() - peaksUsed) / middleData.peaks_idPeak.size() * 100));
|
||||||
String[] dataTitle12 = new String[]{data1, data2, data3};
|
String[] dataTitle12 = new String[]{data1, data2, data3};
|
||||||
String[] dataContent12 = new String[]{"", "", ""};
|
String[] dataContent12 = new String[]{"", "", ""};
|
||||||
strBuffer.append(attributeFormat(dataTitle12, dataContent12));
|
strBuffer.append(attributeFormat(dataTitle12, dataContent12));
|
||||||
//文本内容第十三部分数据
|
//文本内容第十三部分数据
|
||||||
|
String data14= "PeakID : %-7s Energy : %-13s Centroid : %-13s FWHM : %-10s NetArea : %-16s NAErr%% : %-23s Signif : %-13s Sensit : %-13s Nuclide : %-30s";
|
||||||
for (int i=0; i<middleData.peaks_idPeak.size();i++){
|
for (int i=0; i<middleData.peaks_idPeak.size();i++){
|
||||||
String data14= "PeakID : %-7sEnergy : %-13sCentroid : %-13sFWHM : %-10sNetArea : %-16sNAErr% : %-23sSignif : %-13sSensit : %-13sNuclide : %-30s";
|
|
||||||
String idPeak = middleData.peaks_idPeak.get(i);
|
String idPeak = middleData.peaks_idPeak.get(i);
|
||||||
String energy = middleData.peaks_Energy.get(i);
|
String energy = middleData.peaks_Energy.get(i);
|
||||||
String peakCentroid = String.format("%.3f", Double.valueOf(middleData.peaks_peakCentroid.get(i)));
|
String peakCentroid = String.format("%.3f", Double.valueOf(middleData.peaks_peakCentroid.get(i)));
|
||||||
|
@ -2566,8 +2563,8 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
||||||
//换行
|
//换行
|
||||||
strBuffer.append(System.lineSeparator());
|
strBuffer.append(System.lineSeparator());
|
||||||
//文本内容第十五部分数据
|
//文本内容第十五部分数据
|
||||||
for (int i=0;i<middleData.nucl_ided_Nuclidename.size();i++){
|
|
||||||
String data15 = "Nuclide : %-11s Halflife : %-20s Activity : %-14s RelErr : %-12s Conc : %-24s MDC : %-17s";
|
String data15 = "Nuclide : %-11s Halflife : %-20s Activity : %-14s RelErr : %-12s Conc : %-24s MDC : %-17s";
|
||||||
|
for (int i=0;i<middleData.nucl_ided_Nuclidename.size();i++){
|
||||||
String nuclideName = middleData.nucl_ided_Nuclidename.get(i);
|
String nuclideName = middleData.nucl_ided_Nuclidename.get(i);
|
||||||
String halflife = middleData.nucl_ided_Halflife.get(i);
|
String halflife = middleData.nucl_ided_Halflife.get(i);
|
||||||
String activity = String.format("%.3f", Double.valueOf(middleData.nucl_ided_activ_key.get(i))) + " bq";
|
String activity = String.format("%.3f", Double.valueOf(middleData.nucl_ided_activ_key.get(i))) + " bq";
|
||||||
|
@ -3110,6 +3107,9 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
||||||
String qsSaveBaseLine = StringPool.SLASH+spectrumPathProperties.getRootPath()+StringPool.SLASH+qsBaseLinePath;
|
String qsSaveBaseLine = StringPool.SLASH+spectrumPathProperties.getRootPath()+StringPool.SLASH+qsBaseLinePath;
|
||||||
String qsSaveLc = StringPool.SLASH+spectrumPathProperties.getRootPath()+StringPool.SLASH+qsLcPath;
|
String qsSaveLc = StringPool.SLASH+spectrumPathProperties.getRootPath()+StringPool.SLASH+qsLcPath;
|
||||||
String qsSaveScac = StringPool.SLASH+spectrumPathProperties.getRootPath()+StringPool.SLASH+qsScacPath;
|
String qsSaveScac = StringPool.SLASH+spectrumPathProperties.getRootPath()+StringPool.SLASH+qsScacPath;
|
||||||
|
GammaReportUtil.writeFile(fileAnlyse.getBaseCtrls(), qsSaveBaseLine);
|
||||||
|
GammaReportUtil.writeFile(fileAnlyse.getVLc(), "LC", qsSaveLc);
|
||||||
|
GammaReportUtil.writeFile(fileAnlyse.getVScac(), "SCSC", qsSaveScac);
|
||||||
// WriteBaseInfo(fileAnlyse.getBaseCtrls(),qsSaveBaseLine);
|
// WriteBaseInfo(fileAnlyse.getBaseCtrls(),qsSaveBaseLine);
|
||||||
// WriteLcScac(fileAnlyse.getVLc(),"Lc",qsSaveLc);
|
// WriteLcScac(fileAnlyse.getVLc(),"Lc",qsSaveLc);
|
||||||
// WriteLcScac(fileAnlyse.getVScac(),"Scac",qsSaveScac);
|
// WriteLcScac(fileAnlyse.getVScac(),"Scac",qsSaveScac);
|
||||||
|
@ -4359,6 +4359,8 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Certificate
|
// Certificate
|
||||||
|
CertificateBlock phdCertificate = phd.getCertificate();
|
||||||
|
if (Objects.nonNull(phdCertificate)) {
|
||||||
if(CollectionUtils.isNotEmpty(phd.getCertificate().getG_energy())) {
|
if(CollectionUtils.isNotEmpty(phd.getCertificate().getG_energy())) {
|
||||||
spectrum.append("#Certificate");
|
spectrum.append("#Certificate");
|
||||||
//换行
|
//换行
|
||||||
|
@ -4385,6 +4387,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
||||||
spectrum.append(System.lineSeparator());
|
spectrum.append(System.lineSeparator());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// #Calibration
|
// #Calibration
|
||||||
if(StringUtils.isNotBlank(phd.getCalibration().getDate_calibration())) {
|
if(StringUtils.isNotBlank(phd.getCalibration().getDate_calibration())) {
|
||||||
|
@ -4402,6 +4405,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
||||||
//换行
|
//换行
|
||||||
spectrum.append(System.lineSeparator());
|
spectrum.append(System.lineSeparator());
|
||||||
GEnergyBlock g_ener = phd.getUsedEnerKD();
|
GEnergyBlock g_ener = phd.getUsedEnerKD();
|
||||||
|
if (Objects.nonNull(g_ener)) {
|
||||||
for(int i=0; i<g_ener.getG_energy().size(); i++) {
|
for(int i=0; i<g_ener.getG_energy().size(); i++) {
|
||||||
String g_energy = RightFill(String.format("%.9f", g_ener.getG_energy().get(i)), 16);
|
String g_energy = RightFill(String.format("%.9f", g_ener.getG_energy().get(i)), 16);
|
||||||
String centroid_channel = RightFill(String.format("%.9f", g_ener.getCentroid_channel().get(i)), 16);
|
String centroid_channel = RightFill(String.format("%.9f", g_ener.getCentroid_channel().get(i)), 16);
|
||||||
|
@ -4411,12 +4415,14 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
||||||
//换行
|
//换行
|
||||||
spectrum.append(System.lineSeparator());
|
spectrum.append(System.lineSeparator());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// #g_Resolution
|
// #g_Resolution
|
||||||
spectrum.append("#g_Resolution");
|
spectrum.append("#g_Resolution");
|
||||||
//换行
|
//换行
|
||||||
spectrum.append(System.lineSeparator());
|
spectrum.append(System.lineSeparator());
|
||||||
GResolutionBlock g_reso = phd.getUsedResoKD();
|
GResolutionBlock g_reso = phd.getUsedResoKD();
|
||||||
|
if (Objects.nonNull(g_reso)) {
|
||||||
for(int i=0; i<g_reso.getFWHM().size(); i++) {
|
for(int i=0; i<g_reso.getFWHM().size(); i++) {
|
||||||
String g_energy = RightFill(String.format("%.9f", g_reso.getG_energy().get(i)), 16);
|
String g_energy = RightFill(String.format("%.9f", g_reso.getG_energy().get(i)), 16);
|
||||||
String fwhm = RightFill(String.format("%.9f", g_reso.getFWHM().get(i)), 16);
|
String fwhm = RightFill(String.format("%.9f", g_reso.getFWHM().get(i)), 16);
|
||||||
|
@ -4426,12 +4432,14 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
||||||
//换行
|
//换行
|
||||||
spectrum.append(System.lineSeparator());
|
spectrum.append(System.lineSeparator());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// #g_Efficiency
|
// #g_Efficiency
|
||||||
spectrum.append("#g_Efficiency");
|
spectrum.append("#g_Efficiency");
|
||||||
//换行
|
//换行
|
||||||
spectrum.append(System.lineSeparator());
|
spectrum.append(System.lineSeparator());
|
||||||
GEfficiencyBlock g_effi = phd.getUsedEffiKD();
|
GEfficiencyBlock g_effi = phd.getUsedEffiKD();
|
||||||
|
if (Objects.nonNull(g_effi)) {
|
||||||
for(int i=0; i<g_effi.getEfficiency().size(); i++) {
|
for(int i=0; i<g_effi.getEfficiency().size(); i++) {
|
||||||
String g_energy = RightFill(String.format("%.9f", g_effi.getG_energy().get(i)), 16);
|
String g_energy = RightFill(String.format("%.9f", g_effi.getG_energy().get(i)), 16);
|
||||||
String g_efficiency = RightFill(String.format("%.9f", g_effi.getEfficiency().get(i)), 16);
|
String g_efficiency = RightFill(String.format("%.9f", g_effi.getEfficiency().get(i)), 16);
|
||||||
|
@ -4440,13 +4448,15 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
||||||
spectrum.append(rowFormat(efficiency, g_energy, g_efficiency, uncertainty));
|
spectrum.append(rowFormat(efficiency, g_energy, g_efficiency, uncertainty));
|
||||||
spectrum.append(System.lineSeparator());
|
spectrum.append(System.lineSeparator());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// #TotalEff
|
// #TotalEff
|
||||||
if(phd.getUsedTotEKD().getG_energy().size() > 0) {
|
TotaleffBlock g_totE = phd.getUsedTotEKD();
|
||||||
|
if (Objects.nonNull(g_totE)) {
|
||||||
|
if(g_totE.getG_energy().size() > 0) {
|
||||||
spectrum.append("#TotalEff");
|
spectrum.append("#TotalEff");
|
||||||
//换行
|
//换行
|
||||||
spectrum.append(System.lineSeparator());
|
spectrum.append(System.lineSeparator());
|
||||||
TotaleffBlock g_totE = phd.getUsedTotEKD();
|
|
||||||
for(int i=0; i<g_totE.getRecord_count(); i++) {
|
for(int i=0; i<g_totE.getRecord_count(); i++) {
|
||||||
String g_energy = RightFill(String.format("%.9f", g_totE.getG_energy().get(i)), 16);
|
String g_energy = RightFill(String.format("%.9f", g_totE.getG_energy().get(i)), 16);
|
||||||
String total_efficiency = RightFill(String.format("%.9f", g_totE.getTotal_efficiency().get(i)), 16);
|
String total_efficiency = RightFill(String.format("%.9f", g_totE.getTotal_efficiency().get(i)), 16);
|
||||||
|
@ -4457,11 +4467,14 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
||||||
spectrum.append(System.lineSeparator());
|
spectrum.append(System.lineSeparator());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// #g_Spectrum
|
// #g_Spectrum
|
||||||
spectrum.append("#g_Spectrum");
|
spectrum.append("#g_Spectrum");
|
||||||
//换行
|
//换行
|
||||||
spectrum.append(System.lineSeparator());
|
spectrum.append(System.lineSeparator());
|
||||||
|
GSpectrumBlock spec = phd.getSpec();
|
||||||
|
if (Objects.nonNull(spec)) {
|
||||||
String spectrumData = "%s %s";
|
String spectrumData = "%s %s";
|
||||||
String num_g_channel = RightFill(String.valueOf(phd.getSpec().getNum_g_channel()), 5);
|
String num_g_channel = RightFill(String.valueOf(phd.getSpec().getNum_g_channel()), 5);
|
||||||
String g_energy_span = RightFill(String.valueOf(phd.getSpec().getG_energy_span()), 4);
|
String g_energy_span = RightFill(String.valueOf(phd.getSpec().getG_energy_span()), 4);
|
||||||
|
@ -4495,11 +4508,25 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
||||||
}
|
}
|
||||||
spectrum.append(System.lineSeparator());
|
spectrum.append(System.lineSeparator());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
spectrum.append("STOP");
|
spectrum.append("STOP");
|
||||||
spectrum.append(System.lineSeparator());
|
spectrum.append(System.lineSeparator());
|
||||||
return spectrum.toString();
|
return spectrum.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ChartData CreateTempBaseLine(String color, String name, BaseControls m_baseCtrl) {
|
||||||
|
ChartData cData = new ChartData();
|
||||||
|
cData.setColor(color);
|
||||||
|
cData.setName(name);
|
||||||
|
for(int i=0; i<m_baseCtrl.getBaseline().size(); ++i) {
|
||||||
|
SeriseData seriseData = new SeriseData();
|
||||||
|
seriseData.setX(i+1);
|
||||||
|
seriseData.setY(m_baseCtrl.getBaseline().get(i));
|
||||||
|
cData.getPointlist().add(seriseData);
|
||||||
|
}
|
||||||
|
return cData;
|
||||||
|
}
|
||||||
|
|
||||||
public List<ShapeData> CreateShapeCP(BaseControls baseControls) {
|
public List<ShapeData> CreateShapeCP(BaseControls baseControls) {
|
||||||
List<ShapeData> shapes = new LinkedList<>();
|
List<ShapeData> shapes = new LinkedList<>();
|
||||||
for(int i=0; i<baseControls.getXCtrl().size(); ++i) {
|
for(int i=0; i<baseControls.getXCtrl().size(); ++i) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user