Commit 1e5599ef by dong

fix20221226

parent 7314eea0
......@@ -903,17 +903,21 @@ def project_graph():
data = []
num_li = []
for industry in industry_list:
if industry == '其他':
all_project_count = project_obj.count()
other_num = all_project_count - sum(num_li)
data_dic = {"name": industry, "value": other_num}
data.append(data_dic)
else:
project_count = project_obj.filter(ProjectManagement.industry == industry).count()
num_li.append(project_count)
data_dic = {"name": industry, "value": project_count}
data.append(data_dic)
continue
# if industry == '其他':
# all_project_count = project_obj.count()
# other_num = all_project_count - sum(num_li)
# data_dic = {"name": industry, "value": other_num}
# data.append(data_dic)
# else:
# project_count = project_obj.filter(ProjectManagement.industry == industry).count()
# num_li.append(project_count)
# data_dic = {"name": industry, "value": project_count}
# data.append(data_dic)
# continue
project_count = project_obj.filter(ProjectManagement.industry == industry).count()
num_li.append(project_count)
data_dic = {"name": industry, "value": project_count}
data.append(data_dic)
elif flag == 5:
if project_source == '京津冀':
num1 = project_obj.filter(or_(
......
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