From ac8e8f1e592151a88fb106da18237a1cbda1efda Mon Sep 17 00:00:00 2001 From: umsangdon Date: Wed, 9 Sep 2026 13:13:54 +0900 Subject: [PATCH] =?UTF-8?q?fix(B08):=20=EB=AC=BC=EB=9F=89=200=20=EC=9D=B8?= =?UTF-8?q?=20=EA=B5=AC=EC=A1=B0=EB=AC=BC=EC=9D=84=20=EB=82=B4=EC=97=AD?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EB=BA=8C=20=E2=80=94=200=20=EC=9B=90=20?= =?UTF-8?q?=EC=A4=84=EC=9D=B4=20=EB=A7=8C=EB=93=A4=EC=96=B4=EC=A7=80?= =?UTF-8?q?=EB=8D=98=20=EC=9E=90=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 물넘이포장이 면적을 못 받아 「0.0 ㎡」로 내역에 서고 있었음. 코드가 붙어 있어 0 원 줄이 만들어지고 화면에는 값이 있는 줄로 보임 — 0 은 「없음」과 구별이 안 됨. 줄은 그대로 넘기되 in_bill False + 까닭(원단위 사유 그대로) + input_missing 로 둠. Co-Authored-By: Claude Opus 5 (1M context) --- .../B08_Quantity_Engine_Handoff_Rows.py | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/B08_Quantity/B08_Quantity_Engine_Handoff_Rows.py b/B08_Quantity/B08_Quantity_Engine_Handoff_Rows.py index eaa403f0..c12f967f 100644 --- a/B08_Quantity/B08_Quantity_Engine_Handoff_Rows.py +++ b/B08_Quantity/B08_Quantity_Engine_Handoff_Rows.py @@ -408,6 +408,19 @@ def _structure_rows( bill_quantity = float(structure.get("billing_quantity") or 0.0) else: bill_unit, bill_quantity = "m", length + # ⚠⚠ **물량 0 을 내역에 세우지 않는다**(2026-09-09 감사). 물넘이포장이 면적을 안 받아 + # `0.0 ㎡` 로 서고 있었다 — 코드가 붙어 있어 **0 원 줄**이 만들어지고, 화면에는 + # 「값이 있는 줄」로 보인다. 0 은 「없음」과 구별이 안 된다(오늘 표토에서 겪은 자리). + # ⇒ 줄은 그대로 넘기되 **내역에서 빼고 까닭을 적는다.** + in_bill = bill_quantity > 0 + zero_reason = "" + if not in_bill: + notes = "; ".join(str(note) for note in (structure.get("notes") or [])) + zero_reason = ( + f"물량이 0 이라 내역에 안 세움 — {notes}" + if notes + else "물량이 0 이라 내역에 안 세움 — 저장 제원에서 치수·면적을 넣으면 값이 섭니다" + ) rows.append( { "work_item_code": code, @@ -431,8 +444,8 @@ def _structure_rows( # 철근이 있나 없나로 자동 판정 — 사람이 고르는 값이 아니다. "structure_kind": kind, # ⚠ 줄마다 **왜 막혔는지**를 싣는다 — 안 실으면 받는 쪽 화면이 빈다. - "blocked_kind": blocked_kind, - "blocked_reason": blocked_reason, + "blocked_kind": blocked_kind or (BLOCKED_INPUT_MISSING if not in_bill else None), + "blocked_reason": blocked_reason or zero_reason, # 규격 갈래(뒷길이 …㎝ 이하) — 못 고르면 사유가 남는다. # ⚠ **갈래 키 문자열을 우리가 조립하지 않는다** (2026-09-07 계약 변경). # 품셈 원문이 물결표를 섞어 쓴다(`∼` U+223C / `~` U+FF5E). 두 창이 각자 @@ -447,8 +460,8 @@ def _structure_rows( "spec_class_basis": class_basis, # ⚠ 물량을 못 채운 조각 — 0 으로 적지 않고 사유와 함께 드러낸다. "composite_not_ready": parts_missing or None, - "in_bill": True, - "in_bill_reason": (composite or {}).get("why", ""), + "in_bill": in_bill, + "in_bill_reason": zero_reason or (composite or {}).get("why", ""), "origin": ORIGIN_STRUCTURE, } )