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
78db3f05
Commit
78db3f05
authored
Feb 13, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix202302013
parent
e07d0d98
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
9 deletions
+20
-9
apps/view_atlas/view.py
+20
-9
No files found.
apps/view_atlas/view.py
View file @
78db3f05
...
...
@@ -111,16 +111,27 @@ def industry_cluster():
def
get_count
(
industry_id
,
chain_name
,
flag
):
company_count
=
''
if
flag
==
1
:
# 晋城
company_count
=
Company
.
query
.
filter
(
Company
.
product_all
.
like
(
'
%
{}
%
'
.
format
(
chain_name
)),
Company
.
c_type
==
industry_id
,
)
.
count
()
if
chain_name
in
[
"钢铁"
,
"光机电"
,
"煤层气"
,
"装备制造"
,
"铸造"
,
"煤化工"
,
"新材料"
,
"绿色建材"
,
"医药"
,
"丝麻纺织服装"
,
"现代服务业"
,
"数字经济"
,
"文化旅游"
]:
company_count
=
Company
.
query
.
filter
(
Company
.
product_all
.
like
(
'
%
{}
%
'
.
format
(
chain_name
)),
Company
.
c_type
==
industry_id
,
)
.
count
()
else
:
company_count
=
Company
.
query
.
filter
(
Company
.
product_all
.
like
(
'
%
{}
%
'
.
format
(
chain_name
)))
.
count
()
if
flag
==
2
:
# 全国
company_count
=
Enterprise
.
query
.
filter
(
Enterprise
.
product_all
.
like
(
'
%
{}
%
'
.
format
(
chain_name
)),
Enterprise
.
c_type
==
industry_id
,
)
.
count
()
# print(chain_name + '===' + str(company_count))
if
chain_name
in
[
"钢铁"
,
"光机电"
,
"煤层气"
,
"装备制造"
,
"铸造"
,
"煤化工"
,
"新材料"
,
"绿色建材"
,
"医药"
,
"丝麻纺织服装"
,
"现代服务业"
,
"数字经济"
,
"文化旅游"
]:
company_count
=
Enterprise
.
query
.
filter
(
Enterprise
.
product_all
.
like
(
'
%
{}
%
'
.
format
(
chain_name
)),
Enterprise
.
c_type
==
industry_id
,
)
.
count
()
else
:
company_count
=
Enterprise
.
query
.
filter
(
Enterprise
.
product_all
.
like
(
'
%
{}
%
'
.
format
(
chain_name
)))
.
count
()
return
company_count
...
...
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