Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mancheng
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
Administrator
mancheng
Commits
d5aefa9a
Commit
d5aefa9a
authored
Mar 08, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230308
parent
007c40d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
13 deletions
+10
-13
apps/view_360company/view.py
+5
-10
apps/view_atlas/view.py
+3
-1
insert_company_hots.py
+2
-2
No files found.
apps/view_360company/view.py
View file @
d5aefa9a
...
@@ -168,15 +168,11 @@ def open_dists():
...
@@ -168,15 +168,11 @@ def open_dists():
# 搜索接口
# 搜索接口
@api_portraits.route
(
"/EsSearch"
,
methods
=
[
"POST"
])
@api_portraits.route
(
"/EsSearch"
,
methods
=
[
"POST"
])
#
@login_required
@login_required
def
search
():
def
search
():
"""
"""
获取用户信息
获取用户信息
"""
"""
# token = request.headers["token"]
# user = verify_token(token)
# user_id = user.id
# user_id = 5
# 参数获取
# 参数获取
req_dict
=
request
.
get_json
()
req_dict
=
request
.
get_json
()
company
=
req_dict
.
get
(
"company_name"
)
# 搜索企业名称
company
=
req_dict
.
get
(
"company_name"
)
# 搜索企业名称
...
@@ -197,11 +193,6 @@ def search():
...
@@ -197,11 +193,6 @@ def search():
page
=
req_dict
.
get
(
"page"
)
# 页码
page
=
req_dict
.
get
(
"page"
)
# 页码
per_page
=
req_dict
.
get
(
"per_page"
)
# 每页大小
per_page
=
req_dict
.
get
(
"per_page"
)
# 每页大小
# if area == []:
# area = ["", "", ""]
# province = area[0]
# city = area[1]
# district = area[2]
# 页数
# 页数
if
not
page
:
if
not
page
:
page
=
1
page
=
1
...
@@ -301,6 +292,8 @@ def search():
...
@@ -301,6 +292,8 @@ def search():
"dengl"
:
'瞪羚企业'
if
i
[
"_source"
][
"dengl"
]
==
"1"
else
''
,
"dengl"
:
'瞪羚企业'
if
i
[
"_source"
][
"dengl"
]
==
"1"
else
''
,
"unicorn"
:
'独角兽企业'
if
i
[
"_source"
][
"unicorn"
]
==
"1"
else
''
,
"unicorn"
:
'独角兽企业'
if
i
[
"_source"
][
"unicorn"
]
==
"1"
else
''
,
"isfive"
:
'500强企业'
if
i
[
"_source"
][
"isfive"
]
==
'1'
else
''
,
"isfive"
:
'500强企业'
if
i
[
"_source"
][
"isfive"
]
==
'1'
else
''
,
# "serve": '限额以上服务业' if i["_source"]["serve"] == '1' else '',
# "chain_master": '链主企业' if i["_source"]["chain_master"] == '1' else '',
})
})
else
:
else
:
data_list
.
append
({
data_list
.
append
({
...
@@ -320,6 +313,8 @@ def search():
...
@@ -320,6 +313,8 @@ def search():
"dengl"
:
'瞪羚企业'
if
i
[
"_source"
][
"dengl"
]
==
"1"
else
''
,
"dengl"
:
'瞪羚企业'
if
i
[
"_source"
][
"dengl"
]
==
"1"
else
''
,
"unicorn"
:
'独角兽企业'
if
i
[
"_source"
][
"unicorn"
]
==
"1"
else
''
,
"unicorn"
:
'独角兽企业'
if
i
[
"_source"
][
"unicorn"
]
==
"1"
else
''
,
"isfive"
:
'500强企业'
if
i
[
"_source"
][
"isfive"
]
==
'1'
else
''
,
"isfive"
:
'500强企业'
if
i
[
"_source"
][
"isfive"
]
==
'1'
else
''
,
# "serve": '限额以上服务业' if i["_source"]["serve"] == '1' else '',
# "chain_master": '链主企业' if i["_source"]["chain_master"] == '1' else '',
})
})
except
Exception
as
e
:
except
Exception
as
e
:
current_app
.
logger
.
error
(
e
)
current_app
.
logger
.
error
(
e
)
...
...
apps/view_atlas/view.py
View file @
d5aefa9a
...
@@ -1152,7 +1152,7 @@ def industry_enterprise():
...
@@ -1152,7 +1152,7 @@ def industry_enterprise():
"entype"
:
i
.
entype
,
"entype"
:
i
.
entype
,
"address"
:
i
.
address
,
"address"
:
i
.
address
,
"telephone"
:
i
.
telephone
,
"telephone"
:
i
.
telephone
,
"hosts"
:
'企业热度'
if
i
.
hots
else
''
,
"hosts"
:
i
.
hots
,
"high_new"
:
'高新技术企业'
if
i
.
high_new
==
'1'
else
''
,
"high_new"
:
'高新技术企业'
if
i
.
high_new
==
'1'
else
''
,
"tbe"
:
'科技型中小企业'
if
i
.
tbe
==
'1'
else
''
,
"tbe"
:
'科技型中小企业'
if
i
.
tbe
==
'1'
else
''
,
"quoted_company"
:
'上市企业'
if
i
.
quoted_company
==
'1'
else
''
,
"quoted_company"
:
'上市企业'
if
i
.
quoted_company
==
'1'
else
''
,
...
@@ -1163,6 +1163,8 @@ def industry_enterprise():
...
@@ -1163,6 +1163,8 @@ def industry_enterprise():
"isfive"
:
'中国500强'
if
i
.
isfive
==
'1'
else
''
,
"isfive"
:
'中国500强'
if
i
.
isfive
==
'1'
else
''
,
"scale"
:
'规模以上企业'
if
i
.
scale
==
'1'
else
''
,
"scale"
:
'规模以上企业'
if
i
.
scale
==
'1'
else
''
,
"serve"
:
'限额以上服务业'
if
i
.
serve
==
'1'
else
''
,
"serve"
:
'限额以上服务业'
if
i
.
serve
==
'1'
else
''
,
"fianacing"
:
'融资企业'
if
i
.
fianacing
==
'1'
else
''
,
"patent"
:
'有专利企业'
if
i
.
patent
==
'1'
else
''
,
"chain_master"
:
'链主企业'
if
i
.
chain_master
==
'1'
else
''
"chain_master"
:
'链主企业'
if
i
.
chain_master
==
'1'
else
''
}
for
i
in
companys
]
}
for
i
in
companys
]
df
.
sort
(
key
=
lambda
s
:
s
[
"hosts"
],
reverse
=
True
)
df
.
sort
(
key
=
lambda
s
:
s
[
"hosts"
],
reverse
=
True
)
...
...
insert_company_hots.py
View file @
d5aefa9a
...
@@ -18,8 +18,8 @@ def handle():
...
@@ -18,8 +18,8 @@ def handle():
i
=
1
i
=
1
for
company_obj
in
company_obj_list
:
for
company_obj
in
company_obj_list
:
grade_li
=
[]
grade_li
=
[]
if
company_obj
.
company_name
==
'山西永硕新材料科技有限公司'
:
#
if company_obj.company_name == '山西永硕新材料科技有限公司':
print
(
'--'
)
#
print('--')
if
company_obj
.
isfive
and
company_obj
.
isfive
==
'1'
:
# 五百强
if
company_obj
.
isfive
and
company_obj
.
isfive
==
'1'
:
# 五百强
grade_li
.
append
(
5
)
grade_li
.
append
(
5
)
else
:
else
:
...
...
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