Merge remote-tracking branch 'origin/station' into station
This commit is contained in:
commit
b89295f1e1
|
@ -12,14 +12,18 @@ import org.apache.commons.net.ftp.FTPClient;
|
|||
import org.apache.commons.net.ftp.FTPFile;
|
||||
import org.apache.commons.net.ftp.FTPReply;
|
||||
import org.jeecg.common.constant.SymbolConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.*;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -152,7 +152,7 @@ public class Sample_G_Analysis {
|
|||
}
|
||||
|
||||
// 执行分析业务代码
|
||||
gammaFileUtil.GetMiddleData(phdFile, CommonConstant.REPORT_PREFIX_AUTO, nuclideLibs, middleData, MiddleDataType.Auto.getType());
|
||||
gammaFileUtil.GetMiddleData(phdFile, CommonConstant.REPORT_PREFIX_AUTO, nuclideLibs, middleData, MiddleDataType.Auto.getType(), "");
|
||||
|
||||
// 数据插入数据库
|
||||
this.storageDataToDatabase(middleData, phdFile.getQcItems());
|
||||
|
|
|
@ -274,7 +274,9 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
|
||||
String baselineFileName = prefixName+"_"+subFileName + ".baseline";
|
||||
String fromPathBase = pathName + StringPool.SLASH + baselineFileName;
|
||||
inputStreamBase = ftpUtil.downloadFileStream(fromPathBase);
|
||||
File file = ftpUtil.downloadFile(fromPathBase, "betaGamma");
|
||||
inputStreamBase = new FileInputStream(file);
|
||||
// inputStreamBase = ftpUtil.downloadFileStream(fromPathBase);
|
||||
// 调用处理BaseCtrl的方法
|
||||
ReadBaseCtrlInfo(phd, inputStreamBase);
|
||||
// 将phdFile的BaseCtrls的BaseLine部分数据 赋值给 phdFile的vBase
|
||||
|
@ -343,7 +345,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
} else if (StringUtils.isNotBlank(strList.get(k)) && strList.get(k).equalsIgnoreCase("nan")) {
|
||||
//如果数据不为空 但 数据匹配任意大小写的nan
|
||||
//结果数组中补充0.0
|
||||
vData.add(0.0);
|
||||
vData.add(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -384,8 +386,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
data.add(d);
|
||||
} else if (StringUtils.isNotBlank(str) && str.equalsIgnoreCase("nan")) {
|
||||
//如果当前数据不为空 但 数据匹配任意大小写的nan
|
||||
//将0.0填充到 double中
|
||||
data.add(0.0);
|
||||
data.add(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2228,9 +2229,9 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
map.put("AllData", datalist);
|
||||
}
|
||||
|
||||
public String GetReportContent(PHDFile phd, String userName, boolean bLog) {
|
||||
public String GetReportContent(PHDFile phd, String userName, boolean bLog, String flag) {
|
||||
GStoreMiddleProcessData middleData = new GStoreMiddleProcessData();
|
||||
GetInterMiddlData(phd, userName, middleData);
|
||||
GetInterMiddlData(phd, userName, middleData, flag);
|
||||
if(bLog) {
|
||||
return GetLogContent(middleData);
|
||||
} else {
|
||||
|
@ -2238,11 +2239,11 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean GetInterMiddlData(PHDFile phd, String userName, GStoreMiddleProcessData middleData) {
|
||||
public boolean GetInterMiddlData(PHDFile phd, String userName, GStoreMiddleProcessData middleData, String flag) {
|
||||
boolean bRet = true;
|
||||
Map<String, NuclideLines> temp = new HashMap<>();
|
||||
try {
|
||||
bRet = GetMiddleData(phd, userName, temp,middleData, MiddleDataType.InterAction.getType());
|
||||
bRet = GetMiddleData(phd, userName, temp,middleData, MiddleDataType.InterAction.getType(), flag);
|
||||
middleData.analyses_type ="Interactive";
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
@ -2989,7 +2990,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
return name;
|
||||
}
|
||||
|
||||
public boolean GetMiddleData(PHDFile fileAnlyse, String userName,Map<String, NuclideLines> nucline,GStoreMiddleProcessData middleData, String type) throws ParseException {
|
||||
public boolean GetMiddleData(PHDFile fileAnlyse, String userName,Map<String, NuclideLines> nucline,GStoreMiddleProcessData middleData, String type, String flag) throws ParseException {
|
||||
boolean bRet=true;
|
||||
//标准名称规范化
|
||||
String dataType = fileAnlyse.getMsgInfo().getData_type();
|
||||
|
@ -3024,7 +3025,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
anylseEnd = DateUtils.formatDate(new Date(), "yyyy/MM/dd HH:mm:ss");
|
||||
middleData.analyses_analysisBegin = anylseBegin;
|
||||
middleData.analyses_analysisEnd = anylseEnd;
|
||||
} else if (type.equals(MiddleDataType.InterAction.getType())){ //如果是人工交互分析 则先上传phd对应文件信息
|
||||
} else if (type.equals(MiddleDataType.InterAction.getType()) && flag.equalsIgnoreCase("save")){ //如果是人工交互分析 则先上传phd对应文件信息
|
||||
//上传本次文件到ftp人工交互存储路径下
|
||||
File sampleTmp = null;
|
||||
try {
|
||||
|
@ -3055,9 +3056,11 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
String qsSaveBaseLine = savePath + StringPool.SLASH + qsBaseLinePath;
|
||||
String qsSaveLc = savePath + StringPool.SLASH + qsLcPath;
|
||||
String qsSaveScac = savePath + StringPool.SLASH + qsScacPath;
|
||||
if((type.equals(MiddleDataType.Auto.getType())) || (type.equals(MiddleDataType.InterAction.getType()) && flag.equalsIgnoreCase("save")) ) {
|
||||
GammaReportUtil.writeFile(fileAnlyse.getBaseCtrls(), rootPath + qsSaveBaseLine);
|
||||
GammaReportUtil.writeFile(fileAnlyse.getVLc(), "LC", rootPath + qsSaveLc);
|
||||
GammaReportUtil.writeFile(fileAnlyse.getVScac(), "SCSC", rootPath + qsSaveScac);
|
||||
}
|
||||
|
||||
double totalNumber = 0.0;
|
||||
for(int m=0;m<fileAnlyse.getSpec().getCounts().size();m++) {
|
||||
|
|
|
@ -151,6 +151,7 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
seriseData.setY(count);
|
||||
gammaOriginalSeriseData.add(seriseData);
|
||||
}
|
||||
|
||||
map.put("gammaOriginalData", gammaOriginalSeriseData);
|
||||
//Gamma Spectrum Projected
|
||||
List<Long> gammaProjectedData = new LinkedList<>();
|
||||
|
@ -255,15 +256,23 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
if (type.equalsIgnoreCase("sample")) {
|
||||
betaDataFile.setSampleSpectrumData(spectrumData);
|
||||
betaDataFile.setSampleBoundary(boundaryList);
|
||||
betaDataFile.setSampleHistogramDataList(histogramDataList);
|
||||
betaDataFile.setSampleHistogramDataDList(histogramDataDList);
|
||||
} else if (type.equalsIgnoreCase("gas")) {
|
||||
betaDataFile.setGasSpectrumData(spectrumData);
|
||||
betaDataFile.setGasBoundary(boundaryList);
|
||||
betaDataFile.setGasHistogramDataList(histogramDataList);
|
||||
betaDataFile.setGasHistogramDataDList(histogramDataDList);
|
||||
} else if (type.equalsIgnoreCase("det")) {
|
||||
betaDataFile.setDetSpectrumData(spectrumData);
|
||||
betaDataFile.setDetBoundary(boundaryList);
|
||||
betaDataFile.setDetHistogramDataList(histogramDataList);
|
||||
betaDataFile.setDetHistogramDataDList(histogramDataDList);
|
||||
} else if (type.equalsIgnoreCase("qc")) {
|
||||
betaDataFile.setQcSpectrumData(spectrumData);
|
||||
betaDataFile.setQcBoundary(boundaryList);
|
||||
betaDataFile.setQcHistogramDataList(histogramDataList);
|
||||
betaDataFile.setQcHistogramDataDList(histogramDataDList);
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
@ -831,10 +840,17 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
gammaCalibrationSpectrumList.add(gammaCalibrationS);
|
||||
} else {
|
||||
GardsCalibrationSpectrum gammaCalibrationS = new GardsCalibrationSpectrum();
|
||||
if (bgAnalyseResult.s_g_fitting_c_e.size() < 0) {
|
||||
gammaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType());
|
||||
gammaCalibrationS.setCoeff1(Double.valueOf(gammaFittingPara.get(0)));
|
||||
gammaCalibrationS.setCoeff2(Double.valueOf(gammaFittingPara.get(1)));
|
||||
gammaCalibrationS.setCoeff3(Double.valueOf(gammaFittingPara.get(2)));
|
||||
} else {
|
||||
gammaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType());
|
||||
gammaCalibrationS.setCoeff1(bgAnalyseResult.s_g_fitting_c_e.get(0));
|
||||
gammaCalibrationS.setCoeff2(bgAnalyseResult.s_g_fitting_c_e.get(1));
|
||||
gammaCalibrationS.setCoeff3(bgAnalyseResult.s_g_fitting_c_e.get(2));
|
||||
}
|
||||
gammaCalibrationSpectrumList.add(gammaCalibrationS);
|
||||
}
|
||||
if (betaDataFile.isBGammaEnergyValidGas()) {
|
||||
|
@ -846,10 +862,18 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
gammaCalibrationSpectrumList.add(gammaCalibrationG);
|
||||
} else {
|
||||
GardsCalibrationSpectrum gammaCalibrationG = new GardsCalibrationSpectrum();
|
||||
if (bgAnalyseResult.g_g_fitting_c_e.size() < 0) {
|
||||
gammaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType());
|
||||
gammaCalibrationG.setCoeff1(Double.valueOf(gammaFittingPara.get(0)));
|
||||
gammaCalibrationG.setCoeff2(Double.valueOf(gammaFittingPara.get(1)));
|
||||
gammaCalibrationG.setCoeff3(Double.valueOf(gammaFittingPara.get(2)));
|
||||
} else {
|
||||
gammaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType());
|
||||
gammaCalibrationG.setCoeff1(bgAnalyseResult.g_g_fitting_c_e.get(0));
|
||||
gammaCalibrationG.setCoeff2(bgAnalyseResult.g_g_fitting_c_e.get(1));
|
||||
gammaCalibrationG.setCoeff3(bgAnalyseResult.g_g_fitting_c_e.get(2));
|
||||
}
|
||||
|
||||
gammaCalibrationSpectrumList.add(gammaCalibrationG);
|
||||
}
|
||||
if (betaDataFile.isBGammaEnergyValidDet()) {
|
||||
|
@ -861,10 +885,17 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
gammaCalibrationSpectrumList.add(gammaCalibrationD);
|
||||
} else {
|
||||
GardsCalibrationSpectrum gammaCalibrationD = new GardsCalibrationSpectrum();
|
||||
if (bgAnalyseResult.d_g_fitting_c_e.size() < 0) {
|
||||
gammaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType());
|
||||
gammaCalibrationD.setCoeff1(Double.valueOf(gammaFittingPara.get(0)));
|
||||
gammaCalibrationD.setCoeff2(Double.valueOf(gammaFittingPara.get(1)));
|
||||
gammaCalibrationD.setCoeff3(Double.valueOf(gammaFittingPara.get(2)));
|
||||
} else {
|
||||
gammaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType());
|
||||
gammaCalibrationD.setCoeff1(bgAnalyseResult.d_g_fitting_c_e.get(0));
|
||||
gammaCalibrationD.setCoeff2(bgAnalyseResult.d_g_fitting_c_e.get(1));
|
||||
gammaCalibrationD.setCoeff3(bgAnalyseResult.d_g_fitting_c_e.get(2));
|
||||
}
|
||||
gammaCalibrationSpectrumList.add(gammaCalibrationD);
|
||||
}
|
||||
betaDataFile.setGammaCalibrationSpectrumList(gammaCalibrationSpectrumList);
|
||||
|
@ -880,10 +911,17 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
betaCalibrationSpectrumList.add(betaCalibrationS);
|
||||
} else {
|
||||
GardsCalibrationSpectrum betaCalibrationS = new GardsCalibrationSpectrum();
|
||||
if (bgAnalyseResult.s_b_fitting_c_e.size() < 0) {
|
||||
betaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType());
|
||||
betaCalibrationS.setCoeff1(Double.valueOf(betaFittingPara.get(0)));
|
||||
betaCalibrationS.setCoeff2(Double.valueOf(betaFittingPara.get(1)));
|
||||
betaCalibrationS.setCoeff3(Double.valueOf(betaFittingPara.get(2)));
|
||||
} else {
|
||||
betaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType());
|
||||
betaCalibrationS.setCoeff1(bgAnalyseResult.s_b_fitting_c_e.get(0));
|
||||
betaCalibrationS.setCoeff2(bgAnalyseResult.s_b_fitting_c_e.get(1));
|
||||
betaCalibrationS.setCoeff3(bgAnalyseResult.s_b_fitting_c_e.get(2));
|
||||
}
|
||||
betaCalibrationSpectrumList.add(betaCalibrationS);
|
||||
}
|
||||
if (betaDataFile.isBBetaEnergyValidGas()) {
|
||||
|
@ -895,10 +933,17 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
betaCalibrationSpectrumList.add(betaCalibrationG);
|
||||
} else {
|
||||
GardsCalibrationSpectrum betaCalibrationG = new GardsCalibrationSpectrum();
|
||||
if (bgAnalyseResult.g_b_fitting_c_e.size() < 0) {
|
||||
betaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType());
|
||||
betaCalibrationG.setCoeff1(Double.valueOf(betaFittingPara.get(0)));
|
||||
betaCalibrationG.setCoeff2(Double.valueOf(betaFittingPara.get(1)));
|
||||
betaCalibrationG.setCoeff3(Double.valueOf(betaFittingPara.get(2)));
|
||||
} else {
|
||||
betaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType());
|
||||
betaCalibrationG.setCoeff1(bgAnalyseResult.g_b_fitting_c_e.get(0));
|
||||
betaCalibrationG.setCoeff2(bgAnalyseResult.g_b_fitting_c_e.get(1));
|
||||
betaCalibrationG.setCoeff3(bgAnalyseResult.g_b_fitting_c_e.get(2));
|
||||
}
|
||||
betaCalibrationSpectrumList.add(betaCalibrationG);
|
||||
}
|
||||
if (betaDataFile.isBBetaEnergyValidDet()) {
|
||||
|
@ -910,10 +955,17 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
betaCalibrationSpectrumList.add(betaCalibrationD);
|
||||
} else {
|
||||
GardsCalibrationSpectrum betaCalibrationD = new GardsCalibrationSpectrum();
|
||||
if (bgAnalyseResult.d_b_fitting_c_e.size() < 0) {
|
||||
betaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType());
|
||||
betaCalibrationD.setCoeff1(Double.valueOf(betaFittingPara.get(0)));
|
||||
betaCalibrationD.setCoeff2(Double.valueOf(betaFittingPara.get(1)));
|
||||
betaCalibrationD.setCoeff3(Double.valueOf(betaFittingPara.get(2)));
|
||||
} else {
|
||||
betaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType());
|
||||
betaCalibrationD.setCoeff1(bgAnalyseResult.d_b_fitting_c_e.get(0));
|
||||
betaCalibrationD.setCoeff2(bgAnalyseResult.d_b_fitting_c_e.get(1));
|
||||
betaCalibrationD.setCoeff3(bgAnalyseResult.d_b_fitting_c_e.get(2));
|
||||
}
|
||||
betaCalibrationSpectrumList.add(betaCalibrationD);
|
||||
}
|
||||
betaDataFile.setBetaCalibrationSpectrumList(betaCalibrationSpectrumList);
|
||||
|
@ -1326,10 +1378,10 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
if (bgAnalyseResult.s_b_fitting_c_e.size() > 0) {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.s_b_fitting_c_e.get(0))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.s_b_fitting_c_e.get(1))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.s_b_fitting_c_e.get(2)))));
|
||||
} else {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
} else {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
//换行
|
||||
out.append(System.lineSeparator());
|
||||
|
@ -1338,10 +1390,10 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
if (bgAnalyseResult.s_b_fitting_e_c.size() > 0) {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.s_b_fitting_e_c.get(0))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.s_b_fitting_e_c.get(1))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.s_b_fitting_e_c.get(2)))));
|
||||
} else {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
} else {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
//换行
|
||||
out.append(System.lineSeparator());
|
||||
|
@ -1356,10 +1408,10 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
if (bgAnalyseResult.s_g_fitting_c_e.size() > 0) {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.s_g_fitting_c_e.get(0))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.s_g_fitting_c_e.get(1))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.s_g_fitting_c_e.get(2)))));
|
||||
} else {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
} else {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
//换行
|
||||
out.append(System.lineSeparator());
|
||||
|
@ -1368,10 +1420,10 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
if (bgAnalyseResult.s_g_fitting_e_c.size() > 0) {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.s_g_fitting_e_c.get(0))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.s_g_fitting_e_c.get(1))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.s_g_fitting_e_c.get(2)))));
|
||||
} else {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
} else {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
//换行
|
||||
out.append(System.lineSeparator());
|
||||
|
@ -1426,10 +1478,10 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
if (bgAnalyseResult.d_b_fitting_c_e.size() > 0) {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.d_b_fitting_c_e.get(0))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.d_b_fitting_c_e.get(1))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.d_b_fitting_c_e.get(2)))));
|
||||
} else {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
} else {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
|
||||
//换行
|
||||
|
@ -1439,10 +1491,10 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
if (bgAnalyseResult.d_b_fitting_e_c.size() > 0) {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.d_b_fitting_e_c.get(0))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.d_b_fitting_e_c.get(1))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.d_b_fitting_e_c.get(2)))));
|
||||
} else {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
} else {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
//换行
|
||||
out.append(System.lineSeparator());
|
||||
|
@ -1457,10 +1509,10 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
if (bgAnalyseResult.d_g_fitting_c_e.size() > 0) {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.d_g_fitting_c_e.get(0))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.d_g_fitting_c_e.get(1))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.d_g_fitting_c_e.get(2)))));
|
||||
} else {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
} else {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
//换行
|
||||
out.append(System.lineSeparator());
|
||||
|
@ -1469,10 +1521,10 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
if (bgAnalyseResult.d_g_fitting_e_c.size() > 0) {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.d_g_fitting_e_c.get(0))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.d_g_fitting_e_c.get(1))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.d_g_fitting_e_c.get(2)))));
|
||||
} else {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
} else {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
//换行
|
||||
out.append(System.lineSeparator());
|
||||
|
@ -1522,10 +1574,10 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
if (bgAnalyseResult.g_b_fitting_c_e.size() > 0) {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.g_b_fitting_c_e.get(0))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.g_b_fitting_c_e.get(1))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.g_b_fitting_c_e.get(2)))));
|
||||
} else {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
} else {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
//换行
|
||||
out.append(System.lineSeparator());
|
||||
|
@ -1534,10 +1586,10 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
if (bgAnalyseResult.g_b_fitting_e_c.size() > 0) {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.g_b_fitting_e_c.get(0))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.g_b_fitting_e_c.get(1))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.g_b_fitting_e_c.get(2)))));
|
||||
} else {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
} else {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
//换行
|
||||
out.append(System.lineSeparator());
|
||||
|
@ -1552,10 +1604,10 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
if (bgAnalyseResult.g_g_fitting_c_e.size() > 0) {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.g_g_fitting_c_e.get(0))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.g_g_fitting_c_e.get(1))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.g_g_fitting_c_e.get(2)))));
|
||||
} else {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
} else {
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("energy to channel equation: CH(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
//换行
|
||||
out.append(System.lineSeparator());
|
||||
|
@ -1564,10 +1616,10 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
if (bgAnalyseResult.g_g_fitting_e_c.size() > 0) {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.g_g_fitting_e_c.get(0))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.g_g_fitting_e_c.get(1))), NumberFormatUtil.numberFormat(String.valueOf(bgAnalyseResult.g_g_fitting_e_c.get(2)))));
|
||||
} else {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
} else {
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?", "?", "?"));
|
||||
out.append(rowFormat("channel to energy equation: E(x) = (%s)+(%s)*x+(%s)x*x", "?1", "?2", "?3"));
|
||||
}
|
||||
//换行
|
||||
out.append(System.lineSeparator());
|
||||
|
|
|
@ -57,8 +57,8 @@ public class SpectrumAnalysesController {
|
|||
|
||||
@DeleteMapping("deleteSpectrumCacheData")
|
||||
@ApiOperation(value = "删除缓存数据",notes = "删除缓存数据")
|
||||
public void deleteSpectrumCacheData(String sampleFileName, String qcFileName, HttpServletRequest request) {
|
||||
spectrumAnalysisService.deleteSpectrumCacheData(sampleFileName, qcFileName, request);
|
||||
public void deleteSpectrumCacheData(String sampleFileName, HttpServletRequest request) {
|
||||
spectrumAnalysisService.deleteSpectrumCacheData(sampleFileName, request);
|
||||
}
|
||||
|
||||
@GetMapping("viewComment")
|
||||
|
|
|
@ -112,6 +112,30 @@ public class BetaDataFile implements Serializable {
|
|||
|
||||
private SpectrumData qcSpectrumData;
|
||||
|
||||
private List<String> betaFittingParaOld;
|
||||
|
||||
private List<String> betaFittingParaToUiOld;
|
||||
|
||||
private List<String> gammaFittingParaOld;
|
||||
|
||||
private List<String> gammaFittingParaToUiOld;
|
||||
|
||||
private List<HistogramData> sampleHistogramDataList;
|
||||
|
||||
private List<HistogramData> sampleHistogramDataDList;
|
||||
|
||||
private List<HistogramData> gasHistogramDataList;
|
||||
|
||||
private List<HistogramData> gasHistogramDataDList;
|
||||
|
||||
private List<HistogramData> detHistogramDataList;
|
||||
|
||||
private List<HistogramData> detHistogramDataDList;
|
||||
|
||||
private List<HistogramData> qcHistogramDataList;
|
||||
|
||||
private List<HistogramData> qcHistogramDataDList;
|
||||
|
||||
//存储分析结果信息
|
||||
private List<GardsXeResults> xeDataList;
|
||||
private List<GardsCalibrationSpectrum> gammaCalibrationSpectrumList;
|
||||
|
@ -157,6 +181,10 @@ public class BetaDataFile implements Serializable {
|
|||
gasSpectrumData = new SpectrumData();
|
||||
detSpectrumData = new SpectrumData();
|
||||
qcSpectrumData = new SpectrumData();
|
||||
betaFittingParaOld = new LinkedList<>();
|
||||
betaFittingParaToUiOld = new LinkedList<>();
|
||||
gammaFittingParaOld = new LinkedList<>();
|
||||
gammaFittingParaToUiOld = new LinkedList<>();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ public interface ISpectrumAnalysisService {
|
|||
|
||||
Result getFileSpectrumChart(String sampleFileName, String gasFileName, String detFileName, String qcFileName, HttpServletRequest request);
|
||||
|
||||
void deleteSpectrumCacheData(String sampleFileName, String qcFileName, HttpServletRequest request);
|
||||
void deleteSpectrumCacheData(String sampleFileName, HttpServletRequest request);
|
||||
|
||||
Result viewComment(Integer sampleId, String sampleFileName, HttpServletRequest request);
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
}
|
||||
// 从数据库中读取相关信息
|
||||
boolean bRet = getResultFromDB(dbName, userName, sampleId, phd, result);
|
||||
if (!redisUtil.hasKey(fileName+"-"+userName)) {
|
||||
if (!redisUtil.hasKey(userName+"-"+phd.getHeader().getSystem_type())) {
|
||||
// 查询当前用户关联的核素信息
|
||||
List<String> userLib = new LinkedList<>();
|
||||
// 从postgreSql中获取当前用户关注的核素信息 如果当前用户没有 则返回管理员的
|
||||
|
@ -178,7 +178,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
userLib = defaultNuclideSpectrumService.findNuclidesByUserName("admin", phd.getHeader().getSystem_type().toUpperCase());
|
||||
}
|
||||
Map<String, NuclideLines> nuclideMap = GetNuclideLines(userLib);
|
||||
redisUtil.set(fileName+"-"+userName, nuclideMap);
|
||||
redisUtil.set(userName+"-"+phd.getHeader().getSystem_type(), nuclideMap);
|
||||
}
|
||||
if (!bRet) {
|
||||
return result;
|
||||
|
@ -188,7 +188,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
String pathName = ftpUtil.getFtpRootPath() + spectrumPathProperties.getUploadPath() + StringPool.SLASH + userName;
|
||||
String fileName = samfileName;
|
||||
boolean flag = gammaFileUtil.loadFile(pathName, fileName, phd, result);
|
||||
if (!redisUtil.hasKey(fileName+"-"+userName)) {
|
||||
if (!redisUtil.hasKey(userName+"-"+phd.getHeader().getSystem_type())) {
|
||||
// 查询当前用户关联的核素信息
|
||||
List<String> userLib = new LinkedList<>();
|
||||
// 从postgreSql中获取当前用户关注的核素信息 如果当前用户没有 则返回管理员的
|
||||
|
@ -197,7 +197,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
userLib = defaultNuclideSpectrumService.findNuclidesByUserName("admin", phd.getHeader().getSystem_type().toUpperCase());
|
||||
}
|
||||
Map<String, NuclideLines> nuclideMap = GetNuclideLines(userLib);
|
||||
redisUtil.set(fileName+"-"+userName, nuclideMap);
|
||||
redisUtil.set(userName+"-"+phd.getHeader().getSystem_type(), nuclideMap);
|
||||
}
|
||||
if (!flag) {
|
||||
return result;
|
||||
|
@ -224,7 +224,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
Map<String, NuclideLines> nuclideLinesMap = (Map<String, NuclideLines>) redisUtil.get(fileName+"-"+userName);//GetNuclideLines(nuclides);
|
||||
Map<String, NuclideLines> nuclideLinesMap = (Map<String, NuclideLines>) redisUtil.get(userName+"-"+phd.getHeader().getSystem_type());//GetNuclideLines(nuclides);
|
||||
// 解析获取临时文件信息
|
||||
File tmpFile = gammaFileUtil.analyzeFile(ftpUtil.getFtpRootPath() + spectrumPathProperties.getUploadPath() + StringPool.SLASH + userName, fileName);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
|
@ -472,7 +472,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
}
|
||||
// 从数据库中读取phd其他相关信息
|
||||
boolean bRet = getResultFromDB(dbName, userName, sampleId, phd, result);
|
||||
if (!redisUtil.hasKey(fileName+"-"+userName)) {
|
||||
if (!redisUtil.hasKey(userName+"-"+phd.getHeader().getSystem_type())) {
|
||||
// 查询当前用户关联的核素信息
|
||||
List<String> userLib = new LinkedList<>();
|
||||
// 从postgreSql中获取当前用户关注的核素信息 如果当前用户没有 则返回管理员的
|
||||
|
@ -481,7 +481,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
userLib = defaultNuclideSpectrumService.findNuclidesByUserName("admin", phd.getHeader().getSystem_type().toUpperCase());
|
||||
}
|
||||
Map<String, NuclideLines> nuclideMap = GetNuclideLines(userLib);
|
||||
redisUtil.set(fileName+"-"+userName, nuclideMap);
|
||||
redisUtil.set(userName+"-"+phd.getHeader().getSystem_type(), nuclideMap);
|
||||
}
|
||||
// 判断数据库信息是否读取正常
|
||||
if (!bRet) {
|
||||
|
@ -722,8 +722,8 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
phd.getMapNucActMda().get(str_key).setEfficiency(nuclLinesIdedSpectrum.getEffic());
|
||||
phd.getMapNucActMda().get(str_key).setEffi_err(nuclLinesIdedSpectrum.getUnEffic());
|
||||
phd.getMapNucActMda().get(str_key).setMda(nuclLinesIdedSpectrum.getMda());
|
||||
phd.getMapNucActMda().get(str_key).setMdc(nuclLinesIdedSpectrum.getMdc().equalsIgnoreCase("inf") ? 0.0 : Double.valueOf(nuclLinesIdedSpectrum.getMdc()));
|
||||
phd.getMapNucActMda().get(str_key).setConcentration(nuclLinesIdedSpectrum.getConcentration().equalsIgnoreCase("inf") ? 0.0 : Double.valueOf(nuclLinesIdedSpectrum.getConcentration()));
|
||||
phd.getMapNucActMda().get(str_key).setMdc(nuclLinesIdedSpectrum.getMdc().equalsIgnoreCase("inf") ? null : Double.valueOf(nuclLinesIdedSpectrum.getMdc()));
|
||||
phd.getMapNucActMda().get(str_key).setConcentration(nuclLinesIdedSpectrum.getConcentration().equalsIgnoreCase("inf") ? null : Double.valueOf(nuclLinesIdedSpectrum.getConcentration()));
|
||||
if (phd.getMapNucActMda().get(str_key).getActivity() > 0) {
|
||||
phd.getMapNucActMda().get(str_key).setBCalculateMDA(true);
|
||||
}
|
||||
|
@ -837,7 +837,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
if (!bRet) {
|
||||
return result;
|
||||
}
|
||||
if (!redisUtil.hasKey(fileName+"-"+userName)) {
|
||||
if (!redisUtil.hasKey(userName+"-"+phd.getHeader().getSystem_type())) {
|
||||
// 查询当前用户关联的核素信息
|
||||
List<String> userLib = new LinkedList<>();
|
||||
// 从postgreSql中获取当前用户关注的核素信息 如果当前用户没有 则返回管理员的
|
||||
|
@ -846,7 +846,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
userLib = defaultNuclideSpectrumService.findNuclidesByUserName("admin", phd.getHeader().getSystem_type().toUpperCase());
|
||||
}
|
||||
Map<String, NuclideLines> nuclideMap = GetNuclideLines(userLib);
|
||||
redisUtil.set(fileName+"-"+userName, nuclideMap);
|
||||
redisUtil.set(userName+"-"+phd.getHeader().getSystem_type(), nuclideMap);
|
||||
}
|
||||
}
|
||||
// 更新 ‘QC Flags’ 状态
|
||||
|
@ -882,7 +882,6 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
String key = fileName + StrUtil.DASHED + username;
|
||||
// 删除指定key的Cache
|
||||
localCache.deletePHDCache(key);
|
||||
redisUtil.del(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1052,7 +1051,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
"2. You didn't change any setting or calibration.";
|
||||
result.error500(warning);
|
||||
} else if (flag == -1) {
|
||||
Map<String, NuclideLines> nuclideLinesMap = (Map<String, NuclideLines>) redisUtil.get(fileName+"-"+userName);//GetNuclideLines(nuclides);
|
||||
Map<String, NuclideLines> nuclideLinesMap = (Map<String, NuclideLines>) redisUtil.get(userName+"-"+phd.getHeader().getSystem_type());//GetNuclideLines(nuclides);
|
||||
gammaFileUtil.NuclidesIdent(phd, nuclideLinesMap);
|
||||
gammaFileUtil.RunQC(phd);
|
||||
String warning = "Finish three tasks:\n" +
|
||||
|
@ -1061,7 +1060,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
"\t3.Test QC again.";
|
||||
result.error500(warning);
|
||||
} else {
|
||||
Map<String, NuclideLines> nuclideLinesMap = (Map<String, NuclideLines>) redisUtil.get(fileName+"-"+userName);//GetNuclideLines(nuclides);
|
||||
Map<String, NuclideLines> nuclideLinesMap = (Map<String, NuclideLines>) redisUtil.get(userName+"-"+phd.getHeader().getSystem_type());//GetNuclideLines(nuclides);
|
||||
gammaFileUtil.AnalyseSpectrum(phd, nuclideLinesMap);
|
||||
// 重新分析各峰值对应的核素信息
|
||||
// gammaFileUtil.NuclidesIdent(phd, nuclideLinesMap);
|
||||
|
@ -1245,7 +1244,6 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
insertInput.curChan = curChan;
|
||||
insertInput.vCount = m_vCount;
|
||||
StructInsertOutput structInsertOutput = CalValuesHandler.insertPeaks(insertInput);
|
||||
List<PeakInfo> newPeak = new LinkedList<>();
|
||||
List<PeakInfo> newPeaks = new LinkedList<>();
|
||||
newPeaks.addAll(phd.getVPeak());
|
||||
if (structInsertOutput.vIdx.size() > 0) {
|
||||
|
@ -1257,9 +1255,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
PeakInfo peak = new PeakInfo();
|
||||
peak.index = a + 1;
|
||||
peak.left = structInsertOutput.vLeft.get(j).intValue();
|
||||
;
|
||||
peak.right = structInsertOutput.vRight.get(j).intValue();
|
||||
;
|
||||
peak.peakCentroid = structInsertOutput.peakCentroid.get(j);
|
||||
peak.energy = structInsertOutput.energy.get(j);
|
||||
peak.area = structInsertOutput.area.get(j);
|
||||
|
@ -1468,8 +1464,6 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Result result = new Result();
|
||||
//获取用户名称
|
||||
String userName = JwtUtil.getUserNameByToken(request);
|
||||
//获取缓存的核素信息
|
||||
Map<String, NuclideLines> nuclideMap = (Map<String, NuclideLines>) redisUtil.get(fileName + "-" + userName);
|
||||
//获取PHDFile的缓存信息
|
||||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName + "-" + userName);
|
||||
|
@ -1477,6 +1471,8 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
//获取缓存的核素信息
|
||||
Map<String, NuclideLines> nuclideMap = (Map<String, NuclideLines>) redisUtil.get(userName+"-"+phd.getHeader().getSystem_type());
|
||||
//获取颜色信息
|
||||
Map<String, String> colorMap = sysUserColorService.initColor(userName);
|
||||
//声明一个结果的map
|
||||
|
@ -1658,7 +1654,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
// if (CollectionUtils.isEmpty(userLib)) {
|
||||
// userLib = defaultNuclideSpectrumService.findNuclidesByUserName("admin", phd.getHeader().getSystem_type().toUpperCase());
|
||||
// }
|
||||
Map<String, NuclideLines> mapNucLines = (Map<String, NuclideLines>) redisUtil.get(fileName+"-"+userName);//GetNuclideLines(userLib);
|
||||
Map<String, NuclideLines> mapNucLines = (Map<String, NuclideLines>) redisUtil.get(userName+"-"+phd.getHeader().getSystem_type());//GetNuclideLines(userLib);
|
||||
// 查询出核素信息
|
||||
NuclideLines it_line = mapNucLines.get(nuclideName);
|
||||
// 如果核素信息不存在返回
|
||||
|
@ -1687,8 +1683,6 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Result result = new Result();
|
||||
//获取用户名
|
||||
String userName = JwtUtil.getUserNameByToken(request);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
Map<String, NuclideLines> nuclideMap = (Map<String, NuclideLines>) redisUtil.get(fileName + "-" + userName);
|
||||
//缓存中获取缓存信息
|
||||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName + "-" + userName);
|
||||
|
@ -1696,6 +1690,8 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
Map<String, NuclideLines> nuclideMap = (Map<String, NuclideLines>) redisUtil.get(userName+"-"+phd.getHeader().getSystem_type());
|
||||
//判断当前选择的核素名称是否包含在当前Peak的核素列表中
|
||||
int index = list_identify.indexOf(nuclideName);
|
||||
if (index >= 0) {
|
||||
|
@ -3576,7 +3572,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
userLib = defaultNuclideSpectrumService.findNuclidesByUserName("admin", phd.getHeader().getSystem_type().toUpperCase());
|
||||
}
|
||||
Map<String, NuclideLines> nuclideMap = GetNuclideLines(userLib);
|
||||
redisUtil.set(fileName+"-"+userName, nuclideMap);
|
||||
redisUtil.set(userName+"-"+phd.getHeader().getSystem_type(), nuclideMap);
|
||||
} else {
|
||||
result.success("Modification failure!");
|
||||
}
|
||||
|
@ -3791,7 +3787,11 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
String reportContent = gammaFileUtil.GetReportContent(phd, userName, false);
|
||||
//分析gamma文件
|
||||
Map<String, NuclideLines> nuclideLinesMap = (Map<String, NuclideLines>) redisUtil.get(userName+"-"+phd.getHeader().getSystem_type());//GetNuclideLines(nuclides);
|
||||
gammaFileUtil.AnalyseSpectrum(phd, nuclideLinesMap);
|
||||
//生成对应报告内容
|
||||
String reportContent = gammaFileUtil.GetReportContent(phd, userName, false, "log");
|
||||
result.setSuccess(true);
|
||||
result.setResult(reportContent);
|
||||
return result;
|
||||
|
@ -3805,7 +3805,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
if (Objects.isNull(phd)) {
|
||||
return;
|
||||
}
|
||||
String reportContent = gammaFileUtil.GetReportContent(phd, userName, false);
|
||||
String reportContent = gammaFileUtil.GetReportContent(phd, userName, false, "log");
|
||||
OutputStream fos = null;
|
||||
try {
|
||||
// 设置响应类型
|
||||
|
@ -4325,7 +4325,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
String reportContent = gammaFileUtil.GetReportContent(phd, userName, true);
|
||||
String reportContent = gammaFileUtil.GetReportContent(phd, userName, true, "log");
|
||||
result.setSuccess(true);
|
||||
result.setResult(reportContent);
|
||||
return result;
|
||||
|
@ -4417,7 +4417,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
// 如果有权限则开始保存数据库操作
|
||||
// 将PHDFile数据 生成用于数据库存储的数据结构
|
||||
GStoreMiddleProcessData middleData = new GStoreMiddleProcessData();
|
||||
bRet = gammaFileUtil.GetInterMiddlData(phd, userName, middleData);
|
||||
bRet = gammaFileUtil.GetInterMiddlData(phd, userName, middleData, "save");
|
||||
if (!bRet) {
|
||||
result.error500("Transform PHDFile into structGStoreMiddleProcessData failed.");
|
||||
return result;
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.jeecg.common.properties.SpectrumPathProperties;
|
|||
import org.jeecg.common.system.util.JwtUtil;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.*;
|
||||
import org.jeecg.modules.base.abstracts.AbstractLogOrReport;
|
||||
import org.jeecg.modules.base.bizVo.BetaRLR;
|
||||
import org.jeecg.modules.base.dto.ESStructDto;
|
||||
import org.jeecg.modules.base.dto.ROIChannelsDto;
|
||||
|
@ -68,7 +69,7 @@ import static org.jeecg.modules.base.enums.ExportTemplate.*;
|
|||
|
||||
@Service("spectrumAnalysisService")
|
||||
@DS("ora")
|
||||
public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||
public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements ISpectrumAnalysisService {
|
||||
|
||||
@Autowired
|
||||
private SpectrumAnalysisMapper spectrumAnalysisMapper;
|
||||
|
@ -398,6 +399,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
EnergySpectrumStruct struct = EnergySpectrumHandler.getSourceData(sampleTmp.getAbsolutePath());
|
||||
betaDataFile.setSampleStruct(struct);
|
||||
sampleMap = phdFileUtil.getSourceData(struct, sample.getSampleId(), sample.getStatus(), "sample", betaDataFile);
|
||||
sampleMap.put("fileName", betaDataFile.getSampleFileName());
|
||||
resultMap.put("sample",sampleMap);
|
||||
}
|
||||
}
|
||||
|
@ -410,6 +412,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
EnergySpectrumStruct struct = EnergySpectrumHandler.getSourceData(gasTmp.getAbsolutePath());
|
||||
betaDataFile.setGasStruct(struct);
|
||||
gasBgMap = phdFileUtil.getSourceData(struct, gasBg.getSampleId(), gasBg.getStatus(), "gas", betaDataFile);
|
||||
gasBgMap.put("fileName", betaDataFile.getGasFileName());
|
||||
resultMap.put("gasBg",gasBgMap);
|
||||
}
|
||||
}
|
||||
|
@ -422,6 +425,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
EnergySpectrumStruct struct = EnergySpectrumHandler.getSourceData(detTmp.getAbsolutePath());
|
||||
betaDataFile.setDetStruct(struct);
|
||||
detBgMap = phdFileUtil.getSourceData(struct, detBg.getSampleId(), detBg.getStatus(), "det", betaDataFile);
|
||||
detBgMap.put("fileName", betaDataFile.getDetFileName());
|
||||
resultMap.put("detBg",detBgMap);
|
||||
}
|
||||
}
|
||||
|
@ -434,6 +438,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
EnergySpectrumStruct struct = EnergySpectrumHandler.getSourceData(qcTmp.getAbsolutePath());
|
||||
betaDataFile.setQcStruct(struct);
|
||||
qcMap = phdFileUtil.getSourceData(struct, qc.getSampleId(), qc.getStatus(), "qc", betaDataFile);
|
||||
qcMap.put("fileName", betaDataFile.getQcFileName());
|
||||
resultMap.put("qc",qcMap);
|
||||
}
|
||||
}
|
||||
|
@ -513,8 +518,6 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
Map<String, Object> gasBgMap = new HashMap<>();
|
||||
Map<String, Object> detBgMap = new HashMap<>();
|
||||
Map<String, Object> qcMap = new HashMap<>();
|
||||
boolean bProcessed = false;
|
||||
boolean savedAnalysisResult = false;
|
||||
//页面展示结果数组
|
||||
List<GardsXeResultsSpectrum> xeResultsSpectrumList = new LinkedList<>();
|
||||
//获取本地缓存信息
|
||||
|
@ -535,6 +538,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
betaDataFile.setSampleFilePathName(sampleFilePath);
|
||||
betaDataFile.setSampleFileName(sampleFileName);
|
||||
sampleMap = phdFileUtil.getSourceData(struct, null, null, "sample", betaDataFile);
|
||||
sampleMap.put("fileName", betaDataFile.getSampleFileName());
|
||||
resultMap.put("sample", sampleMap);
|
||||
}
|
||||
}
|
||||
|
@ -545,6 +549,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
betaDataFile.setGasFilePathName(gasBgFilePath);
|
||||
betaDataFile.setGasFileName(gasFileName);
|
||||
gasBgMap = phdFileUtil.getSourceData(struct, null, null, "gas", betaDataFile);
|
||||
gasBgMap.put("fileName", betaDataFile.getGasFileName());
|
||||
resultMap.put("gasBg", gasBgMap);
|
||||
}
|
||||
}
|
||||
|
@ -555,6 +560,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
betaDataFile.setDetFilePathName(detBgFilePath);
|
||||
betaDataFile.setDetFileName(detFileName);
|
||||
detBgMap = phdFileUtil.getSourceData(struct, null, null, "det", betaDataFile);
|
||||
detBgMap.put("fileName", betaDataFile.getDetFileName());
|
||||
resultMap.put("detBg", detBgMap);
|
||||
}
|
||||
}
|
||||
|
@ -565,6 +571,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
betaDataFile.setQcFilePathName(dbQcFilePath);
|
||||
betaDataFile.setQcFileName(qcFileName);
|
||||
qcMap = phdFileUtil.getSourceData(struct, null, null, "qc", betaDataFile);
|
||||
qcMap.put("fileName", betaDataFile.getQcFileName());
|
||||
resultMap.put("qc", qcMap);
|
||||
}
|
||||
}
|
||||
|
@ -634,26 +641,38 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
Map<String, Object> map = new HashMap<>();
|
||||
SpectrumData spectrumData = new SpectrumData();
|
||||
List<Boundary> boundaryList = new LinkedList<>();
|
||||
List<HistogramData> histogramDataList = new LinkedList<>();
|
||||
List<HistogramData> histogramDataDList = new LinkedList<>();
|
||||
if (type.equalsIgnoreCase("sample")) {
|
||||
spectrumData = betaDataFile.getSampleSpectrumData();
|
||||
boundaryList = betaDataFile.getSampleBoundary();
|
||||
histogramDataList = betaDataFile.getSampleHistogramDataList();
|
||||
histogramDataDList = betaDataFile.getSampleHistogramDataDList();
|
||||
} else if (type.equalsIgnoreCase("gas")) {
|
||||
spectrumData = betaDataFile.getGasSpectrumData();
|
||||
boundaryList = betaDataFile.getGasBoundary();
|
||||
histogramDataList = betaDataFile.getGasHistogramDataList();
|
||||
histogramDataDList = betaDataFile.getGasHistogramDataDList();
|
||||
} else if (type.equalsIgnoreCase("det")) {
|
||||
spectrumData = betaDataFile.getDetSpectrumData();
|
||||
boundaryList = betaDataFile.getDetBoundary();
|
||||
histogramDataList = betaDataFile.getDetHistogramDataList();
|
||||
histogramDataDList = betaDataFile.getDetHistogramDataDList();
|
||||
} else if (type.equalsIgnoreCase("qc")) {
|
||||
spectrumData = betaDataFile.getQcSpectrumData();
|
||||
boundaryList = betaDataFile.getQcBoundary();
|
||||
histogramDataList = betaDataFile.getQcHistogramDataList();
|
||||
histogramDataDList = betaDataFile.getQcHistogramDataDList();
|
||||
}
|
||||
map.put("spectrumData", spectrumData);
|
||||
map.put("Boundary", boundaryList);
|
||||
map.put("histogramDataList", histogramDataList);
|
||||
map.put("histogramDataDList", histogramDataDList);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSpectrumCacheData(String sampleFileName, String qcFileName, HttpServletRequest request) {
|
||||
public void deleteSpectrumCacheData(String sampleFileName, HttpServletRequest request) {
|
||||
String userName = JwtUtil.getUserNameByToken(request);
|
||||
String betaKey = sampleFileName + "-" + userName;
|
||||
betaCache.deleteBetaCache(betaKey);
|
||||
|
@ -669,7 +688,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
Cache<String, BetaDataFile> cache = betaCache.getBetaCache();
|
||||
BetaDataFile betaDataFile = cache.getIfPresent(sampleFileName + "-" + userName);
|
||||
if (Objects.isNull(betaDataFile)) {
|
||||
result.error500("请先加载文件基础信息!");
|
||||
result.error500("Load basic file information first!");
|
||||
return result;
|
||||
}
|
||||
EnergySpectrumStruct struct = betaDataFile.getSampleStruct();
|
||||
|
@ -740,7 +759,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
Cache<String, BetaDataFile> cache = betaCache.getBetaCache();
|
||||
BetaDataFile betaDataFile = cache.getIfPresent(rrrLogInfo.getSampleFileName() + "-" + userName);
|
||||
if (Objects.isNull(betaDataFile)) {
|
||||
result.error500("请先加载文件基础信息!");
|
||||
result.error500("Load basic file information first!");
|
||||
return result;
|
||||
}
|
||||
GardsCalibrationSpectrum gammaCalibrationParamS = new GardsCalibrationSpectrum();
|
||||
|
@ -1205,7 +1224,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
Cache<String, BetaDataFile> cache = betaCache.getBetaCache();
|
||||
BetaDataFile betaDataFile = cache.getIfPresent(sampleFileName + "-" + userName);
|
||||
if (Objects.isNull(betaDataFile)) {
|
||||
result.error500("请先加载文件基础信息!");
|
||||
result.error500("Load basic file information first!");
|
||||
return result;
|
||||
}
|
||||
Map<String, List<String>> map = new HashMap<>();
|
||||
|
@ -1239,7 +1258,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
Cache<String, BetaDataFile> cache = betaCache.getBetaCache();
|
||||
BetaDataFile betaDataFile = cache.getIfPresent(sampleFileName + "-" + userName);
|
||||
if (Objects.isNull(betaDataFile)) {
|
||||
result.error500("请先加载文件基础信息!");
|
||||
result.error500("Load basic file information first!");
|
||||
return result;
|
||||
}
|
||||
if (StringUtils.isNotBlank(betaDataFile.getSampleFilePathName())){
|
||||
|
@ -1329,7 +1348,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
Cache<String, BetaDataFile> cache = betaCache.getBetaCache();
|
||||
BetaDataFile betaDataFile = cache.getIfPresent(sampleFileName + "-" + userName);
|
||||
if (Objects.isNull(betaDataFile)) {
|
||||
result.error500("请先加载文件基础信息!");
|
||||
result.error500("Load basic file information first!");
|
||||
return result;
|
||||
}
|
||||
QCResult qcResult = new QCResult();
|
||||
|
@ -1462,7 +1481,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
Cache<String, BetaDataFile> cache = betaCache.getBetaCache();
|
||||
BetaDataFile betaDataFile = cache.getIfPresent(sampleFileName + "-" + userName);
|
||||
if (Objects.isNull(betaDataFile)) {
|
||||
result.error500("请先加载文件基础信息!");
|
||||
result.error500("Load basic file information first!");
|
||||
return result;
|
||||
}
|
||||
List<GardsXeResultsSpectrum> xeDataList = betaDataFile.getXeResultsSpectrumList();
|
||||
|
@ -1530,7 +1549,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
Cache<String, BetaDataFile> cache = betaCache.getBetaCache();
|
||||
BetaDataFile betaDataFile = cache.getIfPresent(sampleFileName + "-" + userName);
|
||||
if (Objects.isNull(betaDataFile)) {
|
||||
result.error500("请先加载文件基础信息!");
|
||||
result.error500("Load basic file information first!");
|
||||
return result;
|
||||
}
|
||||
//获取qc的分析结果数据
|
||||
|
@ -1617,6 +1636,8 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
betaDataFile.setGammaList(oldScatterSeries);
|
||||
betaDataFile.setGammaFittingPara(fittingParaStr);
|
||||
betaDataFile.setGammaFittingParaToUi(fittingParaToUiStr);
|
||||
betaDataFile.setGammaFittingParaOld(fittingParaStr);
|
||||
betaDataFile.setGammaFittingParaToUiOld(fittingParaToUiStr);
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setResult(map);
|
||||
|
@ -1633,7 +1654,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
Cache<String, BetaDataFile> cache = betaCache.getBetaCache();
|
||||
BetaDataFile betaDataFile = cache.getIfPresent(sampleFileName + "-" + userName);
|
||||
if (Objects.isNull(betaDataFile)) {
|
||||
result.error500("请先加载文件基础信息!");
|
||||
result.error500("Load basic file information first!");
|
||||
return result;
|
||||
}
|
||||
//判断qc的分析结果是否为空
|
||||
|
@ -1723,6 +1744,8 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
betaDataFile.setBetaList(oldScatterSeries);
|
||||
betaDataFile.setBetaFittingPara(fittingParaStr);
|
||||
betaDataFile.setBetaFittingParaToUi(fittingParaToUiStr);
|
||||
betaDataFile.setBetaFittingParaOld(fittingParaStr);
|
||||
betaDataFile.setBetaFittingParaToUiOld(fittingParaToUiStr);
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setResult(map);
|
||||
|
@ -1739,7 +1762,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
Cache<String, BetaDataFile> cache = betaCache.getBetaCache();
|
||||
BetaDataFile betaDataFile = cache.getIfPresent(sampleFileName + "-" + userName);
|
||||
if (Objects.isNull(betaDataFile)) {
|
||||
result.error500("请先加载文件基础信息!");
|
||||
result.error500("Load basic file information first!");
|
||||
return result;
|
||||
}
|
||||
//读取文件信息
|
||||
|
@ -1826,7 +1849,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
Cache<String, BetaDataFile> cache = betaCache.getBetaCache();
|
||||
BetaDataFile betaDataFile = cache.getIfPresent(extInfo.getSampleFileName() + "-" + userName);
|
||||
if (Objects.isNull(betaDataFile)) {
|
||||
result.error500("请先加载文件基础信息!");
|
||||
result.error500("Load basic file information first!");
|
||||
return result;
|
||||
}
|
||||
//获取sample文件的文件读取信息
|
||||
|
@ -2094,7 +2117,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
Cache<String, BetaDataFile> cache = betaCache.getBetaCache();
|
||||
BetaDataFile betaDataFile = cache.getIfPresent(sampleFileName + "-" + userName);
|
||||
if (Objects.isNull(betaDataFile)) {
|
||||
result.error500("请先加载文件基础信息!");
|
||||
result.error500("Load basic file information first!");
|
||||
return result;
|
||||
}
|
||||
//读取文件信息
|
||||
|
@ -2447,7 +2470,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
Cache<String, BetaDataFile> cache = betaCache.getBetaCache();
|
||||
BetaDataFile betaDataFile = cache.getIfPresent(sampleFileName + "-" + userName);
|
||||
if (Objects.isNull(betaDataFile)) {
|
||||
result.error500("请先加载文件基础信息!");
|
||||
result.error500("Load basic file information first!");
|
||||
return result;
|
||||
}
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
@ -2595,7 +2618,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
Cache<String, BetaDataFile> cache = betaCache.getBetaCache();
|
||||
BetaDataFile betaDataFile = cache.getIfPresent(sampleFileName + "-" + userName);
|
||||
if (Objects.isNull(betaDataFile)) {
|
||||
result.error500("请先加载文件基础信息!");
|
||||
result.error500("Load basic file information first!");
|
||||
return result;
|
||||
}
|
||||
//选择矩形框高度
|
||||
|
@ -2645,7 +2668,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
String sampleFileName = analyseData.getSampleFileNames().get(0);
|
||||
BetaDataFile betaDataFile = cache.getIfPresent(sampleFileName + "-" + userName);
|
||||
if (Objects.isNull(betaDataFile)) {
|
||||
result.error500("请先加载文件基础信息!");
|
||||
result.error500("Load basic file information first!");
|
||||
return result;
|
||||
}
|
||||
map = BetaGammaAnalyzeCurrentProcess(analyseData, betaDataFile);
|
||||
|
@ -3208,7 +3231,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
Cache<String, BetaDataFile> cache = betaCache.getBetaCache();
|
||||
BetaDataFile betaDataFile = cache.getIfPresent(sampleFileName + "-" + userName);
|
||||
if (Objects.isNull(betaDataFile)) {
|
||||
result.error500("请先加载文件基础信息!");
|
||||
result.error500("Load basic file information first!");
|
||||
return result;
|
||||
}
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
@ -3469,7 +3492,9 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
FileInputStream inputStream = null;
|
||||
OutputStream fos = null;
|
||||
try {
|
||||
inputStream = new FileInputStream(new File(logFilePath));
|
||||
File file = new File(logFilePath);
|
||||
if (file.exists()) {
|
||||
inputStream = new FileInputStream(file);
|
||||
fos = response.getOutputStream();
|
||||
byte[] buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
|
@ -3477,6 +3502,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
while ((bytesRead = inputStream.read(buffer)) != -1) {
|
||||
fos.write(buffer, 0, bytesRead);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
|
|
Loading…
Reference in New Issue
Block a user