pharmacy-pos-qr-system/backend/check_status.py
thug0bin 232a77006a fix: 지오영 주문량 집계 시 취소/삭제 상태 제외
- status에 '취소' 또는 '삭제' 포함 시 집계 제외
- 예: '취소(삭제)' 상태
2026-03-07 18:14:00 +09:00

26 lines
765 B
Python

# -*- 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')}")