feat(tkeg): tkeg BOM 자재관리 서비스 초기 세팅 (api + web + docker-compose)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-16 15:41:58 +09:00
parent 2699242d1f
commit 1e1d2f631a
160 changed files with 60367 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import re
from typing import Dict
def classify_structural(tag: str, description: str, main_nom: str = "") -> Dict:
"""
형강(STRUCTURAL) 분류기
규격 예: H-BEAM 100x100x6x8
"""
desc_upper = description.upper()
# 1. 타입 식별
struct_type = "UNKNOWN"
if "H-BEAM" in desc_upper or "H-SECTION" in desc_upper: struct_type = "H-BEAM"
elif "ANGLE" in desc_upper or "L-SECTION" in desc_upper: struct_type = "ANGLE"
elif "CHANNEL" in desc_upper or "C-SECTION" in desc_upper: struct_type = "CHANNEL"
elif "BEAM" in desc_upper: struct_type = "I-BEAM"
# 2. 규격 추출
# 패턴: 100x100, 100x100x6x8, 50x50x5T, H-200x200
dimension = ""
# 숫자와 x 또는 *로 구성된 패턴, 앞에 H- 등이 붙을 수 있음
dim_match = re.search(r'(?:H-|L-|C-)?(\d+(?:\.\d+)?(?:\s*[X\*]\s*\d+(?:\.\d+)?){1,3})', desc_upper)
if dim_match:
dimension = dim_match.group(1).replace("*", "x")
return {
"category": "STRUCTURAL",
"overall_confidence": 0.9,
"details": {
"type": struct_type,
"dimension": dimension
}
}