|
@@ -22,6 +22,7 @@ import java.io.IOException;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
+import java.util.Set;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -120,7 +121,13 @@ public class EnterpriseGroupVertex extends
|
|
|
for (String destVertexId : vertexInfo.getHoldCompanyId()) {
|
|
|
boolean flag = message.routeLog(destVertexId);
|
|
|
if (!flag) {
|
|
|
- mergeMsg2Vertex(getValue(), Arrays.asList(message), null);
|
|
|
+ //todo:debug
|
|
|
+ /*prodEnvDebug.debug_3(getId()
|
|
|
+ , "\nvertexInfo: {}\nroteLog:{}\n"
|
|
|
+ , vertexInfo
|
|
|
+ ,message
|
|
|
+ );
|
|
|
+ mergeMsg2Vertex(getValue(), Arrays.asList(message), null);*/
|
|
|
continue;
|
|
|
}
|
|
|
message.addStockRightControlChain(getId().toString(), vertexInfo.getInvestmentProportion(destVertexId), destVertexId);
|
|
@@ -211,19 +218,27 @@ public class EnterpriseGroupVertex extends
|
|
|
if (!getValue().isOutput()) {
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+ Set<String> holdCompanyId = getValue().getHoldCompanyIds().tuple2Set();
|
|
|
|
|
|
//输出
|
|
|
Text enterprise_group_hold_company_id = getId();
|
|
|
Text enterprise_group_hold_company_name = getValue().getCompanyName();
|
|
|
- LongWritable hold_num = new LongWritable(getValue().getHoldNum().get() + 1);
|
|
|
- Text group_company_id = new Text(gson.toJson(getValue().getHoldCompanyIds().tuple2List()));
|
|
|
- Text group_investment_company_id = new Text(gson.toJson(getValue().getGroupInvestmentCompanyIds().tuple2List()));
|
|
|
- Text group_holder_company_id = new Text(gson.toJson(getValue().getGroupHolderCompanyIds().tuple2List()));
|
|
|
+ Text group_company_id = new Text(gson.toJson(holdCompanyId));
|
|
|
+
|
|
|
+ //todo:可能会出现集团股东 本就是控股企业,需要排除
|
|
|
+ Set<String> groupInvestmentCompanyId = getValue().getGroupInvestmentCompanyIds().tuple2Set();
|
|
|
+ groupInvestmentCompanyId.removeAll(holdCompanyId);
|
|
|
+ Text group_investment_company_id = new Text(gson.toJson(groupInvestmentCompanyId));
|
|
|
+ Set<String> groupHolderCompanyId = getValue().getGroupHolderCompanyIds().tuple2Set();
|
|
|
+ groupHolderCompanyId.removeAll(holdCompanyId);
|
|
|
+ Text group_holder_company_id = new Text(gson.toJson(groupHolderCompanyId));
|
|
|
Text group_controller_keyno = getValue().getGroupControllerKeyno();
|
|
|
Text stockRightControlChain = getValue().getStockRightControlChain();
|
|
|
|
|
|
- List<String> subgroupList = getValue().getSubgroup().tuple2List();
|
|
|
+ LongWritable hold_num = new LongWritable(holdCompanyId.size() + 1);
|
|
|
+
|
|
|
+
|
|
|
+ List<String> subgroupList = getValue().getSubgroup().tuple2ListByDistinct();
|
|
|
Text subgroup = new Text();
|
|
|
if (getValue().getCompanyName().toString().contains("集团")) {
|
|
|
subgroup = new Text(subgroupList.stream().filter(e -> !e.equals(getId().toString())).collect(Collectors.joining(",")));
|