939cde2e by 周伟奇

fix bug

1 parent a1c7bfd2
......@@ -8,13 +8,13 @@ class DocHandler:
@staticmethod
def get_link(doc_id, business_type, file='pdf'):
if file == 'pdf':
return '/data/{1}/{0}/{2}/{0}.pdf'.format(doc_id, business_type, consts.TMP_DIR_NAME)
return '/data/{1}/{2}/{0}/{0}.pdf'.format(doc_id, business_type, consts.TMP_DIR_NAME)
elif file == 'img':
return '/data/{1}/{0}/{2}/{0}_img.zip'.format(doc_id, business_type, consts.TMP_DIR_NAME)
return '/data/{1}/{2}/{0}/{0}_img.zip'.format(doc_id, business_type, consts.TMP_DIR_NAME)
elif file == 'src_excel':
return '/data/{1}/{0}/{2}/src.xlsx'.format(doc_id, business_type, consts.TMP_DIR_NAME)
return '/data/{1}/{2}/{0}/src.xlsx'.format(doc_id, business_type, consts.TMP_DIR_NAME)
else:
return '/data/{1}/{0}/{2}/{0}.xlsx'.format(doc_id, business_type, consts.TMP_DIR_NAME)
return '/data/{1}/{2}/{0}/{0}.xlsx'.format(doc_id, business_type, consts.TMP_DIR_NAME)
def get_doc_list(self, doc_queryset, business_type):
for doc_dict in doc_queryset:
......
......@@ -319,7 +319,7 @@ class BSWorkbook(Workbook):
cn_str = ''.join(cn_chars)
row_value[1] = re.sub(consts.CN_RE, '', row_value[1])
if isinstance(row_value[2], str):
row_value[2] = cn_str + row_value[2]
row_value[2] = '{0}\n{1}'.format(cn_str, row_value[2])
return row_value
def build_month_sheet(self, ms, card, month_mapping, is_reverse, statistics_header_info, max_column, classify):
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!