Commit cefcb911 by dong

fix20230319

parent f41aa9b9
...@@ -4,7 +4,8 @@ from py2neo import Graph ...@@ -4,7 +4,8 @@ from py2neo import Graph
def conn_neo4j(): def conn_neo4j():
# graph = Graph("http://localhost:7474", username="neo4j", password="123456") # 本地neo4j # graph = Graph("http://localhost:7474", username="neo4j", password="123456") # 本地neo4j
# graph = Graph("http://39.100.39.50:7476", username="neo4j", password="123456") # 50服务器上的neo4j时使用 # graph = Graph("http://39.100.39.50:7476", username="neo4j", password="123456") # 50服务器上的neo4j时使用
graph = Graph("http://39.100.39.50:7475", username="neo4j", password="century-english-almanac-havana-golf-9040") # 太原的neo4j,测试是借用 # graph = Graph("http://39.100.39.50:7475", username="neo4j", password="century-english-almanac-havana-golf-9040") # 太原的neo4j,测试是借用
graph = Graph("http://39.100.39.50:7475", username="neo4j", password="123456") # 太原的neo4j,测试是借用
return graph return graph
......
...@@ -664,7 +664,7 @@ def find_next(): ...@@ -664,7 +664,7 @@ def find_next():
try: try:
if category == "1": # 查询企业的产品 if category == "1": # 查询企业的产品
url = "http://39.100.39.50:9200/newty_supply_chain/_search" # 产品对企业 url = "http://39.100.39.50:9200/jc_supply_chain/_search" # 产品对企业
# 1、根据公司查询产品 # 1、根据公司查询产品
body = body_by_companyName(name) body = body_by_companyName(name)
result_es = json.loads(requests.post(url=url, json=body).text) result_es = json.loads(requests.post(url=url, json=body).text)
...@@ -699,7 +699,7 @@ def find_next(): ...@@ -699,7 +699,7 @@ def find_next():
} }
return jsonify(code=RET.OK, msg="获取成功", data=result) return jsonify(code=RET.OK, msg="获取成功", data=result)
elif category == "3": # 产品查询供应商 elif category == "3": # 产品查询供应商
url = "http://39.100.39.50:9200/newty_supply_chain/_search" url = "http://39.100.39.50:9200/jc_supply_chain/_search"
body = body_by_products(name) body = body_by_products(name)
companys_return = json.loads(requests.post(url=url, json=body).text) companys_return = json.loads(requests.post(url=url, json=body).text)
res = [i["_source"]["company_name"] for i in companys_return["hits"]["hits"]] res = [i["_source"]["company_name"] for i in companys_return["hits"]["hits"]]
...@@ -728,7 +728,7 @@ def get_semic_map(): ...@@ -728,7 +728,7 @@ def get_semic_map():
res = request.get_json() res = request.get_json()
company_name = res.get('company_name').strip() company_name = res.get('company_name').strip()
c_type = res.get('c_type') c_type = res.get('c_type')
url = "http://39.100.39.50:9200/newty_supply_chain/_search" # 产品对企业 url = "http://39.100.39.50:9200/jc_supply_chain/_search" # 产品对企业
# 1、根据公司查询产品 # 1、根据公司查询产品
body = body_by_companyName(company_name) body = body_by_companyName(company_name)
result_es = json.loads(requests.post(url=url, json=body).text) result_es = json.loads(requests.post(url=url, json=body).text)
......
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