Commit 1e5599ef by dong

fix20221226

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