ae029c03 by 周伟奇

fix compare report

1 parent 21cab0c8
...@@ -376,16 +376,21 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id): ...@@ -376,16 +376,21 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id):
376 } 376 }
377 377
378 individual_list = comparison_res.get('OCR_Input', {}).get('individualCusInfo', []) 378 individual_list = comparison_res.get('OCR_Input', {}).get('individualCusInfo', [])
379 total_fields = len(individual_list) * 4 379 total_fields = 0
380 380
381 for individual in individual_list: 381 for individual in individual_list:
382
382 field_list = [] 383 field_list = []
384 if individual.get('customerType') not in consts.NO_COMPARE_CUSTOMER_TYPE and \
385 individual.get('idType') in consts.ID_TYPE_COMPARE:
386 total_fields += 4
383 if not successful_at_this_level: 387 if not successful_at_this_level:
384 for field_name, _, _, _, result_field in consts.ITPRC: 388 for field_name, _, _, _, result_field in consts.ITPRC:
385 if individual.get(result_field) != consts.RESULT_Y: 389 if individual.get(result_field) != consts.RESULT_Y:
386 field_list.append(field_name) 390 field_list.append(field_name)
387 391
388 if individual.get('secondIdType') in consts.SECOND_ID_TYPE_COMPARE: 392 if individual.get('customerType') not in consts.NO_COMPARE_CUSTOMER_TYPE and \
393 individual.get('secondIdType') in consts.SECOND_ID_TYPE_COMPARE:
389 total_fields += 1 394 total_fields += 1
390 if not successful_at_this_level: 395 if not successful_at_this_level:
391 if individual.get(consts.SECOND_ID_RES) != consts.RESULT_Y: 396 if individual.get(consts.SECOND_ID_RES) != consts.RESULT_Y:
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!