560316ec by 周伟奇

fix ltgt

1 parent 20f285b0
...@@ -833,14 +833,9 @@ MVC_SE_FIELD_ORDER_3_4 = ( ...@@ -833,14 +833,9 @@ MVC_SE_FIELD_ORDER_3_4 = (
833 ('解除抵押日期', '解除抵押日期'), 833 ('解除抵押日期', '解除抵押日期'),
834 ) 834 )
835 835
836 MVC_SE_FIELD_ORDER_1_2_LTGT = (('1.机动车所有人/身份证名称/号码', '机动车所有人/身份证明名称/号码'), 836 MVC_SE_FIELD_ORDER_LTGT = (('1.机动车所有人/身份证名称/号码', '机动车所有人/身份证明名称/号码'),
837 ('编号', '机动车登记证书编号'),) 837 ('4.机动车登记编号', '机动车登记证书编号'),
838 838 ('抵押登记日期', '抵押登记日期'),)
839 MVC_SE_FIELD_ORDER_3_4_LTGT = (
840 ('身份证名称/号码', '身份证明名称/号码'),
841 ('机动车登记证书编号', '机动车登记证书编号'),
842 ('抵押登记日期', '抵押登记日期'),
843 )
844 839
845 # 机动车销售统一发票 840 # 机动车销售统一发票
846 MVI_CN_NAME = '机动车销售统一发票' 841 MVI_CN_NAME = '机动车销售统一发票'
......
...@@ -90,8 +90,7 @@ class Command(BaseCommand, LoggerMixin): ...@@ -90,8 +90,7 @@ class Command(BaseCommand, LoggerMixin):
90 consts.CONTRACT_CLASSIFY: (consts.CONTRACT_CN_NAME, None, None, consts.AFC_CON_FIELD_ORDER_LTGT), 90 consts.CONTRACT_CLASSIFY: (consts.CONTRACT_CN_NAME, None, None, consts.AFC_CON_FIELD_ORDER_LTGT),
91 consts.VAT_CLASSIFY: (consts.VAT_CN_NAME, None, None, consts.VATS_FIELD_ORDER), 91 consts.VAT_CLASSIFY: (consts.VAT_CN_NAME, None, None, consts.VATS_FIELD_ORDER),
92 consts.IC_CLASSIFY: (consts.IC_CN_NAME, '有效期限', consts.IC_FIELD_ORDER_3, consts.IC_FIELD_ORDER_2), 92 consts.IC_CLASSIFY: (consts.IC_CN_NAME, '有效期限', consts.IC_FIELD_ORDER_3, consts.IC_FIELD_ORDER_2),
93 consts.MVC_CLASSIFY: ( 93 consts.MVC_CLASSIFY: (consts.MVC_CN_NAME, None, None, consts.MVC_SE_FIELD_ORDER_LTGT),
94 consts.MVC_CN_NAME, '机动车登记证书编号', consts.MVC_SE_FIELD_ORDER_3_4_LTGT, consts.MVC_SE_FIELD_ORDER_1_2_LTGT),
95 } 94 }
96 # ocr相关 95 # ocr相关
97 self.ocr_url = conf.OCR_URL_FOLDER 96 self.ocr_url = conf.OCR_URL_FOLDER
...@@ -605,12 +604,12 @@ class Command(BaseCommand, LoggerMixin): ...@@ -605,12 +604,12 @@ class Command(BaseCommand, LoggerMixin):
605 604
606 if key_field is not None and len(side_field_order) > len(field_order): 605 if key_field is not None and len(side_field_order) > len(field_order):
607 first_head_row = [] 606 first_head_row = []
608 for a, _ in side_field_order: 607 for _, b in side_field_order:
609 first_head_row.append(a) 608 first_head_row.append(b)
610 else: 609 else:
611 first_head_row = [] 610 first_head_row = []
612 for a, _ in field_order: 611 for _, b in field_order:
613 first_head_row.append(a) 612 first_head_row.append(b)
614 613
615 if key_field is not None and key_field in result[self.RESULT_KEY]: 614 if key_field is not None and key_field in result[self.RESULT_KEY]:
616 head_fields = [] 615 head_fields = []
...@@ -734,6 +733,19 @@ class Command(BaseCommand, LoggerMixin): ...@@ -734,6 +733,19 @@ class Command(BaseCommand, LoggerMixin):
734 if isinstance(result, dict) and len(result) > 0: 733 if isinstance(result, dict) and len(result) > 0:
735 date_str = time.strftime("%Y-%m-%d") 734 date_str = time.strftime("%Y-%m-%d")
736 for c, res_list in result.items(): 735 for c, res_list in result.items():
736 if c == consts.MVC_CLASSIFY:
737 rebuild_res = {}
738 for tmp_res in res_list:
739 rebuild_res.update(tmp_res)
740 result_queue.put(
741 {
742 self.CLASSIFY_KEY: c,
743 self.RESULT_KEY: rebuild_res,
744 self.DATE_KEY: date_str,
745 self.FILE_KEY: name,
746 }
747 )
748 else:
737 for res in res_list: 749 for res in res_list:
738 result_queue.put( 750 result_queue.put(
739 { 751 {
......
...@@ -2741,6 +2741,16 @@ def se_compare_auto(application_id, application_entity, ocr_res_id, last_obj, oc ...@@ -2741,6 +2741,16 @@ def se_compare_auto(application_id, application_entity, ocr_res_id, last_obj, oc
2741 auto_obj.ocr_whole_result_pass = full_result 2741 auto_obj.ocr_whole_result_pass = full_result
2742 auto_obj.ocr_auto_result = json.dumps(compare_result) 2742 auto_obj.ocr_auto_result = json.dumps(compare_result)
2743 auto_obj.ocr_latest_comparison_time = datetime.now() 2743 auto_obj.ocr_latest_comparison_time = datetime.now()
2744 auto_obj.rpa_result = None
2745 auto_obj.rpa_1st_eye_tat = None
2746 auto_obj.rpa_2nd_eye_tat = None
2747 auto_obj.rpa_3rd_eye_tat = None
2748 auto_obj.rpa_total_tat = None
2749 auto_obj.rpa_activated_time = None
2750 auto_obj.rpa_get_case_from_ocr_time = None
2751 auto_obj.rpa_get_case_from_oc_time = None
2752 auto_obj.rpa_payment_authorize_time = None
2753 auto_obj.rpa_second_eye_time = None
2744 auto_obj.save() 2754 auto_obj.save()
2745 compare_log.info('{0} [Auto SE] [result save success] [entity={1}] [id={2}] [ocr_res_id={3}]'.format( 2755 compare_log.info('{0} [Auto SE] [result save success] [entity={1}] [id={2}] [ocr_res_id={3}]'.format(
2746 log_base, application_entity, application_id, ocr_res_id)) 2756 log_base, application_entity, application_id, ocr_res_id))
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!