From ef5b9536c07aa41a500f944758e35e16e9b21aa2 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Wed, 9 Sep 2026 12:44:27 +0900 Subject: [PATCH] =?UTF-8?q?feat(B09):=20=EA=B4=80=EA=B2=BD=EC=9D=B4=20?= =?UTF-8?q?=ED=91=9C=20=EB=B0=96=EC=9D=B4=EB=A9=B4=20**=EB=AC=B4=EC=97=87?= =?UTF-8?q?=EC=9D=84=20=EC=A0=95=ED=95=B4=EC=95=BC=20=ED=95=98=EB=8A=94?= =?UTF-8?q?=EC=A7=80**=EA=B9=8C=EC=A7=80=20=EA=B0=80=EB=A6=AC=ED=82=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 「품셈 표에 그 관경이 없음」만 적으면 사용자가 **엉뚱한 것을 정하러 감** — 정할 것이 단가가 아니라 **시설 선택**일 수 있음. - 관부설 품셈 표가 다루는 관경은 ∅800·∅1000·∅1200 뿐임을 사유에 적음 - Ø1,500 이상이면 임도기술교본 3장을 가리킴 — 「BOX암거 적용 — 수리계산상 배수관 **Ø1,500㎜ 이상** 적용 유역」(`횡단배수관_암거 §5`) - ⚠ **단정하지 않음** — 그 §5 는 **교본 기준이지 법령·행정규칙이 아님**. 프로젝트 규칙이 「기본값은 현행 법령·행정규칙, 교본은 과거 참조」라 **가리키기만** 하고 사유에 그 사실을 함께 적음 검증: pytest 307 통과 · Ø1500 두 줄에 그 문구가 뜸 Co-Authored-By: Claude Opus 5 (1M context) --- .../B09_Estimation_BillOfQuantities_Rows.py | 9 ++++- B09_Estimation/B09_Estimation_KnownGaps.py | 35 +++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/B09_Estimation/B09_Estimation_BillOfQuantities_Rows.py b/B09_Estimation/B09_Estimation_BillOfQuantities_Rows.py index fc884869..33843c80 100644 --- a/B09_Estimation/B09_Estimation_BillOfQuantities_Rows.py +++ b/B09_Estimation/B09_Estimation_BillOfQuantities_Rows.py @@ -222,6 +222,10 @@ def _leaf_row( if children: names = ", ".join(f"{c[2:]} {unit_prices.book.title(c).name}" for c in children) row.note = f"이 공종엔 일위대가가 없고 한 층 아래에 있습니다 — 후보: {names}" + # 관경이 표 밖이면 **무엇을 정해야 하는지**까지 가리킨다. + diameter_note = pipe_diameter_note(node.code, item.variant_value) + if diameter_note: + row.note = f"{row.note} / {diameter_note}" reason = f"일위대가가 하위 공종에 있음(후보 {len(children)}건)" else: # ⚠ 「아직 안 만든 것」과 「성분이 빠져 못 세운 것」은 **할 일이 다르다**. @@ -362,7 +366,10 @@ def _leaf_row( _PENDING_FORMULA: dict[str, str] = {} -from B09_Estimation.B09_Estimation_KnownGaps import known_gap_note # noqa: E402 +from B09_Estimation.B09_Estimation_KnownGaps import ( # noqa: E402 + known_gap_note, + pipe_diameter_note, +) def pending_formula_note(code: str | None) -> str: diff --git a/B09_Estimation/B09_Estimation_KnownGaps.py b/B09_Estimation/B09_Estimation_KnownGaps.py index b0838fe9..ccf08ab5 100644 --- a/B09_Estimation/B09_Estimation_KnownGaps.py +++ b/B09_Estimation/B09_Estimation_KnownGaps.py @@ -67,3 +67,38 @@ def known_gap_note(code: str | None) -> str: if plain.startswith(prefix): parts.append(note) return " / ".join(parts) + + +#: 관부설 품셈 표가 다루는 관경 — 그 밖은 **표에 없는 것**이지 값이 틀린 것이 아니다. +PIPE_TABLE_DIAMETERS_MM = (800, 1000, 1200) + +#: 교본이 큰 관을 넘기는 자리 — **교본 기준이지 법령·행정규칙이 아니다.** +#: `횡단배수관_암거.md §5`(교본 3장) 「BOX암거 적용 — 수리계산상 배수관 **Ø1,500㎜ 이상** +#: 적용 유역 · 계곡 횡단경사 40% 이내 · 구체 수평 설치 원칙」. +#: ⚠ 그래서 「Ø1,500 이면 반드시 암거」라고 **단정하지 않는다** — 프로젝트 규칙이 +#: 「기본값은 현행 법령·행정규칙, 교본은 과거 참조」이기 때문이다. **가리키기만** 한다. +CULVERT_HINT_MM = 1500 + + +def pipe_diameter_note(code: str | None, variant_value: object) -> str: + """관경이 품셈 표 밖일 때 **어디를 봐야 하는지**를 가리킨다. + + ⚠ 「품셈 표에 그 관경이 없음」만 적으면 사용자가 **엉뚱한 것을 정하러 간다** — + 정할 것은 단가가 아니라 **시설 선택**일 수 있다. + """ + if not code or not str(code).startswith("FP-12-11"): + return "" + try: + diameter = int(float(str(variant_value))) + except (TypeError, ValueError): + return "" + if diameter in PIPE_TABLE_DIAMETERS_MM: + return "" + note = f"⚠ 품셈 관부설 표는 ∅800·∅1000·∅1200 까지만 있습니다 — Ø{diameter} 는 표 밖입니다." + if diameter >= CULVERT_HINT_MM: + note += ( + " ⓘ 임도기술교본 3장은 **Ø1,500㎜ 이상을 BOX암거 적용 유역**으로 봅니다" + "(`횡단배수관_암거 §5`). 관으로 놓을 자리가 아닐 수 있으니 **단가가 아니라" + " 시설 선택**을 먼저 볼 것. ⚠ 교본 기준이라 법령·행정규칙은 아닙니다." + ) + return note