contract part 1
Showing
2 changed files
with
11 additions
and
0 deletions
... | @@ -1002,6 +1002,10 @@ JYPZ_FIELD_ORDER = (("type", "标题"), | ... | @@ -1002,6 +1002,10 @@ JYPZ_FIELD_ORDER = (("type", "标题"), |
1002 | ("stamp_signature_seller", "出卖方签字/盖章"), | 1002 | ("stamp_signature_seller", "出卖方签字/盖章"), |
1003 | ("stamp_signature_agent", "经销商签字/盖章"),) | 1003 | ("stamp_signature_agent", "经销商签字/盖章"),) |
1004 | 1004 | ||
1005 | # 合同 | ||
1006 | CONTRACT_CN_NAME = '合同' | ||
1007 | CONTRACT_CLASSIFY = 41 | ||
1008 | |||
1005 | SUCCESS_CODE_SET = {'0', 0} | 1009 | SUCCESS_CODE_SET = {'0', 0} |
1006 | 1010 | ||
1007 | FIELD_ORDER_MAP = { | 1011 | FIELD_ORDER_MAP = { | ... | ... |
... | @@ -207,6 +207,9 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -207,6 +207,9 @@ class Command(BaseCommand, LoggerMixin): |
207 | else: | 207 | else: |
208 | res_list.append((pno, ino, part_idx, consts.RES_SUCCESS_EMPTY)) | 208 | res_list.append((pno, ino, part_idx, consts.RES_SUCCESS_EMPTY)) |
209 | 209 | ||
210 | def contract_process(self, ocr_data, contract_result, res_list, pno, ino, part_idx, img_path): | ||
211 | pass | ||
212 | |||
210 | def license1_process(self, ocr_data, license_summary, classify, res_list, pno, ino, part_idx, img_path, do_dda, dda_id_bc_mapping): | 213 | def license1_process(self, ocr_data, license_summary, classify, res_list, pno, ino, part_idx, img_path, do_dda, dda_id_bc_mapping): |
211 | # 类别:'0'身份证, '1'居住证 | 214 | # 类别:'0'身份证, '1'居住证 |
212 | license_data = ocr_data.get('data') | 215 | license_data = ocr_data.get('data') |
... | @@ -820,6 +823,7 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -820,6 +823,7 @@ class Command(BaseCommand, LoggerMixin): |
820 | bs_summary = {} | 823 | bs_summary = {} |
821 | unknown_summary = {} | 824 | unknown_summary = {} |
822 | license_summary = {} | 825 | license_summary = {} |
826 | contract_result = {} | ||
823 | res_list = [] | 827 | res_list = [] |
824 | interest_keyword = Keywords.objects.filter( | 828 | interest_keyword = Keywords.objects.filter( |
825 | type=KeywordsType.INTEREST.value, on_off=True).values_list('keyword', flat=True) | 829 | type=KeywordsType.INTEREST.value, on_off=True).values_list('keyword', flat=True) |
... | @@ -907,6 +911,9 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -907,6 +911,9 @@ class Command(BaseCommand, LoggerMixin): |
907 | res_list.append((pno, ino, part_idx, consts.RES_FAILED_2)) | 911 | res_list.append((pno, ino, part_idx, consts.RES_FAILED_2)) |
908 | self.online_log.warn( | 912 | self.online_log.warn( |
909 | '{0} [ocr_2 failed] [img_path={1}]'.format(self.log_base, img_path)) | 913 | '{0} [ocr_2 failed] [img_path={1}]'.format(self.log_base, img_path)) |
914 | elif classify == consts.CONTRACT_CLASSIFY: | ||
915 | self.contract_process(ocr_data, contract_result, res_list, pno, ino, | ||
916 | part_idx, img_path) | ||
910 | else: # 流水处理 | 917 | else: # 流水处理 |
911 | bs_classify_set.add(classify) | 918 | bs_classify_set.add(classify) |
912 | self.bs_process(wb, ocr_data, bs_summary, unknown_summary, classify, res_list, pno, ino, part_idx) | 919 | self.bs_process(wb, ocr_data, bs_summary, unknown_summary, classify, res_list, pno, ino, part_idx) | ... | ... |
-
Please register or sign in to post a comment