Commit c53e9a4f by dong

fix20230411

parent 686df175
......@@ -344,8 +344,8 @@ def find_up_thr1(chain_id, industry_type, industry_id, flag):
"subNodeList": []
}
node_two["subNodeList"].append(node_thr)
node_one["subNodeList"].append(node_two)
node_two.update({"company_count": len(set(two_id_li))})
node_one["subNodeList"].append(node_two)
# node_one.update({"company_count": len(set(one_id_li)), "enterprise_count": total_count})
node_one.update({"company_count": len(set(one_id_li))})
data["subNodeList"].append(node_one)
......@@ -1112,12 +1112,12 @@ def search_enterprise():
return jsonify(code=RET.DBERR, msg='查询出错!')
def get_product_li(product):
def get_product_li(product, inid):
res_two_li = []
res_three_li = []
product_id = IndustryChain.query.filter_by(industry_name=product).first().id
product_id = IndustryChain.query.filter_by(industry_name=product, chain_id=inid).first().id
product_li = [{"chain_name": product, "chain_name_id": product_id}]
chain_one_obj_list = IndustryChain.query.filter_by(relate_id=product_id).all()
chain_one_obj_list = IndustryChain.query.filter_by(relate_id=product_id, chain_id=inid).all()
res_one_li = [{"chain_name": chain_one_obj.industry_name,
"chain_name_id": chain_one_obj.id
} for chain_one_obj in chain_one_obj_list]
......@@ -1193,7 +1193,7 @@ def industry_enterprise():
if product:
# 点击上级环节,展示本级所有企业
product_li = get_product_li(product)
product_li = get_product_li(product, inid)
company1 = []
for product in product_li:
company2 = ''
......
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