04020101 by 周伟奇

fix skip img

1 parent 2290e6cb
......@@ -147,11 +147,10 @@ class Command(BaseCommand, LoggerMixin):
if summary[6] is not None:
ed_list.append(summary[6])
@staticmethod
def license1_process(ocr_data, license_summary, classify, skip_img, img_path):
def license1_process(self, ocr_data, license_summary, classify, skip_img, img_path):
license_data = ocr_data.get('data', [])
if not license_data:
skip_img.append(img_path)
skip_img.append(self.parse_img_path(img_path))
return
for license_dict in license_data:
res_list = []
......@@ -537,8 +536,9 @@ class Command(BaseCommand, LoggerMixin):
merged_bs_summary = self.rebuild_bs_summary(bs_summary, unknown_summary)
self.cronjob_log.info('{0} [business_type={1}] [doc_id={2}] [merged_bs_summary={3}] '
'[unknown_summary={4}]'.format(self.log_base, business_type, doc.id,
merged_bs_summary, unknown_summary))
'[unknown_summary={4}] [skip_img={5}]'.format(self.log_base, business_type,
doc.id, merged_bs_summary,
unknown_summary, skip_img))
del unknown_summary
# 4.2 重构Excel文件
......
......@@ -249,7 +249,7 @@ class BSWorkbook(Workbook):
except Exception as e:
continue
else:
over_cell.number_format = numbers.FORMAT_GENERAL
over_cell.number_format = numbers.FORMAT_NUMBER_COMMA_SEPARATED1
# 3.4.金额转数值
try:
......@@ -271,7 +271,7 @@ class BSWorkbook(Workbook):
else:
if rows[consts.BORROW_IDX].value in consts.BORROW_OUTLAY_SET:
amount_cell.value = -amount_cell.value
amount_cell.number_format = numbers.FORMAT_GENERAL
amount_cell.number_format = numbers.FORMAT_NUMBER_COMMA_SEPARATED1
same_amount_mapping = amount_mapping.get(date_cell.value, {})
fill_rows = same_amount_mapping.get(-amount_cell.value)
if fill_rows:
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!