Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
22082100
Commit
22082100
authored
Jul 09, 2020
by
黄静
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hj
parent
ae684dc1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
entprofile/service/__pycache__/company_30s.cpython-37.pyc
+0
-0
entprofile/service/company_30s.py
+14
-9
No files found.
entprofile/service/__pycache__/company_30s.cpython-37.pyc
View file @
22082100
No preview for this file type
entprofile/service/company_30s.py
View file @
22082100
import
pymysql
,
json
import
pymysql
,
ast
from
flask
import
request
from
flask
import
request
from
DBUtils.PooledDB
import
PooledDB
from
DBUtils.PooledDB
import
PooledDB
...
@@ -14,18 +14,23 @@ pool = PooledDB(pymysql,8, host=MYSQL_HOST, user=USER, passwd=PASSWORD, db=DB, p
...
@@ -14,18 +14,23 @@ pool = PooledDB(pymysql,8, host=MYSQL_HOST, user=USER, passwd=PASSWORD, db=DB, p
def
industry_select
(
companyName
):
def
industry_select
(
companyName
):
company_industry
=
''
company_industry
=
''
conn
=
pool
.
connection
()
conn
=
pool
.
connection
()
cursor
=
conn
.
cursor
()
# cursor = conn.cursor()
sql
=
'SELECT * FROM `tj_standard_order` WHERE standard_company_name = "
%
s" limit 1'
%
companyName
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
)
cursor
.
execute
(
sql
)
standard_order_info
=
cursor
.
fetchall
()
standard_order_info
=
cursor
.
fetchall
()
for
row
in
standard_order_info
:
for
row
in
standard_order_info
:
company_industry
=
row
[
5
]
management_label
=
row
[
'management_label'
]
if
company_industry
:
management_label_list
=
ast
.
literal_eval
(
management_label
)
company_industry
=
company_industry
for
management_label_item
in
management_label_list
:
else
:
if
"经营行业"
in
management_label_item
:
company_industry
=
''
company_industry
=
management_label_item
[
"经营行业"
]
else
:
company_industry
=
''
# print('company_industry',company_industry)
return
company_industry
return
company_industry
#
print(industry_select('云选家网络科技(广东)有限公司'))
print
(
industry_select
(
'云选家网络科技(广东)有限公司'
))
# 根据公司名称获取产品标签两个。知识产权信息;3个(商标、著作权、专利);资产标签2个及分公司情况
# 根据公司名称获取产品标签两个。知识产权信息;3个(商标、著作权、专利);资产标签2个及分公司情况
def
hx_30s
(
companyName
):
def
hx_30s
(
companyName
):
conn
=
pool
.
connection
()
conn
=
pool
.
connection
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment