From 27cf08e72fbff991712384ee7d5c509dc0ccc76f Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期一, 19 八月 2024 15:37:43 +0800
Subject: [PATCH] 传给算法包的模型中,增加节点的名称,以方便调试。
---
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java
index b9b65f5..4eccb68 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java
@@ -630,7 +630,7 @@
if (xmlWriter != null) xmlWriter.close();
}
// XML瀛樼洏
- update(simulatAssess);
+ insert(simulatAssess);
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("缁勮绠楁硶搴撲豢鐪熻绠楃敤妯″瀷XML澶辫触: " + e.getMessage());
@@ -803,10 +803,11 @@
"end".equals(item.getAlgorithmType())).collect(Collectors.toList()).get(0);
ModelNode computerNode = modelNodeAndVnodeList.stream().filter(item ->
endAlgo.getComputerList().equals(item.getId().toString())).collect(Collectors.toList()).get(0);
+ XhProductModel product = xhProductModelDao.getById(productId);
node2DOM(taskId,
taskPhaseModel,
gkModelTop.getModelId(),
- productId,
+ product,
productList,
paramDataList,
gkModelsAssembled,
@@ -822,7 +823,7 @@
private void node2DOM(Long taskId,
TaskPhaseModel taskPhaseModel,
Long modelId,
- Long productId,
+ XhProductModel productTop,
List<XhProductModel> productList,
List<ParamData> paramDataList,
List<OperatConditModel> gkModelsAssembled,
@@ -850,7 +851,7 @@
node2DOM(taskId,
taskPhaseModel,
gkModel.getModelId(),
- product.getId(),
+ productTop,
productList,
paramDataList,
gkModelsAssembled,
@@ -863,6 +864,8 @@
// 璁惧
Element nodeTag = parent.addElement("node");
nodeTag.addAttribute("name", dataId.toString());
+ nodeTag.addAttribute("real_name", product.getName());
+ nodeTag.addAttribute("name_path", product.getNamePath());
nodeTag.addAttribute("type", "node");
ParamData paramData = paramDataList.stream().filter(item ->
@@ -904,10 +907,12 @@
Algorithm algo = algorithmList.stream().filter(item ->
node.getId().equals(item.getId())).collect(Collectors.toList()).get(0);
Element element = parent.addElement("logic");
- if (null == productId) {
+ if (null == productTop) {
element.addAttribute("name", algo.getId().toString());
} else {
- element.addAttribute("name", productId.toString());
+ element.addAttribute("name", productTop.getId().toString());
+ element.addAttribute("real_name", productTop.getName());
+ element.addAttribute("name_path", productTop.getNamePath());
}
if ("series".equals(algo.getAlgorithmType())) {
element.addAttribute("type", "series");
--
Gitblit v1.9.1