Commit 00a35ce7 by dong

fix20221209

parent a86d0cae
...@@ -124,7 +124,6 @@ def get_count(chain_name): ...@@ -124,7 +124,6 @@ def get_count(chain_name):
return company_count return company_count
def find_up_thr1(industry_type, industry_id): def find_up_thr1(industry_type, industry_id):
# relation 1为上游,2为中游,3为下游 # relation 1为上游,2为中游,3为下游
relation = '' relation = ''
...@@ -155,8 +154,9 @@ def find_up_thr1(industry_type, industry_id): ...@@ -155,8 +154,9 @@ def find_up_thr1(industry_type, industry_id):
company_count = get_count(chain_name) company_count = get_count(chain_name)
# 一级 # 一级
node_one = { node_one = {
"node": "{}({})".format(chain_name, company_count), "node": "{}".format(chain_name),
"level": 2, "level": 2,
"company_count": company_count,
"subNodeList": [] "subNodeList": []
} }
# 获取二级节点 # 获取二级节点
...@@ -171,8 +171,9 @@ def find_up_thr1(industry_type, industry_id): ...@@ -171,8 +171,9 @@ def find_up_thr1(industry_type, industry_id):
company_count = get_count(chain_name) company_count = get_count(chain_name)
# 二级 # 二级
node_two = { node_two = {
"node": "{}({})".format(chain_name, company_count), "node": "{}".format(chain_name),
"level": 3, "level": 3,
"company_count": company_count,
"subNodeList": [] "subNodeList": []
} }
# 获取第三级节点 # 获取第三级节点
...@@ -186,8 +187,9 @@ def find_up_thr1(industry_type, industry_id): ...@@ -186,8 +187,9 @@ def find_up_thr1(industry_type, industry_id):
company_count = get_count(chain_name) company_count = get_count(chain_name)
# 三级 # 三级
node_thr = { node_thr = {
"node": "{}({})".format(chain_name, company_count), "node": "{}".format(chain_name),
"level": 4, "level": 4,
"company_count": company_count,
"subNodeList": [] "subNodeList": []
} }
node_two["subNodeList"].append(node_thr) node_two["subNodeList"].append(node_thr)
......
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