- parse_spec 함수 개선: product_name에서도 수량 단위 추출 - 예: '스틸녹스정10mg(PTP) 14T' → spec='10mg'이어도 14T에서 14 추출
20 lines
965 B
Python
20 lines
965 B
Python
# -*- coding: utf-8 -*-
|
|
import requests
|
|
|
|
# 지오영 확인
|
|
geo = requests.get('http://localhost:7001/api/geoyoung/orders/summary-by-kd?start_date=2026-03-07&end_date=2026-03-07', timeout=120).json()
|
|
print("=== 지오영 ===")
|
|
for kd, info in geo.get('by_kd_code', {}).items():
|
|
if '스틸' in info['product_name'] or '녹스' in info['product_name']:
|
|
print(f" {info['product_name']}: {info['boxes']}박스, {info['units']}개")
|
|
|
|
# 수인 확인
|
|
sooin = requests.get('http://localhost:7001/api/sooin/orders/summary-by-kd?start_date=2026-03-07&end_date=2026-03-07', timeout=120).json()
|
|
print("\n=== 수인약품 ===")
|
|
for kd, info in sooin.get('by_kd_code', {}).items():
|
|
if '스틸' in info['product_name'] or '녹스' in info['product_name']:
|
|
print(f" {info['product_name']}: {info['boxes']}박스, {info['units']}개")
|
|
|
|
if not any('스틸' in info['product_name'] for info in sooin.get('by_kd_code', {}).values()):
|
|
print(" (없음)")
|