# -*- coding: utf-8 -*- import requests 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 # 지오영 베이슨 검색 print("=== 지오영 베이슨 검색 결과 ===") res = requests.get('http://localhost:7001/api/geoyoung/stock?keyword=베이슨', timeout=30).json() for item in res.get('items', []): internal = item.get('internal_code', '') spec = item.get('specification', '') name = item.get('product_name', '') print(f" 내부: {internal} | spec: {spec:8} | {name}") print() # 어제 주문 상세 print("=== 어제 베이슨 주문 상세 ===") session = GeoYoungSession() session.login() result = session.get_order_list('2026-03-06', '2026-03-06') if result.get('success'): for order in result.get('orders', []): for item in order.get('items', []): name = item.get('product_name', '') if '베이슨' in name: internal = item.get('product_code', '') qty = item.get('quantity', 0) status = item.get('status', '') print(f" 주문번호: {order.get('order_num')}") print(f" 제품명: {name}") print(f" 내부코드: {internal}") print(f" 수량: {qty}박스") print(f" 상태: {status}") print()