feat(z01,b08): 이름 자간 다듬기·품셈 번호 숫자 정렬·건설 빈 칸 감춤 — 한 글자 낱말뿐인 조각이나 셋 이상 이어진 한 글자 낱말만 붙임(「측 량」→「측량」·「메 붙 임 · 깬 돌」→「메붙임 · 깬돌」 · 「그 외 자재」는 그대로) · 목록 경로 이름과 갈래 다듬은 이름(name_clean)에만 · 원문 이름은 마스터에 그대로 · 열쇠는 번호라 안 흔들림을 시험으로 못박음(다듬기 끈 목록과 열쇠 맞댐 · 장부 새 발급 0) · 품셈 번호 칸은 마디마다 수로 세움(「10-1」이 「2-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:
@@ -71,6 +71,13 @@ def _path(item: dict[str, Any] | None, by: dict[str, dict]) -> str:
|
||||
return PATH_JOIN.join(reversed(names))
|
||||
|
||||
|
||||
def _shown_path(item: dict[str, Any], by: dict[str, dict]) -> str:
|
||||
"""목록에 보일 경로 — 조각마다 자간 공백 다듬기(「토목부문 › 측 량」→「측량」). 열쇠와 무관."""
|
||||
from B08_Quantity.B08_Quantity_Build_WorkItemMaster_Keys import tidy_spacing
|
||||
|
||||
return PATH_JOIN.join(tidy_spacing(part) for part in _path(item, by).split(PATH_JOIN))
|
||||
|
||||
|
||||
def base_rows(kind: str) -> list[dict[str, Any]]:
|
||||
found = doc(kind)
|
||||
if found is None:
|
||||
@@ -101,7 +108,7 @@ def base_rows(kind: str) -> list[dict[str, Any]]:
|
||||
"@source": name,
|
||||
"work_item_code": item["work_item_code"], # 목차 코드 — 열쇠 아님, 칸으로만
|
||||
"number": item["number"],
|
||||
"name": _path(item, by),
|
||||
"name": _shown_path(item, by), # 자간 공백만 다듬음 — 원문 이름은 마스터에
|
||||
"variant": variant["name"] if variant else None, # 원문 그대로
|
||||
"variant_clean": variant["name_clean"] if variant else None, # 다듬은 것
|
||||
"pum_tables": [t["pum_table_id"] for t in item["tables"]],
|
||||
@@ -156,7 +163,7 @@ def rules(kind: str) -> list[dict[str, Any]]:
|
||||
rule = {
|
||||
"@id": _key(item),
|
||||
"work_item_code": item["work_item_code"],
|
||||
"name": _path(item, by),
|
||||
"name": _shown_path(item, by),
|
||||
"mode": mode,
|
||||
"children": [_key(c) for c in children.get(item["work_item_code"], [])],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user