fix sep name
Showing
1 changed file
with
29 additions
and
29 deletions
| ... | @@ -34,33 +34,33 @@ def field_compare(info_dict, ocr_res_dict, ocr_field, compare_list, res_set, has | ... | @@ -34,33 +34,33 @@ def field_compare(info_dict, ocr_res_dict, ocr_field, compare_list, res_set, has |
| 34 | ocr_res_str = ocr_res_dict.get(ocr_field) | 34 | ocr_res_str = ocr_res_dict.get(ocr_field) |
| 35 | if ocr_res_str is not None: | 35 | if ocr_res_str is not None: |
| 36 | ocr_res_list = json.loads(ocr_res_str) | 36 | ocr_res_list = json.loads(ocr_res_str) |
| 37 | length = len(ocr_res_list) | 37 | # length = len(ocr_res_list) |
| 38 | 38 | ||
| 39 | # # sep营业执照根据法人过滤 | 39 | # sep营业执照根据法人过滤 |
| 40 | # if isinstance(sep_name, str): | 40 | if isinstance(sep_name, str): |
| 41 | # tmp_list = [] | 41 | tmp_list = [] |
| 42 | # for ocr_res in ocr_res_list: | 42 | for ocr_res in ocr_res_list: |
| 43 | # ocr_sep_name = ocr_res.get(consts.LEGAL_REP_NAME) | 43 | ocr_sep_name = ocr_res.get(consts.LEGAL_REP_NAME) |
| 44 | # if isinstance(ocr_sep_name, str) and ocr_sep_name == sep_name: | 44 | if isinstance(ocr_sep_name, str) and ocr_sep_name == sep_name: |
| 45 | # tmp_list.append(ocr_res) | 45 | tmp_list.append(ocr_res) |
| 46 | # else: | 46 | else: |
| 47 | # tmp_list = ocr_res_list | 47 | tmp_list = ocr_res_list |
| 48 | # | 48 | |
| 49 | # length = len(tmp_list) | 49 | length = len(tmp_list) |
| 50 | 50 | ||
| 51 | # 过期期限特殊处理 | 51 | # 过期期限特殊处理 |
| 52 | if has_expiry_date: | 52 | if has_expiry_date: |
| 53 | expiry_dates = [] | 53 | expiry_dates = [] |
| 54 | key = compare_list[2][1] | 54 | key = compare_list[2][1] |
| 55 | # for ocr_res in tmp_list: | 55 | for ocr_res in tmp_list: |
| 56 | for ocr_res in ocr_res_list: | 56 | # for ocr_res in ocr_res_list: |
| 57 | if ocr_res.get(key): | 57 | if ocr_res.get(key): |
| 58 | expiry_dates.append(ocr_res.get(key)) | 58 | expiry_dates.append(ocr_res.get(key)) |
| 59 | else: | 59 | else: |
| 60 | expiry_dates = [] | 60 | expiry_dates = [] |
| 61 | 61 | ||
| 62 | # for ocr_res in tmp_list: | 62 | for ocr_res in tmp_list: |
| 63 | for ocr_res in ocr_res_list: | 63 | # for ocr_res in ocr_res_list: |
| 64 | if is_find: | 64 | if is_find: |
| 65 | break | 65 | break |
| 66 | for idx, compare_tuple in enumerate(compare_list): | 66 | for idx, compare_tuple in enumerate(compare_list): |
| ... | @@ -208,15 +208,15 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id): | ... | @@ -208,15 +208,15 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id): |
| 208 | for individual_cus_info in individual_cus_info_list: | 208 | for individual_cus_info in individual_cus_info_list: |
| 209 | order_individual_cus_info = get_order_dict(individual_cus_info, consts.IN_ORDER) | 209 | order_individual_cus_info = get_order_dict(individual_cus_info, consts.IN_ORDER) |
| 210 | 210 | ||
| 211 | # # 获取sep下营业执照法人代表 | 211 | # 获取sep下营业执照法人代表 |
| 212 | # if order_individual_cus_info.get('customerType') == consts.CUSTOMER_TYPE[5]: | 212 | if order_individual_cus_info.get('customerType') == consts.CUSTOMER_TYPE[5]: |
| 213 | # sep_name = order_individual_cus_info.get('customerChineseName') | 213 | sep_name = order_individual_cus_info.get('customerChineseName') |
| 214 | # if isinstance(sep_name, str): | 214 | if isinstance(sep_name, str): |
| 215 | # sep_name = sep_name.strip() | 215 | sep_name = sep_name.strip() |
| 216 | # if sep_name == '': | 216 | if sep_name == '': |
| 217 | # sep_name = None | 217 | sep_name = None |
| 218 | # else: | 218 | else: |
| 219 | # sep_name = None | 219 | sep_name = None |
| 220 | 220 | ||
| 221 | # 个人信息证件 | 221 | # 个人信息证件 |
| 222 | id_type = order_individual_cus_info.get('idType') | 222 | id_type = order_individual_cus_info.get('idType') |
| ... | @@ -242,9 +242,9 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id): | ... | @@ -242,9 +242,9 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id): |
| 242 | 242 | ||
| 243 | # sep营业执照 | 243 | # sep营业执照 |
| 244 | if order_individual_cus_info.get('customerType') == consts.CUSTOMER_TYPE[5]: | 244 | if order_individual_cus_info.get('customerType') == consts.CUSTOMER_TYPE[5]: |
| 245 | # field_compare(order_individual_cus_info, ocr_res_dict, consts.BL_OCR_FIELD, consts.TCSEP, res_set, | 245 | field_compare(order_individual_cus_info, ocr_res_dict, consts.BL_OCR_FIELD, consts.TCSEP, res_set, |
| 246 | # sep_name=sep_name) | 246 | sep_name=sep_name) |
| 247 | field_compare(order_individual_cus_info, ocr_res_dict, consts.BL_OCR_FIELD, consts.TCSEP, res_set) | 247 | # field_compare(order_individual_cus_info, ocr_res_dict, consts.BL_OCR_FIELD, consts.TCSEP, res_set) |
| 248 | 248 | ||
| 249 | order_individual_cus_info_list.append(order_individual_cus_info) | 249 | order_individual_cus_info_list.append(order_individual_cus_info) |
| 250 | 250 | ... | ... |
-
Please register or sign in to post a comment