人工交互分析gamma部分新增加G气体相关MDC计算信息
自动处理增加G气体相关MDC计算信息
This commit is contained in:
parent
5e9642de91
commit
66ba744b79
|
@ -230,26 +230,36 @@ public class Sample_G_Analysis {
|
|||
for (int i=0; i<docChildNodes.getLength(); i++) {
|
||||
//获取节点信息
|
||||
Node node = docChildNodes.item(i);
|
||||
//判断节点名称是否是item
|
||||
if (node.getNodeName().equalsIgnoreCase("item")) {
|
||||
//获取节点属性信息
|
||||
NamedNodeMap attributes = node.getAttributes();
|
||||
//判断节点属性信息是否为空
|
||||
if (Objects.nonNull(attributes)) {
|
||||
CalMDCInfo info = new CalMDCInfo();
|
||||
//遍历属性信息
|
||||
for (int j=0; j<attributes.getLength(); j++) {
|
||||
//根据顺序读取属性
|
||||
Node attribute = attributes.item(j);
|
||||
if (attribute.getNodeName().equalsIgnoreCase("nuclide_name")) {
|
||||
info.setNuclideName(attribute.getNodeValue());
|
||||
} else if (attribute.getNodeName().equalsIgnoreCase("halflife")) {
|
||||
info.setHalflife(Double.valueOf(attribute.getNodeValue()));
|
||||
if (node.getNodeName().equalsIgnoreCase(phd.getHeader().getSystem_type())) {
|
||||
NodeList childNodes = node.getChildNodes();
|
||||
if (Objects.nonNull(childNodes) && childNodes.getLength() > 0) {
|
||||
//遍历子节点信息
|
||||
for (int j=0; j< childNodes.getLength(); j++) {
|
||||
//获取子节点信息
|
||||
Node childNode = childNodes.item(j);
|
||||
//判断节点名称是否是item
|
||||
if (childNode.getNodeName().equalsIgnoreCase("item")) {
|
||||
//获取节点属性信息
|
||||
NamedNodeMap attributes = childNode.getAttributes();
|
||||
//判断节点属性信息是否为空
|
||||
if (Objects.nonNull(attributes)) {
|
||||
CalMDCInfo info = new CalMDCInfo();
|
||||
//遍历属性信息
|
||||
for (int k=0; k<attributes.getLength(); k++) {
|
||||
//根据顺序读取属性
|
||||
Node attribute = attributes.item(k);
|
||||
if (attribute.getNodeName().equalsIgnoreCase("nuclide_name")) {
|
||||
info.setNuclideName(attribute.getNodeValue());
|
||||
} else if (attribute.getNodeName().equalsIgnoreCase("halflife")) {
|
||||
info.setHalflife(Double.valueOf(attribute.getNodeValue()));
|
||||
}
|
||||
}
|
||||
if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotBlank(info.getNuclideName()) && Objects.nonNull(info.getHalflife())) {
|
||||
mdcInfoMap.put(info.getNuclideName(), info);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotBlank(info.getNuclideName()) && Objects.nonNull(info.getHalflife())) {
|
||||
mdcInfoMap.put(info.getNuclideName(), info);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -207,7 +207,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
return result;
|
||||
}
|
||||
//读取redis缓存的计算mdc信息
|
||||
Map<String, CalMDCInfo> mdcInfoMap = (Map<String, CalMDCInfo>) redisUtil.get("mdcInfoMap");
|
||||
Map<String, CalMDCInfo> mdcInfoMap = (Map<String, CalMDCInfo>) redisUtil.get("mdcInfoMap-"+phd.getHeader().getSystem_type());
|
||||
if (CollectionUtils.isNotEmpty(mdcInfoMap)) {
|
||||
phd.setMdcInfoMap(mdcInfoMap);
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
redisUtil.set(userName+StringPool.DASH+phd.getHeader().getSystem_type(), nuclideMap);
|
||||
}
|
||||
//读取redis缓存的计算mdc信息
|
||||
Map<String, CalMDCInfo> mdcInfoMap = (Map<String, CalMDCInfo>) redisUtil.get("mdcInfoMap");
|
||||
Map<String, CalMDCInfo> mdcInfoMap = (Map<String, CalMDCInfo>) redisUtil.get("mdcInfoMap-"+phd.getHeader().getSystem_type());
|
||||
if (CollectionUtils.isNotEmpty(mdcInfoMap)) {
|
||||
phd.setMdcInfoMap(mdcInfoMap);
|
||||
}
|
||||
|
@ -517,7 +517,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
return result;
|
||||
}
|
||||
//读取redis缓存的计算mdc信息
|
||||
Map<String, CalMDCInfo> mdcInfoMap = (Map<String, CalMDCInfo>) redisUtil.get("mdcInfoMap");
|
||||
Map<String, CalMDCInfo> mdcInfoMap = (Map<String, CalMDCInfo>) redisUtil.get("mdcInfoMap-"+phd.getHeader().getSystem_type());
|
||||
if (CollectionUtils.isNotEmpty(mdcInfoMap)) {
|
||||
phd.setMdcInfoMap(mdcInfoMap);
|
||||
}
|
||||
|
@ -893,7 +893,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
redisUtil.set(userName+StringPool.DASH+phd.getHeader().getSystem_type(), nuclideMap);
|
||||
}
|
||||
//读取redis缓存的计算mdc信息
|
||||
Map<String, CalMDCInfo> mdcInfoMap = (Map<String, CalMDCInfo>) redisUtil.get("mdcInfoMap");
|
||||
Map<String, CalMDCInfo> mdcInfoMap = (Map<String, CalMDCInfo>) redisUtil.get("mdcInfoMap-"+phd.getHeader().getSystem_type());
|
||||
if (CollectionUtils.isNotEmpty(mdcInfoMap)) {
|
||||
phd.setMdcInfoMap(mdcInfoMap);
|
||||
}
|
||||
|
@ -5792,8 +5792,6 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
* 读取计算MDC参数文件方法
|
||||
*/
|
||||
public void readMDCParameter() {
|
||||
//存储文件结果用的map
|
||||
Map<String, CalMDCInfo> mdcInfoMap = new TreeMap<>();
|
||||
//配置文件路径
|
||||
String filePath = parameterProperties.getFilePath()+ File.separator + "MDCParameter.xml";
|
||||
try {
|
||||
|
@ -5814,34 +5812,85 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
for (int i=0; i<docChildNodes.getLength(); i++) {
|
||||
//获取节点信息
|
||||
Node node = docChildNodes.item(i);
|
||||
//判断节点名称是否是item
|
||||
if (node.getNodeName().equalsIgnoreCase("item")) {
|
||||
//获取节点属性信息
|
||||
NamedNodeMap attributes = node.getAttributes();
|
||||
//判断节点属性信息是否为空
|
||||
if (Objects.nonNull(attributes)) {
|
||||
CalMDCInfo info = new CalMDCInfo();
|
||||
//遍历属性信息
|
||||
for (int j=0; j<attributes.getLength(); j++) {
|
||||
//根据顺序读取属性
|
||||
Node attribute = attributes.item(j);
|
||||
if (attribute.getNodeName().equalsIgnoreCase("nuclide_name")) {
|
||||
info.setNuclideName(attribute.getNodeValue());
|
||||
} else if (attribute.getNodeName().equalsIgnoreCase("halflife")) {
|
||||
info.setHalflife(Double.valueOf(attribute.getNodeValue()));
|
||||
//判断节点名称是否是 P
|
||||
if (node.getNodeName().equalsIgnoreCase("P")) {
|
||||
//存储文件结果用的map
|
||||
Map<String, CalMDCInfo> mdcInfoMap = new TreeMap<>();
|
||||
//获取节点下的子节点信息
|
||||
NodeList childNodes = node.getChildNodes();
|
||||
//如果子节点不为空
|
||||
if (Objects.nonNull(childNodes) && childNodes.getLength() > 0) {
|
||||
//遍历子节点信息 将核素信息封存到缓存中
|
||||
for (int j=0; j<childNodes.getLength(); j++) {
|
||||
Node childNode = childNodes.item(j);
|
||||
//判断节点名称是否是item
|
||||
if (childNode.getNodeName().equalsIgnoreCase("item")) {
|
||||
//获取节点属性信息
|
||||
NamedNodeMap attributes = childNode.getAttributes();
|
||||
//判断节点属性信息是否为空
|
||||
if (Objects.nonNull(attributes)) {
|
||||
CalMDCInfo info = new CalMDCInfo();
|
||||
//遍历属性信息
|
||||
for (int k=0; k<attributes.getLength(); k++) {
|
||||
//根据顺序读取属性
|
||||
Node attribute = attributes.item(k);
|
||||
if (attribute.getNodeName().equalsIgnoreCase("nuclide_name")) {
|
||||
info.setNuclideName(attribute.getNodeValue());
|
||||
} else if (attribute.getNodeName().equalsIgnoreCase("halflife")) {
|
||||
info.setHalflife(Double.valueOf(attribute.getNodeValue()));
|
||||
}
|
||||
}
|
||||
if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotBlank(info.getNuclideName()) && Objects.nonNull(info.getHalflife())) {
|
||||
mdcInfoMap.put(info.getNuclideName(), info);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotBlank(info.getNuclideName()) && Objects.nonNull(info.getHalflife())) {
|
||||
mdcInfoMap.put(info.getNuclideName(), info);
|
||||
if (CollectionUtils.isNotEmpty(mdcInfoMap)) {
|
||||
redisUtil.set("mdcInfoMap-P", mdcInfoMap);
|
||||
}
|
||||
}
|
||||
} else if (node.getNodeName().equalsIgnoreCase("G")) {//判断节点名称是否是 G
|
||||
//存储文件结果用的map
|
||||
Map<String, CalMDCInfo> mdcInfoMap = new TreeMap<>();
|
||||
//获取节点的子节点
|
||||
NodeList childNodes = node.getChildNodes();
|
||||
//判断子节点是否为空
|
||||
if (Objects.nonNull(childNodes) && childNodes.getLength() > 0) {
|
||||
//遍历子节点信息
|
||||
for (int j=0; j<childNodes.getLength(); j++) {
|
||||
Node childNode = childNodes.item(j);
|
||||
//判断节点名称是否是item
|
||||
if (childNode.getNodeName().equalsIgnoreCase("item")) {
|
||||
//获取节点属性信息
|
||||
NamedNodeMap attributes = childNode.getAttributes();
|
||||
//判断节点属性信息是否为空
|
||||
if (Objects.nonNull(attributes)) {
|
||||
CalMDCInfo info = new CalMDCInfo();
|
||||
//遍历属性信息
|
||||
for (int k=0; k<attributes.getLength(); k++) {
|
||||
//根据顺序读取属性
|
||||
Node attribute = attributes.item(k);
|
||||
if (attribute.getNodeName().equalsIgnoreCase("nuclide_name")) {
|
||||
info.setNuclideName(attribute.getNodeValue());
|
||||
} else if (attribute.getNodeName().equalsIgnoreCase("halflife")) {
|
||||
info.setHalflife(Double.valueOf(attribute.getNodeValue()));
|
||||
}
|
||||
}
|
||||
if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotBlank(info.getNuclideName()) && Objects.nonNull(info.getHalflife())) {
|
||||
mdcInfoMap.put(info.getNuclideName(), info);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(mdcInfoMap)) {
|
||||
redisUtil.set("mdcInfoMap-G", mdcInfoMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(mdcInfoMap)) {
|
||||
redisUtil.set("mdcInfoMap", mdcInfoMap);
|
||||
}
|
||||
} catch (ParserConfigurationException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user