xyc
2024-08-19 27cf08e72fbff991712384ee7d5c509dc0ccc76f
传给算法包的模型中,增加节点的名称,以方便调试。
1个文件已修改
17 ■■■■■ 已修改文件
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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");