7d6ce4df by 周伟奇

fix bug

1 parent 17c207a9
...@@ -212,7 +212,7 @@ class Command(BaseCommand, LoggerMixin): ...@@ -212,7 +212,7 @@ class Command(BaseCommand, LoggerMixin):
212 } 212 }
213 license_summary.setdefault(classify, []).append(dda_ocr_result) 213 license_summary.setdefault(classify, []).append(dda_ocr_result)
214 214
215 if classify == consts.MVC_CLASSIFY: # 车辆登记证 3/4页结果整合 215 elif classify == consts.MVC_CLASSIFY: # 车辆登记证 3/4页结果整合
216 for mvc_dict in license_data: 216 for mvc_dict in license_data:
217 try: 217 try:
218 mvc_page = mvc_dict.pop('page') 218 mvc_page = mvc_dict.pop('page')
...@@ -249,7 +249,7 @@ class Command(BaseCommand, LoggerMixin): ...@@ -249,7 +249,7 @@ class Command(BaseCommand, LoggerMixin):
249 del mvc_res 249 del mvc_res
250 license_summary.setdefault(classify, []).extend(license_data) 250 license_summary.setdefault(classify, []).extend(license_data)
251 251
252 if classify == consts.IC_CLASSIFY: # 身份证真伪 252 elif classify == consts.IC_CLASSIFY: # 身份证真伪
253 for id_card_dict in license_data: 253 for id_card_dict in license_data:
254 try: 254 try:
255 base64_img = id_card_dict.pop('base64_img') 255 base64_img = id_card_dict.pop('base64_img')
...@@ -302,6 +302,8 @@ class Command(BaseCommand, LoggerMixin): ...@@ -302,6 +302,8 @@ class Command(BaseCommand, LoggerMixin):
302 if len(ic_name) > 0 and len(ic_id) > 0: 302 if len(ic_name) > 0 and len(ic_id) > 0:
303 dda_id_bc_mapping.setdefault(consts.IC_FIELD, []).append((ic_name, ic_id, img_path)) 303 dda_id_bc_mapping.setdefault(consts.IC_FIELD, []).append((ic_name, ic_id, img_path))
304 license_summary.setdefault(classify, []).extend(license_data) 304 license_summary.setdefault(classify, []).extend(license_data)
305 else:
306 license_summary.setdefault(classify, []).extend(license_data)
305 307
306 def license2_process(self, ocr_res_2, license_summary, pid, classify, res_list, pno, ino, part_idx, img_path, do_dda, dda_id_bc_mapping): 308 def license2_process(self, ocr_res_2, license_summary, pid, classify, res_list, pno, ino, part_idx, img_path, do_dda, dda_id_bc_mapping):
307 if ocr_res_2.get('ErrorCode') in consts.SUCCESS_CODE_SET: 309 if ocr_res_2.get('ErrorCode') in consts.SUCCESS_CODE_SET:
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!