Merge remote-tracking branch 'origin/main_laptop_1' into sub_desktop_1

This commit is contained in:
2026-09-09 23:08:31 +09:00
5 changed files with 434 additions and 3 deletions
@@ -256,6 +256,266 @@
"destination": "earthwork"
}
]
},
{
"type_id": "pipe_wing_wall",
"spec": {
"wing_wall_type": "A-TYPE",
"pipe_diameter_mm": "800"
},
"unit": "개소",
"source": "uljin_library",
"source_note": "§1 관보호공 날개벽 — 원본 탭 「날개벽(800)A-TYPE산출근거」",
"components": [
{
"name": "기초잡석",
"unit": "㎥",
"amount": 1.152,
"destination": "unit_price",
"basis_note": "T=0.2"
},
{
"name": "콘크리트",
"unit": "㎥",
"amount": 2.0595,
"destination": "unit_price",
"basis_note": "저판 0.952 + 벽체 1.1075"
},
{
"name": "유로폼",
"unit": "㎡",
"amount": 12.5376,
"destination": "unit_price",
"basis_note": "저판 1.92 + 벽체 10.6176 · 원본 「유로폼」"
},
{
"name": "터파기",
"unit": "㎥",
"amount": 13.104,
"destination": "earthwork"
},
{
"name": "되메우기",
"unit": "㎥",
"amount": 6.504,
"destination": "earthwork"
},
{
"name": "잔토처리",
"unit": "㎥",
"amount": 6.61,
"destination": "earthwork"
}
],
"note": "⚠ 철근·면목 줄이 **원본에 없다** — 날개벽 탭 다섯에 그 줄이 없고 집수정구조도 탭에만 D13·면목이 있다. 지어내지 않는다."
},
{
"type_id": "pipe_wing_wall",
"spec": {
"wing_wall_type": "C-TYPE",
"pipe_diameter_mm": "800"
},
"unit": "개소",
"source": "uljin_library",
"source_note": "§1 관보호공 날개벽 — 원본 탭 「날개벽(800)C-TYPE산출근거」",
"components": [
{
"name": "기초잡석",
"unit": "㎥",
"amount": 0.6821,
"destination": "unit_price",
"basis_note": "T=0.2"
},
{
"name": "콘크리트",
"unit": "㎥",
"amount": 1.109,
"destination": "unit_price",
"basis_note": "저판 0.4847 + 벽체 0.6243"
},
{
"name": "유로폼",
"unit": "㎡",
"amount": 6.2309,
"destination": "unit_price",
"basis_note": "저판 1.4786 + 벽체 4.7523 · 원본 「유로폼」"
},
{
"name": "터파기",
"unit": "㎥",
"amount": 7.7269,
"destination": "earthwork"
},
{
"name": "되메우기",
"unit": "㎥",
"amount": 4.7148,
"destination": "earthwork"
},
{
"name": "잔토처리",
"unit": "㎥",
"amount": 3.0122,
"destination": "earthwork"
}
],
"note": "⚠ 철근·면목 줄이 **원본에 없다** — 날개벽 탭 다섯에 그 줄이 없고 집수정구조도 탭에만 D13·면목이 있다. 지어내지 않는다."
},
{
"type_id": "pipe_wing_wall",
"spec": {
"wing_wall_type": "A-TYPE",
"pipe_diameter_mm": "1000"
},
"unit": "개소",
"source": "uljin_library",
"source_note": "§1 관보호공 날개벽 — 원본 탭 「날개벽(1000)A-TYPE산출근거」",
"components": [
{
"name": "기초잡석",
"unit": "㎥",
"amount": 1.6,
"destination": "unit_price",
"basis_note": "T=0.2"
},
{
"name": "콘크리트",
"unit": "㎥",
"amount": 2.891,
"destination": "unit_price",
"basis_note": "저판 1.368 + 벽체 1.523"
},
{
"name": "합판거푸집",
"unit": "㎡",
"amount": 18.255,
"destination": "unit_price",
"basis_note": "저판 2.24 + 벽체 16.015 · 원본 「거푸집 합판(4회)」"
},
{
"name": "터파기",
"unit": "㎥",
"amount": 24.39,
"destination": "earthwork"
},
{
"name": "되메우기",
"unit": "㎥",
"amount": 10.478,
"destination": "earthwork"
},
{
"name": "잔토처리",
"unit": "㎥",
"amount": 13.912,
"destination": "earthwork"
}
],
"note": "⚠ 철근·면목 줄이 **원본에 없다** — 날개벽 탭 다섯에 그 줄이 없고 집수정구조도 탭에만 D13·면목이 있다. 지어내지 않는다."
},
{
"type_id": "pipe_wing_wall",
"spec": {
"wing_wall_type": "C-TYPE",
"pipe_diameter_mm": "1000"
},
"unit": "개소",
"source": "uljin_library",
"source_note": "§1 관보호공 날개벽 — 원본 탭 「날개벽(1000)C-TYPE산출근거」",
"components": [
{
"name": "기초잡석",
"unit": "㎥",
"amount": 1.0271,
"destination": "unit_price",
"basis_note": "T=0.2"
},
{
"name": "콘크리트",
"unit": "㎥",
"amount": 1.9109,
"destination": "unit_price",
"basis_note": "저판 0.7736 + 벽체 1.1373"
},
{
"name": "합판거푸집",
"unit": "㎡",
"amount": 10.722,
"destination": "unit_price",
"basis_note": "저판 1.9118 + 벽체 8.8102 · 원본 「거푸집 합판(4회)」"
},
{
"name": "터파기",
"unit": "㎥",
"amount": 13.7179,
"destination": "earthwork"
},
{
"name": "되메우기",
"unit": "㎥",
"amount": 7.9134,
"destination": "earthwork"
},
{
"name": "잔토처리",
"unit": "㎥",
"amount": 5.8046,
"destination": "earthwork"
}
],
"note": "⚠ 철근·면목 줄이 **원본에 없다** — 날개벽 탭 다섯에 그 줄이 없고 집수정구조도 탭에만 D13·면목이 있다. 지어내지 않는다."
},
{
"type_id": "pipe_wing_wall",
"spec": {
"wing_wall_type": "A-TYPE+집수정",
"pipe_diameter_mm": "800"
},
"unit": "개소",
"source": "uljin_library",
"source_note": "§1 관보호공 날개벽 — 원본 탭 「날개벽(800)A-TYPE+집수정산출근거」",
"components": [
{
"name": "기초잡석",
"unit": "㎥",
"amount": 1.152,
"destination": "unit_price",
"basis_note": "T=0.2"
},
{
"name": "콘크리트",
"unit": "㎥",
"amount": 2.6395,
"destination": "unit_price",
"basis_note": "저판 0.952 + 벽체 1.6875"
},
{
"name": "합판거푸집",
"unit": "㎡",
"amount": 18.3376,
"destination": "unit_price",
"basis_note": "저판 1.92 + 벽체 16.4176 · 원본 「거푸집 합판(4회)」"
},
{
"name": "터파기",
"unit": "㎥",
"amount": 16.256,
"destination": "earthwork"
},
{
"name": "되메우기",
"unit": "㎥",
"amount": 8.44,
"destination": "earthwork"
},
{
"name": "잔토처리",
"unit": "㎥",
"amount": 7.816,
"destination": "earthwork"
}
],
"note": "⚠ 철근·면목 줄이 **원본에 없다** — 날개벽 탭 다섯에 그 줄이 없고 집수정구조도 탭에만 D13·면목이 있다. 지어내지 않는다."
}
],
"not_found": {
@@ -299,6 +559,14 @@
"why": "물구멍을 자재 줄로 세우면 규격·수량이 눈에 보이고 되짚을 수 있다. 제잡비 윗단은 같은 것을 품 안에 녹이는 다른 방식이라 어느 쪽이든 하나만 골라야 한다.",
"scope": "⚠ 지금 쓰는 돌쌓기(13-4 계열)에는 **제잡비 행 자체가 없어** 겹치지 않는다(전수 확인). 이 규칙은 13-6·13-7 을 쓰게 될 때 걸린다.",
"guard": "제잡비 윗단과 물구멍 줄이 함께 서면 멈출 것 — B09 ㉥ 가드와 짝."
},
{
"key": "날개벽 「A-TYPE+집수정」 ↔ 유입부 집수정 줄",
"where": "원본 탭 「날개벽(800)집수정산출근거」",
"quote": "A-TYPE 날개벽에 집수정을 **결합한** 형식의 개소당 물량(터파기 16.256㎥ 등)",
"our_choice": "이 형식을 고르면 **집수정 줄을 따로 세우지 않는다** — 날개벽 값이 이미 품고 있다.",
"why": "따로 세우면 한 개소를 두 번 센다(터파기·콘크리트·거푸집 전부).",
"guard": "`wing_wall_type` 이 「A-TYPE+집수정」인데 `inlet_basin_form` 도 차 있으면 사유로 알린다."
}
]
},
+119
View File
@@ -0,0 +1,119 @@
"""관보호공 날개벽 원단위 — 소광리 원본 다섯 탭에서 옮긴 값 (2026-09-09, 계획서 4-13).
값은 **개소당·붙박이**다. 원본 탭(`07-구조도-소광리.xlsx`)의 소계를 그대로 옮겼고
비례로 늘리지 않는다 — Ø800·Ø1000, A·C-TYPE, 그리고 「A-TYPE+집수정」 다섯뿐이다.
⚠ 겹쳐 세는 자리 하나 — 「A-TYPE+집수정」은 집수정을 **품은** 형식이라 집수정 줄을 따로
세우면 한 개소를 두 번 센다. 값을 고치지 않고 **사유로 드러낸다.**
⚠ 철근·면목 줄은 원본 날개벽 탭에 **없다**(집수정구조도 탭에만 있음) — 지어내지 않는다.
"""
from __future__ import annotations
import json
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from B08_Quantity.B08_Quantity_Engine_ObservedUnit import load_observed_table # noqa: E402
from B08_Quantity.B08_Quantity_Engine_UnitQuantity import ( # noqa: E402
ATTACHMENTS,
OBSERVED_SPEC_KEYS,
attachments_of,
wing_wall_double_count,
)
def _registry_choices() -> list[str]:
payload = json.loads(
(ROOT / "B05_Profile" / "B05_Profile_Structure_Types.json").read_text(encoding="utf-8")
)
types = payload if isinstance(payload, list) else payload["types"]
pipe = next(item for item in types if item["type_id"] == "pipe")
option = next(o for o in pipe["options"] if o["key"] == "wing_wall_type")
return list(option["choices"])
def test_다섯_형식이_표에_있다() -> None:
table = load_observed_table()
specs = {
(spec.get("wing_wall_type"), spec.get("pipe_diameter_mm"))
for spec in table.specs_for("pipe_wing_wall")
}
assert specs == {
("A-TYPE", "800"),
("C-TYPE", "800"),
("A-TYPE", "1000"),
("C-TYPE", "1000"),
("A-TYPE+집수정", "800"),
}
def test_원본_소계와_같다() -> None:
"""Ø800 A-TYPE — 원본 탭 소계(터파기 13.104 · 저판 0.952 + 벽체 1.1075 …)."""
found = load_observed_table().find(
"pipe_wing_wall", {"wing_wall_type": "A-TYPE", "pipe_diameter_mm": "800"}
)
assert found is not None
amounts = {c["name"]: c["amount"] for c in found["components"]}
assert amounts["터파기"] == 13.104
assert amounts["되메우기"] == 6.504
assert amounts["잔토처리"] == 6.61
assert amounts["기초잡석"] == 1.152
assert abs(amounts["콘크리트"] - (0.952 + 1.1075)) < 1e-9
assert abs(amounts["유로폼"] - (1.92 + 10.6176)) < 1e-9
def test_거푸집_종류가_탭마다_다르다() -> None:
"""Ø800 A 는 유로폼, Ø1000 은 합판(4회) — 단가가 갈리므로 이름을 뭉개지 않는다."""
table = load_observed_table()
small = table.find("pipe_wing_wall", {"wing_wall_type": "A-TYPE", "pipe_diameter_mm": "800"})
big = table.find("pipe_wing_wall", {"wing_wall_type": "A-TYPE", "pipe_diameter_mm": "1000"})
assert "유로폼" in [c["name"] for c in small["components"]]
assert "합판거푸집" in [c["name"] for c in big["components"]]
def test_철근_면목은_안_지어낸다() -> None:
table = load_observed_table()
for spec in table.specs_for("pipe_wing_wall"):
found = table.find("pipe_wing_wall", spec)
names = [c["name"] for c in found["components"]]
assert not any("철근" in name or "면목" in name for name in names), spec
def test_형식을_고르면_줄이_선다() -> None:
rows = attachments_of(
{
"structure_id": "s1",
"type_id": "pipe",
"options": {"wing_wall_type": "A-TYPE", "pipe_diameter_mm": "800"},
}
)
assert [row["type_id"] for row in rows] == ["pipe_wing_wall"]
# 안 고르면 줄이 없다 — 안 놓은 것과 같다.
assert attachments_of({"structure_id": "s2", "type_id": "pipe", "options": {}}) == []
def test_집수정_결합형은_두_번_세는_것을_알린다() -> None:
assert wing_wall_double_count({"wing_wall_type": "A-TYPE+집수정"}) is None
warn = wing_wall_double_count(
{"wing_wall_type": "A-TYPE+집수정", "inlet_basin_form": "□형(기본형)"}
)
assert warn is not None and "두 번" in warn
assert (
wing_wall_double_count({"wing_wall_type": "A-TYPE", "inlet_basin_form": "□형(기본형)"})
is None
)
def test_등록부_선택지와_표가_한_벌이다() -> None:
"""칸에서 고를 수 있는데 표에 없으면 「원단위 미확보」로 끝난다 — 둘을 붙여 둔다."""
table_types = {
spec.get("wing_wall_type") for spec in load_observed_table().specs_for("pipe_wing_wall")
}
assert set(_registry_choices()) == table_types
assert OBSERVED_SPEC_KEYS["pipe_wing_wall"] == ("wing_wall_type", "pipe_diameter_mm")
assert any(item[0] == "pipe_wing_wall" for item in ATTACHMENTS["pipe"])