a8c68474 by 周伟奇

fix bug

1 parent 793920a0
......@@ -373,7 +373,7 @@ class Command(BaseCommand, LoggerMixin):
# 4.获取OCR结果并且构建excel文件
bs_summary = {}
license_summary = {}
unknown_summary = []
unknown_summary = {}
interest_keyword = Keywords.objects.filter(
type=KeywordsType.INTEREST.value).values_list('keyword', flat=True)
salary_keyword = Keywords.objects.filter(
......
......@@ -169,6 +169,10 @@ class BSWorkbook(Workbook):
0, (ws.title, idx_list[-1] + min_row, ws.max_row, 0))
def build_metadata_rows(self, classify, confidence, role, code, print_time, start_date, end_date):
if start_date is None or end_date is None:
timedelta = None
else:
timedelta = (end_date - start_date).days
metadata_rows = [
('流水识别置信度', confidence),
self.blank_row,
......@@ -182,7 +186,7 @@ class BSWorkbook(Workbook):
metadata_rows.extend(
[self.blank_row,
self.date_header,
(print_time, start_date, end_date, (end_date - start_date).days),
(print_time, start_date, end_date, timedelta),
self.blank_row,
self.keyword_header]
)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!