Commit d652d3a7 by dong

fix20221208

parent 9e226bfa
......@@ -76,16 +76,14 @@ def find_up_thr(name_query, relation):
@api_atlas.route('/industry/cluster', methods=['GET'])
def get_cluster():
try:
# cluster_obj = Industry.query.filter_by(fid=0).all()
cluster_obj = Industry.query.all()
cluster_obj = Industry.query.filter_by(fid=0).all()
# cluster_obj = Industry.query.all()
data = {
"cluster": [
{"id": i.nid, 'industry_level': 1, 'name': i.name,
"subNodeList": [{'id': j.nid, 'industry_level': 2, "name": j.name} for j in
Industry.query.filter_by(fid=i.nid)]} for i in
cluster_obj]
Industry.query.filter_by(fid=i.nid)]} for i in cluster_obj]
}
return jsonify(code=RET.OK, msg='产业集群名称获取成功!', data=data)
except Exception as e:
......
......@@ -17,7 +17,8 @@ from apps import db, constants, redis_store
# 获取左上角经济指标数据
def get_jjzb(district, year):
'''经济指标数据'''
year1 = datetime.now().year - 1
# year1 = datetime.now().year - 1
year1 = '2022年1-11月'
year2 = datetime.now().year
years = ''
......
......@@ -1008,5 +1008,3 @@ def cancel_collect():
current_app.logger.error(e)
return jsonify(code=RET.DBERR, msg="数据库错误")
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