refactor(M02): 재료산출 시트 지움 — 종류 material · 재료번 SM · 좌측 줄 · 집계표 「재료산출」 줄 · 카드 · 전체 편집 · 복사 길 · 프로젝트 복사본 「재료」 · 고르기 모달 · 시스템 층 · fixture · 시험

- 새 프로젝트 씨앗(KINDS)에서도 빠짐 · 새 열은 구조물 도면 · 면적산출만 만듦
- storage 층(회사 · 개인 · 프로젝트) material/ 파일은 지우지 않음(읽기만 끊음)
- 장부 재료번 칸은 다음 집계표 [저장] 때 빠짐

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NPJGtfXo6GMbcpiboQC4uK
This commit is contained in:
2026-10-04 17:56:49 +09:00
co-authored by Claude Opus 5.5
parent 54ce67ceb8
commit 61d2ed5997
53 changed files with 198 additions and 1811 deletions
+5 -6
View File
@@ -50,13 +50,12 @@ from M02_MasterTemplete.M02_Item_Source import (
KINDS = {
"도면": "도면.json",
"면적": "면적.json",
"재료": "재료.json",
"입력연결": LINK_FILE,
"입력값": VALUES_FILE,
"고른자재": PICKS_FILE,
}
#: 뼈대 검사에 쓰는 층 양식 종류(도면 · 면적산출 · 재료산출)
SKELETON = {"도면": "structure", "면적": "area", "재료": "material"}
#: 뼈대 검사에 쓰는 층 양식 종류(도면 · 면적산출)
SKELETON = {"도면": "structure", "면적": "area"}
SEATS = ("면적", "재료", "선택", None)
_MT = re.compile(r"^MT\d{6}$")
@@ -190,13 +189,13 @@ def write_file(
content: Any,
recalc: Callable[[dict], dict] | None = None,
) -> dict[str, Any]:
"""판이 같을 때만 씀 — 면적 · 재료는 `recalc`(서버 계산값)를 거친 것을 씀."""
"""판이 같을 때만 씀 — 면적은 `recalc`(서버 계산값)를 거친 것을 씀."""
target = folder_of(project_root, folder)
check(kind, content)
current = version_of(read_json(target / KINDS[kind]))
if version != current:
raise Stale(current)
if recalc is not None and kind in ("면적", "재료"):
if recalc is not None and kind == "면적":
content = recalc(content)
atomic_write_json(target / KINDS[kind], content)
manifest = read_json(target / MANIFEST_NAME) or {}
@@ -244,7 +243,7 @@ def _kept_picks(picks: Any, labor: dict[str, Any]) -> dict[str, Any]:
def reapply(project_root: str | Path, folder: str) -> dict[str, Any]:
"""재적용 — 원본(층 · 마스터)을 다시 가져옴 · 입력값 · 고른자재는 같은 키면 살림.
원본과 달라 덮인 파일(도면 · 면적 · 재료 · 입력연결)은 `덮임` 에 알림."""
원본과 달라 덮인 파일(도면 · 면적 · 입력연결)은 `덮임` 에 알림."""
target = folder_of(project_root, folder)
manifest = read_json(target / MANIFEST_NAME) or {}
values = read_json(target / VALUES_FILE)