fix(860-3): 불러오기 머리 막대 — 호표 없는 파일은 「단가산출 n」 만

- 원파일(.estx · .STC) · 일위대가 시트 없는 엑셀에 뜻 없이 뜨던 「시트 일위대가(없는 시트) · 호표 0 · 검산 맞음 · 연결 0 / 줄 0」 숨김
- 서버 목록 한 줄(brief)에 단산수 더함 · 호표 있는 파일 머리 글은 그대로

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 13:10:54 +09:00
co-authored by Claude Opus 5.5
parent 66eed8b045
commit 25974a7c68
3 changed files with 14 additions and 8 deletions
+2 -1
View File
@@ -59,11 +59,12 @@ def _grid_path(folder: str | Path, key: str) -> Path:
def brief(doc: dict[str, Any]) -> dict[str, Any]:
"""목록 한 줄 — `{키, 파일, 올린때, 올린이, 시트, 호표수, 어긋남}`."""
"""목록 한 줄 — `{키, 파일, 올린때, 올린이, 시트, 호표수, 단산수, 어긋남}`."""
keep = ("키", "파일", "올린때", "올린이", "시트")
return {
**{k: doc.get(k) for k in keep},
"호표수": len(doc.get("호표") or []),
"단산수": len(doc.get("단산") or []), # 호표 없는 파일 머리 글(860-3)
"어긋남": len((doc.get("검산") or {}).get("어긋남") or []),
}
@@ -29,6 +29,8 @@ export interface HopyoFile {
올린이: { id: number; 이름: string | null } | null;
시트: string;
호표수: number;
/** 단가산출 블록 수 — 호표 없는 파일(원파일 · 일위대가 시트 없는 엑셀) 머리 글(860-3) */
단산수?: number;
어긋남: number;
/** 올림 응답만 — 산근 시트를 못 읽은 사유(빈 파일 · DRM 암호 · 형식 오류 · 797-1) */
읽기불가?: string;
@@ -176,13 +176,16 @@ export function buildHopyoSheet(opt: HopyoSheetOptions): HopyoSheetBody {
/** 머리 막대 — 시트 · 호표 수 · 검산 · 제안 · 셈 중 + 덧붙임 */
function paintHead(file: HopyoView): void {
const wrong = file.검산.어긋남;
head.replaceChildren(
note(`시트 ${file.시트}`),
note(`호표 ${file.호표수}`),
note(wrong.length ? `검산 어긋남 ${wrong.length}` : "검산 맞음"),
note(`연결 ${file.맞춤[0]} / 줄 ${file.맞춤[1]}`),
...(opt.headExtra ?? []),
);
// 호표 없는 파일 = 있는 것만(860-3 — 없는 시트 이름 · 뜻 없는 검산 · 연결 0 / 줄 0 안 적음)
const facts = file.호표수
? [
note(`시트 ${file.시트}`),
note(`호표 ${file.호표수}`),
note(wrong.length ? `검산 어긋남 ${wrong.length}` : "검산 맞음"),
note(`연결 ${file.맞춤[0]} / 줄 ${file.맞춤[1]}`),
]
: [note(`단가산출 ${file.단산수 ?? 0}`)];
head.replaceChildren(...facts, ...(opt.headExtra ?? []));
opt.onRead?.(file);
warn.textContent = wrong.join("\n");
warn.hidden = !wrong.length;