fix(axis): 9-19-3 비탈면 고르기(발파암) 소형브레이커 = 5210-0010(1.0㎥/min) — 값 출처 9-19-1 표·[주]① 이 규격을 정함(브레인 승인) · 범위 별칭이 코드를 적으면 그 항목으로 곧장 이음 · 어어호스는 카탈로그 없어 그대로
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BW6Jdsh18WPtYUR6THZJqn
This commit is contained in:
@@ -107,6 +107,22 @@ def load_scoped_aliases() -> list[dict[str, str]]:
|
||||
return load_aliases("resource")
|
||||
|
||||
|
||||
def scoped_alias_entry(
|
||||
catalog: ResourceCatalog, name_cell: str, work_item_code: str
|
||||
) -> CatalogEntry | None:
|
||||
"""범위 별칭이 가리키는 **항목 그 자체**(코드로 곧장) — 없으면 `None`.
|
||||
|
||||
⚠ 이름만 돌려주면 규격이 조인 키인 기계(소형브레이커 공압식 넷)는 다시 「규격 미정」 으로
|
||||
흐려짐 — 별칭이 코드를 적었으면 그 코드가 곧 답(2026-09-14 · 9-19-3 소형브레이커).
|
||||
"""
|
||||
wanted = _normalize(name_cell)
|
||||
for row in catalog.scoped_aliases:
|
||||
if _normalize(row["from"]) != wanted or not in_scope(work_item_code, row["scope"]):
|
||||
continue
|
||||
return next((entry for entry in catalog.entries if entry.code == row["to"]), None)
|
||||
return None
|
||||
|
||||
|
||||
def apply_scoped_alias(catalog: ResourceCatalog, name_cell: str, work_item_code: str) -> str:
|
||||
"""범위 안이면 카탈로그 쪽 **이름**으로 바꾼다. 범위 밖이거나 대상 코드가 없으면 원문 그대로."""
|
||||
wanted = _normalize(name_cell)
|
||||
|
||||
Reference in New Issue
Block a user