From 8b6bf03d768be3b5b17c3a4c062f5e17f052da59 Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Thu, 20 Mar 2025 10:23:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E5=89=8D=E5=A4=87=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 2 +- photo_review/auto_photo_review.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a7d8aee..2226f63 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ x-env: &template - image: fcb_photo_review:1.14.16 + image: fcb_photo_review:1.14.17 restart: always x-review: diff --git a/photo_review/auto_photo_review.py b/photo_review/auto_photo_review.py index 8e43071..ed27e20 100644 --- a/photo_review/auto_photo_review.py +++ b/photo_review/auto_photo_review.py @@ -22,7 +22,7 @@ from photo_review import PATIENT_NAME, ADMISSION_DATE, DISCHARGE_DATE, MEDICAL_E PERSONAL_ACCOUNT_PAYMENT, PERSONAL_FUNDED_AMOUNT, MEDICAL_INSURANCE_TYPE, HOSPITAL, DEPARTMENT, DOCTOR, \ ADMISSION_ID, SETTLEMENT_ID, AGE, OCR, SETTLEMENT_IE, DISCHARGE_IE, COST_IE, PHHD_BATCH_SIZE, SLEEP_MINUTES, \ UPPERCASE_MEDICAL_EXPENSES, HOSPITAL_ALIAS, HOSPITAL_FILTER, DEPARTMENT_ALIAS, DEPARTMENT_FILTER -from ucloud import ufile +from ucloud import ufile, BUCKET from util import image_util, util, html_util from util.data_util import handle_date, handle_decimal, parse_department, handle_name, \ handle_insurance_type, handle_original_data, handle_hospital, handle_department, handle_age, parse_money, \ @@ -240,13 +240,15 @@ def information_extraction(ie, phrecs, identity): with tempfile.NamedTemporaryFile(delete=False, suffix='.jpg') as temp_file: cv2.imwrite(temp_file.name, image) try: - ufile.upload_file(phrec.cfjaddress, temp_file.name) if img_angle != '0': + ufile.upload_file(phrec.cfjaddress, temp_file.name) logging.info(f'旋转图片[{phrec.cfjaddress}]替换成功,已旋转{img_angle}度。') # 修正旋转角度 for zx_ie_result in zx_ie_results: zx_ie_result.rotation_angle -= int(img_angle) else: + ufile.copy_file(BUCKET, phrec.cfjaddress, "drg2015", phrec.cfjaddress) + ufile.upload_file(phrec.cfjaddress, temp_file.name) logging.info(f'高清图片[{phrec.cfjaddress}]替换成功!') except Exception as e: logging.error(f'上传图片({phrec.cfjaddress})失败', exc_info=e)