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
cc7c428d
Commit
cc7c428d
authored
Feb 14, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix202302014
parent
0eb8f89f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
23 deletions
+18
-23
apps/view_atlas/view.py
+18
-23
No files found.
apps/view_atlas/view.py
View file @
cc7c428d
...
@@ -140,30 +140,25 @@ def industry_cluster():
...
@@ -140,30 +140,25 @@ def industry_cluster():
def
get_count
(
industry_id
,
chain_name
,
flag
):
def
get_count
(
industry_id
,
chain_name
,
flag
):
company_count
=
''
company_count
=
''
if
flag
==
1
:
# 晋城
if
flag
==
1
:
# 晋城
if
chain_name
in
[
"钢铁"
,
"光机电"
,
"煤层气"
,
"装备制造"
,
"铸造"
,
# if industry_id in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]:
"煤化工"
,
"新材料"
,
"绿色建材"
,
"医药"
,
"丝麻纺织服装"
,
# company_count = Company.query.filter(
"现代服务业"
,
"数字经济"
,
"文化旅游"
]:
# Company.c_type == industry_id
company_count
=
Company
.
query
.
filter
(
# ).count()
# Company.product_all.like('%{}%'.format(chain_name)),
# else:
Company
.
c_type
==
industry_id
company_count
=
Company
.
query
.
filter
(
)
.
count
()
Company
.
product_all
.
like
(
'
%
{}
%
'
.
format
(
chain_name
)),
else
:
Company
.
c_type
==
industry_id
,
company_count
=
Company
.
query
.
filter
(
)
.
count
()
Company
.
product_all
.
like
(
'
%
{}
%
'
.
format
(
chain_name
)),
Company
.
c_type
==
industry_id
,
)
.
count
()
if
flag
==
2
:
# 全国
if
flag
==
2
:
# 全国
if
chain_name
in
[
"钢铁"
,
"光机电"
,
"煤层气"
,
"装备制造"
,
"铸造"
,
# if industry_id in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]:
"煤化工"
,
"新材料"
,
"绿色建材"
,
"医药"
,
"丝麻纺织服装"
,
# chain_obj = IndustryChain.query.get(industry_id)
"现代服务业"
,
"数字经济"
,
"文化旅游"
]:
# company_count = chain_obj.enterprise_num
chain_obj
=
IndustryChain
.
query
.
get
(
id
=
industry_id
)
# else:
company_count
=
chain_obj
.
enterprise_num
chain_obj
=
IndustryChain
.
query
.
filter
(
else
:
IndustryChain
.
industry_name
==
chain_name
,
chain_obj
=
IndustryChain
.
query
.
filter
(
IndustryChain
.
chain_id
==
industry_id
,
IndustryChain
.
industry_name
==
chain_name
,
)
.
first
()
IndustryChain
.
chain_id
==
industry_id
,
company_count
=
chain_obj
.
enterprise_num
)
.
first
()
company_count
=
chain_obj
.
enterprise_num
return
company_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