diff --git a/photo_review/auto_photo_review.py b/photo_review/auto_photo_review.py index 9c815a4..8e938f9 100644 --- a/photo_review/auto_photo_review.py +++ b/photo_review/auto_photo_review.py @@ -438,12 +438,14 @@ def photo_review(pk_phhd, name): ZxPhrec.pk_phhd == pk_phhd ).all() session.close() + # 同一批图的标识 set_batch_id(uuid.uuid4().hex) + processed_img_dir = common_util.get_processed_img_path('') + os.makedirs(processed_img_dir, exist_ok=True) + discharge_text = '' for phrec in phrecs: - processed_img_dir = common_util.get_processed_img_path('') - os.makedirs(processed_img_dir, exist_ok=True) rec_type, ie_result, ocr_text = information_extraction(phrec, pk_phhd) if rec_type == '基本医保结算单': rec_result = settlement_result @@ -458,9 +460,9 @@ def photo_review(pk_phhd, name): for key, value in ie_result.items(): rec_result[key].append(value) - # 删除多余图片 - if os.path.exists(processed_img_dir) and os.path.isdir(processed_img_dir): - shutil.rmtree(processed_img_dir) + # 删除多余图片 + if os.path.exists(processed_img_dir) and os.path.isdir(processed_img_dir): + shutil.rmtree(processed_img_dir) settlement_data = settlement_task(pk_phhd, settlement_result) discharge_data = discharge_task(pk_phhd, discharge_result)