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
80a6218a
Commit
80a6218a
authored
Sep 25, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230721
parent
92cd596c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
25 deletions
+10
-25
apps/view_choose/choose_view.py
+10
-25
No files found.
apps/view_choose/choose_view.py
View file @
80a6218a
...
...
@@ -100,27 +100,19 @@ def global_region(industry_id, preference, key_words, district_name, page, per_p
# 土地公共方法
def
global_land
(
key_words
,
district_name
,
land_name
,
land_nature
,
industry_name
,
page
,
per_page
):
try
:
if
key_words
:
carrier_obj
=
CarrierLand
.
query
.
filter
(
and_
(
CarrierLand
.
land_name
.
like
(
'
%
{}
%
'
.
format
(
land_name
))
if
land_name
else
text
(
''
),
CarrierLand
.
land_name
.
like
(
'
%
{}
%
'
.
format
(
land_name
))
if
land_name
else
text
(
''
),
CarrierLand
.
district_name
==
district_name
if
district_name
!=
'晋城市'
else
text
(
''
),
CarrierLand
.
land_nature
.
like
(
'
%
{}
%
'
.
format
(
land_nature
))
if
land_nature
else
text
(
''
),
# CarrierLand.industry_name.like('%{}%'.format(industry_name)) if industry_name else text(''),
CarrierLand
.
audit_status
==
1
))
.
filter
(
)
if
key_words
:
carrier_obj
=
carrier_obj
.
filter
(
or_
(
# CarrierLand.industry_name.like("%" + key_words + "%"),
CarrierLand
.
district_name
.
like
(
"
%
"
+
key_words
+
"
%
"
),
CarrierLand
.
land_name
.
like
(
"
%
"
+
key_words
+
"
%
"
)
))
else
:
carrier_obj
=
CarrierLand
.
query
.
filter
(
CarrierLand
.
land_name
.
like
(
'
%
{}
%
'
.
format
(
land_name
))
if
land_name
else
text
(
''
),
CarrierLand
.
district_name
==
district_name
if
district_name
!=
'晋城市'
else
text
(
''
),
CarrierLand
.
land_nature
==
land_nature
if
land_nature
else
text
(
''
),
# CarrierLand.industry_name.like('%{}%'.format(industry_name)) if industry_name else text(''),
CarrierLand
.
audit_status
==
1
)
land_obj_list
=
carrier_obj
.
order_by
(
CarrierLand
.
upload_time
.
desc
())
.
paginate
(
page
,
per_page
)
.
items
carrier_size
=
len
(
land_obj_list
)
...
...
@@ -152,11 +144,11 @@ def global_land(key_words, district_name, land_name, land_nature, industry_name,
def
global_factory
(
key_words
,
district_name
,
factory_name
,
industry_name
,
page
,
per_page
):
try
:
carrier_obj
=
CarrierFactory
.
query
.
filter
(
and_
(
CarrierFactory
.
factory_name
.
like
(
'
%
{}
%
'
.
format
(
factory_name
))
if
factory_name
else
text
(
''
),
CarrierFactory
.
factory_name
.
like
(
'
%
{}
%
'
.
format
(
factory_name
))
if
factory_name
else
text
(
''
),
CarrierFactory
.
district_name
==
district_name
if
district_name
!=
'晋城市'
else
text
(
''
),
CarrierFactory
.
attract_status
.
like
(
'
%
{}
%
'
.
format
(
industry_name
))
if
industry_name
else
text
(
''
),
CarrierFactory
.
audit_status
==
1
)
)
)
if
key_words
:
carrier_obj
=
carrier_obj
.
filter
(
or_
(
CarrierFactory
.
attract_status
.
like
(
"
%
"
+
key_words
+
"
%
"
),
CarrierFactory
.
district_name
.
like
(
"
%
"
+
key_words
+
"
%
"
),
...
...
@@ -195,27 +187,20 @@ def global_factory(key_words, district_name, factory_name, industry_name, page,
# 楼宇公共方法
def
global_build
(
key_words
,
district_name
,
build_name
,
industry_name
,
build_type
,
page
,
per_page
):
try
:
if
key_words
:
carrier_obj
=
CarrierBuild
.
query
.
filter
(
and_
(
CarrierBuild
.
build_name
.
like
(
'
%
{}
%
'
.
format
(
build_name
))
if
build_name
else
text
(
''
),
CarrierBuild
.
build_name
.
like
(
'
%
{}
%
'
.
format
(
build_name
))
if
build_name
else
text
(
''
),
CarrierBuild
.
district_name
==
district_name
if
district_name
!=
'晋城市'
else
text
(
''
),
CarrierBuild
.
build_type
.
like
(
'
%
{}
%
'
.
format
(
build_type
))
if
build_type
else
text
(
''
),
CarrierBuild
.
attract_status
.
like
(
'
%
{}
%
'
.
format
(
industry_name
))
if
industry_name
else
text
(
''
),
CarrierBuild
.
audit_status
==
1
))
.
filter
(
)
if
key_words
:
carrier_obj
=
carrier_obj
.
filter
(
or_
(
CarrierBuild
.
attract_status
.
like
(
"
%
"
+
key_words
+
"
%
"
),
CarrierBuild
.
district_name
.
like
(
"
%
"
+
key_words
+
"
%
"
),
CarrierBuild
.
build_name
.
like
(
"
%
"
+
key_words
+
"
%
"
),
CarrierBuild
.
build_type
.
like
(
"
%
"
+
key_words
+
"
%
"
)
))
else
:
carrier_obj
=
CarrierBuild
.
query
.
filter
(
CarrierBuild
.
build_name
.
like
(
'
%
{}
%
'
.
format
(
build_name
))
if
build_name
else
text
(
''
),
CarrierBuild
.
district_name
==
district_name
if
district_name
!=
'晋城市'
else
text
(
''
),
CarrierBuild
.
build_type
.
like
(
'
%
{}
%
'
.
format
(
build_type
))
if
build_type
else
text
(
''
),
CarrierBuild
.
attract_status
.
like
(
'
%
{}
%
'
.
format
(
industry_name
))
if
industry_name
else
text
(
''
),
CarrierBuild
.
audit_status
==
1
)
build_obj_list
=
carrier_obj
.
order_by
(
CarrierBuild
.
upload_time
.
desc
())
.
paginate
(
page
,
per_page
)
.
items
carrier_size
=
len
(
build_obj_list
)
...
...
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