Commit 8d80c271 by 赵宇

fix20220225

parent a6a4f11b
...@@ -32,7 +32,7 @@ def check(name): ...@@ -32,7 +32,7 @@ def check(name):
:return: :return:
''' '''
Cypher = "match (n)-[r]->(m) WHERE m.name='{}' or n.name='{}' return r.type".format(name, name) Cypher = "match (n)-[r]->(m) WHERE m.name='{}' or n.name='{}' return r.type".format(name, name)
res = graph.run(Cypher).data() res = graph1.run(Cypher).data()
res = list(set([i["r.type"] for i in res])) res = list(set([i["r.type"] for i in res]))
if res.__contains__("上游行业") or res.__contains__("下游行业"): if res.__contains__("上游行业") or res.__contains__("下游行业"):
return True return True
...@@ -182,7 +182,7 @@ def findUpDownCompany(name_query, name): # 对中间产品进行上下游产品 ...@@ -182,7 +182,7 @@ def findUpDownCompany(name_query, name): # 对中间产品进行上下游产品
"match (n) -[r:`下游行业`]->(m) WHERE m.name='{}' return n.name as bname,r.type,m.name as sname ".format( "match (n) -[r:`下游行业`]->(m) WHERE m.name='{}' return n.name as bname,r.type,m.name as sname ".format(
name, name, name, name) name, name, name, name)
res_product = graph.run(sql_all).data() res_product = graph1.run(sql_all).data()
res_product = trans_formet(name, res_product) res_product = trans_formet(name, res_product)
nodes = [] nodes = []
links = [] links = []
......
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