feat(742-1): 일위대가 안 줄 수량 = 사용자 입력 저장 · 기준단위 단가 / 수량 반영 금액 열

- 723-1 「안 줄 수량 null」 걷음 — SC 줄 · 자재 수량 {손} 저장(새 줄 1 · 빈 칸 = 「수량 입력」 · 금액 빠짐)
- 셈 차례: 층 = 알약 값 → 저장 수량 · 공사 굳힌 사본 = 굳힌 손 → 알약 → 저장(with_pills 가 {저장} 칸으로 옮김)
- 불러오기로 만든 일위대가 = 엑셀 수량을 저장 수량으로(본뜬.실무수량 같은 값 남김)
- 단가산출 안 일위대가 = 저장 수량으로 금액(수량 없음 없어짐) · B08 자재 · B09 내 자료집 저장도 같은 차례
- 일위대가표 수량 칸 = 문서에 저장(휘발 임시 칸 걷음) · 합계 열 「기준단위 단가」 · 「수량 반영 금액」
- 낡은 시험(723 · 175 · 204-2 · 702-3 · 703 · 717-4 · 719-1 · 719-2 · hopyo build · flow · labor ref)의 null 단언을
  저장 수량 단언으로 고침 — 723-1 결정이 742-1(요구 584-1)로 바뀜 · 새 지킴 시험 test_742_1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-02 20:03:48 +09:00
co-authored by Claude Opus 5.5
parent c61fe32c2c
commit b68a246602
21 changed files with 325 additions and 204 deletions
+10 -7
View File
@@ -336,17 +336,20 @@ class Builder:
depth: int = 0,
use: tuple[dict, str] = ({}, ""),
) -> str:
"""사전조합(SC) = 겹 대가 — 로직 줄 = 품셈 호표 · 자재 줄(175-2) · 줄 수량(723-4) =
굳힌 손 → use 알약 값 → 없음(`ask`) · use = (쓰는 구조물 사본 면적 알약 값, 덮개 자리)."""
"""사전조합(SC) = 겹 대가 — 로직 줄 = 품셈 호표 · 자재 줄(175-2) · 줄 수량(723-4 · 742-1) =
굳힌 손 → use 알약 값 → 저장 수량(`refs.SAVED`) → 없음(`ask`) · use = (쓰는 구조물 사본 면적
알약 값, 덮개 자리)."""
from M01_MasterData import M01_MasterData_Store_Combo as combo_store
rid, (given, where) = refs.ref_id(ref), use
pilled: list[bool] = [] # 줄마다 알약 값을 썼나
def qty_of(key: str, hand: Any) -> float | None: # 짝 = `M02_Labor_Expand._qty` 차례
got = _f(hand)
def qty_of(key: str, qty: Any) -> float | None: # 짝 = `M02_Labor_Expand._qty` 차례
qty = qty if isinstance(qty, dict) else {}
got = _f(qty.get("손"))
pill = None if got is not None else _f(given.get(key))
pilled.append(got is None and key in given)
return _f(given.get(key)) if got is None else got
return got if got is not None else pill if pill is not None else _f(qty.get(refs.SAVED))
inner = [one for one in doc.get("담은로직") or [] if isinstance(one, dict)]
kept = doc.get("알약") # 굳힌 알약(142-2 · 지금 M01 안 읽음 · 719-2) · 없으면 셈
@@ -358,7 +361,7 @@ class Builder:
}
lines = []
for n, one in enumerate(inner):
qty = qty_of(f"{rid}#{n}", (one.get("수량") or {}).get("손"))
qty = qty_of(f"{rid}#{n}", one.get("수량"))
pill = pills.get(one.get("로직")) or {}
times = pill.get("배") if "로직" in one else 1
name = pill.get("이름") or str(one.get("로직") or "")
@@ -368,7 +371,7 @@ class Builder:
lines.append(self.line_of(whole, one, qty, times, name, copies, depth, use))
for mat in doc.get("자재") or []:
key = f"{rid}#{labor_doc.material_key(mat.get('코드'))}"
lines.append(_material(whole, mat, qty_of(key, (mat.get("수량") or {}).get("손"))))
lines.append(_material(whole, mat, qty_of(key, mat.get("수량"))))
lines = [ln if ln["kind"] == "blank" or ln.get("qty") is not None else {**ln, "ask": ASK}
for ln in lines] # fmt: skip
return self.put(