Merge branch 'mdc' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide into mdc
This commit is contained in:
commit
c647bc52ca
|
@ -79,6 +79,12 @@ public class NameStandUtil {
|
|||
return path.toString();
|
||||
}
|
||||
|
||||
public Map<String, String> NameStandard(String dataType, String spectrumQuantity, Double acqusitionLiveTime, String sampleFileName, String measurementId) {
|
||||
String suffix = GetSuffix(dataType, spectrumQuantity,String.valueOf(acqusitionLiveTime));
|
||||
Map<String, String> fileNames = NameStandardByName(sampleFileName, measurementId,suffix);
|
||||
return fileNames;
|
||||
}
|
||||
|
||||
public Map<String, String> NameStandard(PHDFile fileAnlyse) {
|
||||
String suffix = GetSuffix(fileAnlyse.getMsgInfo().getData_type(), fileAnlyse.getHeader().getSpectrum_quantity(),String.valueOf(fileAnlyse.getAcq().getAcquisition_live_time()));
|
||||
Map<String, String> fileNames = NameStandardByName(fileAnlyse.getFilename(), fileAnlyse.getHeader().getMeasurement_id(),suffix);
|
||||
|
|
|
@ -32,10 +32,10 @@ public class GardsMDC implements Serializable {
|
|||
private Double efficiency;
|
||||
|
||||
@TableField(value = "MDC")
|
||||
private Double mdc;
|
||||
private String mdc;
|
||||
|
||||
@TableField(value = "MDC_ERR")
|
||||
private Double mdcErr;
|
||||
private String mdcErr;
|
||||
|
||||
@TableField(value = "MODDATE")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
|
|
|
@ -32,10 +32,10 @@ public class GardsMDC implements Serializable {
|
|||
private Double efficiency;
|
||||
|
||||
@TableField(value = "MDC")
|
||||
private Double mdc;
|
||||
private String mdc;
|
||||
|
||||
@TableField(value = "MDC_ERR")
|
||||
private Double mdcErr;
|
||||
private String mdcErr;
|
||||
|
||||
@TableField(value = "MODDATE")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
|
|
|
@ -895,7 +895,7 @@ public class Sample_G_Analysis {
|
|||
mdc.setYield(mdcInfo.getYield());
|
||||
mdc.setEfficiency(mdcInfo.getEfficiency());
|
||||
if (Objects.nonNull(mdcInfo.getMdc()) && Double.isFinite(mdcInfo.getMdc())) {
|
||||
mdc.setMdc(mdcInfo.getMdc());
|
||||
mdc.setMdc(String.valueOf(mdcInfo.getMdc()));
|
||||
} else {
|
||||
mdc.setMdc(null);
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.*;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
@ -628,44 +629,6 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
return rData;
|
||||
}
|
||||
|
||||
// public File analyzeFile(String path, String fileName) {
|
||||
// //连接ftp
|
||||
// FTPClient ftpClient = ftpUtil.LoginFTP();
|
||||
// InputStream inputStream = null;
|
||||
// File file = null;
|
||||
// try {
|
||||
// //被动模式
|
||||
// ftpClient.enterLocalPassiveMode();
|
||||
// //设置文件类型--二进制文件
|
||||
// ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
|
||||
// //
|
||||
// ftpClient.setControlEncoding("UTF-8");
|
||||
// ftpClient.setFileTransferMode(FTPClient.STREAM_TRANSFER_MODE);
|
||||
// //切换文件路径
|
||||
// ftpClient.changeWorkingDirectory(path);
|
||||
// inputStream = ftpClient.retrieveFileStream(fileName);
|
||||
// if (Objects.nonNull(inputStream)){
|
||||
// file = File.createTempFile("betaGamma", null);
|
||||
// //将ftp文件的输入流复制给临时文件
|
||||
// FileUtils.copyInputStreamToFile(inputStream, file);
|
||||
// }
|
||||
// } catch (IOException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// } finally {
|
||||
// try {
|
||||
// if (Objects.nonNull(ftpClient)){
|
||||
// ftpClient.disconnect();
|
||||
// }
|
||||
// if (Objects.nonNull(inputStream)){
|
||||
// inputStream.close();
|
||||
// }
|
||||
// } catch (IOException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// }
|
||||
// return file;
|
||||
// }
|
||||
|
||||
public boolean analyzeSpectrum(File sampleTmp, File gasTmp, File detTmp, BgCalibratePara BgCalPara, Map<String, Object> map, BetaDataFile betaDataFile) {
|
||||
boolean bRet = true;
|
||||
//调用动态库解析文件
|
||||
|
@ -1987,6 +1950,449 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
}
|
||||
}
|
||||
|
||||
public String OutPutRnRpt(BetaDataFile betaDataFile) {
|
||||
GardsCalibrationSpectrum gammaCalibrationParamS = new GardsCalibrationSpectrum();
|
||||
GardsCalibrationSpectrum gammaCalibrationParamG = new GardsCalibrationSpectrum();
|
||||
GardsCalibrationSpectrum gammaCalibrationParamD = new GardsCalibrationSpectrum();
|
||||
GardsCalibrationSpectrum gammaCalibrationParamES = new GardsCalibrationSpectrum();
|
||||
GardsCalibrationSpectrum gammaCalibrationParamEG = new GardsCalibrationSpectrum();
|
||||
GardsCalibrationSpectrum gammaCalibrationParamED = new GardsCalibrationSpectrum();
|
||||
|
||||
GardsCalibrationSpectrum betaCalibrationParamS = new GardsCalibrationSpectrum();
|
||||
GardsCalibrationSpectrum betaCalibrationParamG = new GardsCalibrationSpectrum();
|
||||
GardsCalibrationSpectrum betaCalibrationParamD = new GardsCalibrationSpectrum();
|
||||
GardsCalibrationSpectrum betaCalibrationParamES = new GardsCalibrationSpectrum();
|
||||
GardsCalibrationSpectrum betaCalibrationParamEG = new GardsCalibrationSpectrum();
|
||||
GardsCalibrationSpectrum betaCalibrationParamED = new GardsCalibrationSpectrum();
|
||||
|
||||
StringBuffer strBuffer = new StringBuffer();
|
||||
//对分析后的内容进行数据获取
|
||||
List<GardsROIChannelsSpectrum> channelsSpectrums = betaDataFile.getRoiChannelsSpectrumList();
|
||||
List<GardsROIChannelsSpectrum> roiChannelsSpectrumsSample = channelsSpectrums.stream().filter(item -> item.getDataType().equalsIgnoreCase("S")).collect(Collectors.toList());
|
||||
List<GardsROIChannelsSpectrum> roiChannelsSpectrumsGas = channelsSpectrums.stream().filter(item -> item.getDataType().equalsIgnoreCase("G")).collect(Collectors.toList());
|
||||
List<GardsROIChannelsSpectrum> roiChannelsSpectrumsDet = channelsSpectrums.stream().filter(item -> item.getDataType().equalsIgnoreCase("D")).collect(Collectors.toList());
|
||||
List<GardsROIResultsSpectrum> resultsSpectrums = betaDataFile.getRoiResultsSpectrumList();
|
||||
List<GardsXeResultsSpectrum> xeResultsSpectrums = betaDataFile.getXeResultsSpectrumList();
|
||||
//#SAMPLE: LIMITS PER ROI GAMMA
|
||||
List<GardsCalibrationSpectrum> gammaCalibrationParamList = betaDataFile.getGammaCalibrationSpectrumList();
|
||||
List<GardsCalibrationSpectrum> gammaCalibrationSpectrumEList = betaDataFile.getGammaCalibrationSpectrumEList();
|
||||
for (int i=0; i<gammaCalibrationParamList.size(); i++) {
|
||||
if (gammaCalibrationParamList.get(i).getDataType().equals("S")) {
|
||||
gammaCalibrationParamS = gammaCalibrationParamList.get(i);
|
||||
} else if (gammaCalibrationParamList.get(i).getDataType().equals("G")) {
|
||||
gammaCalibrationParamG = gammaCalibrationParamList.get(i);
|
||||
} else if (gammaCalibrationParamList.get(i).getDataType().equals("D")) {
|
||||
gammaCalibrationParamD = gammaCalibrationParamList.get(i);
|
||||
}
|
||||
}
|
||||
for (int i=0; i<gammaCalibrationSpectrumEList.size(); i++) {
|
||||
if (gammaCalibrationSpectrumEList.get(i).getDataType().equals("S")) {
|
||||
gammaCalibrationParamES = gammaCalibrationSpectrumEList.get(i);
|
||||
} else if (gammaCalibrationSpectrumEList.get(i).getDataType().equals("G")) {
|
||||
gammaCalibrationParamEG = gammaCalibrationSpectrumEList.get(i);
|
||||
} else if (gammaCalibrationSpectrumEList.get(i).getDataType().equals("D")) {
|
||||
gammaCalibrationParamED = gammaCalibrationSpectrumEList.get(i);
|
||||
}
|
||||
}
|
||||
//#SAMPLE: LIMITS PER ROI BETA
|
||||
List<GardsCalibrationSpectrum> betaCalibrationParamList = betaDataFile.getBetaCalibrationSpectrumList();
|
||||
List<GardsCalibrationSpectrum> betaCalibrationSpectrumEList = betaDataFile.getBetaCalibrationSpectrumEList();
|
||||
for (int i=0; i<betaCalibrationParamList.size(); i++) {
|
||||
if (betaCalibrationParamList.get(i).getDataType().equals("S")) {
|
||||
betaCalibrationParamS = betaCalibrationParamList.get(i);
|
||||
} else if (betaCalibrationParamList.get(i).getDataType().equals("G")) {
|
||||
betaCalibrationParamG = betaCalibrationParamList.get(i);
|
||||
} else if (betaCalibrationParamList.get(i).getDataType().equals("D")) {
|
||||
betaCalibrationParamD = betaCalibrationParamList.get(i);
|
||||
}
|
||||
}
|
||||
for (int i=0; i<betaCalibrationSpectrumEList.size(); i++) {
|
||||
if (betaCalibrationSpectrumEList.get(i).getDataType().equals("S")) {
|
||||
betaCalibrationParamES = betaCalibrationSpectrumEList.get(i);
|
||||
} else if (betaCalibrationSpectrumEList.get(i).getDataType().equals("G")) {
|
||||
betaCalibrationParamEG = betaCalibrationSpectrumEList.get(i);
|
||||
} else if (betaCalibrationSpectrumEList.get(i).getDataType().equals("D")) {
|
||||
betaCalibrationParamED = betaCalibrationSpectrumEList.get(i);
|
||||
}
|
||||
}
|
||||
Information information = new Information();
|
||||
//sampleFile 相关数据
|
||||
try {
|
||||
EnergySpectrumStruct sampleSourceData = betaDataFile.getSampleStruct();
|
||||
if (Objects.nonNull(sampleSourceData)) {
|
||||
information.setSample_measid_name(sampleSourceData.measurement_id);
|
||||
information.setSample_det_measid_name(sampleSourceData.detector_bk_measurement_id);
|
||||
information.setSample_gas_measid_name(sampleSourceData.gas_bk_measurement_id);
|
||||
information.setSit_det_code(sampleSourceData.site_code);
|
||||
information.setSample_type(sampleSourceData.system_type);
|
||||
information.setGeometry(sampleSourceData.sample_geometry);
|
||||
information.setSpectral_qualifie(sampleSourceData.spectrum_quantity);
|
||||
String transmit_dtg_str=sampleSourceData.transmit_date+StringPool.SPACE+sampleSourceData.transmit_time;
|
||||
Date transmit_dtg = DateUtils.parseDate(transmit_dtg_str);
|
||||
information.setTransmit_dtg(transmit_dtg);
|
||||
information.setDetect_code(sampleSourceData.detector_code);
|
||||
information.setMeasurementID(sampleSourceData.measurement_id.replace("\\","/"));
|
||||
information.setBkgdMeasurementID(sampleSourceData.detector_bk_measurement_id.replace("\\","/"));
|
||||
information.setGasBkgdMeasurementID(sampleSourceData.gas_bk_measurement_id.replace("\\","/"));
|
||||
information.setSampleRefId(sampleSourceData.sample_ref_id);
|
||||
String collect_start_str = sampleSourceData.collection_start_date+StringPool.SPACE+sampleSourceData.collection_start_time;
|
||||
Date collect_start = DateUtils.parseDate(collect_start_str);
|
||||
information.setCollect_start(collect_start);
|
||||
String collect_stop_str = sampleSourceData.collection_stop_date+StringPool.SPACE+sampleSourceData.collection_stop_time;
|
||||
Date collect_stop = DateUtils.parseDate(collect_stop_str);
|
||||
information.setCollect_stop(collect_stop);
|
||||
information.setS_xe_stable_volume(sampleSourceData.air_volume);
|
||||
String acquisition_start_str = sampleSourceData.acquisition_start_date+StringPool.SPACE+sampleSourceData.acquisition_start_time;
|
||||
Date acquisition_start = DateUtils.parseDate(acquisition_start_str);
|
||||
information.setAcquisition_start(acquisition_start);
|
||||
long dataTime = (long) (acquisition_start.getTime() + sampleSourceData.acquisition_real_time * 1000);
|
||||
String acquisition_stop_str = DateUtils.formatDate(new Date(dataTime), "yyyy/MM/dd HH:mm:ss");
|
||||
Date acquisition_stop = DateUtils.parseDate(acquisition_stop_str);
|
||||
information.setAcquisition_stop(acquisition_stop);
|
||||
information.setAcquisition_real_sec(sampleSourceData.acquisition_real_time);
|
||||
information.setAcquisition_live_sec(sampleSourceData.acquisition_live_time);
|
||||
information.setS_volume_of_Xe(sampleSourceData.sample_volume_of_Xe);
|
||||
}
|
||||
EnergySpectrumStruct gasSourceData = betaDataFile.getGasStruct();
|
||||
if (Objects.nonNull(gasSourceData)) {
|
||||
information.setGas_measid_name(gasSourceData.measurement_id);
|
||||
}
|
||||
EnergySpectrumStruct detSourceData = betaDataFile.getDetStruct();
|
||||
if (Objects.nonNull(detSourceData)) {
|
||||
information.setDet_measid_name(detSourceData.measurement_id);
|
||||
}
|
||||
strBuffer.append(titleFormat("%sCNL06 GENERATED REPORT%s", 60, StringPool.SPACE, StringPool.SPACE));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(titleFormat("%sREVIEWED RADIONUCLIDE REPORT%s", 57, StringPool.SPACE, StringPool.SPACE));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(titleFormat("%s(Noble Gas Version)%s", 61, StringPool.SPACE, StringPool.SPACE));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(titleFormat("%sCreation Date "+DateUtils.formatDate(new Date(), "yyyy/MM/dd-HH:mm:ss")+"%s", 54, StringPool.SPACE, StringPool.SPACE));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#FILE INFORMATION");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sSampleMeasID:%-15s%s", StringPool.SPACE, StringPool.SPACE, information.getMeasurementID()));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sGASBKMeasID:%-16s%s", StringPool.SPACE, StringPool.SPACE, information.getGasBkgdMeasurementID()));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sSRID:%-23s%s", StringPool.SPACE, StringPool.SPACE, information.getSampleRefId()));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sDetector Type:%-14s%s", StringPool.SPACE, StringPool.SPACE, "3D b-g"));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#COLLECTION INFORMATION");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sStation CODE:%-15s%s", StringPool.SPACE, StringPool.SPACE, information.getSit_det_code()));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sDetector CODE:%-14s%s", StringPool.SPACE, StringPool.SPACE, information.getDetect_code()));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sCollection Start:%-11s%s", StringPool.SPACE, StringPool.SPACE, DateUtils.formatDate(information.getCollect_start(), "yyyy/MM/dd HH:mm:ss")));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sCollection Stop:%-12s%s", StringPool.SPACE, StringPool.SPACE, DateUtils.formatDate(information.getCollect_stop(), "yyyy/MM/dd HH:mm:ss")));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sCollection TIME(h):%-9s%s", StringPool.SPACE, StringPool.SPACE, String.valueOf(((information.getCollect_stop().getTime()-information.getCollect_start().getTime())/1000)/3600)));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sAir Volume[cm3]:%-12s%s", StringPool.SPACE, StringPool.SPACE, String.valueOf(information.getS_xe_stable_volume())));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sXe Volume[cm3]:%-13s%s", StringPool.SPACE, StringPool.SPACE, String.valueOf(information.getS_volume_of_Xe())));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#ACQUISITION INFORMATION");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sAcquisition Start:%-10s%s", StringPool.SPACE, StringPool.SPACE, DateUtils.formatDate(information.getAcquisition_start(), "yyyy/MM/dd HH:mm:ss")));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sAcq Real Time(s):%-11s%s", StringPool.SPACE, StringPool.SPACE, String.valueOf(information.getAcquisition_real_sec())));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sAcq Live Time:%-14s%s", StringPool.SPACE, StringPool.SPACE, String.valueOf(information.getAcquisition_live_sec())));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#SOFTWARE");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sversion:%-20s%s", StringPool.SPACE, StringPool.SPACE, "1.0.1"));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#SAMPLE Old CALIBRATION");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sOld Beta%-43sOld Gamma%-42s", StringPool.SPACE, StringPool.SPACE, StringPool.SPACE));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
//拼接历史计算公式 CH
|
||||
String oldBetaSampleCHStr = rowFormat("%sCH(x) = (%s)+(%s)*x+(%s)x*x", StringPool.SPACE, NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(0)),
|
||||
NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(2)));
|
||||
String oldGammaSampleCHStr = rowFormat("CH(x) = (%s)+(%s)*x+(%s)x*x%-24s", NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(1)),
|
||||
NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(2)), StringPool.SPACE);
|
||||
strBuffer.append(rowFormat("%s%-"+(52-oldBetaSampleCHStr.length())+"s%s", oldBetaSampleCHStr, StringPool.SPACE, oldGammaSampleCHStr));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
//拼接历史计算公式 E
|
||||
String oldBetaSampleEStr = rowFormat("%sE(x) = (%s)+(%s)*x+(%s)x*x", StringPool.SPACE, NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(0)),
|
||||
NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(2)));
|
||||
String oldGammaSampleEStr = rowFormat("E(x) = (%s)+(%s)*x+(%s)x*x%-24s", NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(1)),
|
||||
NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(2)), StringPool.SPACE);
|
||||
strBuffer.append(rowFormat("%s%-"+(52-oldBetaSampleEStr.length())+"s%s", oldBetaSampleEStr, StringPool.SPACE, oldGammaSampleEStr));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#SAMPLE New CALIBRATION");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sNew Beta%-43sNew Gamma%-42s", StringPool.SPACE, StringPool.SPACE, StringPool.SPACE));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
//拼接新计算公式 CH
|
||||
String newBetaSampleCHStr = rowFormat("%sCH(x) = (%s)+(%s)*x+(%s)x*x", StringPool.SPACE,
|
||||
(Objects.isNull(betaCalibrationParamES.getCoeff1())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(0)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamES.getCoeff1()))),
|
||||
(Objects.isNull(betaCalibrationParamES.getCoeff2())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(1)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamES.getCoeff2()))),
|
||||
(Objects.isNull(betaCalibrationParamES.getCoeff3())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(2)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamES.getCoeff3()))));
|
||||
String newGammaSampleCHStr = rowFormat("CH(x) = (%s)+(%s)*x+(%s)x*x%-24s", (Objects.isNull(gammaCalibrationParamES.getCoeff1())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(0)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamES.getCoeff1()))),
|
||||
(Objects.isNull(gammaCalibrationParamES.getCoeff2())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(1)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamES.getCoeff2()))),
|
||||
(Objects.isNull(gammaCalibrationParamES.getCoeff3())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(2)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamES.getCoeff3()))),
|
||||
StringPool.SPACE);
|
||||
strBuffer.append(rowFormat("%s%-"+(52-newBetaSampleCHStr.length())+"s%s", newBetaSampleCHStr, StringPool.SPACE, newGammaSampleCHStr));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
//拼接新计算公式 E
|
||||
String newBetaSampleEStr = rowFormat("%sE(x) = (%s)+(%s)*x+(%s)x*x", StringPool.SPACE,
|
||||
(Objects.isNull(betaCalibrationParamS.getCoeff1())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(0)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamS.getCoeff1()))),
|
||||
(Objects.isNull(betaCalibrationParamS.getCoeff2())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(1)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamS.getCoeff2()))),
|
||||
(Objects.isNull(betaCalibrationParamS.getCoeff3())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(2)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamS.getCoeff3()))));
|
||||
String newGammaSampleEStr = rowFormat("E(x) = (%s)+(%s)*x+(%s)x*x%-24s", (Objects.isNull(gammaCalibrationParamS.getCoeff1())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(0)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamS.getCoeff1()))),
|
||||
(Objects.isNull(gammaCalibrationParamS.getCoeff2())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(1)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamS.getCoeff2()))),
|
||||
(Objects.isNull(gammaCalibrationParamS.getCoeff3())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(2)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamS.getCoeff3()))),
|
||||
StringPool.SPACE);
|
||||
strBuffer.append(rowFormat("%s%-"+(52-newBetaSampleEStr.length())+"s%s", newBetaSampleEStr, StringPool.SPACE, newGammaSampleEStr));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#SAMPLE: LIMITS PER ROI");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
String limitRoi = "%s%-15s%-15s%-15s";
|
||||
strBuffer.append(rowFormat(limitRoi, StringPool.SPACE, "Roi", "Beta", "Gamma"));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
if (CollectionUtils.isNotEmpty(roiChannelsSpectrumsSample)) {
|
||||
for (GardsROIChannelsSpectrum channelsSpectrum:roiChannelsSpectrumsSample) {
|
||||
strBuffer.append(rowFormat(limitRoi, StringPool.SPACE, String.valueOf(channelsSpectrum.getRoi()), channelsSpectrum.getBChanStart()+" to "+channelsSpectrum.getBChanStop(), channelsSpectrum.getGChanStart()+" to "+channelsSpectrum.getGChanStop()));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
}
|
||||
}
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#DET Old CALIBRATION");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sOld Beta%-43sOld Gamma%-42s", StringPool.SPACE, StringPool.SPACE, StringPool.SPACE));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
//拼接历史计算公式 CH
|
||||
String oldBetaDetCHStr = rowFormat("%sCH(x) = (%s)+(%s)*x+(%s)x*x", StringPool.SPACE, NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(0)),
|
||||
NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(2)));
|
||||
String oldGammaDetCHStr = rowFormat("CH(x) = (%s)+(%s)*x+(%s)x*x%-24s", NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(0)),
|
||||
NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(2)),
|
||||
StringPool.SPACE);
|
||||
strBuffer.append(rowFormat("%s%-"+(52-oldBetaDetCHStr.length())+"s%s", oldBetaDetCHStr, StringPool.SPACE, oldGammaDetCHStr));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
//拼接历史计算公式 E
|
||||
String oldBetaDetEStr = rowFormat("%sE(x) = (%s)+(%s)*x+(%s)x*x", StringPool.SPACE, NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(0)),
|
||||
NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(2)));
|
||||
String oldGammaDetEStr = rowFormat("E(x) = (%s)+(%s)*x+(%s)x*x%-24s", NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(0)),
|
||||
NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(2)),
|
||||
StringPool.SPACE);
|
||||
strBuffer.append(rowFormat("%s%-"+(52-oldBetaDetEStr.length())+"s%s", oldBetaDetEStr, StringPool.SPACE, oldGammaDetEStr));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#DET New CALIBRATION");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sNew Beta%-43sNew Gamma%-42s", StringPool.SPACE, StringPool.SPACE, StringPool.SPACE));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
//拼接新计算公式 CH
|
||||
String newBetaDetCHStr = rowFormat("%sCH(x) = (%s)+(%s)*x+(%s)x*x", StringPool.SPACE,
|
||||
(Objects.isNull(betaCalibrationParamED.getCoeff1())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(0)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamED.getCoeff1()))),
|
||||
(Objects.isNull(betaCalibrationParamED.getCoeff2())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(1)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamED.getCoeff2()))),
|
||||
(Objects.isNull(betaCalibrationParamED.getCoeff3())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(2)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamED.getCoeff3()))));
|
||||
String newGammaDetCHStr = rowFormat("CH(x) = (%s)+(%s)*x+(%s)x*x%-24s", (Objects.isNull(gammaCalibrationParamED.getCoeff1())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(0)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamED.getCoeff1()))),
|
||||
(Objects.isNull(gammaCalibrationParamED.getCoeff2())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(1)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamED.getCoeff2()))),
|
||||
(Objects.isNull(gammaCalibrationParamED.getCoeff3())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(2)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamED.getCoeff3()))),
|
||||
StringPool.SPACE);
|
||||
strBuffer.append(rowFormat("%s%-"+(52-newBetaDetCHStr.length())+"s%s", newBetaDetCHStr, StringPool.SPACE, newGammaDetCHStr));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
//拼接新计算公式 E
|
||||
String newBetaDetEStr = rowFormat("%sE(x) = (%s)+(%s)*x+(%s)x*x", StringPool.SPACE,
|
||||
(Objects.isNull(betaCalibrationParamD.getCoeff1())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(0)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamD.getCoeff1()))),
|
||||
(Objects.isNull(betaCalibrationParamD.getCoeff2())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(1)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamD.getCoeff2()))),
|
||||
(Objects.isNull(betaCalibrationParamD.getCoeff3())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(2)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamD.getCoeff3()))));
|
||||
String newGammaDetEStr = rowFormat("E(x) = (%s)+(%s)*x+(%s)x*x%-24s", (Objects.isNull(gammaCalibrationParamD.getCoeff1())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(0)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamD.getCoeff1()))),
|
||||
(Objects.isNull(gammaCalibrationParamD.getCoeff2())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(1)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamD.getCoeff2()))),
|
||||
(Objects.isNull(gammaCalibrationParamD.getCoeff3())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(2)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamD.getCoeff3()))),
|
||||
StringPool.SPACE);
|
||||
strBuffer.append(rowFormat("%s%-"+(52-newBetaDetEStr.length())+"s%s", newBetaDetEStr, StringPool.SPACE, newGammaDetEStr));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#DET: LIMITS PER ROI");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat(limitRoi, StringPool.SPACE, "Roi", "Beta", "Gamma"));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
if (CollectionUtils.isNotEmpty(roiChannelsSpectrumsDet)) {
|
||||
for (GardsROIChannelsSpectrum channelsSpectrum:roiChannelsSpectrumsDet) {
|
||||
strBuffer.append(rowFormat(limitRoi, StringPool.SPACE, String.valueOf(channelsSpectrum.getRoi()), channelsSpectrum.getBChanStart()+" to "+channelsSpectrum.getBChanStop(), channelsSpectrum.getGChanStart()+" to "+channelsSpectrum.getGChanStop()));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
}
|
||||
}
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#GAS Old CALIBRATION");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sOld Beta%-43sOld Gamma%-42s", StringPool.SPACE, StringPool.SPACE, StringPool.SPACE));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
//拼接历史计算公式 CH
|
||||
String oldBetaGasCHStr = rowFormat("%sCH(x) = (%s)+(%s)*x+(%s)x*x", StringPool.SPACE, NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(0)),
|
||||
NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(2)));
|
||||
String oldGammaGasCHStr = rowFormat("CH(x) = (%s)+(%s)*x+(%s)x*x%-24s", NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(0)),
|
||||
NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(2)),
|
||||
StringPool.SPACE);
|
||||
strBuffer.append(rowFormat("%s%-"+(52-oldBetaGasCHStr.length())+"s%s", oldBetaGasCHStr, StringPool.SPACE, oldGammaGasCHStr));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
String oldBetaGasEStr = rowFormat("%sE(x) = (%s)+(%s)*x+(%s)x*x", StringPool.SPACE, NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(0)),
|
||||
NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(2)));
|
||||
String oldGammaGasEStr = rowFormat("E(x) = (%s)+(%s)*x+(%s)x*x%-24s", NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(0)),
|
||||
NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(2)),
|
||||
StringPool.SPACE);
|
||||
strBuffer.append(rowFormat("%s%-"+(52-oldBetaGasEStr.length())+"s%s", oldBetaGasEStr, StringPool.SPACE, oldGammaGasEStr));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#GAS New CALIBRATION");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat("%sNew Beta%-43sNew Gamma%-42s", StringPool.SPACE, StringPool.SPACE, StringPool.SPACE));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
//拼接新计算公式 CH
|
||||
String newBetaGasCHStr = rowFormat("%sCH(x) = (%s)+(%s)*x+(%s)x*x", StringPool.SPACE,
|
||||
(Objects.isNull(betaCalibrationParamEG.getCoeff1())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(0)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamEG.getCoeff1()))),
|
||||
(Objects.isNull(betaCalibrationParamEG.getCoeff2())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(1)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamEG.getCoeff2()))),
|
||||
(Objects.isNull(betaCalibrationParamEG.getCoeff3())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(2)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamEG.getCoeff3()))));
|
||||
String newGammaGasCHStr = rowFormat("CH(x) = (%s)+(%s)*x+(%s)x*x%-24s", (Objects.isNull(gammaCalibrationParamEG.getCoeff1())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(0)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamEG.getCoeff1()))),
|
||||
(Objects.isNull(gammaCalibrationParamEG.getCoeff2())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(1)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamEG.getCoeff2()))),
|
||||
(Objects.isNull(gammaCalibrationParamEG.getCoeff3())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(2)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamEG.getCoeff3()))),
|
||||
StringPool.SPACE);
|
||||
strBuffer.append(rowFormat("%s%-"+(52-newBetaGasCHStr.length())+"s%s", newBetaGasCHStr, StringPool.SPACE, newGammaGasCHStr));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
//拼接新计算公式 E
|
||||
String newBetaGasEStr = rowFormat("%sE(x) = (%s)+(%s)*x+(%s)x*x", StringPool.SPACE,
|
||||
(Objects.isNull(betaCalibrationParamG.getCoeff1())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(0)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamG.getCoeff1()))),
|
||||
(Objects.isNull(betaCalibrationParamG.getCoeff2())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(1)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamG.getCoeff2()))),
|
||||
(Objects.isNull(betaCalibrationParamG.getCoeff3())?NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(2)):NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamG.getCoeff3()))));
|
||||
String newGammaGasEStr = rowFormat("E(x) = (%s)+(%s)*x+(%s)x*x%-24s", (Objects.isNull(gammaCalibrationParamG.getCoeff1())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(0)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamG.getCoeff1()))),
|
||||
(Objects.isNull(gammaCalibrationParamG.getCoeff2())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(1)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamG.getCoeff2()))),
|
||||
(Objects.isNull(gammaCalibrationParamG.getCoeff3())?NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(2)):NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamG.getCoeff3()))),
|
||||
StringPool.SPACE);
|
||||
strBuffer.append(rowFormat("%s%-"+(52-newBetaGasEStr.length())+"s%s", newBetaGasEStr, StringPool.SPACE, newGammaGasEStr));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#GAS: LIMITS PER ROI");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append(rowFormat(limitRoi, StringPool.SPACE, "Roi", "Beta", "Gamma"));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
if (CollectionUtils.isNotEmpty(roiChannelsSpectrumsGas)) {
|
||||
for (GardsROIChannelsSpectrum channelsSpectrum:roiChannelsSpectrumsGas) {
|
||||
strBuffer.append(rowFormat(limitRoi, StringPool.SPACE, String.valueOf(channelsSpectrum.getRoi()), channelsSpectrum.getBChanStart()+" to "+channelsSpectrum.getBChanStop(), channelsSpectrum.getGChanStart()+" to "+channelsSpectrum.getGChanStop()));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
}
|
||||
}
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#GROSS COUNTS PER ROI");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
String grossRoi = "%s%-15s%-15s%-15s%-15s";
|
||||
strBuffer.append(rowFormat(grossRoi, StringPool.SPACE, "Roi", "Sample", "GasBkgnd", "DetBkgnd"));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
if (CollectionUtils.isNotEmpty(resultsSpectrums)) {
|
||||
for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums) {
|
||||
strBuffer.append(rowFormat(grossRoi, StringPool.SPACE, String.valueOf(resultsSpectrum.getRoi()), String.valueOf(resultsSpectrum.getSGross()), String.valueOf(resultsSpectrum.getGGross()), String.valueOf(resultsSpectrum.getBGross())));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
}
|
||||
}
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#NET COUNTS AND LC PER ROI");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
String netRoi = "%s%-15s%-25s%-15s";
|
||||
if (betaDataFile.isBProcessed()) {
|
||||
if (CollectionUtils.isNotEmpty(resultsSpectrums)) {
|
||||
if (Objects.isNull(resultsSpectrums.get(0).getLcCts())) {
|
||||
strBuffer.append(rowFormat(netRoi, StringPool.SPACE, "Roi", "Net count", StringPool.SPACE));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
if (CollectionUtils.isNotEmpty(resultsSpectrums)) {
|
||||
for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){
|
||||
strBuffer.append(rowFormat(netRoi, StringPool.SPACE, String.valueOf(resultsSpectrum.getRoi()), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNet()))+" +/- "+NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNetErr())), StringPool.SPACE));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
strBuffer.append(rowFormat(netRoi, StringPool.SPACE, "Roi", "Net count", "LC"));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
if (CollectionUtils.isNotEmpty(resultsSpectrums)) {
|
||||
for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){
|
||||
strBuffer.append(rowFormat(netRoi, StringPool.SPACE, String.valueOf(resultsSpectrum.getRoi()), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNet()))+" +/- "+NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNetErr())), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getLcCts()))));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
strBuffer.append(rowFormat(netRoi, StringPool.SPACE, "Roi", "Net count", "LC"));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
}
|
||||
} else {
|
||||
if (CollectionUtils.isNotEmpty(resultsSpectrums)) {
|
||||
if (Objects.isNull(resultsSpectrums.get(0).getLcCts())) {
|
||||
strBuffer.append(rowFormat(netRoi, StringPool.SPACE, "Roi", "Net count", StringPool.SPACE));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
if (CollectionUtils.isNotEmpty(resultsSpectrums)) {
|
||||
for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){
|
||||
strBuffer.append(rowFormat(netRoi, StringPool.SPACE, String.valueOf(resultsSpectrum.getRoi()), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNet()))+" +/- "+NumberFormatUtil.numberSixLen(String.valueOf(Math.sqrt(resultsSpectrum.getNetErr()))), StringPool.SPACE));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
strBuffer.append(rowFormat(netRoi, StringPool.SPACE, "Roi", "Net count", "LC"));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
if (CollectionUtils.isNotEmpty(resultsSpectrums)) {
|
||||
for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){
|
||||
strBuffer.append(rowFormat(netRoi, StringPool.SPACE, String.valueOf(resultsSpectrum.getRoi()), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNet()))+" +/- "+NumberFormatUtil.numberSixLen(String.valueOf(Math.sqrt(resultsSpectrum.getNetErr()))), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getLcCts()))));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
strBuffer.append(rowFormat(netRoi, StringPool.SPACE, "Roi", "Net count", "LC"));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
}
|
||||
}
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#CONCENTRATION AND LC PER ROI");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
String conLcRoi = "%s%-15s%-25s%-15s%-15s";
|
||||
strBuffer.append(rowFormat(conLcRoi, StringPool.SPACE, "Roi", "Conc(mBq/m3)", "LC(mBq/m3)", "MDC(mBq/m3):"));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
if (betaDataFile.isBProcessed()) {
|
||||
if (CollectionUtils.isNotEmpty(resultsSpectrums)) {
|
||||
for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){
|
||||
strBuffer.append(rowFormat(conLcRoi, StringPool.SPACE, String.valueOf(resultsSpectrum.getRoi()), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getConc()))+" +/- "+NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getConcErr())), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getLc())), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getMdc()))));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (CollectionUtils.isNotEmpty(resultsSpectrums)) {
|
||||
for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){
|
||||
strBuffer.append(rowFormat(conLcRoi, StringPool.SPACE, String.valueOf(resultsSpectrum.getRoi()), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getConcErr()))+" +/- "+NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getConcErr())), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getLc())), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getMdc()))));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
}
|
||||
}
|
||||
}
|
||||
strBuffer.append(System.lineSeparator());
|
||||
strBuffer.append("#RESULT SUMMARY");
|
||||
strBuffer.append(System.lineSeparator());
|
||||
String resultSum = "%s%-15s%-25s%-15s%-15s%-15s";
|
||||
strBuffer.append(rowFormat(resultSum, StringPool.SPACE, "Nuclide Name", "Conc", "LC", "MDC", "NID Flag"));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
if (CollectionUtils.isNotEmpty(xeResultsSpectrums)) {
|
||||
for (GardsXeResultsSpectrum xeResultsSpectrum:xeResultsSpectrums) {
|
||||
strBuffer.append(rowFormat(resultSum, StringPool.SPACE, xeResultsSpectrum.getNuclideName(), NumberFormatUtil.numberSixLen(String.valueOf(xeResultsSpectrum.getConc()))+" +/- "+NumberFormatUtil.numberSixLen(String.valueOf(xeResultsSpectrum.getConcErr())), NumberFormatUtil.numberSixLen(String.valueOf(xeResultsSpectrum.getLc())), NumberFormatUtil.numberSixLen(String.valueOf(xeResultsSpectrum.getMdc())), String.valueOf(xeResultsSpectrum.getNidFlag())));
|
||||
strBuffer.append(System.lineSeparator());
|
||||
}
|
||||
}
|
||||
strBuffer.append(System.lineSeparator());
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return strBuffer.toString();
|
||||
}
|
||||
|
||||
public List<GardsXeResultsView> viewXeData(List<GardsXeResultsSpectrum> xeResultsSpectrumList) {
|
||||
List<GardsXeResultsView> xeResultsViewList = new LinkedList<>();
|
||||
if (CollectionUtils.isNotEmpty(xeResultsSpectrumList)) {
|
||||
|
@ -2004,4 +2410,6 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
return xeResultsViewList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
TOTALCOUNTS = #{analyses.totalCounts},
|
||||
BASELINE_PATH = #{analyses.baselinePath},
|
||||
LC_PATH = #{analyses.lcPath},
|
||||
SCAC_PATH = #{analyses.scacPath}
|
||||
SCAC_PATH = #{analyses.scacPath},
|
||||
LOG_PATH = #{analyses.logPath},
|
||||
REPORT_PAHT = #{analyses.reportPath}
|
||||
WHERE
|
||||
IDANALYSIS = #{analyses.idAnalysis}
|
||||
</update>
|
||||
|
|
|
@ -900,7 +900,9 @@
|
|||
USEDGASPHD=#{gardsAnalyses.usedgasphd},
|
||||
USEDDETPHD=#{gardsAnalyses.useddetphd},
|
||||
USEDGASPHD_ID=#{gardsAnalyses.usedgasphdId},
|
||||
USEDDETPHD_ID=#{gardsAnalyses.useddetphdId}
|
||||
USEDDETPHD_ID=#{gardsAnalyses.useddetphdId},
|
||||
LOG_PATH = #{gardsAnalyses.logPath},
|
||||
REPORT_PAHT = #{gardsAnalyses.reportPath}
|
||||
WHERE
|
||||
SAMPLE_ID=#{gardsAnalyses.sampleId}
|
||||
AND ANALYST=#{gardsAnalyses.analyst}
|
||||
|
@ -921,7 +923,9 @@
|
|||
USEDGASPHD,
|
||||
USEDDETPHD,
|
||||
USEDGASPHD_ID,
|
||||
USEDDETPHD_ID)
|
||||
USEDDETPHD_ID,
|
||||
LOG_PATH,
|
||||
REPORT_PAHT)
|
||||
VALUES(#{gardsAnalyses.sampleId},
|
||||
to_date(#{gardsAnalyses.analysisBeginStr},'YYYY-MM-DD hh24:mi:ss'),
|
||||
to_date(#{gardsAnalyses.analysisEndStr},'YYYY-MM-DD hh24:mi:ss'),
|
||||
|
@ -934,7 +938,9 @@
|
|||
#{gardsAnalyses.usedgasphd},
|
||||
#{gardsAnalyses.useddetphd},
|
||||
#{gardsAnalyses.usedgasphdId},
|
||||
#{gardsAnalyses.useddetphdId})
|
||||
#{gardsAnalyses.useddetphdId},
|
||||
#{gardsAnalyses.logPath},
|
||||
#{gardsAnalyses.reportPath})
|
||||
</insert>
|
||||
|
||||
<delete id="deleteCalibrationPairs">
|
||||
|
|
|
@ -3,6 +3,7 @@ package org.jeecg.modules.service.impl;
|
|||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.ReUtil;
|
||||
|
@ -27,6 +28,7 @@ import org.jeecg.common.constant.DateConstant;
|
|||
import org.jeecg.common.constant.RedisConstant;
|
||||
import org.jeecg.common.properties.ParameterProperties;
|
||||
import org.jeecg.common.properties.SpectrumPathProperties;
|
||||
import org.jeecg.common.properties.TaskProperties;
|
||||
import org.jeecg.common.system.util.JwtUtil;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.*;
|
||||
|
@ -187,6 +189,8 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
// 从数据库中读取phd其他相关信息
|
||||
boolean bRet = getResultFromDB(dbName, analyst, sampleId, phd, result);
|
||||
if (!redisUtil.hasKey(userName+StringPool.DASH+phd.getHeader().getSystem_type()) || !redisUtil.hasKey(userName+StringPool.DASH+phd.getHeader().getSystem_type()+"-list")) {
|
||||
//读取缓存的全部核素信息
|
||||
Map<String, NuclideLines> allNuclideMap = (Map<String, NuclideLines>) redisUtil.get("AllNuclideMap");
|
||||
// 查询当前用户关联的核素信息
|
||||
List<String> userLib = new LinkedList<>();
|
||||
// 从postgreSql中获取当前用户关注的核素信息 如果当前用户没有 则返回管理员的
|
||||
|
@ -195,7 +199,12 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
userLib = defaultNuclideSpectrumService.findNuclidesByUserName("admin", phd.getHeader().getSystem_type().toUpperCase());
|
||||
}
|
||||
userLib = userLib.stream().sorted().collect(Collectors.toList());
|
||||
Map<String, NuclideLines> nuclideMap = GetNuclideLines(userLib);
|
||||
Map<String, NuclideLines> nuclideMap = new HashMap<>();
|
||||
for (Map.Entry<String, NuclideLines> entry:allNuclideMap.entrySet()) {
|
||||
if (userLib.contains(entry.getKey())) {
|
||||
nuclideMap.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
redisUtil.set(userName+StringPool.DASH+phd.getHeader().getSystem_type()+"-list", userLib);
|
||||
redisUtil.set(userName+StringPool.DASH+phd.getHeader().getSystem_type(), nuclideMap);
|
||||
}
|
||||
|
@ -205,8 +214,23 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
}
|
||||
//读取redis缓存的计算mdc信息
|
||||
Map<String, CalMDCInfo> mdcInfoMap = (Map<String, CalMDCInfo>) redisUtil.get("mdcInfoMap-"+phd.getHeader().getSystem_type());
|
||||
if (CollectionUtils.isNotEmpty(mdcInfoMap)) {
|
||||
phd.setMdcInfoMap(mdcInfoMap);
|
||||
//如果是数据库加载 判断如果mdc计算结果是空的 就加入新的 否则使用数据库加载的mdc数据
|
||||
if (CollectionUtils.isEmpty(phd.getMdcInfoMap())) {
|
||||
if (CollectionUtils.isNotEmpty(mdcInfoMap)) {
|
||||
phd.setMdcInfoMap(mdcInfoMap);
|
||||
}
|
||||
} else {
|
||||
if (CollectionUtils.isNotEmpty(mdcInfoMap)) {
|
||||
Map<String, CalMDCInfo> infoMap = phd.getMdcInfoMap();
|
||||
for (Map.Entry<String, CalMDCInfo> entry:infoMap.entrySet()) {
|
||||
String nuclName = entry.getKey();
|
||||
CalMDCInfo info = mdcInfoMap.get(nuclName);
|
||||
if (Objects.nonNull(info)) {
|
||||
CalMDCInfo mdcInfo = entry.getValue();
|
||||
mdcInfo.setHalflife(info.getHalflife());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
gammaFileUtil.Qcstate(phd);
|
||||
key = fileName + StringPool.DASH + userName;
|
||||
|
@ -219,6 +243,8 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
return result;
|
||||
}
|
||||
if (!redisUtil.hasKey(userName+StringPool.DASH+phd.getHeader().getSystem_type()) || !redisUtil.hasKey(userName+StringPool.DASH+phd.getHeader().getSystem_type()+"-list")) {
|
||||
//读取缓存的全部核素信息
|
||||
Map<String, NuclideLines> allNuclideMap = (Map<String, NuclideLines>) redisUtil.get("AllNuclideMap");
|
||||
// 查询当前用户关联的核素信息
|
||||
List<String> userLib = new LinkedList<>();
|
||||
// 从postgreSql中获取当前用户关注的核素信息 如果当前用户没有 则返回管理员的
|
||||
|
@ -227,7 +253,12 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
userLib = defaultNuclideSpectrumService.findNuclidesByUserName("admin", phd.getHeader().getSystem_type().toUpperCase());
|
||||
}
|
||||
userLib = userLib.stream().sorted().collect(Collectors.toList());
|
||||
Map<String, NuclideLines> nuclideMap = GetNuclideLinesLocal(userLib);
|
||||
Map<String, NuclideLines> nuclideMap = new HashMap<>();
|
||||
for (Map.Entry<String, NuclideLines> entry:allNuclideMap.entrySet()) {
|
||||
if (userLib.contains(entry.getKey())) {
|
||||
nuclideMap.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
redisUtil.set(userName+StringPool.DASH+phd.getHeader().getSystem_type()+"-list", userLib);
|
||||
redisUtil.set(userName+StringPool.DASH+phd.getHeader().getSystem_type(), nuclideMap);
|
||||
}
|
||||
|
@ -497,6 +528,8 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
// 从数据库中读取phd其他相关信息
|
||||
boolean bRet = getResultFromDB(dbName, analyst, sampleId, phd, result);
|
||||
if (!redisUtil.hasKey(userName+StringPool.DASH+phd.getHeader().getSystem_type()) || !redisUtil.hasKey(userName+StringPool.DASH+phd.getHeader().getSystem_type()+"-list")) {
|
||||
//读取缓存的全部核素信息
|
||||
Map<String, NuclideLines> allNuclideMap = (Map<String, NuclideLines>) redisUtil.get("AllNuclideMap");
|
||||
// 查询当前用户关联的核素信息
|
||||
List<String> userLib = new LinkedList<>();
|
||||
// 从postgreSql中获取当前用户关注的核素信息 如果当前用户没有 则返回管理员的
|
||||
|
@ -505,7 +538,12 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
userLib = defaultNuclideSpectrumService.findNuclidesByUserName("admin", phd.getHeader().getSystem_type().toUpperCase());
|
||||
}
|
||||
userLib = userLib.stream().sorted().collect(Collectors.toList());
|
||||
Map<String, NuclideLines> nuclideMap = GetNuclideLines(userLib);
|
||||
Map<String, NuclideLines> nuclideMap = new HashMap<>();
|
||||
for (Map.Entry<String, NuclideLines> entry:allNuclideMap.entrySet()) {
|
||||
if (userLib.contains(entry.getKey())) {
|
||||
nuclideMap.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
redisUtil.set(userName+StringPool.DASH+phd.getHeader().getSystem_type()+"-list", userLib);
|
||||
redisUtil.set(userName+StringPool.DASH+phd.getHeader().getSystem_type(), nuclideMap);
|
||||
}
|
||||
|
@ -515,8 +553,23 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
}
|
||||
//读取redis缓存的计算mdc信息
|
||||
Map<String, CalMDCInfo> mdcInfoMap = (Map<String, CalMDCInfo>) redisUtil.get("mdcInfoMap-"+phd.getHeader().getSystem_type());
|
||||
if (CollectionUtils.isNotEmpty(mdcInfoMap)) {
|
||||
phd.setMdcInfoMap(mdcInfoMap);
|
||||
//如果是数据库加载 判断如果mdc计算结果是空的 就加入新的 否则使用数据库加载的mdc数据
|
||||
if (CollectionUtils.isEmpty(phd.getMdcInfoMap())) {
|
||||
if (CollectionUtils.isNotEmpty(mdcInfoMap)) {
|
||||
phd.setMdcInfoMap(mdcInfoMap);
|
||||
}
|
||||
} else {
|
||||
if (CollectionUtils.isNotEmpty(mdcInfoMap)) {
|
||||
Map<String, CalMDCInfo> infoMap = phd.getMdcInfoMap();
|
||||
for (Map.Entry<String, CalMDCInfo> entry:infoMap.entrySet()) {
|
||||
String nuclName = entry.getKey();
|
||||
CalMDCInfo info = mdcInfoMap.get(nuclName);
|
||||
if (Objects.nonNull(info)) {
|
||||
CalMDCInfo mdcInfo = entry.getValue();
|
||||
mdcInfo.setHalflife(info.getHalflife());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 获取当前角色配置的颜色信息
|
||||
|
@ -879,6 +932,8 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
return result;
|
||||
}
|
||||
if (!redisUtil.hasKey(userName+StringPool.DASH+phd.getHeader().getSystem_type()) || !redisUtil.hasKey(userName+StringPool.DASH+phd.getHeader().getSystem_type()+"-list")) {
|
||||
//读取缓存的全部核素信息
|
||||
Map<String, NuclideLines> allNuclideMap = (Map<String, NuclideLines>) redisUtil.get("AllNuclideMap");
|
||||
// 查询当前用户关联的核素信息
|
||||
List<String> userLib = new LinkedList<>();
|
||||
// 从postgreSql中获取当前用户关注的核素信息 如果当前用户没有 则返回管理员的
|
||||
|
@ -887,7 +942,12 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
userLib = defaultNuclideSpectrumService.findNuclidesByUserName("admin", phd.getHeader().getSystem_type().toUpperCase());
|
||||
}
|
||||
userLib = userLib.stream().sorted().collect(Collectors.toList());
|
||||
Map<String, NuclideLines> nuclideMap = GetNuclideLinesLocal(userLib);
|
||||
Map<String, NuclideLines> nuclideMap = new HashMap<>();
|
||||
for (Map.Entry<String, NuclideLines> entry:allNuclideMap.entrySet()) {
|
||||
if (userLib.contains(entry.getKey())) {
|
||||
nuclideMap.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
redisUtil.set(userName+StringPool.DASH+phd.getHeader().getSystem_type()+"-list", userLib);
|
||||
redisUtil.set(userName+StringPool.DASH+phd.getHeader().getSystem_type(), nuclideMap);
|
||||
}
|
||||
|
@ -1317,85 +1377,6 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
return result;
|
||||
}
|
||||
|
||||
public Map<String, NuclideLines> GetNuclideLines(List<String> nuclideList) {
|
||||
Map<String, NuclideLines> mapLines = new HashMap<>();
|
||||
if (nuclideList.size() < 1) {
|
||||
return mapLines;
|
||||
}
|
||||
for (String name : nuclideList) {
|
||||
NuclideLines nlines = new NuclideLines();
|
||||
List<NuclideLine> nuclideLineList = spectrumAnalysisMapper.getNuclideLines(name);
|
||||
for (int j = 0; j < nuclideLineList.size(); j++) {
|
||||
nlines.getFullNames().add(nuclideLineList.get(j).getFullName());
|
||||
nlines.getVenergy().add(nuclideLineList.get(j).getEnergy());
|
||||
nlines.getVuncertE().add(nuclideLineList.get(j).getEnergyUncert());
|
||||
nlines.getVyield().add(nuclideLineList.get(j).getYield() / 100);
|
||||
nlines.getVuncertY().add(nuclideLineList.get(j).getYieldUncert());
|
||||
if (Objects.nonNull(nuclideLineList.get(j).getKeyFlag()) && nuclideLineList.get(j).getKeyFlag().intValue() > 0) {
|
||||
nlines.key_flag = j;
|
||||
nlines.maxYeildIdx = j;
|
||||
}
|
||||
}
|
||||
mapLines.put(name, nlines);
|
||||
}
|
||||
List<HalfData> halfs = spectrumAnalysisMapper.getHalf(nuclideList);
|
||||
for (int m = 0; m < halfs.size(); m++) {
|
||||
NuclideLines nuclideLines = mapLines.get(halfs.get(m).getName());
|
||||
nuclideLines.setHalflife(halfs.get(m).getHalf() == null ? 0 : halfs.get(m).getHalf() * 86400);// 将天转换成秒
|
||||
mapLines.put(halfs.get(m).getName(), nuclideLines);
|
||||
}
|
||||
return mapLines;
|
||||
}
|
||||
|
||||
public Map<String, NuclideLines> GetNuclideLinesLocal(List<String> nuclideList) {
|
||||
Map<String, NuclideLines> mapLines = new HashMap<>();
|
||||
if (nuclideList.size() < 1) {
|
||||
return mapLines;
|
||||
}
|
||||
//需要查询的两个表的名称
|
||||
String table_lines = "lines";
|
||||
String table_lib = "libdata";
|
||||
// 建立数据库连接
|
||||
Connection conn = dbUtil.openDB();
|
||||
Statement statement = null;
|
||||
try {
|
||||
statement = conn.createStatement();
|
||||
for (String name : nuclideList) {
|
||||
NuclideLines nlines = new NuclideLines();
|
||||
//根据核素名称查询相关核素信息
|
||||
String sql1 = "select fullname, energy, energy_uncert, yield, yield_uncert, key_flag from "+table_lines+" where name = '"+name+"' Order by energy";
|
||||
ResultSet resultSet = statement.executeQuery(sql1);
|
||||
int j=0;
|
||||
while (resultSet.next()) {
|
||||
nlines.getFullNames().add(resultSet.getString("fullname"));
|
||||
nlines.getVenergy().add(resultSet.getDouble("energy"));
|
||||
nlines.getVuncertE().add(resultSet.getDouble("energy_uncert"));
|
||||
nlines.getVyield().add(resultSet.getDouble("yield") / 100);
|
||||
nlines.getVuncertY().add(resultSet.getDouble("yield_uncert"));
|
||||
if (Objects.nonNull(resultSet.getInt("key_flag")) && resultSet.getInt("key_flag") > 0) {
|
||||
nlines.key_flag = j;
|
||||
nlines.maxYeildIdx = j;
|
||||
}
|
||||
++j;
|
||||
}
|
||||
mapLines.put(name, nlines);
|
||||
}
|
||||
String names = "'" + String.join("','", nuclideList) + "'";
|
||||
String sql2 = "select name, halflife from "+table_lib+" where name in ("+names+")";
|
||||
ResultSet executeQuery = statement.executeQuery(sql2);
|
||||
while (executeQuery.next()) {
|
||||
NuclideLines nuclideLines = mapLines.get(executeQuery.getString("name"));
|
||||
nuclideLines.setHalflife(Double.valueOf(executeQuery.getDouble("halflife")) == null ? 0 : executeQuery.getDouble("halflife") * 86400);// 将天转换成秒
|
||||
mapLines.put(executeQuery.getString("name"), nuclideLines);
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
dbUtil.close(statement, conn);
|
||||
}
|
||||
return mapLines;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result InteractiveTool(Integer sampleId, String fileName, HttpServletRequest request) {
|
||||
Result result = new Result();
|
||||
|
@ -4149,6 +4130,8 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
boolean save = defaultNuclideSpectrumService.saveNuclidesByUserName(userLibraryName, userName, phd.getHeader().getSystem_type().toUpperCase());
|
||||
if (save) {
|
||||
result.success("Modified successfully!");
|
||||
// 重新计算峰值
|
||||
Map<String, NuclideLines> allNuclideMap = (Map<String, NuclideLines>) redisUtil.get("AllNuclideMap");
|
||||
// 查询当前用户关联的核素信息
|
||||
List<String> userLib = new LinkedList<>();
|
||||
// 从postgreSql中获取当前用户关注的核素信息 如果当前用户没有 则返回管理员的
|
||||
|
@ -4156,7 +4139,12 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
if (CollectionUtils.isEmpty(userLib)) {
|
||||
userLib = defaultNuclideSpectrumService.findNuclidesByUserName("admin", phd.getHeader().getSystem_type().toUpperCase());
|
||||
}
|
||||
Map<String, NuclideLines> nuclideMap = GetNuclideLines(userLib);
|
||||
Map<String, NuclideLines> nuclideMap = new HashMap<>();
|
||||
for (Map.Entry<String, NuclideLines> entry:allNuclideMap.entrySet()) {
|
||||
if (userLib.contains(entry.getKey())) {
|
||||
nuclideMap.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
redisUtil.set(userName+StringPool.DASH+phd.getHeader().getSystem_type()+"-list", userLib);
|
||||
redisUtil.set(userName+StringPool.DASH+phd.getHeader().getSystem_type(), nuclideMap);
|
||||
} else {
|
||||
|
@ -4977,7 +4965,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result saveToDB(String fileName, HttpServletRequest request) {
|
||||
Result result = new Result();
|
||||
String userName = JwtUtil.getUserNameByToken(request);
|
||||
|
@ -5088,6 +5076,39 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
mdcSpectrumService.saveMDCGamma(phd, idAnalysis);
|
||||
if (bRet) {
|
||||
phd.setStatus("R");
|
||||
//分析成功后存储日志文件和报告文件
|
||||
{
|
||||
String logPathName = middleData.analyses_absolute_LogPath.substring(0, middleData.analyses_absolute_LogPath.lastIndexOf(StringPool.SLASH));
|
||||
String logFileName = middleData.analyses_absolute_LogPath.substring(middleData.analyses_absolute_LogPath.lastIndexOf(StringPool.SLASH)+1);
|
||||
File logFile = new File(logFileName);
|
||||
try {
|
||||
FileUtil.writeString(gammaFileUtil.GetLogContent(middleData), logFile, "UTF-8");
|
||||
FileInputStream in = new FileInputStream(logFile);
|
||||
ftpUtil.saveFile(logPathName, logFileName, in);
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
if (Objects.nonNull(logFile)) {
|
||||
logFile.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
String rptPathName = middleData.analyses_absolute_ReportPath.substring(0, middleData.analyses_absolute_ReportPath.lastIndexOf(StringPool.SLASH));
|
||||
String rptFileName = middleData.analyses_absolute_ReportPath.substring(middleData.analyses_absolute_ReportPath.lastIndexOf(StringPool.SLASH)+1);
|
||||
File rptFile = new File(rptFileName);
|
||||
try {
|
||||
FileUtil.writeString(gammaFileUtil.GetReportContent(middleData), rptFile, "UTF-8");
|
||||
FileInputStream in = new FileInputStream(rptFile);
|
||||
ftpUtil.saveFile(rptPathName, rptFileName, in);
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
if (Objects.nonNull(rptFile)) {
|
||||
rptFile.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
List<String> paths = new LinkedList<>();
|
||||
paths.add(middleData.analyses_lc_filePath);
|
||||
paths.add(middleData.analyses_scac_filePath);
|
||||
|
|
|
@ -40,6 +40,8 @@ public class GardsAnalysesSpectrumServiceImpl extends ServiceImpl<GardsAnalysesM
|
|||
analyses.setBaselinePath(middleData.analyses_baseline_filePath);
|
||||
analyses.setLcPath(middleData.analyses_lc_filePath);
|
||||
analyses.setScacPath(middleData.analyses_scac_filePath);
|
||||
analyses.setLogPath(middleData.analyses_LogPath);
|
||||
analyses.setReportPath(middleData.analyses_ReportPath);
|
||||
int insert = this.baseMapper.insert(analyses);
|
||||
return insert;
|
||||
} catch (ParseException e) {
|
||||
|
@ -65,6 +67,8 @@ public class GardsAnalysesSpectrumServiceImpl extends ServiceImpl<GardsAnalysesM
|
|||
analyses.setBaselinePath(middleData.analyses_baseline_filePath);
|
||||
analyses.setLcPath(middleData.analyses_lc_filePath);
|
||||
analyses.setScacPath(middleData.analyses_scac_filePath);
|
||||
analyses.setLogPath(middleData.analyses_LogPath);
|
||||
analyses.setReportPath(middleData.analyses_ReportPath);
|
||||
this.baseMapper.updateEntity(analyses);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ public class GardsMDCSpectrumServiceImpl extends ServiceImpl<GardsMDCSpectrumMap
|
|||
mdc.setYield(mdcInfo.getYield());
|
||||
mdc.setEfficiency(mdcInfo.getEfficiency());
|
||||
if (Objects.nonNull(mdcInfo.getMdc()) && Double.isFinite(mdcInfo.getMdc())) {
|
||||
mdc.setMdc(mdcInfo.getMdc());
|
||||
mdc.setMdc(String.valueOf(mdcInfo.getMdc()));
|
||||
} else {
|
||||
mdc.setMdc(null);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package org.jeecg.modules.service.impl;
|
|||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.ReUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
@ -115,6 +116,8 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
private IGardsHistogramSpectrumService histogramService;
|
||||
@Autowired
|
||||
private RedisStreamUtil redisStreamUtil;
|
||||
@Autowired
|
||||
private NameStandUtil nameStandUtil;
|
||||
|
||||
|
||||
@Override
|
||||
|
@ -3771,7 +3774,7 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result saveToDB(BgDataAnlyseResultIn anlyseResultIn, HttpServletRequest request) {
|
||||
Result result = new Result();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
@ -3885,6 +3888,22 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
result.error500("sampleFile save failed");
|
||||
return result;
|
||||
}
|
||||
//获取日志,报告文件存放路径
|
||||
EnergySpectrumStruct sampleStruct = betaDataFile.getSampleStruct();
|
||||
String dataType = sampleStruct.data_type;
|
||||
String subDirSavePath = "";
|
||||
subDirSavePath+=nameStandUtil.GetSysTemSubdir(sampleStruct.system_type);
|
||||
subDirSavePath+=nameStandUtil.GetDateTypeSubdir(dataType);
|
||||
String path = nameStandUtil.SetFileDir(subDirSavePath, betaDataFile.getSampleFileName());
|
||||
Map<String, String> fileNameMap = nameStandUtil.NameStandard(dataType, sampleStruct.spectrum_quantity, sampleStruct.acquisition_live_time, betaDataFile.getSampleFileName(), sampleStruct.measurement_id);
|
||||
String logName = fileNameMap.get("log");
|
||||
String qsLogPath= path+StringPool.SLASH+userName+"_"+logName;
|
||||
qsLogPath = qsLogPath.replace(StringPool.BACK_SLASH, StringPool.SLASH);
|
||||
String rptName = fileNameMap.get("rpt");
|
||||
String qsReportPath="Arr"+StringPool.SLASH+path+StringPool.SLASH+userName+"_"+rptName;
|
||||
qsReportPath = qsReportPath.replace(StringPool.BACK_SLASH, StringPool.SLASH);
|
||||
String analyses_absolute_LogPath=spectrumPathProperties.getLogPath()+StringPool.SLASH+qsLogPath;
|
||||
String analyses_absolute_ReportPath=spectrumPathProperties.getSaveFilePath()+StringPool.SLASH+qsReportPath;
|
||||
//根据文件名称查询对应的sampleId--- sampleFile gasFile detFile
|
||||
sampleId = spectrumAnalysisMapper.getSampleId(sampleFilePathName);
|
||||
gasId = spectrumAnalysisMapper.getSampleId(gasFilePathName);
|
||||
|
@ -3904,6 +3923,8 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
gardsAnalyses.setUsedgasphdId(gasId);
|
||||
gardsAnalyses.setUseddetphdId(detId);
|
||||
gardsAnalyses.setAnalyst(anlyseResultIn.getUserName());
|
||||
gardsAnalyses.setLogPath(qsLogPath);
|
||||
gardsAnalyses.setReportPath(qsReportPath);
|
||||
if (Objects.nonNull(isExist)){
|
||||
spectrumAnalysisMapper.updateGardsAnalyses(gardsAnalyses);
|
||||
}else {//如果没有分析过就新增--GARDS_ANALYSES
|
||||
|
@ -4012,6 +4033,36 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
File qcTmp = new File(betaDataFile.getQcTmpPath());
|
||||
ftpUtil.saveFile(StringPool.SLASH + ftpUtil.getFtpRootPath() + spectrumPathProperties.getSaveFilePath() + StringPool.SLASH + qcFilePathName.substring(0, qcFilePathName.lastIndexOf(StringPool.SLASH)), anlyseResultIn.getQcFileName(), new FileInputStream(qcTmp));
|
||||
}
|
||||
//分析成功后存储日志文件和报告文件
|
||||
{
|
||||
String logPathName = analyses_absolute_LogPath.substring(0, analyses_absolute_LogPath.lastIndexOf(StringPool.SLASH));
|
||||
String logFileName = analyses_absolute_LogPath.substring(analyses_absolute_LogPath.lastIndexOf(StringPool.SLASH)+1);
|
||||
String logFilePath = parameterProperties.getLogFilePath() + File.separator + DateUtils.formatDate(new Date(), "yyyy-MM-dd") + File.separator + betaDataFile.getSampleFileName().replace("PHD", "log");
|
||||
File logFile = new File(logFilePath);
|
||||
try {
|
||||
FileInputStream in = new FileInputStream(logFile);
|
||||
ftpUtil.saveFile(logPathName, logFileName, in);
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
{
|
||||
String rptContent = phdFileUtil.OutPutRnRpt(betaDataFile);
|
||||
String rptPathName = analyses_absolute_ReportPath.substring(0, analyses_absolute_ReportPath.lastIndexOf(StringPool.SLASH));
|
||||
String rptFileName = analyses_absolute_ReportPath.substring(analyses_absolute_ReportPath.lastIndexOf(StringPool.SLASH)+1);
|
||||
File rptFile = new File(rptFileName);
|
||||
try {
|
||||
FileUtil.writeString(rptContent, rptFile, "UTF-8");
|
||||
FileInputStream in = new FileInputStream(rptFile);
|
||||
ftpUtil.saveFile(rptPathName, rptFileName, in);
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
if (Objects.nonNull(rptFile)) {
|
||||
rptFile.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
@ -5471,6 +5522,17 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
roiResultsSpectrumList.add(roiResults);
|
||||
}
|
||||
anlyseResultIn.setRoiResultsSpectrumList(roiResultsSpectrumList);
|
||||
betaDataFile.getXeResultsSpectrumList().forEach(item -> {
|
||||
if (item.getNuclideName().equals(XeNuclideName.XE_131m.getType())) {
|
||||
item.setNidFlag(anlyseResultIn.getXe131mFlag());
|
||||
} else if (item.getNuclideName().equals(XeNuclideName.XE_133.getType())) {
|
||||
item.setNidFlag(anlyseResultIn.getXe133Flag());
|
||||
} else if (item.getNuclideName().equals(XeNuclideName.XE_133m.getType())) {
|
||||
item.setNidFlag(anlyseResultIn.getXe133mFlag());
|
||||
} else if (item.getNuclideName().equals(XeNuclideName.XE_135.getType())) {
|
||||
item.setNidFlag(anlyseResultIn.getXe135Flag());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -5559,75 +5621,6 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
return calibrationPairsList;
|
||||
}
|
||||
|
||||
// public void getROILimit(BgDataAnlyseResultIn anlyseResultIn) {
|
||||
// File sampleTmp = null;
|
||||
// try {
|
||||
// //获取ftp文件路径下临时文件
|
||||
// sampleTmp = phdFileUtil.analyzeFile(anlyseResultIn.getSampleFilePath(), anlyseResultIn.getSampleFileName());
|
||||
// if (Objects.nonNull(sampleTmp)){
|
||||
// EnergySpectrumStruct sourceData = EnergySpectrumHandler.getSourceData(sampleTmp.getAbsolutePath());
|
||||
// List<Double> poiBX1 = sourceData.POI_B_x1;
|
||||
// List<Double> poiBX2 = sourceData.POI_B_x2;
|
||||
// List<Double> poiGY1 = sourceData.POI_G_y1;
|
||||
// List<Double> poiGY2 = sourceData.POI_G_y2;
|
||||
// //ROI Limit
|
||||
// List<String> report_limit_roi = new LinkedList<>();
|
||||
// for(int pos=1;pos<=poiBX1.size();pos++) {
|
||||
// report_limit_roi.add(String.valueOf(pos));
|
||||
// }
|
||||
// List<String> beginB = new LinkedList<>();
|
||||
// for(int pos=1;pos<=poiBX1.size();pos++) {
|
||||
// beginB.add(String.valueOf(poiBX1.get(pos)));
|
||||
// }
|
||||
// List<String> endB = new LinkedList<>();
|
||||
// for(int pos=0;pos<poiBX2.size();pos++) {
|
||||
// endB.add(String.valueOf(poiBX2.get(pos)));
|
||||
// }
|
||||
// List<String> beginG = new LinkedList<>();
|
||||
// for(int pos=1;pos<=poiGY1.size();pos++) {
|
||||
// beginG.add(String.valueOf(poiGY1.get(pos)));
|
||||
// }
|
||||
// List<String> endG = new LinkedList<>();
|
||||
// for(int pos=0;pos<poiGY2.size();pos++) {
|
||||
// endG.add(String.valueOf(poiGY2.get(pos)));
|
||||
// }
|
||||
// //ratios
|
||||
// List<String> ratio_id = sourceData.ratio_id;
|
||||
// List<String> ROI_num_highter_G_energy_ROI = sourceData.ROI_num_highter_G_energy_ROI;
|
||||
// List<String> ROI_num_lower_G_energy_ROI = sourceData.ROI_num_lower_G_energy_ROI;
|
||||
// List<Double> count_ratio = sourceData.count_ratio;
|
||||
// List<Double> count_ratio_uncertainty = sourceData.count_ratio_uncertainty;
|
||||
// List<String> countRatioList = new LinkedList<>();
|
||||
// for(int pos=0;pos<count_ratio.size();pos++) {
|
||||
// countRatioList.add(String.valueOf(count_ratio.get(pos)));
|
||||
// }
|
||||
// List<String> countRatioUncertaintyList = new LinkedList<>();
|
||||
// for(int pos=0;pos<count_ratio_uncertainty.size();pos++) {
|
||||
// countRatioUncertaintyList.add(String.valueOf(count_ratio_uncertainty.get(pos)));
|
||||
// }
|
||||
// //bg_efficiency
|
||||
// List<Double> bg_efficiency = sourceData.bg_efficiency;
|
||||
// List<String> nuclide_name = sourceData.nuclide_name;
|
||||
// List<String> ROI_number = sourceData.ROI_number;
|
||||
// List<Double> uncertainty = sourceData.uncertainty;
|
||||
// List<String> efficiencyList = new LinkedList<>();
|
||||
// for(int pos=0;pos<bg_efficiency.size();pos++) {
|
||||
// efficiencyList.add(String.valueOf(bg_efficiency.get(pos)));
|
||||
// }
|
||||
// List<String> uncertaintyList = new LinkedList<>();
|
||||
// for(int pos=0;pos<uncertainty.size();pos++) {
|
||||
// uncertaintyList.add(String.valueOf(uncertainty.get(pos)));
|
||||
// }
|
||||
// }
|
||||
// } catch (Exception e){
|
||||
// e.printStackTrace();
|
||||
// } finally {
|
||||
// if (Objects.nonNull(sampleTmp)) {
|
||||
// sampleTmp.delete();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
public List<GardsCalibration> getCalibration(BgDataAnlyseResultIn anlyseResultIn, Integer sampleId, Integer gasId, Integer detId, Integer idAnalysis) {
|
||||
List<GardsCalibration> calibrationSpectrumList = new LinkedList<>();
|
||||
if (Objects.nonNull(sampleId)) {
|
||||
|
|
15
jeecg-server-cloud/armd-abnormal-alarm-start/Dockerfile
Normal file
15
jeecg-server-cloud/armd-abnormal-alarm-start/Dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
|||
FROM armd-jdk64:latest
|
||||
|
||||
MAINTAINER armd@163.com
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
RUN mkdir -p /armd-abnormal-alarm-cloud
|
||||
|
||||
WORKDIR /armd-abnormal-alarm-cloud
|
||||
|
||||
EXPOSE 7006
|
||||
|
||||
ADD armd-abnormal-alarm-start-3.5.1.jar ./
|
||||
|
||||
CMD sleep 1;java -Xms512m -Xmx1g -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar armd-abnormal-alarm-start-3.5.1.jar
|
24
jeecg-server-cloud/armd-auto-process-start/Dockerfile
Normal file
24
jeecg-server-cloud/armd-auto-process-start/Dockerfile
Normal file
|
@ -0,0 +1,24 @@
|
|||
FROM armd-jdk64:latest
|
||||
|
||||
MAINTAINER armd@163.com
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
COPY --from=armd-jdk64 /usr/local/jdk/lib/ /usr/local/jdk/lib/
|
||||
|
||||
RUN mkdir -p /armd-auto-process
|
||||
|
||||
WORKDIR /armd-auto-process
|
||||
|
||||
EXPOSE 7004
|
||||
|
||||
ADD armd-auto-process-start-3.5.1.jar ./
|
||||
|
||||
COPY setup.tar ./
|
||||
RUN ls ./
|
||||
RUN tar -C ./ -xvf ./setup.tar && \
|
||||
rm ./setup.tar
|
||||
|
||||
ENV LD_LIBRARY_PATH /usr/local/jdk/lib
|
||||
|
||||
CMD sleep 1;java -Xms512m -Xmx1g -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar armd-auto-process-start-3.5.1.jar
|
|
@ -1,15 +1,15 @@
|
|||
FROM anapsix/alpine-java:8_server-jre_unlimited
|
||||
FROM armd-jdk64:latest
|
||||
|
||||
MAINTAINER jeecgos@163.com
|
||||
MAINTAINER armd@163.com
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
RUN mkdir -p /jeecg-cloud-gateway
|
||||
RUN mkdir -p /armd-cloud-gateway
|
||||
|
||||
WORKDIR /jeecg-cloud-gateway
|
||||
WORKDIR /armd-cloud-gateway
|
||||
|
||||
EXPOSE 9999
|
||||
|
||||
ADD ./target/jeecg-cloud-gateway-3.5.1.jar ./
|
||||
ADD armd-cloud-gateway-3.5.1.jar ./
|
||||
|
||||
CMD sleep 1;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-gateway-3.5.1.jar
|
||||
CMD sleep 1;java-Xms512m -Xmx1g -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar armd-cloud-gateway-3.5.1.jar
|
|
@ -1,25 +1,23 @@
|
|||
#FROM anapsix/alpine-java:8_server-jre_unlimited
|
||||
FROM openjdk:8
|
||||
FROM jdk64:latest
|
||||
|
||||
MAINTAINER jeecgos@163.com
|
||||
MAINTAINER armd@163.com
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
RUN mkdir -p /jeecg-cloud-nacos
|
||||
RUN mkdir -p /armd-cloud-nacos
|
||||
|
||||
WORKDIR /jeecg-cloud-nacos
|
||||
WORKDIR /armd-cloud-nacos
|
||||
|
||||
EXPOSE 8848
|
||||
|
||||
|
||||
ENV DB_URL=""
|
||||
ENV DB_USER=""
|
||||
ENV DB_PASSWORD=""
|
||||
ENV DB_PLATFORM=""
|
||||
ENV SERVER_PORT=""
|
||||
ENV DB_URL="jdbc:postgresql://192.168.8.103:5432/nacos"
|
||||
ENV DB_USER="postgres"
|
||||
ENV DB_PASSWORD="123456"
|
||||
ENV DB_PLATFORM="postgresql"
|
||||
ENV SERVER_PORT="8848"
|
||||
|
||||
EXPOSE $SERVER_PORT
|
||||
|
||||
ADD ./target/jeecg-cloud-nacos-3.5.1.jar ./
|
||||
ADD armd-cloud-nacos-3.5.1.jar ./
|
||||
|
||||
CMD sleep 5;java -DSERVER_PORT=$SERVER_PORT -DDB_URL=$DB_URL -DDB_USER=$DB_USER -DDB_PASSWORD=$DB_PASSWORD -DDB_PLATFORM=$DB_PLATFORM -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-nacos-3.5.1.jar
|
||||
CMD sleep 5;java -DSERVER_PORT=$SERVER_PORT -DDB_URL=$DB_URL -DDB_USER=$DB_USER -DDB_PASSWORD=$DB_PASSWORD -DDB_PLATFORM=$DB_PLATFORM -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar armd-cloud-nacos-3.5.1.jar
|
15
jeecg-server-cloud/armd-log-manage-start/Dockerfile
Normal file
15
jeecg-server-cloud/armd-log-manage-start/Dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
|||
FROM armd-jdk64:latest
|
||||
|
||||
MAINTAINER armd@163.com
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
RUN mkdir -p /armd-log-manage
|
||||
|
||||
WORKDIR /armd-log-manage
|
||||
|
||||
EXPOSE 7005
|
||||
|
||||
ADD armd-log-manage-start-3.5.1.jar ./
|
||||
|
||||
CMD sleep 1;java -Xms512m -Xmx1g -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar armd-log-manage-start-3.5.1.jar
|
26
jeecg-server-cloud/armd-spectrum-analysis-start/Dockerfile
Normal file
26
jeecg-server-cloud/armd-spectrum-analysis-start/Dockerfile
Normal file
|
@ -0,0 +1,26 @@
|
|||
FROM armd-jdk:latest
|
||||
|
||||
MAINTAINER armd@163.com
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
# 将共享库复制到容器中
|
||||
COPY --from=armd-jdk /usr/local/jdk/lib/ /usr/local/jdk/lib/
|
||||
|
||||
RUN mkdir -p /armd-spectrum-analysis
|
||||
|
||||
WORKDIR /armd-spectrum-analysis
|
||||
|
||||
EXPOSE 7007
|
||||
|
||||
ADD armd-spectrum-analysis-start-3.5.1.jar ./
|
||||
# 将所有配置文件复制到armd-spectrum-analysis同级目录并解压
|
||||
COPY setup.tar ./
|
||||
RUN ls ./
|
||||
RUN tar -C ./ -xvf ./setup.tar && \
|
||||
rm ./setup.tar
|
||||
|
||||
# 设置LD_LIBRARY_PATH环境变量
|
||||
ENV LD_LIBRARY_PATH /usr/local/jdk/lib
|
||||
|
||||
CMD sleep 1;java -Xms512m -Xmx1g -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar armd-spectrum-analysis-start-3.5.1.jar
|
21
jeecg-server-cloud/armd-station-operation-start/Dockerfile
Normal file
21
jeecg-server-cloud/armd-station-operation-start/Dockerfile
Normal file
|
@ -0,0 +1,21 @@
|
|||
FROM armd-jdk64:latest
|
||||
|
||||
MAINTAINER armd@163.com
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
RUN mkdir -p /armd-station-operation
|
||||
|
||||
WORKDIR /armd-station-operation
|
||||
|
||||
EXPOSE 7002
|
||||
|
||||
ADD armd-station-operation-start-3.5.1.jar ./
|
||||
|
||||
# 将所有配置文件复制到armd-spectrum-analysis同级目录并解压
|
||||
COPY setup.tar ./
|
||||
RUN ls ./
|
||||
RUN tar -C ./ -xvf ./setup.tar && \
|
||||
rm ./setup.tar
|
||||
|
||||
CMD sleep 1;java -Xms512m -Xmx1g -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar armd-station-operation-start-3.5.1.jar
|
|
@ -1,15 +1,15 @@
|
|||
FROM anapsix/alpine-java:8_server-jre_unlimited
|
||||
FROM armd-jdk64:latest
|
||||
|
||||
MAINTAINER jeecgos@163.com
|
||||
MAINTAINER armd@163.com
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
RUN mkdir -p /jeecg-system-cloud
|
||||
RUN mkdir -p /armd-system-cloud
|
||||
|
||||
WORKDIR /jeecg-system-cloud
|
||||
WORKDIR /armd-system-cloud
|
||||
|
||||
EXPOSE 7001
|
||||
|
||||
ADD ./target/jeecg-system-cloud-start-3.5.1.jar ./
|
||||
ADD armd-system-cloud-start-3.5.1.jar ./
|
||||
|
||||
CMD sleep 1;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-system-cloud-start-3.5.1.jar
|
||||
CMD sleep 1;java -Xms512m -Xmx1g -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar armd-system-cloud-start-3.5.1.jar
|
||||
|
|
|
@ -1,31 +1,63 @@
|
|||
version: '2'
|
||||
services:
|
||||
jeecg-boot-mysql:
|
||||
jdk64:
|
||||
build:
|
||||
context: ../db
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_ROOT_HOST: '%'
|
||||
TZ: Asia/Shanghai
|
||||
restart: always
|
||||
container_name: jeecg-boot-mysql
|
||||
command:
|
||||
--character-set-server=utf8mb4
|
||||
--collation-server=utf8mb4_general_ci
|
||||
--explicit_defaults_for_timestamp=true
|
||||
--lower_case_table_names=1
|
||||
--max_allowed_packet=128M
|
||||
--default-authentication-plugin=caching_sha2_password
|
||||
ports:
|
||||
- 3306:3306
|
||||
context: ./jdk64
|
||||
container_name: jdk64
|
||||
profiles:
|
||||
- jdk64
|
||||
|
||||
jeecg-boot-redis:
|
||||
image: redis:5.0
|
||||
armd-redis:
|
||||
build:
|
||||
context: ./redis
|
||||
ports:
|
||||
- 6379:6379
|
||||
restart: always
|
||||
container_name: jeecg-boot-redis
|
||||
hostname: jeecg-boot-redis
|
||||
container_name: armd-redis
|
||||
hostname: armd-redis
|
||||
restart: on-failure
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
extra_hosts:
|
||||
- "armd-redis:172.18.0.2"
|
||||
profiles:
|
||||
- redis
|
||||
|
||||
armd-vue:
|
||||
build:
|
||||
context: ./nginx
|
||||
ports:
|
||||
- 443:443
|
||||
restart: on-failure
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
container_name: armd-vue
|
||||
profiles:
|
||||
- nginx
|
||||
volumes:
|
||||
- "/home/rmsops/nginx/vue-config:/usr/share/nginx/html/static"
|
||||
- "/home/rmsops/nginx/map:/usr/share/nginx/map"
|
||||
- "/home/rmsops/nginx/logs:/etc/nginx/logs/"
|
||||
- "/home/rmsops/nginx/config:/etc/nginx/conf.d/"
|
||||
|
||||
# jeecg-boot-mysql:
|
||||
# build:
|
||||
# context: ../db
|
||||
# environment:
|
||||
# MYSQL_ROOT_PASSWORD: root
|
||||
# MYSQL_ROOT_HOST: '%'
|
||||
# TZ: Asia/Shanghai
|
||||
# restart: always
|
||||
# container_name: jeecg-boot-mysql
|
||||
# command:
|
||||
# --character-set-server=utf8mb4
|
||||
# --collation-server=utf8mb4_general_ci
|
||||
# --explicit_defaults_for_timestamp=true
|
||||
# --lower_case_table_names=1
|
||||
# --max_allowed_packet=128M
|
||||
# --default-authentication-plugin=caching_sha2_password
|
||||
# ports:
|
||||
# - 3306:3306
|
||||
|
||||
|
||||
# jeecg-boot-rabbitmq:
|
||||
# image: rabbitmq:3.7.7-management
|
||||
|
|
|
@ -1,72 +1,158 @@
|
|||
version: '2'
|
||||
services:
|
||||
jeecg-boot-nacos:
|
||||
nacos:
|
||||
container_name: armd-nacos
|
||||
hostname: armd-nacos
|
||||
restart: always
|
||||
build:
|
||||
context: ./jeecg-cloud-nacos
|
||||
context: ./nacos
|
||||
ports:
|
||||
- 8848:8848
|
||||
profiles:
|
||||
- nacos
|
||||
environment:
|
||||
- SERVER_PORT=8848
|
||||
- DB_URL=jdbc:postgresql://182.92.183.230:5432/nacos
|
||||
- DB_USER=temp
|
||||
- DB_PASSWORD=123456
|
||||
- DB_PLATFORM=postgresql
|
||||
container_name: jeecg-boot-nacos
|
||||
hostname: jeecg-boot-nacos
|
||||
|
||||
jeecg-boot-system:
|
||||
depends_on:
|
||||
- jeecg-boot-nacos
|
||||
extra_hosts:
|
||||
- "armd-nacos:192.168.31.23"
|
||||
|
||||
armd-gateway:
|
||||
container_name: armd-gateway-start
|
||||
hostname: armd-gateway
|
||||
# depends_on:
|
||||
# - armd-nacos
|
||||
profiles:
|
||||
- gateway
|
||||
build:
|
||||
context: ./jeecg-system-cloud-start
|
||||
container_name: jeecg-system-start
|
||||
hostname: jeecg-boot-system
|
||||
context: ./gateway
|
||||
ports:
|
||||
- 9999:9999
|
||||
restart: on-failure
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
extra_hosts:
|
||||
- "armd-gateway:192.168.31.23"
|
||||
volumes:
|
||||
- "/home/rmsops/armd-logs:/armd-gateway/logs"
|
||||
|
||||
# jeecg-boot-demo:
|
||||
# depends_on:
|
||||
# - jeecg-boot-nacos
|
||||
# build:
|
||||
# context: ./jeecg-demo-cloud-start
|
||||
# container_name: jeecg-demo-start
|
||||
# hostname: jeecg-boot-demo
|
||||
# restart: on-failure
|
||||
# environment:
|
||||
# - TZ=Asia/Shanghai
|
||||
armd-system:
|
||||
container_name: armd-system
|
||||
hostname: armd-system
|
||||
profiles:
|
||||
- service
|
||||
build:
|
||||
context: ./system
|
||||
ports:
|
||||
- 7001:7001
|
||||
restart: on-failure
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
extra_hosts:
|
||||
- "armd-system:192.168.31.23"
|
||||
volumes:
|
||||
- "/home/rmsops/armd-logs:/armd-system-cloud/logs"
|
||||
|
||||
jeecg-boot-gateway:
|
||||
armd-station-operation:
|
||||
container_name: armd-station-operation
|
||||
hostname: armd-station-operation
|
||||
depends_on:
|
||||
# - armd-nacos
|
||||
- armd-system
|
||||
profiles:
|
||||
- service
|
||||
restart: on-failure
|
||||
build:
|
||||
context: ./jeecg-cloud-gateway
|
||||
context: ./station-operation
|
||||
ports:
|
||||
- 9999:9999
|
||||
depends_on:
|
||||
- jeecg-boot-nacos
|
||||
- jeecg-boot-system
|
||||
container_name: jeecg-boot-gateway
|
||||
hostname: jeecg-boot-gateway
|
||||
- 7002:7002
|
||||
extra_hosts:
|
||||
- "armd-station-operation:192.168.31.23"
|
||||
volumes:
|
||||
- "/home/rmsops/armd-logs:/armd-station-operation/logs"
|
||||
|
||||
armd-web-statistics:
|
||||
container_name: armd-web-statistics
|
||||
hostname: armd-web-statistics
|
||||
depends_on:
|
||||
- armd-system
|
||||
profiles:
|
||||
- service
|
||||
restart: on-failure
|
||||
build:
|
||||
context: ./web-statistics
|
||||
ports:
|
||||
- 7003:7003
|
||||
extra_hosts:
|
||||
- "armd-web-statistics:192.168.31.23"
|
||||
volumes:
|
||||
- "/home/rmsops/armd-logs:/armd-web-statistics/logs"
|
||||
|
||||
armd-abnormal-alarm:
|
||||
container_name: armd-abnormal-alarm
|
||||
hostname: armd-abnormal-alarm
|
||||
depends_on:
|
||||
- armd-system
|
||||
profiles:
|
||||
- service
|
||||
restart: on-failure
|
||||
build:
|
||||
context: ./abnormal-alarm
|
||||
ports:
|
||||
- 7005:7005
|
||||
extra_hosts:
|
||||
- "armd-abnormal-alarm:192.168.31.23"
|
||||
volumes:
|
||||
- "/home/rmsops/armd-logs:/armd-abnormal-alarm/logs"
|
||||
|
||||
armd-log-manage:
|
||||
container_name: armd-log-manage
|
||||
hostname: armd-log-manage
|
||||
depends_on:
|
||||
- armd-system
|
||||
profiles:
|
||||
- service
|
||||
restart: on-failure
|
||||
build:
|
||||
context: ./log-manage
|
||||
ports:
|
||||
- 7006:7006
|
||||
extra_hosts:
|
||||
- "armd-log-manage:192.168.31.23"
|
||||
volumes:
|
||||
- "/home/rmsops/armd-logs:/armd-log-manage/logs"
|
||||
|
||||
armd-spectrum-analysis:
|
||||
restart: on-failure
|
||||
build:
|
||||
context: ./spectrum-analysis
|
||||
ports:
|
||||
- 7007:7007
|
||||
profiles:
|
||||
- service
|
||||
depends_on:
|
||||
- armd-system
|
||||
container_name: armd-spectrum-analysis
|
||||
hostname: armd-spectrum-analysis
|
||||
extra_hosts:
|
||||
- "armd-spectrum-analysis:127.0.0.1"
|
||||
|
||||
auto-process:
|
||||
restart: on-failure
|
||||
build:
|
||||
context: ./auto-process
|
||||
ports:
|
||||
- 7004:7004
|
||||
profiles:
|
||||
- auto-process
|
||||
container_name: auto-process
|
||||
hostname: armd-auto-process
|
||||
extra_hosts:
|
||||
- "armd-auto-process:127.0.0.1"
|
||||
volumes:
|
||||
- "/home/rmsops/ftp:/armd-auto-process/ftp"
|
||||
- "/home/rmsops/armd-logs:/armd-auto-process/logs"
|
||||
|
||||
|
||||
# jeecg-boot-sentinel:
|
||||
# restart: on-failure
|
||||
# build:
|
||||
# context: ./jeecg-visual/jeecg-cloud-sentinel
|
||||
# ports:
|
||||
# - 9000:9000
|
||||
# depends_on:
|
||||
# - jeecg-boot-nacos
|
||||
# - jeecg-boot-demo
|
||||
# - jeecg-boot-system
|
||||
# - jeecg-boot-gateway
|
||||
# container_name: jeecg-boot-sentinel
|
||||
# hostname: jeecg-boot-sentinel
|
||||
#
|
||||
# jeecg-boot-xxljob:
|
||||
# build:
|
||||
# context: ./jeecg-visual/jeecg-cloud-xxljob
|
||||
# ports:
|
||||
# - 9080:9080
|
||||
# container_name: jeecg-boot-xxljob
|
||||
# hostname: jeecg-boot-xxljob
|
||||
|
|
Loading…
Reference in New Issue
Block a user