Commit bbc669dc by 赵宇

fix

parent 16d242e8
...@@ -191,7 +191,7 @@ def project(): ...@@ -191,7 +191,7 @@ def project():
"nums4": "{}个".format(ss.start_num), "nums4": "{}个".format(ss.start_num),
"add4": ss.start_num_grade "add4": ss.start_num_grade
}) })
# 产业数量/金额分布图数据 # 已开工项目产业分布/已开工项目到位资金产业分布
# types_list = [] # types_list = []
# industry_dic = {} # industry_dic = {}
project_list = NewProject.query.filter_by(district="晋城市").all() project_list = NewProject.query.filter_by(district="晋城市").all()
...@@ -222,7 +222,7 @@ def project(): ...@@ -222,7 +222,7 @@ def project():
"nums4": "{}个".format(ss.start_num), "nums4": "{}个".format(ss.start_num),
"add4": ss.start_num_grade "add4": ss.start_num_grade
}) })
# 产业数量/金额分布图数据 # 已开工项目产业分布/已开工项目到位资金产业分布
i = 0 i = 0
project_list = NewProject.query.filter_by(district=district).all() project_list = NewProject.query.filter_by(district=district).all()
for project in project_list: for project in project_list:
......
...@@ -386,20 +386,23 @@ def radar_enums(): ...@@ -386,20 +386,23 @@ def radar_enums():
# return jsonify(code=RET.OK, msg="获取成功", data=data) # return jsonify(code=RET.OK, msg="获取成功", data=data)
enterprise = Enterprise.query.filter_by(c_type=inid) enterprise = Enterprise.query.filter_by(c_type=inid)
# 企业列表选择 1234567 500强企业-上市企业-高新技术企业-专精特新企业-独角兽企业--瞪羚企业-科技型中小企业
num_isfive = enterprise.filter_by(isfive="1").count() # 500强企业 num_isfive = enterprise.filter_by(isfive="1").count() # 500强企业
nums_quoted = enterprise.filter_by(quoted_company="1").count() # 上市企业 nums_quoted = enterprise.filter_by(quoted_company="1").count() # 上市企业
nums_financ = enterprise.filter_by(fianacing="1").count() # 有融资小企业
nums_hignew = enterprise.filter_by(high_new="1").count() # 高新技术企业 nums_hignew = enterprise.filter_by(high_new="1").count() # 高新技术企业
nums_tbe = enterprise.filter_by(tbe="1").count() # 科技型中小企业 nums_zjtg = enterprise.filter_by(zjtg="1").count() # 专精特新企业
nums_dengl = enterprise.filter_by(dengl="1").count() # 瞪羚企业
nums_unicorn = enterprise.filter_by(unicorn="1").count() # 独角兽企业 nums_unicorn = enterprise.filter_by(unicorn="1").count() # 独角兽企业
nums_dengl = enterprise.filter_by(dengl="1").count() # 瞪羚企业
nums_tbe = enterprise.filter_by(tbe="1").count() # 科技型中小企业
data = { data = {
"num_isfive": num_isfive, "num_isfive": num_isfive,
"nums_dengl": nums_dengl, "nums_hignew": nums_hignew, "nums_tbe": nums_tbe,
"nums_quoted": nums_quoted, "nums_quoted": nums_quoted,
"nums_financ": nums_financ, "nums_unicorn": nums_unicorn, # "info": info "nums_hignew": nums_hignew,
"nums_zjtg": nums_zjtg,
"nums_unicorn": nums_unicorn, # "info": info
"nums_dengl": nums_dengl,
"nums_tbe": nums_tbe,
} }
# redis缓存 # redis缓存
# redis_store.setex(name_query, 30 * 24 * 3600, json.dumps(data)) # redis_store.setex(name_query, 30 * 24 * 3600, json.dumps(data))
...@@ -419,7 +422,7 @@ def newList(): ...@@ -419,7 +422,7 @@ def newList():
'''查看企业列表——外加详情''' '''查看企业列表——外加详情'''
req_dict = request.get_json() req_dict = request.get_json()
inid = req_dict.get("inid") # 行业id inid = req_dict.get("inid") # 行业id
select = req_dict.get("select") # 企业列表选择 1234567 500强-上市-融资-高新-科技型中小企业--瞪羚-独角兽 select = req_dict.get("select") # 企业列表选择 1234567 500强企业-上市企业-高新技术企业-专精特新企业-独角兽企业--瞪羚企业-科技型中小企业
page = req_dict.get("page") page = req_dict.get("page")
perpage = req_dict.get("perpage") perpage = req_dict.get("perpage")
...@@ -435,21 +438,21 @@ def newList(): ...@@ -435,21 +438,21 @@ def newList():
elif select == 2: # 上市 elif select == 2: # 上市
remind = "上市企业" remind = "上市企业"
enterprise = enterprise.filter_by(quoted_company="1") enterprise = enterprise.filter_by(quoted_company="1")
elif select == 3: # 融资 elif select == 3: # 高新
remind = "融资企业"
enterprise = enterprise.filter_by(fianacing="1")
elif select == 4: # 高新
remind = "高新技术企业" remind = "高新技术企业"
enterprise = enterprise.filter_by(high_new="1") enterprise = enterprise.filter_by(high_new="1")
elif select == 5: # 科技型中小企业 elif select == 4: # 专精特新企业
remind = "科技型中小企业" remind = "专精特新企业"
enterprise = enterprise.filter_by(tbe="1") enterprise = enterprise.filter_by(zjtg="1")
elif select == 5: # 独角兽
remind = "独角兽企业"
enterprise = enterprise.filter_by(unicorn="1")
elif select == 6: # 瞪羚 elif select == 6: # 瞪羚
remind = "瞪羚企业" remind = "瞪羚企业"
enterprise = enterprise.filter_by(dengl="1") enterprise = enterprise.filter_by(dengl="1")
elif select == 7: # 独角兽 elif select == 7: # 科技型中小企业
remind = "独角兽企业" remind = "科技型中小企业"
enterprise = enterprise.filter_by(unicorn="1") enterprise = enterprise.filter_by(tbe="1")
size = enterprise.count() size = enterprise.count()
enters = enterprise.paginate(page, perpage).items enters = enterprise.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