Commit fd8029fb by dong

fix20230331

parent 3cd8f621
......@@ -288,13 +288,14 @@ def find_up_thr1(chain_id, industry_type, industry_id, flag):
# 一级的企业数量
id_list, company_count = get_count(chain_id, industry_id, chain_name1, flag)
one_id_li.extend(id_list)
total_count += company_count
# total_count += company_count
# 一级
node_one = {
"node": "{}".format(chain_name1),
"level": 2,
"company_count": len(set(one_id_li)),
"enterprise_count": total_count,
# "enterprise_count": total_count,
"enterprise_count": company_count,
"subNodeList": []
}
# 获取二级节点
......@@ -310,7 +311,7 @@ def find_up_thr1(chain_id, industry_type, industry_id, flag):
two_id_li.extend(id_list)
one_id_li.extend(two_id_li)
total_count += company_count
# total_count += company_count
# 二级
node_two = {
......@@ -332,7 +333,7 @@ def find_up_thr1(chain_id, industry_type, industry_id, flag):
three_id_li.extend(id_list)
two_id_li.extend(three_id_li)
one_id_li.extend(two_id_li)
total_count += company_count
# total_count += company_count
# 三级
node_thr = {
......@@ -345,7 +346,7 @@ def find_up_thr1(chain_id, industry_type, industry_id, flag):
node_two["subNodeList"].append(node_thr)
node_one["subNodeList"].append(node_two)
# node_one.update({"company_count": total_count})
node_one.update({"company_count": len(set(one_id_li)), "enterprise_count": total_count})
# node_one.update({"company_count": len(set(one_id_li)), "enterprise_count": total_count})
data["subNodeList"].append(node_one)
return data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment