- parse_spec 함수 개선: product_name에서도 수량 단위 추출 - 예: '스틸녹스정10mg(PTP) 14T' → spec='10mg'이어도 14T에서 14 추출
10 lines
466 B
Python
10 lines
466 B
Python
import requests
|
|
res = requests.get('http://localhost:7001/api/geoyoung/orders/summary-by-kd?start_date=2026-03-07&end_date=2026-03-07', timeout=120)
|
|
data = res.json()
|
|
print('success:', data.get('success'))
|
|
print('order_count:', data.get('order_count'))
|
|
print('total_products:', data.get('total_products'))
|
|
print()
|
|
for kd, info in list(data.get('by_kd_code', {}).items()):
|
|
print(f"{kd}: boxes={info['boxes']}, units={info['units']}, {info['product_name'][:20]}")
|