Bladeren bron

feat: 可靠性预计

NickOooo 1 maand geleden
bovenliggende
commit
328383b6ec

+ 2 - 3
nationrel-module-rp-biz/src/main/java/com/nationrel/modules/rp/service/impl/PredictionStruTreeServiceImpl.java

@@ -180,9 +180,8 @@ public class PredictionStruTreeServiceImpl extends ServiceImpl<PredictionStruTre
 
         for (String[] structure : structures) {
             String parentStruId = null;
+            String rootStruId = null;
             for (int i = 0; i < structure.length; i++) {
-                String rootStruId = null;
-
                 if (parentStruNode.getParentStruId().equals(RpConstant.ROOTNODE_PARENT)) {
                     rootStruId = parentStruNode.getStruId();
                 } else {
@@ -191,7 +190,7 @@ public class PredictionStruTreeServiceImpl extends ServiceImpl<PredictionStruTre
                 String childStruId = UuidUtils.getUUID();
                 if (i == 0 && StringUtils.isNotEmpty(structure[i])) {
                     PredictionStruTree struTree = this.buildStruTree(predictionId, childStruId, rootStruId, structure[i]);
-                    parentStruId = struTree.getId();
+                    parentStruId = struTree.getStruId();
                     struChildrenTreeList.add(struTree);
                     newStruList.add(struTree.getStruId());
                 } else {