feat(m02): % 덧줄 표기 — 율 · 규격 덧칸 · 하위 행 · M01 시험계산(149-4)
- 서버 `M02_Labor_Doc.pct_extras` = 식 「X * Y / 100」 덧줄에 율(Y) · 규격(노무비의 % · 인건비의 % · 줄 이름의 %) · `run_line` 에서 부름 - M01 `/calc` 도 같은 도우미(늦은 부름) - 화면 `pctView` 한 벌 = 이름 (규격) · 수량 = 율 · 단위 % — M02 하위 행 · M01 시험계산 표 - 금액 · 엔진 줄(식 · 1) 그대로 · 금액 식 덧줄(기계손료 등) 그대로 · 마스터 안 고침 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SE9MxeXTu2uaDZ55BJowAY
This commit is contained in:
@@ -234,7 +234,23 @@ def post_calc(body: CalcBody) -> dict:
|
||||
if got is not None:
|
||||
return got
|
||||
with store.cm.mf.mp.choosing(body.고름):
|
||||
return _call(store.calc, body.key, body.inputs, body.row, body.file)
|
||||
got = _call(store.calc, body.key, body.inputs, body.row, body.file)
|
||||
return _pct(got, body)
|
||||
|
||||
|
||||
def _pct(got: dict, body: CalcBody) -> dict:
|
||||
"""% 덧줄 표기(149-4) — 줄에 율 · 규격 덧칸(M02 일위대가 하위 행과 같은 도우미 · 금액 그대로)."""
|
||||
if not got.get("lines"):
|
||||
return got
|
||||
from M02_MasterTemplete import M02_Labor_Doc as labor_doc # M02 가 M01 을 부름 — 늦게
|
||||
|
||||
whole = store.loaded()[1]
|
||||
try:
|
||||
logic = body.row or whole.logic(body.key)
|
||||
except store.cm.mf.FormulaError:
|
||||
return got
|
||||
lines = labor_doc.pct_extras(whole, logic, got["lines"], got.get("middle") or {})
|
||||
return {**got, "lines": lines}
|
||||
|
||||
|
||||
@router.post("/text")
|
||||
|
||||
Reference in New Issue
Block a user