feat(746-1): 불러오기 고름 대기 후보 블록 줄비교 · 못옮김 · 기계 줄 M01 요소 후보 · 단위 별칭 hr = 시간 · 개소 = 개
- 고름 대기 후보 앞 셋에 그 기초와 줄마다 견준 `줄비교`(같음 · 품다름 · 엑셀만 · 기초만 · 1 단위 품 · 못옮김) — 고르면 만드는 SK 와 같은 셈(`_Plan` 기록) · 판정 · 순위 · 미리 고름 그대로 - 못옮김 `후보` · 안 이은 기계 줄 `남은줄[].후보` = M01 요소 셋(새 `M02_Hopyo_Elem` — 이름 · 규격 점수 › 엑셀 단가 가까운 차례) - 단위 모듈 짝(master_unit.py ↔ master_unit_swap.ts) 별칭 hr = 시간 · 개수 묶음에 개소 — 거울 시험 사례 셋 더함 - 실측(여덟 파일): 고름 대기 89 중 1위 줄비교 72(셋 중 하나 82) · 골든 1위 163 그대로 · 판정 수 그대로 · 개 ↔ 개소 1 블록 견줌 풀림 · 못옮김 후보 8/9 · 기계 줄 후보 32/32 · M01 로직 3,992 값 전후 같음 - 새 지킴 시험 test_746_1_hopyo_compare Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ from decimal import Decimal
|
||||
from typing import Any
|
||||
|
||||
from M01_MasterData import M01_MasterData_Store as m01
|
||||
from M02_MasterTemplete import M02_Hopyo_Elem as elem
|
||||
from M02_MasterTemplete import M02_Hopyo_Finger as finger
|
||||
from M02_MasterTemplete import M02_Hopyo_Sangeun as sangeun
|
||||
from M02_MasterTemplete import M02_Labor_Doc as labor
|
||||
@@ -118,10 +119,13 @@ def kept(
|
||||
|
||||
|
||||
def left(line: dict[str, Any], why: dict | None) -> dict[str, Any]:
|
||||
"""남은 줄 한 줄 — 엑셀 줄 · 갈래 · 까닭 · 후보."""
|
||||
"""남은 줄 한 줄 — 엑셀 줄 · 갈래 · 까닭 · 후보(기계 = M01 EQ 셋 · 746-1)."""
|
||||
kind = finger.kind_of(line)
|
||||
keep = ("차례", "이름", "규격", "단위", "수량")
|
||||
out = {**{k: line.get(k) for k in keep}, "갈래": kind}
|
||||
out["까닭"] = (why or {}).get("까닭") or WHY.get(kind, "이을 것 없음")
|
||||
more = {k: v for k, v in (why or {}).items() if k not in ("까닭", "후보")}
|
||||
return {**out, "후보": (why or {}).get("후보") or [], **more}
|
||||
cands = (why or {}).get("후보") or []
|
||||
if not cands and kind == "기계":
|
||||
cands = elem.machines(f"{line.get('이름') or ''} {line.get('규격') or ''}")
|
||||
return {**out, "후보": cands, **more}
|
||||
|
||||
Reference in New Issue
Block a user