feat(b09): 구조물도 일위대가를 내역으로 받는 문 — 호표 B-AX-ST-<8hex>#<제원 키>
- 양식 일위대가로 셀 구조물도 장은 인계 줄 하나(코드 AX-ST · 갈래 = 제원 키 · 수량 연장 m) - 양식이 품은 줄(기초잡석)은 따로 인계 안 함 — 이중계상 막음 - B09 내역이 자기 단가표로 B08 일위대가 엔진을 돌려 금액 · 못 받거나 막히면 사유 - 수동 단가도 씀 — 내역 요약에 미확정 N건 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016VBGFXB9AbJBwXP19z75Qq
This commit is contained in:
@@ -286,12 +286,24 @@ def unit_price_table(
|
||||
`library` — 하위 구조물 일위대가(`B-AX-ST-*`)를 찾을 양식들(프로젝트에 박힌 것 + 프로그램 기본).
|
||||
`manual` — 이 프로젝트의 수동 단가 `{seq: {material, labor, expense, source, entered_at}}`.
|
||||
"""
|
||||
assembled = unit_price_money(template, sheet, book, find_variant, library, manual)
|
||||
return assembled[0] if assembled else None
|
||||
|
||||
|
||||
def unit_price_money(
|
||||
template: dict[str, Any],
|
||||
sheet: dict[str, Any],
|
||||
book: Any,
|
||||
find_variant: Callable[[str, str], str | None],
|
||||
library: Iterable[dict[str, Any]] = (),
|
||||
manual: dict[str, dict[str, Any]] | None = None,
|
||||
) -> tuple[dict[str, Any], Any] | None:
|
||||
"""`unit_price_table` 과 같되 **안 자른 단위당 3분할**도 — B09 내역 줄이 이 값에 수량을 곱함."""
|
||||
ctx = _Context(
|
||||
book, find_variant, {str(t["code"]): t for t in library if t.get("code")}, manual or {}
|
||||
)
|
||||
code = str(template.get("code") or "")
|
||||
assembled = _assemble(template, sheet, ctx, 1, (code,) if code else ())
|
||||
return assembled[0] if assembled else None
|
||||
return _assemble(template, sheet, ctx, 1, (code,) if code else ())
|
||||
|
||||
|
||||
def with_rows(template: dict[str, Any], rows: list[dict[str, Any]] | None) -> dict[str, Any]:
|
||||
|
||||
Reference in New Issue
Block a user