Commit a2c8b8a4 by dong

fix20230202

parent 905997cb
......@@ -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
......
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