xyc
2024-10-22 3c2e46fef0e866901cbb5de889166b6fda748e5d
同类设备有多个的修改
4个文件已修改
18 ■■■■ 已修改文件
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/ModelNode.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/RbdTreeNode.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/ModelLineService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/ModelNode.java
@@ -40,6 +40,9 @@
    @ApiModelProperty(value = "")
    private String name;
    @ApiModelProperty(value = "设备序号")
    private Integer deviceNo;
    @ApiModelProperty(value = "表决数")
    private Integer voteNum;
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/RbdTreeNode.java
@@ -20,6 +20,8 @@
    private String algorithmType;
    private Integer voteNum;
    private Long dataId;
    private Integer deviceNo;
    private double x;
    private double y;
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/ModelLineService.java
@@ -366,6 +366,12 @@
                    String productType = JsonUtils2.getJsonValueByPath(jsonObject, "data/productType".split("/")).toString();
                    productImg.setProductType(productType);
                    if ("product_sb".equals(productType)) {
                        jsonValue = JsonUtils2.getJsonValueByPath(jsonObject, "data/deviceNo".split("/"));
                        if (jsonValue != null && StringUtils.isNotBlank(jsonValue.toString())) {
                            modelNode.setVoteNum(Integer.valueOf(jsonValue.toString()));
                        } else {
                            modelNode.setDeviceNo(0);
                        }
                        jsonValue = JsonUtils2.getJsonValueByPath(jsonObject, "data/reliabDistribType".split("/"));
                        if (jsonValue != null && StringUtils.isNotBlank(jsonValue.toString())) {
                            productImg.setReliabDistribType(Integer.valueOf(jsonValue.toString()));
@@ -489,6 +495,7 @@
                treeNode.setNodeType(node.getNodeType());
                treeNode.setPicId(node.getPicId());
                treeNode.setDataId(node.getDataId());
                treeNode.setDeviceNo(node.getDeviceNo());
                treeNode.setObjectWidth(node.getWidth());
                treeNode.setObjectHeight(node.getHeight());
                parent.getChildren().add(treeNode);
@@ -785,6 +792,7 @@
            node.setId(root.getId());
            node.setPicId(root.getPicId());
            node.setDataId(root.getDataId());
            node.setDeviceNo(root.getDeviceNo());
            node.setNodeType(root.getNodeType());
            node.setName(root.getName());
            node.setVoteNum(root.getVoteNum());
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java
@@ -1008,9 +1008,10 @@
                        failureModels, repairModels);
            } else if ("5".equals(product.getProductType())) {
                // 设备
                Integer deviceNo = node.getDeviceNo();
                Element nodeTag = parent.addElement("node");
                nodeTag.addAttribute("name", dataId.toString());
                nodeTag.addAttribute("real_name", product.getName());
                nodeTag.addAttribute("name", deviceNo == 0 ? dataId.toString() : dataId.toString()+"-"+deviceNo);
                nodeTag.addAttribute("real_name", deviceNo == 0 ? product.getName() : product.getName()+"-"+deviceNo);
                nodeTag.addAttribute("name_path", product.getNamePath());
                nodeTag.addAttribute("type", "node");