Browse Source

fix: 修复企业集团节点不存在问题

许家凯 1 năm trước cách đây
mục cha
commit
16aee7dcd9

+ 1 - 1
src/main/java/com/winhc/max/compute/graph/job/enterprise_group/EnterpriseGroupReader.java

@@ -72,7 +72,7 @@ public class EnterpriseGroupReader extends
                 holderTypeVal = 3;
             } else if (holderType != null && holderType.get() == 5) {
                 holderTypeVal = 2;
-            } else if (holderType == null) {
+            } else if (holderType == null || holderType.get() == -2 || holderType.get() == 3) {
                 holderTypeVal = 4;
             }
 

+ 8 - 0
src/main/java/com/winhc/max/compute/graph/job/enterprise_group/entity/VertexComputeInfo.java

@@ -64,6 +64,14 @@ public class VertexComputeInfo {
             return vertexComputeInfo;
         }
 
+        //todo 为解决公司股东不存在的情况,如 华为资产管理委员会 不存在
+//        List<Edge<Text, HolderEdge>> tmpEdge = edges.stream().filter(e -> e.getValue().getHolderType().get() != 4).collect(Collectors.toList());
+//        if (tmpEdge == null || tmpEdge.isEmpty()) {
+//            VertexComputeInfo vertexComputeInfo = new VertexComputeInfo();
+//            vertexComputeInfo.manualStop = manualStop;
+//            return vertexComputeInfo;
+//        }
+
 
         //控股股东,及出资比例
         Map<String, Double> majorityShareholder = edges.getMajorityShareholder(legalEntityIds);