pharmacy-pos-qr-system/backend/check_basen.py
thug0bin 0ae4ae66f0 fix(baekje): 장바구니 담기 시 internal_code 사용하도록 수정
- kd_code 대신 internal_code로 장바구니 추가
- internal_code 없으면 검색 후 규격 매칭으로 찾기
- 백제 장바구니 담기 정상 작동 확인
2026-03-07 21:29:00 +09:00

37 lines
1.2 KiB
Python

# -*- coding: utf-8 -*-
import requests
print("=== 어제 베이슨 주문 (지오영 + 수인) ===\n")
# 지오영
geo = requests.get('http://localhost:7001/api/geoyoung/orders/summary-by-kd?start_date=2026-03-06&end_date=2026-03-06', timeout=120).json()
print("【지오영】")
found = False
for kd, info in geo.get('by_kd_code', {}).items():
if '베이슨' in info['product_name']:
print(f" KD: {kd}")
print(f" 제품명: {info['product_name']}")
print(f" spec: {info['spec']}")
print(f" boxes: {info['boxes']}")
print(f" units: {info['units']}")
found = True
if not found:
print(" (없음)")
print()
# 수인
sooin = requests.get('http://localhost:7001/api/sooin/orders/summary-by-kd?start_date=2026-03-06&end_date=2026-03-06', timeout=120).json()
print("【수인약품】")
found = False
for kd, info in sooin.get('by_kd_code', {}).items():
if '베이슨' in info['product_name']:
print(f" KD: {kd}")
print(f" 제품명: {info['product_name']}")
print(f" spec: {info['spec']}")
print(f" boxes: {info['boxes']}")
print(f" units: {info['units']}")
found = True
if not found:
print(" (없음)")