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
a2c8b8a4
Commit
a2c8b8a4
authored
Feb 02, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230202
parent
905997cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
apps/view_map/view.py
+10
-5
No files found.
apps/view_map/view.py
View file @
a2c8b8a4
...
...
@@ -345,11 +345,11 @@ def attract_enterprise():
try
:
enterprise_obj
=
Enterprise
.
query
.
filter
(
Enterprise
.
product_all
.
like
(
"
%
{}
%
"
.
format
(
product
))
if
product
else
text
(
''
),
Enterprise
.
product_all1
.
like
(
"
%
{}
%
"
.
format
(
product
))
if
product
else
text
(
''
),
# 测试用
#
Enterprise.product_all.like("%{}%".format(product)) if product else text(''),
#
Enterprise.product_all1.like("%{}%".format(product)) if product else text(''), # 测试用
Enterprise
.
entype
.
like
(
'
%
{}
%
'
.
format
(
entype
))
if
entype
else
text
(
''
),
Enterprise
.
company_name
.
like
(
'
%
{}
%
'
.
format
(
company_name
))
if
company_name
else
text
(
''
),
Enterprise
.
c_type
==
inid
if
inid
else
text
(
''
),
Enterprise
.
c_type
==
inid
if
not
product
else
text
(
''
),
Enterprise
.
public_id
==
quoted
if
quoted
else
text
(
''
),
Enterprise
.
province
==
province
if
province
else
text
(
''
),
Enterprise
.
city
==
city
if
city
else
text
(
''
),
...
...
@@ -363,8 +363,13 @@ def attract_enterprise():
Enterprise
.
dengl
==
'1'
if
qualificat
==
'瞪羚企业'
else
text
(
''
),
Enterprise
.
isfive
==
'1'
if
qualificat
==
'中国500强企业'
else
text
(
''
),
Enterprise
.
scale
==
'1'
if
qualificat
==
'规模以上企业'
else
text
(
''
),
Enterprise
.
serve
==
'1'
if
qualificat
==
'限额以上服务业企业'
else
text
(
''
),
)
Enterprise
.
serve
==
'1'
if
qualificat
==
'限额以上服务业企业'
else
text
(
''
)
)
.
filter
(
or_
(
Enterprise
.
product_all
.
like
(
"
%
{}
%
"
.
format
(
product
))
if
product
else
text
(
''
),
Enterprise
.
product_all1
.
like
(
"
%
{}
%
"
.
format
(
product
))
if
product
else
text
(
''
)))
# enterprise_obj = enterprise_obj.filter(or_(Enterprise.product_all.like("%{}%".format(product)) if product else text(''),
# Enterprise.product_all1.like("%{}%".format(product)) if product else text(''), # 测试用
# ))
size
=
enterprise_obj
.
count
()
enterprise_obj_list
=
enterprise_obj
.
paginate
(
page
,
perpage
)
.
items
...
...
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