人工交互模块gamma算法崩溃问题修改,新增字段判断分析是否异常结束,并接收分析异常信息
This commit is contained in:
parent
6abe41c743
commit
3f4e184c82
|
@ -16,6 +16,10 @@ public class PHDFile implements Serializable {
|
|||
|
||||
private String tmpFilePath;
|
||||
|
||||
private String analyMessage;
|
||||
|
||||
private boolean analyFlag;
|
||||
|
||||
private boolean isValid; // 是否有效谱
|
||||
|
||||
private boolean bAnalyed; // 记录是否被分析
|
||||
|
@ -181,6 +185,8 @@ public class PHDFile implements Serializable {
|
|||
userId = "";
|
||||
xmlFilePath = "";
|
||||
tmpFilePath = "";
|
||||
analyMessage = "";
|
||||
analyFlag = true;
|
||||
bAnalyed = false;
|
||||
isValid = true;
|
||||
analy_start_time = "";
|
||||
|
|
|
@ -1335,191 +1335,200 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
}
|
||||
String strValue = CalValuesHandler.analyseSpectrum(phdStr, nuclideLinesMap, phd.getTmpFilePath(), analysisProcess);
|
||||
Map<String, Object> parseMap = JSON.parseObject(strValue, Map.class);
|
||||
for (Map.Entry<String, Object> entry:parseMap.entrySet()) {
|
||||
if (entry.getKey().equalsIgnoreCase("bAnalyed")) {
|
||||
boolean value = JSON.parseObject(JSON.toJSONString(entry.getValue()), Boolean.class);
|
||||
phd.setBAnalyed(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("mapEnerPara")) {
|
||||
HashMap<String, Object> jsonMap = JSON.parseObject(JSON.toJSONString(entry.getValue()), HashMap.class);
|
||||
Map<String, ParameterInfo> value = new HashMap<>();
|
||||
for (Map.Entry<String, Object> objectEntry:jsonMap.entrySet()) {
|
||||
String key = objectEntry.getKey();
|
||||
ParameterInfo entryValue = JSON.parseObject(JSON.toJSONString(objectEntry.getValue()), ParameterInfo.class);
|
||||
value.put(key, entryValue);
|
||||
boolean analyFlag = JSON.parseObject(JSON.toJSONString(parseMap.get("analyFlag")), Boolean.class);
|
||||
phd.setAnalyFlag(analyFlag);
|
||||
String analyMessage = JSON.parseObject(JSON.toJSONString(parseMap.get("analyMessage")), String.class);
|
||||
phd.setAnalyMessage(analyMessage);
|
||||
if (analyFlag) {
|
||||
for (Map.Entry<String, Object> entry:parseMap.entrySet()) {
|
||||
if (entry.getKey().equalsIgnoreCase("bAnalyed")) {
|
||||
boolean value = JSON.parseObject(JSON.toJSONString(entry.getValue()), Boolean.class);
|
||||
phd.setBAnalyed(value);
|
||||
}
|
||||
phd.setMapEnerPara(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("mapResoPara")) {
|
||||
HashMap<String, Object> jsonMap = JSON.parseObject(JSON.toJSONString(entry.getValue()), HashMap.class);
|
||||
Map<String, ParameterInfo> value = new HashMap<>();
|
||||
for (Map.Entry<String, Object> objectEntry:jsonMap.entrySet()) {
|
||||
String key = objectEntry.getKey();
|
||||
ParameterInfo entryValue = JSON.parseObject(JSON.toJSONString(objectEntry.getValue()), ParameterInfo.class);
|
||||
value.put(key, entryValue);
|
||||
if (entry.getKey().equalsIgnoreCase("mapEnerPara")) {
|
||||
HashMap<String, Object> jsonMap = JSON.parseObject(JSON.toJSONString(entry.getValue()), HashMap.class);
|
||||
Map<String, ParameterInfo> value = new HashMap<>();
|
||||
for (Map.Entry<String, Object> objectEntry:jsonMap.entrySet()) {
|
||||
String key = objectEntry.getKey();
|
||||
ParameterInfo entryValue = JSON.parseObject(JSON.toJSONString(objectEntry.getValue()), ParameterInfo.class);
|
||||
value.put(key, entryValue);
|
||||
}
|
||||
phd.setMapEnerPara(value);
|
||||
}
|
||||
phd.setMapResoPara(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("mapEffiPara")) {
|
||||
HashMap<String, Object> jsonMap = JSON.parseObject(JSON.toJSONString(entry.getValue()), HashMap.class);
|
||||
Map<String, ParameterInfo> value = new HashMap<>();
|
||||
for (Map.Entry<String, Object> objectEntry:jsonMap.entrySet()) {
|
||||
String key = objectEntry.getKey();
|
||||
ParameterInfo entryValue = JSON.parseObject(JSON.toJSONString(objectEntry.getValue()), ParameterInfo.class);
|
||||
value.put(key, entryValue);
|
||||
if (entry.getKey().equalsIgnoreCase("mapResoPara")) {
|
||||
HashMap<String, Object> jsonMap = JSON.parseObject(JSON.toJSONString(entry.getValue()), HashMap.class);
|
||||
Map<String, ParameterInfo> value = new HashMap<>();
|
||||
for (Map.Entry<String, Object> objectEntry:jsonMap.entrySet()) {
|
||||
String key = objectEntry.getKey();
|
||||
ParameterInfo entryValue = JSON.parseObject(JSON.toJSONString(objectEntry.getValue()), ParameterInfo.class);
|
||||
value.put(key, entryValue);
|
||||
}
|
||||
phd.setMapResoPara(value);
|
||||
}
|
||||
phd.setMapEffiPara(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("mapTotEPara")) {
|
||||
HashMap<String, Object> jsonMap = JSON.parseObject(JSON.toJSONString(entry.getValue()), HashMap.class);
|
||||
Map<String, ParameterInfo> value = new HashMap<>();
|
||||
for (Map.Entry<String, Object> objectEntry:jsonMap.entrySet()) {
|
||||
String key = objectEntry.getKey();
|
||||
ParameterInfo entryValue = JSON.parseObject(JSON.toJSONString(objectEntry.getValue()), ParameterInfo.class);
|
||||
value.put(key, entryValue);
|
||||
if (entry.getKey().equalsIgnoreCase("mapEffiPara")) {
|
||||
HashMap<String, Object> jsonMap = JSON.parseObject(JSON.toJSONString(entry.getValue()), HashMap.class);
|
||||
Map<String, ParameterInfo> value = new HashMap<>();
|
||||
for (Map.Entry<String, Object> objectEntry:jsonMap.entrySet()) {
|
||||
String key = objectEntry.getKey();
|
||||
ParameterInfo entryValue = JSON.parseObject(JSON.toJSONString(objectEntry.getValue()), ParameterInfo.class);
|
||||
value.put(key, entryValue);
|
||||
}
|
||||
phd.setMapEffiPara(value);
|
||||
}
|
||||
phd.setMapTotEPara(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("para_stepRatio")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setPara_stepRatio(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("para_tail")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setPara_tail(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("para_tailAlpha")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setPara_tailAlpha(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("para_tailRight")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setPara_tailRight(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("para_tailRightAlpha")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setPara_tailRightAlpha(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("newEner")) {
|
||||
String value = JSON.parseObject(JSON.toJSONString(entry.getValue()), String.class);
|
||||
phd.setNewEner(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("newReso")) {
|
||||
String value = JSON.parseObject(JSON.toJSONString(entry.getValue()), String.class);
|
||||
phd.setNewReso(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("mapEnerKD")) {
|
||||
HashMap<String, Object> jsonMap = JSON.parseObject(JSON.toJSONString(entry.getValue()), HashMap.class);
|
||||
Map<String, GEnergyBlock> value = new HashMap<>();
|
||||
for (Map.Entry<String, Object> objectEntry:jsonMap.entrySet()) {
|
||||
String key = objectEntry.getKey();
|
||||
GEnergyBlock entryValue = JSON.parseObject(JSON.toJSONString(objectEntry.getValue()), GEnergyBlock.class);
|
||||
value.put(key, entryValue);
|
||||
if (entry.getKey().equalsIgnoreCase("mapTotEPara")) {
|
||||
HashMap<String, Object> jsonMap = JSON.parseObject(JSON.toJSONString(entry.getValue()), HashMap.class);
|
||||
Map<String, ParameterInfo> value = new HashMap<>();
|
||||
for (Map.Entry<String, Object> objectEntry:jsonMap.entrySet()) {
|
||||
String key = objectEntry.getKey();
|
||||
ParameterInfo entryValue = JSON.parseObject(JSON.toJSONString(objectEntry.getValue()), ParameterInfo.class);
|
||||
value.put(key, entryValue);
|
||||
}
|
||||
phd.setMapTotEPara(value);
|
||||
}
|
||||
phd.setMapEnerKD(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("mapResoKD")) {
|
||||
HashMap<String, Object> jsonMap = JSON.parseObject(JSON.toJSONString(entry.getValue()), HashMap.class);
|
||||
Map<String, GResolutionBlock> value = new HashMap<>();
|
||||
for (Map.Entry<String, Object> objectEntry:jsonMap.entrySet()) {
|
||||
String key = objectEntry.getKey();
|
||||
GResolutionBlock entryValue = JSON.parseObject(JSON.toJSONString(objectEntry.getValue()), GResolutionBlock.class);
|
||||
value.put(key, entryValue);
|
||||
if (entry.getKey().equalsIgnoreCase("para_stepRatio")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setPara_stepRatio(value);
|
||||
}
|
||||
phd.setMapResoKD(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("vEnergy")) {
|
||||
List<Double> value = JSON.parseArray(JSON.toJSONString(entry.getValue()), Double.class);
|
||||
phd.setVEnergy(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("vBase")) {
|
||||
List<Double> value = JSON.parseArray(JSON.toJSONString(entry.getValue()), Double.class);
|
||||
phd.setVBase(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("vLc")) {
|
||||
List<Double> value = JSON.parseArray(JSON.toJSONString(entry.getValue()), Double.class);
|
||||
phd.setVLc(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("vScac")) {
|
||||
List<Double> value = JSON.parseArray(JSON.toJSONString(entry.getValue()), Double.class);
|
||||
phd.setVScac(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("vPeak")) {
|
||||
List<PeakInfo> value = JSON.parseArray(JSON.toJSONString(entry.getValue()), PeakInfo.class);
|
||||
phd.setVPeak(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("baseCtrls")) {
|
||||
BaseControls value = JSON.parseObject(JSON.toJSONString(entry.getValue()), BaseControls.class);
|
||||
phd.setBaseCtrls(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedEner")) {
|
||||
String value = JSON.parseObject(JSON.toJSONString(entry.getValue()), String.class);
|
||||
phd.setUsedEner(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedEnerKD")) {
|
||||
GEnergyBlock value = JSON.parseObject(JSON.toJSONString(entry.getValue()), GEnergyBlock.class);
|
||||
phd.setUsedEnerKD(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedEnerPara")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setUsedEnerPara(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedReso")) {
|
||||
String value = JSON.parseObject(JSON.toJSONString(entry.getValue()), String.class);
|
||||
phd.setUsedReso(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedResoKD")) {
|
||||
GResolutionBlock value = JSON.parseObject(JSON.toJSONString(entry.getValue()), GResolutionBlock.class);
|
||||
phd.setUsedResoKD(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedResoPara")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setUsedResoPara(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedEffi")) {
|
||||
String value = JSON.parseObject(JSON.toJSONString(entry.getValue()), String.class);
|
||||
phd.setUsedEffi(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedEffiKD")) {
|
||||
GEfficiencyBlock value = JSON.parseObject(JSON.toJSONString(entry.getValue()), GEfficiencyBlock.class);
|
||||
phd.setUsedEffiKD(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedEffiPara")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setUsedEffiPara(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedTotE")) {
|
||||
String value = JSON.parseObject(JSON.toJSONString(entry.getValue()), String.class);
|
||||
phd.setUsedTotE(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedTotEKD")) {
|
||||
TotaleffBlock value = JSON.parseObject(JSON.toJSONString(entry.getValue()), TotaleffBlock.class);
|
||||
phd.setUsedTotEKD(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedTotEPara")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setUsedTotEPara(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("mapNucActMda")) {
|
||||
TreeMap<String, Object> jsonMap = JSON.parseObject(JSON.toJSONString(entry.getValue()), TreeMap.class);
|
||||
Map<String, NuclideActMda> value = new TreeMap<>();
|
||||
for (Map.Entry<String, Object> objectEntry:jsonMap.entrySet()) {
|
||||
String key = objectEntry.getKey();
|
||||
NuclideActMda entryValue = JSON.parseObject(JSON.toJSONString(objectEntry.getValue()), NuclideActMda.class);
|
||||
value.put(key, entryValue);
|
||||
if (entry.getKey().equalsIgnoreCase("para_tail")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setPara_tail(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("para_tailAlpha")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setPara_tailAlpha(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("para_tailRight")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setPara_tailRight(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("para_tailRightAlpha")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setPara_tailRightAlpha(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("newEner")) {
|
||||
String value = JSON.parseObject(JSON.toJSONString(entry.getValue()), String.class);
|
||||
phd.setNewEner(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("newReso")) {
|
||||
String value = JSON.parseObject(JSON.toJSONString(entry.getValue()), String.class);
|
||||
phd.setNewReso(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("mapEnerKD")) {
|
||||
HashMap<String, Object> jsonMap = JSON.parseObject(JSON.toJSONString(entry.getValue()), HashMap.class);
|
||||
Map<String, GEnergyBlock> value = new HashMap<>();
|
||||
for (Map.Entry<String, Object> objectEntry:jsonMap.entrySet()) {
|
||||
String key = objectEntry.getKey();
|
||||
GEnergyBlock entryValue = JSON.parseObject(JSON.toJSONString(objectEntry.getValue()), GEnergyBlock.class);
|
||||
value.put(key, entryValue);
|
||||
}
|
||||
phd.setMapEnerKD(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("mapResoKD")) {
|
||||
HashMap<String, Object> jsonMap = JSON.parseObject(JSON.toJSONString(entry.getValue()), HashMap.class);
|
||||
Map<String, GResolutionBlock> value = new HashMap<>();
|
||||
for (Map.Entry<String, Object> objectEntry:jsonMap.entrySet()) {
|
||||
String key = objectEntry.getKey();
|
||||
GResolutionBlock entryValue = JSON.parseObject(JSON.toJSONString(objectEntry.getValue()), GResolutionBlock.class);
|
||||
value.put(key, entryValue);
|
||||
}
|
||||
phd.setMapResoKD(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("vEnergy")) {
|
||||
List<Double> value = JSON.parseArray(JSON.toJSONString(entry.getValue()), Double.class);
|
||||
phd.setVEnergy(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("vBase")) {
|
||||
List<Double> value = JSON.parseArray(JSON.toJSONString(entry.getValue()), Double.class);
|
||||
phd.setVBase(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("vLc")) {
|
||||
List<Double> value = JSON.parseArray(JSON.toJSONString(entry.getValue()), Double.class);
|
||||
phd.setVLc(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("vScac")) {
|
||||
List<Double> value = JSON.parseArray(JSON.toJSONString(entry.getValue()), Double.class);
|
||||
phd.setVScac(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("vPeak")) {
|
||||
List<PeakInfo> value = JSON.parseArray(JSON.toJSONString(entry.getValue()), PeakInfo.class);
|
||||
phd.setVPeak(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("baseCtrls")) {
|
||||
BaseControls value = JSON.parseObject(JSON.toJSONString(entry.getValue()), BaseControls.class);
|
||||
phd.setBaseCtrls(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedEner")) {
|
||||
String value = JSON.parseObject(JSON.toJSONString(entry.getValue()), String.class);
|
||||
phd.setUsedEner(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedEnerKD")) {
|
||||
GEnergyBlock value = JSON.parseObject(JSON.toJSONString(entry.getValue()), GEnergyBlock.class);
|
||||
phd.setUsedEnerKD(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedEnerPara")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setUsedEnerPara(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedReso")) {
|
||||
String value = JSON.parseObject(JSON.toJSONString(entry.getValue()), String.class);
|
||||
phd.setUsedReso(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedResoKD")) {
|
||||
GResolutionBlock value = JSON.parseObject(JSON.toJSONString(entry.getValue()), GResolutionBlock.class);
|
||||
phd.setUsedResoKD(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedResoPara")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setUsedResoPara(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedEffi")) {
|
||||
String value = JSON.parseObject(JSON.toJSONString(entry.getValue()), String.class);
|
||||
phd.setUsedEffi(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedEffiKD")) {
|
||||
GEfficiencyBlock value = JSON.parseObject(JSON.toJSONString(entry.getValue()), GEfficiencyBlock.class);
|
||||
phd.setUsedEffiKD(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedEffiPara")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setUsedEffiPara(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedTotE")) {
|
||||
String value = JSON.parseObject(JSON.toJSONString(entry.getValue()), String.class);
|
||||
phd.setUsedTotE(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedTotEKD")) {
|
||||
TotaleffBlock value = JSON.parseObject(JSON.toJSONString(entry.getValue()), TotaleffBlock.class);
|
||||
phd.setUsedTotEKD(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("usedTotEPara")) {
|
||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||
phd.setUsedTotEPara(value);
|
||||
}
|
||||
if (entry.getKey().equalsIgnoreCase("mapNucActMda")) {
|
||||
TreeMap<String, Object> jsonMap = JSON.parseObject(JSON.toJSONString(entry.getValue()), TreeMap.class);
|
||||
Map<String, NuclideActMda> value = new TreeMap<>();
|
||||
for (Map.Entry<String, Object> objectEntry:jsonMap.entrySet()) {
|
||||
String key = objectEntry.getKey();
|
||||
NuclideActMda entryValue = JSON.parseObject(JSON.toJSONString(objectEntry.getValue()), NuclideActMda.class);
|
||||
value.put(key, entryValue);
|
||||
}
|
||||
phd.setMapNucActMda(value);
|
||||
}
|
||||
phd.setMapNucActMda(value);
|
||||
}
|
||||
}
|
||||
BeanUtils.copyProperties(phd.getSetting(), phd.getUsedSetting());
|
||||
BeanUtils.copyProperties(phd.getSetting(), phd.getUsedSetting());
|
||||
|
||||
for (PeakInfo peak:phd.getVPeak()) {
|
||||
if (StringUtils.isBlank(peak.recoilBetaChan)) {
|
||||
peak.recoilBetaChan = "nan";
|
||||
}
|
||||
if (StringUtils.isBlank(peak.recoilDeltaChan)) {
|
||||
peak.recoilDeltaChan = "nan";
|
||||
for (PeakInfo peak:phd.getVPeak()) {
|
||||
if (StringUtils.isBlank(peak.recoilBetaChan)) {
|
||||
peak.recoilBetaChan = "nan";
|
||||
}
|
||||
if (StringUtils.isBlank(peak.recoilDeltaChan)) {
|
||||
peak.recoilDeltaChan = "nan";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
log.error("AnalyseSpectrum(): {}", analyMessage);
|
||||
return false;
|
||||
}
|
||||
} catch (JsonProcessingException e){
|
||||
e.printStackTrace();
|
||||
|
@ -3206,16 +3215,20 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
String anylseEnd;
|
||||
anylseBegin = DateUtils.formatDate(new Date(), "yyyy/MM/dd HH:mm:ss");
|
||||
bRet = AnalyseSpectrum(fileAnlyse,nucline);
|
||||
RunQC(fileAnlyse);
|
||||
fileAnlyse.setEfficiencyParam(fileAnlyse.getUsedEffiPara().getP());
|
||||
fileAnlyse.setEfficiencyEnergy(fileAnlyse.getUsedEffiKD().getG_energy());
|
||||
fileAnlyse.setEfficiencyCurRow(0);
|
||||
//缓存中获取计算mdc使用的核素信息
|
||||
Map<String, NuclideLines> nuclideLinesMDCMap = (Map<String, NuclideLines>) redisUtil.get("AllNuclideMap");
|
||||
getNuclideMDCValue(fileAnlyse, fileAnlyse.getMdcInfoMap(), nuclideLinesMDCMap);
|
||||
anylseEnd = DateUtils.formatDate(new Date(), "yyyy/MM/dd HH:mm:ss");
|
||||
middleData.analyses_analysisBegin = anylseBegin;
|
||||
middleData.analyses_analysisEnd = anylseEnd;
|
||||
if (bRet) {
|
||||
RunQC(fileAnlyse);
|
||||
fileAnlyse.setEfficiencyParam(fileAnlyse.getUsedEffiPara().getP());
|
||||
fileAnlyse.setEfficiencyEnergy(fileAnlyse.getUsedEffiKD().getG_energy());
|
||||
fileAnlyse.setEfficiencyCurRow(0);
|
||||
//缓存中获取计算mdc使用的核素信息
|
||||
Map<String, NuclideLines> nuclideLinesMDCMap = (Map<String, NuclideLines>) redisUtil.get("AllNuclideMap");
|
||||
getNuclideMDCValue(fileAnlyse, fileAnlyse.getMdcInfoMap(), nuclideLinesMDCMap);
|
||||
anylseEnd = DateUtils.formatDate(new Date(), "yyyy/MM/dd HH:mm:ss");
|
||||
middleData.analyses_analysisBegin = anylseBegin;
|
||||
middleData.analyses_analysisEnd = anylseEnd;
|
||||
} else {
|
||||
return bRet;
|
||||
}
|
||||
} else if (type.equals(MiddleDataType.InterAction.getType()) && flag.equalsIgnoreCase("save")){ //如果是人工交互分析 则先上传phd对应文件信息
|
||||
//上传本次文件到ftp人工交互存储路径下
|
||||
File sampleTmp = null;
|
||||
|
|
|
@ -1252,29 +1252,33 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
//分析时将phd的核素map重置
|
||||
phd.setPhdNuclideMap(nuclideLinesMap);
|
||||
//调用分析算法
|
||||
gammaFileUtil.AnalyseSpectrum(phd, nuclideLinesMap);
|
||||
// 重新分析各峰值对应的核素信息
|
||||
// gammaFileUtil.NuclidesIdent(phd, nuclideLinesMap);
|
||||
phd.setEfficiencyParam(phd.getUsedEffiPara().getP());
|
||||
phd.setEfficiencyEnergy(phd.getUsedEffiKD().getG_energy());
|
||||
phd.setEfficiencyCurRow(0);
|
||||
// 重新计算峰值
|
||||
Map<String, NuclideLines> nuclideLinesMDCMap = (Map<String, NuclideLines>) redisUtil.get("AllNuclideMap");
|
||||
gammaFileUtil.getNuclideMDCValue(phd, phd.getMdcInfoMap(), nuclideLinesMDCMap);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
gammaFileUtil.UpdateChart(phd, map, colorMap);
|
||||
// 更新 ‘QC Flags’ 状态
|
||||
phd.getQcItems().clear();
|
||||
List<String> qcstate = gammaFileUtil.Qcstate(phd);
|
||||
map.put("QCFlag", qcstate);
|
||||
map.put("bAnalyed", phd.isBAnalyed());
|
||||
map.put("peak", phd.getVPeak());
|
||||
map.put("BaseCtrls", phd.getBaseCtrls());
|
||||
// Bar Chart 柱状图
|
||||
List<SeriseData> differance = gammaFileUtil.Differance(phd, phd.getVPeak());
|
||||
map.put("barChart", differance);
|
||||
result.setSuccess(true);
|
||||
result.setResult(map);
|
||||
boolean analyseSpectrum = gammaFileUtil.AnalyseSpectrum(phd, nuclideLinesMap);
|
||||
if (analyseSpectrum) {
|
||||
// 重新分析各峰值对应的核素信息
|
||||
// gammaFileUtil.NuclidesIdent(phd, nuclideLinesMap);
|
||||
phd.setEfficiencyParam(phd.getUsedEffiPara().getP());
|
||||
phd.setEfficiencyEnergy(phd.getUsedEffiKD().getG_energy());
|
||||
phd.setEfficiencyCurRow(0);
|
||||
// 重新计算峰值
|
||||
Map<String, NuclideLines> nuclideLinesMDCMap = (Map<String, NuclideLines>) redisUtil.get("AllNuclideMap");
|
||||
gammaFileUtil.getNuclideMDCValue(phd, phd.getMdcInfoMap(), nuclideLinesMDCMap);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
gammaFileUtil.UpdateChart(phd, map, colorMap);
|
||||
// 更新 ‘QC Flags’ 状态
|
||||
phd.getQcItems().clear();
|
||||
List<String> qcstate = gammaFileUtil.Qcstate(phd);
|
||||
map.put("QCFlag", qcstate);
|
||||
map.put("bAnalyed", phd.isBAnalyed());
|
||||
map.put("peak", phd.getVPeak());
|
||||
map.put("BaseCtrls", phd.getBaseCtrls());
|
||||
// Bar Chart 柱状图
|
||||
List<SeriseData> differance = gammaFileUtil.Differance(phd, phd.getVPeak());
|
||||
map.put("barChart", differance);
|
||||
result.setSuccess(true);
|
||||
result.setResult(map);
|
||||
} else {
|
||||
result.error500("There is a problem with the current phd file, Analysis failure!");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user