DataType增加log日志相关数据
GammaFileUtil实现GetMiddleData方法缺失部分 新增NameStandUtil
This commit is contained in:
parent
a1dc41ff44
commit
e930c07e65
|
@ -41,6 +41,10 @@ public enum DataType {
|
|||
* QC谱
|
||||
*/
|
||||
QCPHD("QCPHD",".PHD"),
|
||||
/**
|
||||
* Error
|
||||
*/
|
||||
ERROR("Error", "log"),
|
||||
/**
|
||||
* 气体谱
|
||||
*/
|
||||
|
|
|
@ -14,6 +14,7 @@ import org.jeecg.modules.base.entity.configuration.GardsNuclLinesLib;
|
|||
import org.jeecg.modules.base.entity.rnman.GardsAnalySetting;
|
||||
import org.jeecg.modules.base.enums.CalName;
|
||||
import org.jeecg.modules.base.enums.CalType;
|
||||
import org.jeecg.modules.base.enums.MiddleDataType;
|
||||
import org.jeecg.modules.base.vo.*;
|
||||
import org.jeecg.modules.entity.*;
|
||||
import org.jeecg.modules.entity.vo.TablePeaks;
|
||||
|
@ -52,7 +53,7 @@ public class GammaFileUtil {
|
|||
@Autowired
|
||||
private SpectrumAnalysisMapper spectrumAnalysisMapper;
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
private NameStandUtil nameStandUtil;
|
||||
|
||||
public boolean loadFile(String pathName, String fileName, PHDFile phd, Result result){
|
||||
phd.setFilepath(pathName);
|
||||
|
@ -576,22 +577,22 @@ public class GammaFileUtil {
|
|||
TotaleffBlock totaleffBlock = new TotaleffBlock();
|
||||
for (GardsCalibrationPairsSpectrum pairsSpectrum:calibrationPairs) {
|
||||
String calType = pairsSpectrum.getCaltype().trim();
|
||||
if(calType.equals("energy")) {
|
||||
if(calType.equals(CalType.ENERGY_CAL.getType())) {
|
||||
phd.setUsedEner(pairsSpectrum.getInput());
|
||||
gEnergyBlock.getCentroid_channel().add(pairsSpectrum.getXValue());
|
||||
gEnergyBlock.getG_energy().add(pairsSpectrum.getYValue());
|
||||
gEnergyBlock.getUncertainty().add(StringUtils.isBlank(pairsSpectrum.getUncYValue())? 0:Double.valueOf(pairsSpectrum.getUncYValue()));
|
||||
} else if(calType.equals("Resolution")) {
|
||||
} else if(calType.equals(CalType.RESOLUTION_CAL.getType())) {
|
||||
phd.setUsedReso(pairsSpectrum.getInput());
|
||||
gResolutionBlock.getG_energy().add(pairsSpectrum.getXValue());
|
||||
gResolutionBlock.getFWHM().add(pairsSpectrum.getYValue());
|
||||
gResolutionBlock.getUncertainty().add(StringUtils.isBlank(pairsSpectrum.getUncYValue())? 0: Double.valueOf(pairsSpectrum.getUncYValue()));
|
||||
} else if(calType.equals("efficiency")) {
|
||||
} else if(calType.equals(CalType.EFFICIENCY_CAL.getType())) {
|
||||
phd.setUsedEffi(pairsSpectrum.getInput());
|
||||
gEfficiencyBlock.getG_energy().add(pairsSpectrum.getXValue());
|
||||
gEfficiencyBlock.getEfficiency().add(pairsSpectrum.getYValue());
|
||||
gEfficiencyBlock.getUncertainty().add(StringUtils.isBlank(pairsSpectrum.getUncYValue())? 0: Double.valueOf(pairsSpectrum.getUncYValue()));
|
||||
} else if(calType.equals("TotalEfficiency")) {
|
||||
} else if(calType.equals(CalType.TOTALEFFICIENCY_CAL.getType())) {
|
||||
phd.setUsedTotE(pairsSpectrum.getInput());
|
||||
totaleffBlock.getG_energy().add(pairsSpectrum.getXValue());
|
||||
totaleffBlock.getTotal_efficiency().add(pairsSpectrum.getYValue());
|
||||
|
@ -646,19 +647,19 @@ public class GammaFileUtil {
|
|||
para.getP().add(Double.valueOf(str));
|
||||
para.getPerr().add(0.0);
|
||||
}
|
||||
if(calType.equals("energy")) {
|
||||
if(calType.equals(CalType.ENERGY_CAL.getType())) {
|
||||
phd.setUsedEnerPara(para);
|
||||
phd.getMapEnerPara().put(phd.getUsedEner(), para);
|
||||
phd.setNewEner(phd.getUsedEner());
|
||||
} else if(calType.equals("Resolution")) {
|
||||
} else if(calType.equals(CalType.RESOLUTION_CAL.getType())) {
|
||||
phd.setUsedResoPara(para);
|
||||
phd.getMapResoPara().put(phd.getUsedReso(), para);
|
||||
phd.setNewReso(phd.getUsedReso());
|
||||
} else if(calType.equals("efficiency")) {
|
||||
} else if(calType.equals(CalType.EFFICIENCY_CAL.getType())) {
|
||||
phd.setUsedEffiPara(para);
|
||||
phd.getMapEffiPara().put(phd.getUsedEffi(), para);
|
||||
phd.setNewEffi(phd.getUsedEffi());
|
||||
} else if(calType.equals("TotalEfficiency")) {
|
||||
} else if(calType.equals(CalType.TOTALEFFICIENCY_CAL.getType())) {
|
||||
phd.setUsedTotEPara(para);
|
||||
phd.getMapTotEPara().put(phd.getUsedTotE(), para);
|
||||
phd.setNewTotE(phd.getUsedTotE());
|
||||
|
@ -1031,7 +1032,7 @@ public class GammaFileUtil {
|
|||
// 获取属性
|
||||
Node item = attributes.item(j);
|
||||
//判断属性名称是否是 number
|
||||
if(item.getNodeName().equals("energy")) {
|
||||
if(item.getNodeName().equals(CalType.ENERGY_CAL.getType())) {
|
||||
ener_Be7 = Double.valueOf(item.getNodeValue());
|
||||
}
|
||||
}
|
||||
|
@ -1046,7 +1047,7 @@ public class GammaFileUtil {
|
|||
// 获取属性
|
||||
Node item = attributes.item(j);
|
||||
//判断属性名称是否是 number
|
||||
if(item.getNodeName().equals("energy")) {
|
||||
if(item.getNodeName().equals(CalType.ENERGY_CAL.getType())) {
|
||||
vMdcInfo.set(0,Double.valueOf(item.getNodeValue()));
|
||||
}else if (item.getNodeName().equals("yield")){
|
||||
vMdcInfo.set(1,Double.valueOf(item.getNodeValue()));
|
||||
|
@ -1094,7 +1095,7 @@ public class GammaFileUtil {
|
|||
// 获取属性
|
||||
Node item = attributes.item(j);
|
||||
//判断属性名称是否是 number
|
||||
if(item.getNodeName().equals("energy")) {
|
||||
if(item.getNodeName().equals(CalType.ENERGY_CAL.getType())) {
|
||||
vMdcInfo.set(0,Double.valueOf(item.getNodeValue()));
|
||||
}else if (item.getNodeName().equals("yield")){
|
||||
vMdcInfo.set(1,Double.valueOf(item.getNodeValue()));
|
||||
|
@ -2368,7 +2369,7 @@ public class GammaFileUtil {
|
|||
|
||||
public String GetReportContent(PHDFile phd, boolean bLog) {
|
||||
GStoreMiddleProcessData middleData = new GStoreMiddleProcessData();
|
||||
this.GetInterMiddlData(phd, middleData);
|
||||
this.GetInterMiddlData(phd, "", middleData);
|
||||
if(bLog) {
|
||||
return this.GetLogContent(middleData);
|
||||
} else {
|
||||
|
@ -2376,11 +2377,11 @@ public class GammaFileUtil {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean GetInterMiddlData(PHDFile phd, GStoreMiddleProcessData middleData){
|
||||
public boolean GetInterMiddlData(PHDFile phd, String userName, GStoreMiddleProcessData middleData){
|
||||
boolean bRet = true;
|
||||
Map<String, NuclideLines> temp = new HashMap<>();
|
||||
try {
|
||||
bRet = GetMiddleData(phd,temp,middleData);
|
||||
bRet = GetMiddleData(phd, userName, temp,middleData, MiddleDataType.InterAction.getType());
|
||||
middleData.analyses_type ="Interactive";
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
@ -2767,8 +2768,64 @@ public class GammaFileUtil {
|
|||
return name;
|
||||
}
|
||||
|
||||
public boolean GetMiddleData(PHDFile fileAnlyse,Map<String, NuclideLines> nucline,GStoreMiddleProcessData middleData) throws ParseException {
|
||||
public boolean GetMiddleData(PHDFile fileAnlyse, String userName,Map<String, NuclideLines> nucline,GStoreMiddleProcessData middleData, String type) throws ParseException {
|
||||
boolean bRet=true;
|
||||
|
||||
//标准名称规范化
|
||||
String dataType = fileAnlyse.getMsgInfo().getData_type();
|
||||
String subDirSavePath = "";
|
||||
subDirSavePath+=nameStandUtil.GetSysTemSubdir(fileAnlyse.getHeader().getSystem_type());
|
||||
subDirSavePath+=nameStandUtil.GetDateTypeSubdir(dataType);
|
||||
Map<String, String> fileNames = nameStandUtil.NameStandard(subDirSavePath, fileAnlyse);
|
||||
String lcName = fileNames.get("lc");
|
||||
String scacName = fileNames.get("scac");
|
||||
String baselineName = fileNames.get("baseline");
|
||||
String logName = fileNames.get("log");
|
||||
String rptName = fileNames.get("rpt");
|
||||
String saveFileName = fileNames.get("saveFile");
|
||||
String path = nameStandUtil.SetFileDir(subDirSavePath, saveFileName);
|
||||
middleData.analyses_analyst=userName;
|
||||
String qsSaveFile = path+StringPool.SLASH+saveFileName;
|
||||
qsSaveFile = qsSaveFile.replace(StringPool.BACK_SLASH, StringPool.SLASH);
|
||||
String qsLogPath= path+StringPool.SLASH+middleData.analyses_analyst+"_"+logName;
|
||||
qsLogPath = qsLogPath.replace(StringPool.BACK_SLASH, StringPool.SLASH);
|
||||
String qsReportPath="Arr"+StringPool.SLASH+path+StringPool.SLASH+middleData.analyses_analyst+"_"+rptName;
|
||||
qsReportPath = qsReportPath.replace(StringPool.BACK_SLASH, StringPool.SLASH);
|
||||
|
||||
middleData.analyses_save_filePath = qsSaveFile;
|
||||
middleData.analyses_LogPath = qsLogPath;
|
||||
middleData.analyses_ReportPath = qsReportPath;
|
||||
//获取算法数据
|
||||
if(type.equals(MiddleDataType.Auto.getType())) {
|
||||
String anylseBegin;
|
||||
String anylseEnd;
|
||||
anylseBegin = DateUtils.formatDate(new Date(), "yyyy/MM/dd HH:mm:ss");
|
||||
bRet = AnalyseSpectrum(fileAnlyse,nucline);
|
||||
anylseEnd = DateUtils.formatDate(new Date(), "yyyy/MM/dd HH:mm:ss");
|
||||
middleData.analyses_analysisBegin = anylseBegin;
|
||||
middleData.analyses_analysisEnd = anylseEnd;
|
||||
}
|
||||
|
||||
|
||||
//gards_analyses
|
||||
String qsBaseLinePath = path+StringPool.SLASH+middleData.analyses_analyst+"_"+baselineName;
|
||||
qsBaseLinePath = qsBaseLinePath.replace(StringPool.BACK_SLASH, StringPool.SLASH);
|
||||
// m_baseLineFileName;
|
||||
String qsLcPath= path+StringPool.SLASH+middleData.analyses_analyst+"_"+lcName;
|
||||
qsLcPath = qsLcPath.replace(StringPool.BACK_SLASH, StringPool.SLASH);
|
||||
String qsScacPath= path+StringPool.SLASH+middleData.analyses_analyst+"_"+scacName;
|
||||
qsScacPath = qsScacPath.replace(StringPool.BACK_SLASH, StringPool.SLASH);
|
||||
|
||||
|
||||
|
||||
String qsSaveBaseLine = StringPool.SLASH+spectrumPathProperties.getRootPath()+StringPool.SLASH+qsBaseLinePath;
|
||||
String qsSaveLc = StringPool.SLASH+spectrumPathProperties.getRootPath()+StringPool.SLASH+qsLcPath;
|
||||
String qsSaveScac = StringPool.SLASH+spectrumPathProperties.getRootPath()+StringPool.SLASH+qsScacPath;
|
||||
|
||||
// WriteBaseInfo(fileAnlyse.getBaseCtrls(),qsSaveBaseLine);
|
||||
// WriteLcScac(fileAnlyse.getVLc(),"Lc",qsSaveLc);
|
||||
// WriteLcScac(fileAnlyse.getVScac(),"Scac",qsSaveScac);
|
||||
|
||||
double totalNumber = 0.0;
|
||||
for(int m=0;m<fileAnlyse.getSpec().getCounts().size();m++) {
|
||||
totalNumber+=fileAnlyse.getSpec().getCounts().get(m);
|
||||
|
@ -2910,7 +2967,7 @@ public class GammaFileUtil {
|
|||
}
|
||||
funcDefEnergy = EquationDescription(funcType);
|
||||
funcTypeDefEnergy = EquationName(funcType);
|
||||
middleData.calibration_E_Caltype = "energy";
|
||||
middleData.calibration_E_Caltype = CalType.ENERGY_CAL.getType();
|
||||
middleData.calibration_E_function = funcType;
|
||||
middleData.calibration_E_functionDef = funcDefEnergy;
|
||||
middleData.calibration_E_functionTypeDef = funcTypeDefEnergy;
|
||||
|
@ -3310,6 +3367,7 @@ public class GammaFileUtil {
|
|||
return bRet;
|
||||
}
|
||||
|
||||
|
||||
public Map<String ,Object> UpdateDatasNuclideActivity(Map<String, NuclideActMda> mapNucAct, Date act_ref, Date con_ref) {
|
||||
Map<String ,Object> map = new HashMap<>();
|
||||
map.put("dateTime_act_ref", act_ref);
|
||||
|
|
|
@ -0,0 +1,185 @@
|
|||
package org.jeecg.common.util;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
||||
import org.jeecg.modules.base.enums.DataType;
|
||||
import org.jeecg.modules.base.enums.SystemType;
|
||||
import org.jeecg.modules.base.vo.PHDFile;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class NameStandUtil {
|
||||
|
||||
public String GetSysTemSubdir(String systemType) {
|
||||
StringBuffer path = new StringBuffer();
|
||||
if(systemType.contains(SystemType.BETA.getType())) {
|
||||
path.append(StringPool.SLASH+"Spectrum");
|
||||
path.append(StringPool.SLASH+"Xenon");
|
||||
path.append(StringPool.SLASH+"Sauna");
|
||||
} else if(systemType.contains(SystemType.GAMMA.getType())) {
|
||||
path.append(StringPool.SLASH+"Spectrum");
|
||||
path.append(StringPool.SLASH+"Xenon");
|
||||
path.append(StringPool.SLASH+"Spalax");
|
||||
} else if(systemType.contains(SystemType.PARTICULATE.getType())) {
|
||||
path.append(StringPool.SLASH+"Spectrum");
|
||||
path.append(StringPool.SLASH+"Particulates");
|
||||
}
|
||||
return path.toString();
|
||||
}
|
||||
|
||||
public String GetDateTypeSubdir(String dataType){
|
||||
StringBuffer path = new StringBuffer();
|
||||
if(dataType.contains(DataType.SAMPLEPHD.getType()))
|
||||
{
|
||||
path.append(StringPool.SLASH+"Samplephd");
|
||||
}
|
||||
else if(dataType.contains(DataType.QCPHD.getType()))
|
||||
{
|
||||
path.append(StringPool.SLASH+"Qcphd");
|
||||
}
|
||||
else if(dataType.contains(DataType.DETBKPHD.getType()))
|
||||
{
|
||||
path.append(StringPool.SLASH+"Detbkphd");
|
||||
}
|
||||
else if(dataType.contains(DataType.GASBKPHD.getType()))
|
||||
{
|
||||
path.append(StringPool.SLASH+"Gasbkphd");
|
||||
}
|
||||
else if(dataType.contains(DataType.SOH.getType()))
|
||||
{
|
||||
path.append(StringPool.SLASH+"Soh");
|
||||
}
|
||||
else if(dataType.contains(DataType.MET.getType()))
|
||||
{
|
||||
path.append(StringPool.SLASH+"Met");
|
||||
}
|
||||
else if(dataType.contains(DataType.ALERT_FLOW.getType())||
|
||||
dataType.contains(DataType.ALERT_SYSTEM.getType())||
|
||||
dataType.contains(DataType.ALERT_TEMP.getType())||
|
||||
dataType.contains(DataType.ALERT_UPS.getType()))
|
||||
{
|
||||
path.append(StringPool.SLASH+"Alert");
|
||||
}
|
||||
else if(dataType.contains(DataType.ERROR.getType()))
|
||||
{
|
||||
path.append(StringPool.SLASH+"Error");
|
||||
}
|
||||
else
|
||||
{
|
||||
path.append(StringPool.SLASH+"Other");
|
||||
}
|
||||
return path.toString();
|
||||
}
|
||||
|
||||
public Map<String, String> NameStandard(String path, PHDFile fileAnlyse) {
|
||||
String suffix = GetSuffix(fileAnlyse.getMsgInfo().getData_type(),fileAnlyse.getHeader().getSystem_type(),fileAnlyse.getHeader().getSpectrum_quantity(),String.valueOf(fileAnlyse.getAcq().getAcquisition_live_time()));
|
||||
Map<String, String> fileNames = NameStandardByName(path, fileAnlyse.getFilename(), fileAnlyse.getHeader().getMeasurement_id(),suffix);
|
||||
return fileNames;
|
||||
}
|
||||
|
||||
public String GetSuffix(String dataType,String sysType,String Fulltype,String LT) {
|
||||
String rData = "";
|
||||
if(dataType.contains(DataType.SAMPLEPHD.getType())) {
|
||||
rData = "_S_%TYPE_%LT.PHD";
|
||||
}
|
||||
else if(dataType.contains(DataType.GASBKPHD.getType())){
|
||||
rData = "_G_%TYPE_%LT.PHD";
|
||||
}else if(dataType.contains(DataType.DETBKPHD.getType())){
|
||||
rData = "_D_%TYPE_%LT.PHD";
|
||||
}else if(dataType.contains(DataType.QCPHD.getType())){
|
||||
rData = "_Q_%TYPE_%LT.PHD";
|
||||
}
|
||||
rData.replace("%TYPE",Fulltype);
|
||||
rData.replace("%LT",LT);
|
||||
return rData;
|
||||
}
|
||||
|
||||
public Map<String, String> NameStandardByName(String path, String fileName, String dateTimeFormat, String suffix) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
String StandardFileName="";
|
||||
String measurementName = GetFileNameFromDateTime(dateTimeFormat, suffix);
|
||||
String fileDir = path + StringPool.SLASH;
|
||||
if(measurementName != fileName) {
|
||||
StandardFileName = fileDir+measurementName;
|
||||
}
|
||||
String fileSuffix = "PHD";
|
||||
|
||||
String m_lcFileName = StandardFileName;
|
||||
String m_baseLineFileName = StandardFileName;
|
||||
String m_scacFileName = StandardFileName;
|
||||
String m_logfileName = StandardFileName;
|
||||
String m_reportFileName = StandardFileName;
|
||||
|
||||
m_lcFileName.replace(fileSuffix,"lc");
|
||||
m_baseLineFileName.replace(fileSuffix,"baseline");
|
||||
m_scacFileName.replace(fileSuffix,"scac");
|
||||
m_logfileName.replace(fileSuffix,"log");
|
||||
m_reportFileName.replace("."+fileSuffix,"_rpt");
|
||||
|
||||
String m_saveFileName = StandardFileName;
|
||||
|
||||
map.put("lc", m_lcFileName);
|
||||
map.put("baseline", m_baseLineFileName);
|
||||
map.put("scac", m_scacFileName);
|
||||
map.put("log", m_logfileName);
|
||||
map.put("rpt", m_reportFileName);
|
||||
map.put("saveFile", m_saveFileName);
|
||||
return map;
|
||||
}
|
||||
|
||||
public String GetFileNameFromDateTime(String dateTimeFormat, String suffix){
|
||||
String rData = "";
|
||||
int pos = dateTimeFormat.indexOf('-');
|
||||
if(-1 != pos) {
|
||||
String dateTime = dateTimeFormat;
|
||||
dateTime = dateTime.substring(pos+1, pos+17);
|
||||
dateTime.replace(" ","-");
|
||||
String fileHeader = dateTime.substring(0, pos+1);
|
||||
String temp = DateTimeStandardToFileFormat(dateTime);
|
||||
rData = fileHeader+ temp + suffix;
|
||||
}
|
||||
return rData;
|
||||
}
|
||||
|
||||
public String DateTimeStandardToFileFormat(String data) {
|
||||
String dateTime = "";
|
||||
try {
|
||||
if ( dateTime.indexOf("-") > 0 ){
|
||||
dateTime = DateUtils.formatDate(DateUtils.parseDate(data,"yyyy/MM/dd-hh:mm"), "yyyyMMdd_hhmm");
|
||||
} else if( dateTime.indexOf(" ") > 0 ) {
|
||||
dateTime = DateUtils.formatDate(DateUtils.parseDate(data,"yyyy/MM/dd hh:mm"), "yyyyMMdd_hhmm");
|
||||
} else if( dateTime.indexOf("-")<0 && dateTime.indexOf(" ") < 0) {
|
||||
dateTime = DateUtils.formatDate(DateUtils.parseDate(data,"yyyy/MM/dd"), "yyyyMMdd");
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return dateTime;
|
||||
}
|
||||
|
||||
public String SetFileDir(String path, String saveFileName) {
|
||||
String input_file_name = path;
|
||||
//添加文件名日期
|
||||
List<String> dateSub = GetSubDirByFileName(saveFileName);
|
||||
for(int pos=0;pos<dateSub.size();pos++) {
|
||||
input_file_name=input_file_name+dateSub.get(pos)+StringPool.SLASH;
|
||||
}
|
||||
return input_file_name;
|
||||
}
|
||||
|
||||
public List<String> GetSubDirByFileName(String fileName) {
|
||||
List<String> rData = new LinkedList<>();
|
||||
int pos = fileName.indexOf('-');
|
||||
if(-1 == pos) {
|
||||
//
|
||||
} else if(fileName.length()>=pos+7) {
|
||||
rData.add(fileName.substring(pos+1, pos+5));
|
||||
rData.add(fileName.substring(pos+5, pos+7));
|
||||
}
|
||||
return rData;
|
||||
}
|
||||
|
||||
}
|
|
@ -1777,6 +1777,7 @@ public class GammaServiceImpl implements IGammaService {
|
|||
//如果有权限则开始保存数据库操作
|
||||
//将PHDFile数据 生成用于数据库存储的数据结构
|
||||
GStoreMiddleProcessData middleData = new GStoreMiddleProcessData();
|
||||
bRet = gammaFileUtil.GetInterMiddlData(phd, userName, middleData);
|
||||
//根据文件名称查询对应的sampleId 如果存在则赋值sampleId, Status 如果不存在则先存储数据信息到sampleData
|
||||
|
||||
//根据sampleId,分析员名称查询idAnalysis
|
||||
|
|
|
@ -2576,10 +2576,6 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
String gasFilePathName = phdFileUtil.NameStandardBy(anlyseResultIn.getGasFilePath(), anlyseResultIn.getGasFileName());
|
||||
String detFilePathName = phdFileUtil.NameStandardBy(anlyseResultIn.getDetFilePath(), anlyseResultIn.getDetFileName());
|
||||
//判断文件是否存储过 如果没有则解析文件并进行存储
|
||||
if ( !OriginalDataStore(anlyseResultIn.getSampleFilePath(), anlyseResultIn.getSampleFileName(), sampleFilePathName, anlyseResultIn.getUserName()) ){
|
||||
result.error500("file save failed");
|
||||
return result;
|
||||
}
|
||||
if ( !OriginalDataStore(anlyseResultIn.getGasFilePath(), anlyseResultIn.getGasFileName(), gasFilePathName, anlyseResultIn.getUserName()) ){
|
||||
result.error500("file save failed");
|
||||
return result;
|
||||
|
@ -2588,6 +2584,10 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
result.error500("file save failed");
|
||||
return result;
|
||||
}
|
||||
if ( !OriginalDataStore(anlyseResultIn.getSampleFilePath(), anlyseResultIn.getSampleFileName(), sampleFilePathName, anlyseResultIn.getUserName()) ){
|
||||
result.error500("file save failed");
|
||||
return result;
|
||||
}
|
||||
//判断当前分析员是否有过历史分析当前文件
|
||||
Integer isExist = spectrumAnalysisMapper.SampleIsExist(sampleFilePathName, anlyseResultIn.getUserName());
|
||||
//根据文件名称查询对应的sampleId--- sampleFile gasFile detFile
|
||||
|
@ -2747,7 +2747,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
calibrationPairs.setIdAnalysis(idAnalysis);
|
||||
calibrationPairs.setSampleType(SystemType.BETA.getType());
|
||||
calibrationPairs.setCaltype(CalType.ENERGY_CAL.getType());
|
||||
calibrationPairs.setInput("PHD");
|
||||
calibrationPairs.setInput(CalName.CalPHD.getType());
|
||||
calibrationPairs.setIdCalPoint(i);
|
||||
calibrationPairs.setXValue(anlyseResultIn.getB_channel_sample().get(i));
|
||||
calibrationPairs.setYValue(anlyseResultIn.getB_energy_sample().get(i));
|
||||
|
@ -2759,7 +2759,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
calibrationPairs.setIdAnalysis(idAnalysis);
|
||||
calibrationPairs.setSampleType(SystemType.GAMMA.getType());
|
||||
calibrationPairs.setCaltype(CalType.ENERGY_CAL.getType());
|
||||
calibrationPairs.setInput("PHD");
|
||||
calibrationPairs.setInput(CalName.CalPHD.getType());
|
||||
calibrationPairs.setIdCalPoint(i);
|
||||
calibrationPairs.setXValue(anlyseResultIn.getG_channel_sample().get(i));
|
||||
calibrationPairs.setYValue(anlyseResultIn.getG_energy_sample().get(i));
|
||||
|
@ -2772,7 +2772,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
calibrationPairs.setIdAnalysis(idAnalysis);
|
||||
calibrationPairs.setSampleType(SystemType.BETA.getType());
|
||||
calibrationPairs.setCaltype(CalType.ENERGY_CAL.getType());
|
||||
calibrationPairs.setInput("PHD");
|
||||
calibrationPairs.setInput(CalName.CalPHD.getType());
|
||||
calibrationPairs.setIdCalPoint(i);
|
||||
calibrationPairs.setXValue(anlyseResultIn.getB_channel_gas().get(i));
|
||||
calibrationPairs.setYValue(anlyseResultIn.getB_energy_gas().get(i));
|
||||
|
@ -2785,7 +2785,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
calibrationPairs.setIdAnalysis(idAnalysis);
|
||||
calibrationPairs.setSampleType(SystemType.GAMMA.getType());
|
||||
calibrationPairs.setCaltype(CalType.ENERGY_CAL.getType());
|
||||
calibrationPairs.setInput("PHD");
|
||||
calibrationPairs.setInput(CalName.CalPHD.getType());
|
||||
calibrationPairs.setIdCalPoint(i);
|
||||
calibrationPairs.setXValue(anlyseResultIn.getG_channel_gas().get(i));
|
||||
calibrationPairs.setYValue(anlyseResultIn.getG_energy_gas().get(i));
|
||||
|
@ -2798,7 +2798,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
calibrationPairs.setIdAnalysis(idAnalysis);
|
||||
calibrationPairs.setSampleType(SystemType.BETA.getType());
|
||||
calibrationPairs.setCaltype(CalType.ENERGY_CAL.getType());
|
||||
calibrationPairs.setInput("PHD");
|
||||
calibrationPairs.setInput(CalName.CalPHD.getType());
|
||||
calibrationPairs.setIdCalPoint(i);
|
||||
calibrationPairs.setXValue(anlyseResultIn.getB_channel_det().get(i));
|
||||
calibrationPairs.setYValue(anlyseResultIn.getB_energy_det().get(i));
|
||||
|
@ -2811,7 +2811,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
calibrationPairs.setIdAnalysis(idAnalysis);
|
||||
calibrationPairs.setSampleType(SystemType.GAMMA.getType());
|
||||
calibrationPairs.setCaltype(CalType.ENERGY_CAL.getType());
|
||||
calibrationPairs.setInput("PHD");
|
||||
calibrationPairs.setInput(CalName.CalPHD.getType());
|
||||
calibrationPairs.setIdCalPoint(i);
|
||||
calibrationPairs.setXValue(anlyseResultIn.getG_channel_det().get(i));
|
||||
calibrationPairs.setYValue(anlyseResultIn.getG_energy_det().get(i));
|
||||
|
|
Loading…
Reference in New Issue
Block a user