Commit 007c40d8 by dong

fix20230307

parent 5bada56c
......@@ -59,6 +59,7 @@ def get_all_enterprise():
"zjtg_gjjxjr": '国家级专精特新小巨人企业' if enterprise.zjtg_gjjxjr == '1' else "",
"zjtg_sjxjr": '省级专精特新小巨人企业' if enterprise.zjtg_sjxjr == '1' else "",
"tbe_sjmy": '省级民营科技企业' if enterprise.tbe_sjmy == '1' else "",
"chain_master": '链主企业' if enterprise.chain_master == '1' else "",
}
data_list.append(data)
data = {"data": data_list, "size": enterprise_all_counts}
......
......@@ -1138,6 +1138,7 @@ def industry_enterprise():
Company.isfive == '1' if aptitude == '中国500强' else text(''),
Company.scale == '1' if aptitude == '规模以上企业' else text(''),
Company.serve == '1' if aptitude == '限额以上服务业' else text(''),
Company.chain_master == '1' if aptitude == '链主企业' else text(''),
)
size = company.count()
companys = company.order_by(Company.hots.desc()).paginate(page, perpage).items # 企业热度倒序
......@@ -1161,7 +1162,8 @@ def industry_enterprise():
"dengl": '瞪羚' if i.dengl == '1' else '',
"isfive": '中国500强' if i.isfive == '1' else '',
"scale": '规模以上企业' if i.scale == '1' else '',
"serve": '限额以上服务业' if i.serve == '1' else ''
"serve": '限额以上服务业' if i.serve == '1' else '',
"chain_master": '链主企业' if i.chain_master == '1' else ''
} for i in companys]
df.sort(key=lambda s: s["hosts"], reverse=True)
......
......@@ -771,6 +771,7 @@ def company_detail():
"zjtg_sjxjr": '省级专精特新小巨人企业' if company.zjtg_sjxjr == '1' else "",
"tbe_sjmy": '省级民营科技企业' if company.tbe_sjmy == '1' else "",
"scale": '规模以上企业' if company.scale == '1' else "",
"chain_master": '链主企业' if company.chain_master == '1' else "",
},
# 经营状况数据封装
"select2_info": {
......@@ -980,6 +981,7 @@ def enterprise_detail():
"zjtg_gjjxjr": '国家级专精特新小巨人企业' if enterprise.zjtg_gjjxjr == '1' else "",
"zjtg_sjxjr": '省级专精特新小巨人企业' if enterprise.zjtg_sjxjr == '1' else "",
"tbe_sjmy": '省级民营科技企业' if enterprise.tbe_sjmy == '1' else "",
"chain_master": '链主企业' if enterprise.chain_master == '1' else "",
},
# 经营状况数据封装
"select2_info": {
......
......@@ -884,7 +884,8 @@ def get_collect():
"dengl": '瞪羚' if i.dengl == '1' else '',
"isfive": '中国500强' if i.isfive == '1' else '',
"scale": '规模以上企业' if i.scale == '1' else '',
"serve": '限额以上服务业' if i.serve == '1' else ''
"serve": '限额以上服务业' if i.serve == '1' else '',
"chain_master": '链主企业' if i.chain_master == '1' else ''
})
else:
continue
......@@ -903,7 +904,9 @@ def get_collect():
"dengl": '瞪羚' if i.dengl == '1' else '',
"isfive": '中国500强' if i.isfive == '1' else '',
"scale": '规模以上企业' if i.scale == '1' else '',
"serve": '限额以上服务业' if i.serve == '1' else ''
"serve": '限额以上服务业' if i.serve == '1' else '',
"chain_master": '链主企业' if i.chain_master == '1' else ''
})
except Exception as e:
current_app.logger.error(e)
......@@ -937,7 +940,9 @@ def get_collect():
"dengl": '瞪羚' if i.dengl == '1' else '',
"isfive": '中国500强' if i.isfive == '1' else '',
"scale": '规模以上企业' if i.scale == '1' else '',
"serve": '限额以上服务业' if i.serve == '1' else ''
"serve": '限额以上服务业' if i.serve == '1' else '',
"chain_master": '链主企业' if i.chain_master == '1' else ''
})
else:
continue
......@@ -956,7 +961,8 @@ def get_collect():
"dengl": '瞪羚' if i.dengl == '1' else '',
"isfive": '中国500强' if i.isfive == '1' else '',
"scale": '规模以上企业' if i.scale == '1' else '',
"serve": '限额以上服务业' if i.serve == '1' else ''
"serve": '限额以上服务业' if i.serve == '1' else '',
"chain_master": '链主企业' if i.chain_master == '1' else ''
})
except Exception as e:
current_app.logger.error(e)
......
......@@ -458,8 +458,9 @@ def company_detail():
'中国500强' if company_obj.isfive == '1' else '',
'山西100强' if company_obj.sxonhun == '1' else '',
'规模以上企业' if company_obj.scale == '1' else '',
'限额以上服务业' if company_obj.serve == '1' else ''
]))
'限额以上服务业' if company_obj.serve == '1' else '',
'链主企业' if company_obj.chain_master == '1' else ''
]))
}
except Exception as e:
......
......@@ -18,6 +18,8 @@ def handle():
i = 1
for company_obj in company_obj_list:
grade_li = []
if company_obj.company_name == '山西永硕新材料科技有限公司':
print('--')
if company_obj.isfive and company_obj.isfive == '1': # 五百强
grade_li.append(5)
else:
......
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