Merge branch 'cj' into 'master'
update ESG查看报告/证书 See merge request root/tfse_app_api!13
This commit is contained in:
commit
337842bc9b
|
@ -85,14 +85,23 @@ def rating_records_by_cid(cid):
|
|||
"""
|
||||
report_link = '/file/get_company_report?file_id={}'
|
||||
certification_link = "/file/get_certification?file_id={}"
|
||||
esg_report_link = '/file/get_company_esg_report?file_id={}'
|
||||
esg_certification_link = "/file/get_esg_certification?file_id={}"
|
||||
records = find_rating_records({"企业ID": cid})
|
||||
for record in records:
|
||||
if records is not None:
|
||||
record['报告'] = report_link.format(record['报告fid']) if record['报告fid'] is not None else None
|
||||
record['证书'] = certification_link.format(record['证书fid']) if record['证书fid'] is not None else None
|
||||
record.pop('企业ID')
|
||||
record.pop('报告fid')
|
||||
record.pop('证书fid')
|
||||
if record['评价项目'] == '综合信用评价':
|
||||
record['报告'] = report_link.format(record['报告fid']) if record['报告fid'] is not None else None
|
||||
record['证书'] = certification_link.format(record['证书fid']) if record['证书fid'] is not None else None
|
||||
record.pop('企业ID')
|
||||
record.pop('报告fid')
|
||||
record.pop('证书fid')
|
||||
else:
|
||||
record['报告'] = esg_report_link.format(record['报告fid']) if record['报告fid'] is not None else None
|
||||
record['证书'] = esg_certification_link.format(record['证书fid']) if record['证书fid'] is not None else None
|
||||
record.pop('企业ID')
|
||||
record.pop('报告fid')
|
||||
record.pop('证书fid')
|
||||
return records
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue