From 232a77006a4f7211a6d5ffa8e69b92767c1db12d Mon Sep 17 00:00:00 2001 From: thug0bin Date: Sat, 7 Mar 2026 18:14:00 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=A7=80=EC=98=A4=EC=98=81=20=EC=A3=BC?= =?UTF-8?q?=EB=AC=B8=EB=9F=89=20=EC=A7=91=EA=B3=84=20=EC=8B=9C=20=EC=B7=A8?= =?UTF-8?q?=EC=86=8C/=EC=82=AD=EC=A0=9C=20=EC=83=81=ED=83=9C=20=EC=A0=9C?= =?UTF-8?q?=EC=99=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - status에 '취소' 또는 '삭제' 포함 시 집계 제외 - 예: '취소(삭제)' 상태 --- backend/check_status.py | 25 +++++++++++++++++++++++++ backend/geoyoung_api.py | 5 +++++ 2 files changed, 30 insertions(+) create mode 100644 backend/check_status.py diff --git a/backend/check_status.py b/backend/check_status.py new file mode 100644 index 0000000..313716a --- /dev/null +++ b/backend/check_status.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +import sys +sys.path.insert(0, 'c:/Users/청춘약국/source/pharmacy-wholesale-api') +from dotenv import load_dotenv +load_dotenv('c:/Users/청춘약국/source/pharmacy-wholesale-api/.env') +from wholesale import GeoYoungSession + +session = GeoYoungSession() +session.login() + +result = session.get_order_list('2026-03-01', '2026-03-07') + +if result.get('success'): + status_set = set() + for order in result.get('orders', []): + for item in order.get('items', []): + status = item.get('status', '').strip() + if status: + status_set.add(status) + + print("=== 발견된 상태값들 ===") + for s in sorted(status_set): + print(f" '{s}'") +else: + print(f"오류: {result.get('error')}") diff --git a/backend/geoyoung_api.py b/backend/geoyoung_api.py index 5466239..38cb082 100644 --- a/backend/geoyoung_api.py +++ b/backend/geoyoung_api.py @@ -656,6 +656,11 @@ def api_geoyoung_orders_by_kd(): for order in orders: # 지오영은 get_order_list에서 items도 같이 반환 for item in order.get('items', []): + # 취소/삭제 상태 제외 + status = item.get('status', '').strip() + if '취소' in status or '삭제' in status: + continue + kd_code = item.get('kd_code', '') if not kd_code: continue