feat(778-4): 율 기준 줄 목록 열쇠@비목 — 그 줄 그 비목 몫(절 노무비 · 기계 노무 포함)

- 밑 공용 함수 rate_base ↔ rateBase · 검사 · 짝잃음 · B09 rows:n@labor(파이썬 · TS) · 굳힘 · 화면 열쇠 옮김이 비목 꼬리 그대로
- 여덟 파일 율 줄 152 중 기준 찾은 147 재현(인력 82 · 재료 35 · 절 소계 16 · 노무비 11 · 장비 2 · 자재+율 1)
- 시험 test_778_4_rate_line 29 · 전후 대조 148/148 같음

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-04 13:15:13 +09:00
co-authored by Claude Opus 5.5
parent b8772a4172
commit fd9cce0b12
10 changed files with 114 additions and 28 deletions
+11 -1
View File
@@ -525,7 +525,7 @@ def fixed_line(fx: dict, qty: Any, where: dict | None = None) -> dict[str, Any]:
"why": "율 기준 줄 목록 — 대가로 못 셈",
}
base = (
"rows:" + ",".join(str(where[k]) for k in basis if k in where)
"rows:" + ",".join(_row_of(k, where) for k in basis if _row_of(k, where))
if isinstance(basis, list)
else f"part:{PART[basis]}"
if basis in PART
@@ -546,6 +546,16 @@ def fixed_line(fx: dict, qty: Any, where: dict | None = None) -> dict[str, Any]:
}
def _row_of(key: str, where: dict) -> str:
"""율 기준 열쇠 → 블록 차례 글(`열쇠@비목` = `n@labor`) · 없는 열쇠 = ""."""
from M02_MasterTemplete.M02_Labor_Fixed import split_key
line, cost = split_key(key)
if line not in where:
return ""
return f"{where[line]}@{PART[cost]}" if cost else str(where[line])
def _material(whole: Any, mat: dict, qty: Any) -> dict[str, Any]:
"""자재 줄 — 조합 사용자 자재 · 사전조합 자재(175-2) 한 꼴 · 이름 · 규격 · 단위 = 사본 단가."""
row = (whole.get(mat.get("코드")) if mat.get("코드") else None) or {}