调整图片删除位置
This commit is contained in:
@@ -438,12 +438,14 @@ def photo_review(pk_phhd, name):
|
|||||||
ZxPhrec.pk_phhd == pk_phhd
|
ZxPhrec.pk_phhd == pk_phhd
|
||||||
).all()
|
).all()
|
||||||
session.close()
|
session.close()
|
||||||
|
|
||||||
# 同一批图的标识
|
# 同一批图的标识
|
||||||
set_batch_id(uuid.uuid4().hex)
|
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 = ''
|
discharge_text = ''
|
||||||
for phrec in phrecs:
|
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)
|
rec_type, ie_result, ocr_text = information_extraction(phrec, pk_phhd)
|
||||||
if rec_type == '基本医保结算单':
|
if rec_type == '基本医保结算单':
|
||||||
rec_result = settlement_result
|
rec_result = settlement_result
|
||||||
@@ -458,9 +460,9 @@ def photo_review(pk_phhd, name):
|
|||||||
for key, value in ie_result.items():
|
for key, value in ie_result.items():
|
||||||
rec_result[key].append(value)
|
rec_result[key].append(value)
|
||||||
|
|
||||||
# 删除多余图片
|
# 删除多余图片
|
||||||
if os.path.exists(processed_img_dir) and os.path.isdir(processed_img_dir):
|
if os.path.exists(processed_img_dir) and os.path.isdir(processed_img_dir):
|
||||||
shutil.rmtree(processed_img_dir)
|
shutil.rmtree(processed_img_dir)
|
||||||
|
|
||||||
settlement_data = settlement_task(pk_phhd, settlement_result)
|
settlement_data = settlement_task(pk_phhd, settlement_result)
|
||||||
discharge_data = discharge_task(pk_phhd, discharge_result)
|
discharge_data = discharge_task(pk_phhd, discharge_result)
|
||||||
|
|||||||
Reference in New Issue
Block a user