b6896a10 by 周伟奇

fix excel extention

1 parent eb21c5bc
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
2 2
3 supervisor==4.2.0 3 supervisor==4.2.0
4 gunicorn==20.0.4 4 gunicorn==20.0.4
5 gevent==20.6.2
......
...@@ -84,7 +84,7 @@ class Command(BaseCommand, LoggerMixin): ...@@ -84,7 +84,7 @@ class Command(BaseCommand, LoggerMixin):
84 if not doc.application_id.startswith(consts.FIXED_APPLICATION_ID_PREFIX): 84 if not doc.application_id.startswith(consts.FIXED_APPLICATION_ID_PREFIX):
85 self.edms.download(pdf_path, doc.metadata_version_id) 85 self.edms.download(pdf_path, doc.metadata_version_id)
86 86
87 excel_path = os.path.join(doc_data_path, '{0}.xls'.format(doc.id)) 87 excel_path = os.path.join(doc_data_path, '{0}.xlsx'.format(doc.id))
88 self.cronjob_log.info('{0} [pdf download success] [business_type={1}] [doc_id={2}] [pdf_path={3}]'.format( 88 self.cronjob_log.info('{0} [pdf download success] [business_type={1}] [doc_id={2}] [pdf_path={3}]'.format(
89 self.log_base, business_type, doc.id, pdf_path)) 89 self.log_base, business_type, doc.id, pdf_path))
90 return doc_data_path, excel_path, pdf_path 90 return doc_data_path, excel_path, pdf_path
......
...@@ -12,7 +12,7 @@ class DocHandler: ...@@ -12,7 +12,7 @@ class DocHandler:
12 elif file == 'img': 12 elif file == 'img':
13 return '/data/{1}/{0}/{0}_img.zip'.format(doc_id, business_type) 13 return '/data/{1}/{0}/{0}_img.zip'.format(doc_id, business_type)
14 else: 14 else:
15 return '/data/{1}/{0}/{0}.xls'.format(doc_id, business_type) 15 return '/data/{1}/{0}/{0}.xlsx'.format(doc_id, business_type)
16 16
17 def get_doc_list(self, doc_queryset, business_type): 17 def get_doc_list(self, doc_queryset, business_type):
18 for doc_dict in doc_queryset: 18 for doc_dict in doc_queryset:
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!