Commit 00a35ce7 by dong

fix20221209

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