fix(B09 불러오기): 코드로만 가리킨 내역 줄도 일위대가에 이음 · 끝수 줄 꼬리표 · 요율 없음 총공사비 숨김 (707-7)
- 영월 꼴(STmate 엑셀 내역 줄 = 호표 코드만) = 일위대가표 같은 코드 호표 번 채움 → 서고 사본 21 · 이음 34 - 이은 줄 차가 비목마다 1 원/단위 안 = 「끝수」(STmate 하위 호표 반올림) · 끝 알림 한 줄 「엑셀 합계와 차 n 원 = 하위 호표 반올림 끝수 m 줄」(브레인 정함 = 끝수 줄도 이음) - 요율 못 읽은 공사(.estx · .STC) = 총공사비 칸 안 보임 - 시험 test_707_7 11(영월 끝수 · 일위대가 시트 없음 까닭) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -168,22 +168,24 @@ def _linked(root: Path, folders: dict[int, str]) -> dict[int, dict[str, Any]]:
|
||||
|
||||
def _own_links(
|
||||
root: Path, name: str, data: bytes, parsed: dict[str, Any], tag: str, who: Any
|
||||
) -> tuple[dict[int, dict[str, Any]], dict[str, Any]]:
|
||||
) -> tuple[dict[int, dict[str, Any]], dict[str, Any], dict[str, Any]]:
|
||||
"""707-7 — 파일 일위대가 · 단가산출 → 이 공사 서고 사본(층 쓰기 0) →
|
||||
(줄 연결, 단계 수 · 까닭)."""
|
||||
(줄 연결, 단계 수 · 까닭, 내역 — 코드로만 가리킨 줄에 호표 번 채움)."""
|
||||
if _raw(name):
|
||||
return {}, {"까닭": f"{Path(name).suffix} 구성 줄은 못 읽음 — 같은 공사 엑셀에서"}
|
||||
return {}, {"까닭": f"{Path(name).suffix} 구성 줄은 못 읽음 — 같은 공사 엑셀에서"}, parsed
|
||||
try:
|
||||
book = bill_hopyo.read(name, data)
|
||||
except ExcelError as error:
|
||||
return {}, {"까닭": str(error)}
|
||||
return {}, {"까닭": str(error)}, parsed
|
||||
built = bill_hopyo.build(book, name, tag, who)
|
||||
parsed = bill_hopyo.numbered(parsed, book)
|
||||
numbers, other = bill_hopyo.agree(parsed, book)
|
||||
folders = {
|
||||
no: got for no in sorted(numbers) if (got := bill_hopyo.copy(root, built, tag, no, who))
|
||||
}
|
||||
links = _linked(root, folders)
|
||||
return links, {**built["수"], "사본": len(links), "실패": built["실패"], "단가다름": other}
|
||||
step = {**built["수"], "사본": len(links), "실패": built["실패"], "단가다름": other}
|
||||
return links, step, parsed
|
||||
|
||||
|
||||
def _numbers(parsed: dict[str, Any]) -> set[int]:
|
||||
@@ -258,7 +260,7 @@ async def apply_bill(
|
||||
steps: dict[str, Any] = {}
|
||||
if body.hopyo:
|
||||
args = (root, path.name, data, parsed, body.file_key, who_of(session))
|
||||
links, steps["일위대가"] = await asyncio.to_thread(_own_links, *args)
|
||||
links, steps["일위대가"], parsed = await asyncio.to_thread(_own_links, *args)
|
||||
else:
|
||||
found = await asyncio.to_thread(_found, session, path.name, _numbers(parsed))
|
||||
links = await asyncio.to_thread(_links, root, found, who_of(session))
|
||||
|
||||
Reference in New Issue
Block a user