feat(797-1): 엑셀 불러오기 요소 연결 — 기계 이음 [우리 단가로] 셈 · 유가 · 환율 이음 · 산근 속 산근 형제 참조 · 읽기 불가 사유 응답

- 기계(EQ) 이음 줄 [우리 단가로] = 시간당 기계경비의 그 비목(옛 Decimal × dict 실패 387 블록 풀림) · 시간당 자료 없는 EQ = 엑셀 단가 그대로
- 내보내기 `_m01` = 유가(MO) · 환율(FX) 유일 짝만 자동 · 여럿 = 표지 · 화폐는 이름 그대로일 때만(「유로폼」 오판 막음)
- 산근 속 산근 = 같은 엑셀 안쪽 블록을 형제 가져온 식 SK 로 먼저 만들어 `참조`(비목 한 줄 부름 = `참조비목`) · 단가기준 따라감 · 못 잇는 줄 = 얼림 + 표지
- 쓰는 곳 · 층 복사 · 프로젝트 굳힘이 가져온 호표 참조를 봄(`Labor_Ref.refs_in` · `_move_doc`)
- 올림 응답 `읽기불가` + 화면 토스트
- 시험 test_797_1_import_links 9 · 낡은 시험 없음

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-07 14:17:06 +09:00
co-authored by Claude Sonnet 5.5
parent b608d2aa3d
commit 430aaa9aae
10 changed files with 390 additions and 23 deletions
+9 -4
View File
@@ -271,11 +271,12 @@ def _upload(name: str, data: bytes, who: dict[str, Any]) -> dict[str, Any]:
mark = hopyo_store.fingerprint(data)
hopyo_forget.sweep(store.root()) # 하루 지난 작업 중 HP 끝냄(743-1)
if same := next((r for r in hopyo_store.rows(store.root()) if r.get("지문") == mark), None):
cannot = None
if not from_hopyo.has(store.root(), same["키"]): # 793-3b 전에 올린 HP
from_hopyo.keep(store.root(), same["키"], name, data)
cannot = from_hopyo.keep(store.root(), same["키"], name, data)
hopyo_judge.ensure(store.root(), same["키"])
san_basis.ensure(store.root(), same["키"])
return {**same, "이어서": True}
return {**same, "이어서": True, **({"읽기불가": cannot} if cannot else {})}
try:
parsed = hopyo_excel.read_book(name, data)
except hopyo_excel.ExcelError as error:
@@ -288,10 +289,14 @@ def _upload(name: str, data: bytes, who: dict[str, Any]) -> dict[str, Any]:
parsed["사전"] = hopyo_row.lexicon(sheets) # 엑셀 사전(785-3 · 1차 줄 판정)
parsed["숨은식"] = san_basis.hidden(parsed, sheets) # STmate 숨은 G 식(793-3a 근거 제안)
row = hopyo_store.save(store.root(), name, parsed, who, grid, mark)
from_hopyo.keep(store.root(), row["키"], name, data) # 산근 시트(793-3b 가져온 식 열기)
cannot = from_hopyo.keep(
store.root(), row["키"], name, data
) # 산근 시트(793-3b 가져온 식 열기)
hopyo_judge.ensure(store.root(), row["키"]) # 블록 풀이 뒤 셈(파생 저장본 · 화면 안 기다림)
san_basis.ensure(store.root(), row["키"]) # 근거 제안 뒤 셈(793-3a)
return row
return (
{**row, "읽기불가": cannot} if cannot else row
) # 797-1 가져온 식 못 씀 사유 → 화면 토스트
@router.get("/layers/{layer}/hopyo")