73c957c3 by 周伟奇

contract part 1

1 parent 19f10814
......@@ -1002,6 +1002,10 @@ JYPZ_FIELD_ORDER = (("type", "标题"),
("stamp_signature_seller", "出卖方签字/盖章"),
("stamp_signature_agent", "经销商签字/盖章"),)
# 合同
CONTRACT_CN_NAME = '合同'
CONTRACT_CLASSIFY = 41
SUCCESS_CODE_SET = {'0', 0}
FIELD_ORDER_MAP = {
......
......@@ -207,6 +207,9 @@ class Command(BaseCommand, LoggerMixin):
else:
res_list.append((pno, ino, part_idx, consts.RES_SUCCESS_EMPTY))
def contract_process(self, ocr_data, contract_result, res_list, pno, ino, part_idx, img_path):
pass
def license1_process(self, ocr_data, license_summary, classify, res_list, pno, ino, part_idx, img_path, do_dda, dda_id_bc_mapping):
# 类别:'0'身份证, '1'居住证
license_data = ocr_data.get('data')
......@@ -820,6 +823,7 @@ class Command(BaseCommand, LoggerMixin):
bs_summary = {}
unknown_summary = {}
license_summary = {}
contract_result = {}
res_list = []
interest_keyword = Keywords.objects.filter(
type=KeywordsType.INTEREST.value, on_off=True).values_list('keyword', flat=True)
......@@ -907,6 +911,9 @@ class Command(BaseCommand, LoggerMixin):
res_list.append((pno, ino, part_idx, consts.RES_FAILED_2))
self.online_log.warn(
'{0} [ocr_2 failed] [img_path={1}]'.format(self.log_base, img_path))
elif classify == consts.CONTRACT_CLASSIFY:
self.contract_process(ocr_data, contract_result, res_list, pno, ino,
part_idx, img_path)
else: # 流水处理
bs_classify_set.add(classify)
self.bs_process(wb, ocr_data, bs_summary, unknown_summary, classify, res_list, pno, ino, part_idx)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!