tfse-app-api-v0.2/file/file_impl.py

17 lines
408 B
Python
Raw Normal View History

2022-03-22 17:08:27 +08:00
from file.file_db import FIND_FILE
2021-12-17 17:01:32 +08:00
2022-03-22 17:08:27 +08:00
def get_pdf_file_impl(file_type, fid):
2021-12-17 17:01:32 +08:00
"""
2022-03-22 17:08:27 +08:00
根据文件类型文件ID,获取pdf文件
2021-12-17 17:01:32 +08:00
"""
2022-03-22 17:08:27 +08:00
# ftm: file_type_map
ftm = {
"cc_report": "综信报告",
"cc_certificate": "综信证书",
"esg_report": "ESG报告",
"esg_certificate": "ESG证书"
}
filestream = FIND_FILE(ftm[file_type], fid)
2022-01-13 14:14:55 +08:00
return filestream