refactor(M02): 자재 조합 표를 마스터 템플릿으로 옮김 · M02 좌측 「자재 조합」 컨테이너

- 표 resources/master_data/자재조합.json → resources/master_template/자재조합.json(git mv) · 키 UM 은 표 안 「다음」 번호 · _키대장 · master_keys 의 UM 뺌 · check_master 틀이 새 자리를 같이 봄
- 서버: M01 /api/m01/matset* 뺌 · M02 저장소 M02_MasterTemplete_Matset.py(목록 · 새로 · 고치기 · 지우기 · 쓰는 열 검사) · 길 GET/POST /api/m02/material-combos · PUT/DELETE /api/m02/material-combos/{키} · 갈라 내기(branchMaterialCombo)도 이 저장소로
- 화면: M01 좌측 「자재 조합」 컨테이너 뺌 · M02 좌측 「자재 조합」 컨테이너(찾기 · 키 맨 앞 목록 · 새로 · 본떠 만들기 · 지우기) · 메인 칸 상세(이름 · 비고 · 본뜬키 · 담은 자재 표 · 자재 더하기 · 빼기 · 저장) · 쓰는 열이 있으면 지우기는 확인 창 없이 알림
- 시험: test_m01_matset → test_m02_matset · test_m02_combo_branch 사본 자리 · 실제 자재 코드

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VwJQ5eRrCKf3nH9EFeKvJz
This commit is contained in:
2026-09-28 22:25:30 +09:00
co-authored by Claude Opus 5.5
parent 6606ef167a
commit 4abfc5b265
28 changed files with 753 additions and 882 deletions
-41
View File
@@ -15,7 +15,6 @@ from pydantic import BaseModel
from M01_MasterData import M01_MasterData_Store as store
from M01_MasterData import M01_MasterData_Store_Combo as combo_store
from M01_MasterData import M01_MasterData_Store_Make as make
from M01_MasterData import M01_MasterData_Store_Matset as matset_store
router = APIRouter(prefix="/api/m01", tags=["M01 MasterData"])
@@ -115,20 +114,6 @@ class PreviewCombo(BaseModel):
inputs: dict[str, dict[str, Any]] = {}
class NewMatset(BaseModel):
"""자재 조합 — 담은 자재 목록만(코드 · 이름 · 규격 · 단위 · 수량 · 단가는 안 둠)."""
matset: dict[str, Any]
owner: str = matset_store.OWNERS[0]
class EditMatset(BaseModel):
key: str
version: str
matset: dict[str, Any]
owner: str = ""
class DraftLogic(BaseModel):
text: str # 줄로 적은 식 — 줄마다 「이름 = 식」
decided: dict[str, Any] = {} # 변수마다 정한 것 {이름: {무엇, 단위, 비목, 요소·찾기·값}}
@@ -364,29 +349,3 @@ def post_combo_delete(body: DeleteCombo) -> dict:
def post_combo_preview(body: PreviewCombo) -> dict:
"""담은 로직마다 값을 뽑아 비목별로 갈라 합계 — 저장하지 않음."""
return _call(combo_store.combo_preview, body.combo, body.inputs)
# ── 자재 조합(계약 9장 끝) ─────────────────────────────────────────────
@router.get("/matsets")
def get_matsets(q: str = "", owner: str = "") -> dict:
return {"matsets": _call(matset_store.matsets, q, owner)}
@router.get("/matset")
def get_matset(key: str) -> dict:
return _call(matset_store.matset, key)
@router.post("/matset/new")
def post_matset_new(body: NewMatset) -> dict:
return _call(matset_store.matset_new, body.matset, body.owner)
@router.post("/matset/edit")
def post_matset_edit(body: EditMatset) -> dict:
return _call(matset_store.matset_edit, body.key, body.version, body.matset, body.owner)
@router.post("/matset/delete")
def post_matset_delete(body: DeleteCombo) -> dict:
return _call(matset_store.matset_delete, body.key, body.version)