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