fix ca compare
Showing
2 changed files
with
4 additions
and
7 deletions
... | @@ -1060,7 +1060,6 @@ IC_RES_MAPPING = { | ... | @@ -1060,7 +1060,6 @@ IC_RES_MAPPING = { |
1060 | # ----------------- CA compare --------------------- | 1060 | # ----------------- CA compare --------------------- |
1061 | ENTITY = ['HIL', 'AFC'] | 1061 | ENTITY = ['HIL', 'AFC'] |
1062 | CUSTOMER_TYPE = ['TCCOR', 'TCDAS', 'TCFRE', 'TCIAS', 'TCIND', 'TCSEP', 'TCURE'] | 1062 | CUSTOMER_TYPE = ['TCCOR', 'TCDAS', 'TCFRE', 'TCIAS', 'TCIND', 'TCSEP', 'TCURE'] |
1063 | NO_COMPARE_CUSTOMER_TYPE = ['TCFRE', 'TCIND'] | ||
1064 | VEHICLE_STATUS = ['PCUSD', 'PCNEW'] | 1063 | VEHICLE_STATUS = ['PCUSD', 'PCNEW'] |
1065 | 1064 | ||
1066 | APPLICANT_TYPE = ['CUSTR', 'COAPP', 'GAUTR1', 'GAUTR2'] | 1065 | APPLICANT_TYPE = ['CUSTR', 'COAPP', 'GAUTR1', 'GAUTR2'] | ... | ... |
... | @@ -237,7 +237,7 @@ def ca_compare(application_id, application_entity, ocr_res_id, last_obj, ocr_res | ... | @@ -237,7 +237,7 @@ def ca_compare(application_id, application_entity, ocr_res_id, last_obj, ocr_res |
237 | 237 | ||
238 | # 个人信息证件 | 238 | # 个人信息证件 |
239 | id_type = order_individual_cus_info.get('idType') | 239 | id_type = order_individual_cus_info.get('idType') |
240 | if cus_type in consts.NO_COMPARE_CUSTOMER_TYPE or id_type not in consts.ID_TYPE_COMPARE: | 240 | if id_type not in consts.ID_TYPE_COMPARE: |
241 | do_not_compare(order_individual_cus_info, consts.ITPRC) | 241 | do_not_compare(order_individual_cus_info, consts.ITPRC) |
242 | else: | 242 | else: |
243 | ocr_field, compare_list, has_expiry_date = consts.ID_TYPE_COMPARE.get(id_type) | 243 | ocr_field, compare_list, has_expiry_date = consts.ID_TYPE_COMPARE.get(id_type) |
... | @@ -247,7 +247,7 @@ def ca_compare(application_id, application_entity, ocr_res_id, last_obj, ocr_res | ... | @@ -247,7 +247,7 @@ def ca_compare(application_id, application_entity, ocr_res_id, last_obj, ocr_res |
247 | # 第二证件 | 247 | # 第二证件 |
248 | second_id_type = order_individual_cus_info.get('secondIdType') | 248 | second_id_type = order_individual_cus_info.get('secondIdType') |
249 | if second_id_type is not None: | 249 | if second_id_type is not None: |
250 | if cus_type in consts.NO_COMPARE_CUSTOMER_TYPE or second_id_type not in consts.SECOND_ID_TYPE_COMPARE: | 250 | if second_id_type not in consts.SECOND_ID_TYPE_COMPARE: |
251 | do_not_compare(order_individual_cus_info, consts.SECOND_ITPRC) | 251 | do_not_compare(order_individual_cus_info, consts.SECOND_ITPRC) |
252 | else: | 252 | else: |
253 | second_ocr_field, second_compare_list = consts.SECOND_ID_TYPE_COMPARE.get(second_id_type) | 253 | second_ocr_field, second_compare_list = consts.SECOND_ID_TYPE_COMPARE.get(second_id_type) |
... | @@ -398,16 +398,14 @@ def ca_compare(application_id, application_entity, ocr_res_id, last_obj, ocr_res | ... | @@ -398,16 +398,14 @@ def ca_compare(application_id, application_entity, ocr_res_id, last_obj, ocr_res |
398 | for individual in individual_list: | 398 | for individual in individual_list: |
399 | 399 | ||
400 | field_list = [] | 400 | field_list = [] |
401 | if individual.get('customerType') not in consts.NO_COMPARE_CUSTOMER_TYPE and \ | 401 | if individual.get('idType') in consts.ID_TYPE_COMPARE: |
402 | individual.get('idType') in consts.ID_TYPE_COMPARE: | ||
403 | total_fields += 4 | 402 | total_fields += 4 |
404 | if not successful_at_this_level: | 403 | if not successful_at_this_level: |
405 | for field_name, _, _, _, result_field in consts.ITPRC: | 404 | for field_name, _, _, _, result_field in consts.ITPRC: |
406 | if individual.get(result_field) != consts.RESULT_Y: | 405 | if individual.get(result_field) != consts.RESULT_Y: |
407 | field_list.append(field_name) | 406 | field_list.append(field_name) |
408 | 407 | ||
409 | if individual.get('customerType') not in consts.NO_COMPARE_CUSTOMER_TYPE and \ | 408 | if individual.get('secondIdType') in consts.SECOND_ID_TYPE_COMPARE: |
410 | individual.get('secondIdType') in consts.SECOND_ID_TYPE_COMPARE: | ||
411 | total_fields += 1 | 409 | total_fields += 1 |
412 | if not successful_at_this_level: | 410 | if not successful_at_this_level: |
413 | if individual.get(consts.SECOND_ID_RES) != consts.RESULT_Y: | 411 | if individual.get(consts.SECOND_ID_RES) != consts.RESULT_Y: | ... | ... |
-
Please register or sign in to post a comment