3e76f8c6 by 王聪

更新ocr process 部分代码结构,待测试

1 parent 1bd8e3a4
...@@ -2448,7 +2448,10 @@ class Command(BaseCommand, LoggerMixin): ...@@ -2448,7 +2448,10 @@ class Command(BaseCommand, LoggerMixin):
2448 self.online_log.info('{0} [stop safely]'.format(self.log_base)) 2448 self.online_log.info('{0} [stop safely]'.format(self.log_base))
2449 2449
2450 2450
2451 class OcrResultProcess(Command): 2451 DOC_SCHEME_LIST = ['ACCEPTANCE', 'SETTLEMENT', 'CONTRACTMANAGEMENT', 'INSURANCE']
2452
2453
2454 class OcrResultProcess(Command, LoggerMixin):
2452 def __init__(self): 2455 def __init__(self):
2453 self.wb = None 2456 self.wb = None
2454 self.doc = None 2457 self.doc = None
...@@ -2470,10 +2473,11 @@ class OcrResultProcess(Command): ...@@ -2470,10 +2473,11 @@ class OcrResultProcess(Command):
2470 self.ocr_1_res = {} 2473 self.ocr_1_res = {}
2471 self.dda_id_bc_mapping = {} 2474 self.dda_id_bc_mapping = {}
2472 2475
2473 self.report_list = []
2474 self.ic_merge = False 2476 self.ic_merge = False
2475 self.rp_merge = False 2477 self.rp_merge = False
2476 2478
2479 super().__init__()
2480
2477 def save_ocr_result_to_wb(self): 2481 def save_ocr_result_to_wb(self):
2478 # 4.OCR结果并且构建excel文件 2482 # 4.OCR结果并且构建excel文件
2479 bs_classify_set = self.bs_classify_set 2483 bs_classify_set = self.bs_classify_set
...@@ -3233,7 +3237,6 @@ class OcrResultProcess(Command): ...@@ -3233,7 +3237,6 @@ class OcrResultProcess(Command):
3233 consts.DDA_FIELD, set()).add(dda_path) 3237 consts.DDA_FIELD, set()).add(dda_path)
3234 3238
3235 if dda_record.is_dda_found: 3239 if dda_record.is_dda_found:
3236
3237 try: 3240 try:
3238 if not dda_record.is_id_found: 3241 if not dda_record.is_id_found:
3239 for ic_name, ic_id, ic_img_path in ic_res_list: 3242 for ic_name, ic_id, ic_img_path in ic_res_list:
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!