feat(B05): 세월교 · 박스 유출 = 「추가 흙막이(단)」 공용 스테퍼 · 「+ 흙막이」 없앰 · 집계 단 수로 상자(90-1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYJJRCfHfdCGNhmXTjQKV7
This commit is contained in:
@@ -7,7 +7,8 @@
|
||||
짝: `A00_Common/design/design_structure_guard.ts` · `_road.ts` 선택 컨테이너(머리 · 잇기 · 제목) —
|
||||
시험이 대조.
|
||||
기타(52-14) = 사용자가 적은 상세 종류 이름이 집계 건 이름(`그룹`) · 비면 「기타」.
|
||||
배관 흙막이 = 지형이 세운 유출 다단 수(`흙막이단`)까지만 — 넘친 컨테이너 값은 파일에만(54-11).
|
||||
배관 · 세월교 · 박스 흙막이 = 지형이 세운 유출 다단 수(`흙막이단`)까지만 — 넘친 컨테이너 값은
|
||||
파일에만(54-11 · 90-1) · 세월교 · 박스 유출이 흙막이가 아니면 0.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -30,6 +31,9 @@ SPEC_CONTAINERS: dict[str, tuple[tuple[str, str, str], ...]] = {
|
||||
"etc": (("etc_detail", "getcdetail", "상세 내용"),),
|
||||
}
|
||||
_TEXT = ("structure", "form", "note")
|
||||
#: 흙막이 상자 수 = 지형이 세운 유출 다단 수인 종류(54-11 · 90-1) · 세월교 · 박스 유출 구조 칸
|
||||
_TIERED = ("pipe", "box_culvert", "ford_bridge")
|
||||
_BODY_OUTLET = {"box_culvert": "wing_out", "ford_bridge": "outlet_type"}
|
||||
|
||||
|
||||
def etc_label(type_id: str, options: dict[str, Any] | None) -> dict[str, str]:
|
||||
@@ -70,6 +74,9 @@ def container_rows(item: dict[str, Any], links: dict[str, Any]) -> list[dict[str
|
||||
"""한 구조물의 선택 컨테이너 인스턴스마다 한 건(n 차례) — 컨테이너 없는 종류는 빈 목록."""
|
||||
rows: list[dict[str, Any]] = []
|
||||
tiers = item.get("흙막이단") # None = 모름(저장된 것 그대로)
|
||||
guard_key = _BODY_OUTLET.get(item["type_id"])
|
||||
if guard_key and str(item["options"].get(guard_key) or "").strip() != "흙막이":
|
||||
tiers = 0 # 유출이 날개벽 · 없음 — 옛 상자는 숨김 · 값은 파일에 남김(90-1)
|
||||
for prefix, link, title in SPEC_CONTAINERS.get(item["type_id"], ()):
|
||||
head = re.compile(rf"^{prefix}_(\d+)_(.+)$")
|
||||
found: dict[int, dict[str, Any]] = {}
|
||||
@@ -80,7 +87,7 @@ def container_rows(item: dict[str, Any], links: dict[str, Any]) -> list[dict[str
|
||||
for n in sorted(found):
|
||||
if (
|
||||
prefix == "soil_add"
|
||||
and item["type_id"] == "pipe"
|
||||
and item["type_id"] in _TIERED
|
||||
and tiers is not None
|
||||
and n > tiers
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user