refactor(841-1): B09 재료 관급 · 별도 = M02 자재표시 — A 걸음 이어서
- 대가 · 산근 재료 줄 = M02 자재표시(기본 별도계상 · 관급) → 대가 · 산근 안 0 원(M02 셈과 같음) · % 덧줄 밑수는 엔진 값 그대로 - 자재단가대비표 기본 표시 = M02 자재표시(사용자 표시가 앞섬 · 「사급」 = 기본 끔 · 칸 누름 차례 관급 → 별도 → 사급) - 4 자재대 · 관급자재대 수량 = 대가 · 산근 밖 재료 역전개 수량(aside_qty) · 집계표에서 겹침 0 - 새 파일 B09_Estimation_Supply.py(표시 함수 · Router 700 줄 막음) - 견본 대가 = M02 반영합(1,527,221 · 1,267,314) · 전후 표 tmp/841_1/전후표.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -38,6 +38,7 @@ from B09_Estimation import B09_Estimation_Labor_Rule as rule
|
||||
from B09_Estimation import B09_Estimation_Sangeun as sg
|
||||
from B09_Estimation import B09_Estimation_Sangeun_Text as st
|
||||
from B09_Estimation.B09_Estimation_Bill_Items import LAYER_WORD
|
||||
from B09_Estimation.B09_Estimation_Supply import supply_mark
|
||||
from M02_MasterTemplete import M02_Item_Prices as item_prices
|
||||
from M02_MasterTemplete import M02_Labor_Doc as labor_doc
|
||||
from M02_MasterTemplete import M02_Labor_Fixed as fixed
|
||||
@@ -150,6 +151,10 @@ class Builder:
|
||||
for line in lines:
|
||||
if line["kind"] == "machine":
|
||||
line["spec"] = (eq.get(line["key"]) or {}).get("규격") or ""
|
||||
marks = one.get("자재표시") or {} # 841-1 M02 자재표시(호표 차례) → 대비표 기본 표시
|
||||
for n, line in enumerate(lines):
|
||||
if line["kind"] == "material":
|
||||
line["mark"] = supply_mark(marks.get(str(n)))
|
||||
law = rule.mark(logic, lines, engine) # 새 의미 로직 = 줄 자리 · 합밖 · 번지 · 끝전(792-4)
|
||||
unit = str(logic.get("결과단위") or "").replace("원/", "")
|
||||
spec = " · ".join(f"{k} {v}" for k, v in sorted(given.items()))
|
||||
@@ -198,7 +203,8 @@ class Builder:
|
||||
return None
|
||||
except (sd.DocError, mf.FormulaError, ArithmeticError, KeyError, TypeError, ValueError):
|
||||
return None
|
||||
one = {"로직": key, "입력값": got["입력값"], "켜쌓기율": got["켜쌓기율"]}
|
||||
one = {"로직": key, "입력값": got["입력값"], "켜쌓기율": got["켜쌓기율"],
|
||||
"자재표시": got.get("자재표시")} # fmt: skip
|
||||
where = {c: n for n, c in enumerate(got["정체"])} # 율 기준 줄 목록(778-4) → 블록 차례
|
||||
block = self._poomsem(calc._Over(whole, key, row), {**one, "고름": got["고름"]})
|
||||
if block is None:
|
||||
@@ -436,7 +442,11 @@ class Builder:
|
||||
if line.get("qty") is None and line["kind"] != "blank":
|
||||
line = {**line, "why": "수량 없음 — 면적산출 알약 칸 · 손 수량을 넣음"}
|
||||
lines.append(line)
|
||||
lines += [_material(whole, mat, mat.get("수량")) for mat in result.get("자재") or []]
|
||||
marks = {m.get("코드"): m for m in doc.get("자재") or [] if isinstance(m, dict)}
|
||||
lines += [
|
||||
_material(whole, {**(marks.get(mat.get("코드")) or {}), **mat}, mat.get("수량"))
|
||||
for mat in result.get("자재") or []
|
||||
]
|
||||
manifest = read_json(folder / MANIFEST_NAME) or {}
|
||||
origin = manifest.get("원본") or {}
|
||||
return self.put(
|
||||
@@ -576,7 +586,8 @@ def _material(whole: Any, mat: dict, qty: Any) -> dict[str, Any]:
|
||||
if price is None and mat.get("코드"):
|
||||
price = labor_doc.material_price(whole, mat["코드"], mat.get("단위"))["기준단가"]
|
||||
own = None if _f(price) is None else {"material": _f(price)}
|
||||
return {"kind": "material", "key": mat.get("코드"), **names, "qty": _f(qty), "own": own}
|
||||
return {"kind": "material", "key": mat.get("코드"), **names, "qty": _f(qty), "own": own,
|
||||
"mark": supply_mark(mat)} # fmt: skip
|
||||
|
||||
|
||||
def _engine_bases(engine: list[dict], items: list[dict]) -> dict[str, float]:
|
||||
|
||||
Reference in New Issue
Block a user