Commit 62d705e9 by dong

fix20230314

parent 49b4993d
......@@ -103,6 +103,7 @@ def index_search():
land_obj = CarrierLand.query.filter(
# CarrierLand.land_name.like('%{}%'.format(carrier_name)) if carrier_name else text(''),
CarrierLand.land_nature == nature if nature else text(''),
CarrierLand.district_name == district if district else text(''),
CarrierLand.total_area > float(area[0]) if area[0] else text(''),
CarrierLand.total_area <= float(area[1]) if area[1] else text(''),
).filter(
......@@ -117,6 +118,7 @@ def index_search():
land_obj = CarrierLand.query.filter(
CarrierLand.land_name.like('%{}%'.format(carrier_name)) if carrier_name else text(''),
CarrierLand.land_nature == nature if nature else text(''),
CarrierLand.district_name == district if district else text(''),
CarrierLand.total_area > float(area[0]) if area[0] else text(''),
CarrierLand.total_area <= float(area[1]) if area[1] else text(''),
)
......@@ -137,6 +139,7 @@ def index_search():
build_obj = CarrierBuild.query.filter(
# CarrierBuild.build_name.like('%{}%'.format(carrier_name)) if carrier_name else text(''),
CarrierBuild.attract_status == industry if industry else text(''),
CarrierBuild.district_name == district if district else text(''),
CarrierBuild.build_area > build_area[0] if build_area[0] else text(''),
CarrierBuild.build_area <= build_area[1] if build_area[1] else text(''),
CarrierBuild.rent_money > rent_money[0] if rent_money[0] else text(''),
......@@ -155,6 +158,7 @@ def index_search():
build_obj = CarrierBuild.query.filter(
CarrierBuild.build_name.like('%{}%'.format(carrier_name)) if carrier_name else text(''),
CarrierBuild.attract_status == industry if industry else text(''),
CarrierBuild.district_name == industry if industry else text(''),
CarrierBuild.build_area > build_area[0] if build_area[0] else text(''),
CarrierBuild.build_area <= build_area[1] if build_area[1] else text(''),
CarrierBuild.rent_money > rent_money[0] if rent_money[0] else text(''),
......@@ -178,6 +182,7 @@ def index_search():
factory_obj = CarrierFactory.query.filter(
# CarrierFactory.factory_name.like('%{}%'.format(carrier_name)) if carrier_name else text(''),
CarrierFactory.attract_status == industry if industry else text(''),
CarrierFactory.district_name == district if district else text(''),
CarrierFactory.factory_area > build_area[0] if build_area[0] else text(''),
CarrierFactory.factory_area <= build_area[1] if build_area[1] else text('')
).filter(
......@@ -192,6 +197,7 @@ def index_search():
factory_obj = CarrierFactory.query.filter(
CarrierFactory.factory_name.like('%{}%'.format(carrier_name)) if carrier_name else text(''),
CarrierFactory.attract_status == industry if industry else text(''),
CarrierFactory.district_name == district if district else text(''),
CarrierFactory.factory_area > build_area[0] if build_area[0] else text(''),
CarrierFactory.factory_area <= build_area[1] if build_area[1] else text('')
)
......@@ -212,6 +218,7 @@ def index_search():
zone_obj = Induzone.query.filter(
# Induzone.name.like('%{}%'.format(carrier_name)) if carrier_name else text(''),
Induzone.navigat == industry if industry else text(''),
Induzone.district == district if district else text(''),
Induzone.level == zone_level if zone_level else text('')
).filter(
or_(
......@@ -227,6 +234,7 @@ def index_search():
zone_obj = Induzone.query.filter(
Induzone.name.like('%{}%'.format(carrier_name)) if carrier_name else text(''),
Induzone.navigat == industry if industry else text(''),
Induzone.district == district if district else text(''),
Induzone.level == zone_level if zone_level else text('')
)
zone_obj_list = zone_obj.paginate(page, perpage).items
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment