Commit 6b7e9518 by 赵宇

fix

parent b94706d0
...@@ -417,7 +417,7 @@ def policy_details(): ...@@ -417,7 +417,7 @@ def policy_details():
# 列表展示左上角企业 # 列表展示左上角企业
@api_attract.route("/showListb", methods=["POST"]) @api_attract.route("/showListb", methods=["POST"])
def showListb(): def showListb():
req_dic = request.get_json() req_dic = request.get_json() # 企业列表选择 1234567 500强企业-上市企业-高新技术企业-专精特新企业-独角兽企业--瞪羚企业-科技型中小企业
type = req_dic.get("type") # 12345678 (500强-上市-规模-专精特新-高新-科技中小-瞪羚-独角兽) type = req_dic.get("type") # 12345678 (500强-上市-规模-专精特新-高新-科技中小-瞪羚-独角兽)
district = req_dic.get("district") district = req_dic.get("district")
page = req_dic.get("page") page = req_dic.get("page")
...@@ -436,31 +436,32 @@ def showListb(): ...@@ -436,31 +436,32 @@ def showListb():
company = Company.query.filter_by(city="晋城市", district=district) company = Company.query.filter_by(city="晋城市", district=district)
size = company.count() size = company.count()
if type == 1: if type == 1:
company = company.filter_by(isfive=1)
size = company.count()
if type == 2:
company = company.filter_by(quoted_company=1) company = company.filter_by(quoted_company=1)
size = company.count() size = company.count()
if type == 3:
if type == 2:
if district == "晋城市": if district == "晋城市":
company = Company.query.filter_by(scale="1") company = Company.query.filter_by(scale="1")
else: else:
company = Company.query.filter_by(district=district, scale="1") company = Company.query.filter_by(district=district, scale="1")
size = company.count() size = company.count()
if type == 3:
company = company.filter_by(high_new=1)
size = company.count()
if type == 4: if type == 4:
company = company.filter_by(zjtg=1) company = company.filter_by(zjtg=1)
size = company.count() size = company.count()
if type == 5: if type == 5:
company = company.filter_by(high_new=1) company = company.filter_by(tbe=1)
size = company.count() size = company.count()
if type == 6: if type == 6:
company = company.filter_by(tbe=1) company = company.filter_by(tbe_sjmy=1)
size = company.count() size = company.count()
if type == 7: if type == 7:
company = company.filter_by(dengl=1) company = company.filter_by(zjtg_gjjxjr=1)
size = company.count() size = company.count()
if type == 8: if type == 8:
company = company.filter_by(unicorn=1) company = company.filter_by(zjtg_sjxjr=1)
size = company.count() size = company.count()
company = company.paginate(page, per_page=int(per_page)).items company = company.paginate(page, per_page=int(per_page)).items
data = [{ data = [{
......
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