Commit 22082100 by 黄静

hj

parent ae684dc1
import pymysql,json
import pymysql,ast
from flask import request
from DBUtils.PooledDB import PooledDB
......@@ -14,18 +14,23 @@ pool = PooledDB(pymysql,8, host=MYSQL_HOST, user=USER, passwd=PASSWORD, db=DB, p
def industry_select(companyName):
company_industry = ''
conn = pool.connection()
cursor = conn.cursor()
sql = 'SELECT * FROM `tj_standard_order` WHERE standard_company_name = "%s" limit 1' % companyName
# cursor = conn.cursor()
cursor = conn.cursor(pymysql.cursors.DictCursor)
# sql = 'SELECT * FROM `tj_standard_order` WHERE standard_company_name = "%s" limit 1' % companyName
sql = 'SELECT * FROM `tj_label_depth_all` WHERE company_name = "%s" limit 1' % companyName
cursor.execute(sql)
standard_order_info = cursor.fetchall()
for row in standard_order_info:
company_industry = row[5]
if company_industry:
company_industry =company_industry
else:
company_industry = ''
management_label = row['management_label']
management_label_list = ast.literal_eval(management_label)
for management_label_item in management_label_list:
if "经营行业" in management_label_item:
company_industry =management_label_item["经营行业"]
else:
company_industry = ''
# print('company_industry',company_industry)
return company_industry
# print(industry_select('云选家网络科技(广东)有限公司'))
print(industry_select('云选家网络科技(广东)有限公司'))
# 根据公司名称获取产品标签两个。知识产权信息;3个(商标、著作权、专利);资产标签2个及分公司情况
def hx_30s(companyName):
conn = pool.connection()
......
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