feat(M02 엑셀 붙여넣기): 붙인 글 서버 해석 · 호표마다 사전조합 · 줄만 고정 줄 (PLAN 705-2)

- M02_Hopyo_Paste — 탭 · 줄 글 → 실무자료 꼴(파일 올리기와 같은 꼴) · 머리 글 줄이면 열 짝 저절로 · 없으면 기억한 열 짝 · 둘 다 없으면 짐작 + 물음
- 「제N호표」 엑셀꼴(같은 줄 머리) · STmate 꼴(다음 줄 머리) · 첫 줄 수량 없음 = 머리 · 합계 · 계 · 소계 · 계약단가 · 근거 줄 거름 · 쉼표 · 0 빈칸
- /hopyo-paste — 물음 · 줄(열린 문서 · 있는 줄 가름 피함) · 만듦(실무자료 「붙여넣기 …」 + build_all 그대로)
- build_all 답에 만듦 [{번, 이름, 키}]
- 시험: 실무 xlsx 넷 시트 통째 붙여넣기 = 파일과 호표 · 줄 · 합계 같음 · 만듦 엑셀 합계 = 우리 합계(14 · 23 · 34 · 25)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 15:46:32 +09:00
co-authored by Claude Opus 5.5
parent bbbf963d05
commit 137b8a3a45
4 changed files with 495 additions and 1 deletions
+3 -1
View File
@@ -462,7 +462,7 @@ def _order(units: dict[int, dict[str, Any]]) -> list[int]:
def build_all(folder: Path, source: Path, key: str, who: Any = None) -> dict[str, Any]:
"""[모두 고정으로 들여오기](705-3) — 시트 호표 모두 · 하위 먼저 · 줄 = 고정(하위 = 참조) ·
이미 확인된 호표는 덮지 않음(`그대로`) → `{호표, 줄, 품셈, 고정, 호표참조, 빠짐, 이음, 이음후보,
같음, 그대로, 다름 [{번, 이름, 엑셀, 우리, 차이}], 실패 [{번, 까닭}]}`."""
같음, 그대로, 다름 [{번, 이름, 엑셀, 우리, 차이}], 실패 [{번, 까닭}], 만듦 [{번, 이름, 키}]}`."""
units = {int(h["번"]): h for h in hopyo_store.read(source, key).get("호표") or []}
sums = dict.fromkeys(("품셈", "고정", "호표", "빠짐", "이음", "이음후보"), 0)
out: dict[str, Any] = {
@@ -472,6 +472,7 @@ def build_all(folder: Path, source: Path, key: str, who: Any = None) -> dict[str
"그대로": 0,
"다름": [],
"실패": [],
"만듦": [],
}
for no in _order(units):
out["줄"] += len(units[no].get("줄") or [])
@@ -487,6 +488,7 @@ def build_all(folder: Path, source: Path, key: str, who: Any = None) -> dict[str
for k in sums:
sums[k] += made["줄수"][k]
got = compare(ref, maker.hopyo)
out["만듦"].append({"번": no, "이름": units[no].get("이름"), "키": ref["키"]})
except store.StoreError as e:
out["실패"].append({"번": no, "까닭": str(e.detail)})
continue