From cdbc93271703ba156ef6fccb339d2c46e80a0f5d Mon Sep 17 00:00:00 2001 From: umsangdon Date: Tue, 8 Sep 2026 06:17:29 +0900 Subject: [PATCH] =?UTF-8?q?feat(B09):=20=EC=83=88=20=EC=9D=B8=EA=B3=84=20?= =?UTF-8?q?=EC=B9=B8=20=EB=91=98=20=EC=88=98=EC=9A=A9=20+=20=EC=98=88?= =?UTF-8?q?=EC=8B=9C=20=EC=84=9C=EC=8B=9D=20=EC=9A=B0=ED=9A=8C=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0(=EC=9B=90=EC=B2=9C=EC=9D=B4=20=EC=9D=B4=EA=B9=80)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 계약 시험이 **제 일을 했음** — 「인계가 보내는데 안 읽는 칸: spec_class, spec_class_basis」로 깨짐. 둘 다 읽고, 갈래 판정 근거(`spec_class_basis`)는 **B08 문구 그대로** 줄 비고에 이음 - 예시 서식 거르기를 뺌 — B08 이 **마스터 원천에서** 거름(8건). 두 곳에서 같은 것을 거르면 나중에 한쪽만 고쳐짐 - 짝 시험은 남기되 모양을 바꿈 — 인공 표 대신 **실물 마스터에서 그 8공종이 자원으로 서지 않는지**. 원천이 바뀌면 이 시험이 알려 줌 검증: pytest 211 통과. 못 맞춘 자원 497(원천 필터 뒤 값과 일치) Co-Authored-By: Claude Opus 5 (1M context) --- B09_Estimation/B09_Estimation_BillOfQuantities.py | 6 ++++++ .../B09_Estimation_BillOfQuantities_Rows.py | 3 +++ B09_Estimation/B09_Estimation_ResourceAxis.py | 11 +++-------- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/B09_Estimation/B09_Estimation_BillOfQuantities.py b/B09_Estimation/B09_Estimation_BillOfQuantities.py index 4a5f7329..b75c5b13 100644 --- a/B09_Estimation/B09_Estimation_BillOfQuantities.py +++ b/B09_Estimation/B09_Estimation_BillOfQuantities.py @@ -96,6 +96,10 @@ class HandoffWorkItem: #: 갈래 축·원본값 — 「stone_cm」·「60~80」. **키 문자열은 우리가 만든다**(두 창 합의). variant_axis: str = "" variant_value: str = "" + #: 규격 갈래를 B08 이 판정해 보낸 것(「철근구조물」)과 그 근거 문구. + #: **근거는 산출근거 칸에 그대로 적는다** — 우리가 다시 지어내지 않는다. + spec_class: str = "" + spec_class_basis: str = "" @property def display_name(self) -> str: @@ -243,6 +247,8 @@ def parse_handoff(payload: dict[str, Any]) -> tuple[list[HandoffWorkItem], list[ blocked_kind=row.get("blocked_kind") or "", variant_axis=row.get("variant_axis") or "", variant_value=str(row.get("variant_value") or ""), + spec_class=row.get("spec_class") or "", + spec_class_basis=row.get("spec_class_basis") or "", ) for row in payload["work_items"] ] diff --git a/B09_Estimation/B09_Estimation_BillOfQuantities_Rows.py b/B09_Estimation/B09_Estimation_BillOfQuantities_Rows.py index 46a19f4c..787dd508 100644 --- a/B09_Estimation/B09_Estimation_BillOfQuantities_Rows.py +++ b/B09_Estimation/B09_Estimation_BillOfQuantities_Rows.py @@ -140,6 +140,9 @@ def _leaf_row( quantity=item.quantity, in_bill=item.in_bill, ) + if item.spec_class_basis: + # 갈래 판정 근거는 **B08 문구를 그대로** 쓴다(두 벌로 짜지 않는다). + row.note = " / ".join(part for part in (row.note, item.spec_class_basis) if part) if item.application_ratio_pct is not None: # ⚠ 곱하지 않는다 — B08 이 이미 곱한 값이다. 산출근거로만 적는다. row.note = f"반영률 {item.application_ratio_pct}% 적용 후 수량" diff --git a/B09_Estimation/B09_Estimation_ResourceAxis.py b/B09_Estimation/B09_Estimation_ResourceAxis.py index 958ce3c2..bc790a7f 100644 --- a/B09_Estimation/B09_Estimation_ResourceAxis.py +++ b/B09_Estimation/B09_Estimation_ResourceAxis.py @@ -357,14 +357,9 @@ def match_table( result: AxisResult, ) -> None: """표 하나에 자원 축을 붙인다. 값이 안 서면 `unmatched` 로 보낸다.""" - # ⚠ **예시 서식 표는 자원 표가 아니다.** 품셈이 「ha당 …단가산출서(예시)」처럼 - # **빈 서식**을 실어 두는데(4-2 · 3-2 등), 그것을 읽으려 들면 구간 라벨·항목명이 - # 자원 이름으로 오해돼 못 맞춘 목록이 못 쓰게 된다(2026-09-08 실측 39줄). - # 값이 있는데 안 서는 자리가 아니라 **애초에 값이 없는 표**다. - headers = " ".join(str(c) for c in (table.get("condition_note") or [])) - if "단가산출서" in headers or "예시" in headers: - result.skipped_forms["example_form"] = result.skipped_forms.get("example_form", 0) + 1 - return + # 예시 서식(「ha당 …단가산출서(예시)」)은 **B08 이 마스터 원천에서 거른다**(8건). + # 두 곳에서 같은 것을 거르면 **나중에 한쪽만 고쳐진다** — 원천이 이긴다. + # ⚠ 짝 시험은 남겨 둔다(예시 서식이 자원으로 안 서는지) — 원천이 바뀌면 그것이 알려 준다. from B09_Estimation.B09_Estimation_CrewOutput import match_crew_table