pharmacy-pos-qr-system/backend/check_stilnox.py
thug0bin dc2a992c12 fix: 규격 파싱 - T/C/P/D 수량 단위 우선, mg/ml 용량 단위 무시
- parse_spec 함수 개선: product_name에서도 수량 단위 추출
- 예: '스틸녹스정10mg(PTP) 14T' → spec='10mg'이어도 14T에서 14 추출
2026-03-07 17:31:18 +09:00

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(" (없음)")