wip(M01): 자재 조합 M01 길 초안 — 합치기 전 임시(sub4 자재조합 표 위에 얹을 예정)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RoyUwuTFiDJfvCfHpvKKzp
This commit is contained in:
2026-09-28 19:00:53 +09:00
co-authored by Claude Sonnet 5
parent 0fb69c053b
commit 1904cd5072
5 changed files with 296 additions and 3 deletions
+7 -3
View File
@@ -218,15 +218,15 @@ def combo_edit(key: str, version: str, combo_: dict, owner: str = "") -> dict:
return {**done, "combo": _find(store.read(FILE)[0], key)}
def combo_users(key: str) -> list[str]:
"""이 조합을 「일위대가」 로 쓰는 구조물 열 이름들 — 집계표 · SS 장부를 함께 봄."""
def users_of(field: str, key: str) -> list[str]:
"""집계표 · SS 장부에서 열 칸 `field`(「일위대가」 · 「자재조합」)가 `key` 인 열 이름들."""
names: dict[str, str] = {}
for path in USERS:
if not path.is_file():
continue
doc = json.loads(path.read_text(encoding="utf-8"))
for col in doc.get("열") or doc.get("줄") or []:
if col.get("일위대가") != key:
if col.get(field) != key:
continue
head = col.get("머리") or [col.get(k) for k in ("종류", "분류1", "분류2", "분류3")]
cid = str(col.get("id") or col.get("열"))
@@ -234,6 +234,10 @@ def combo_users(key: str) -> list[str]:
return list(names.values())
def combo_users(key: str) -> list[str]:
return users_of("일위대가", key)
def combo_delete(key: str, version: str) -> dict:
data, _ = _read()
_find(data, key)