feat(b09): 구조물도 일위대가를 내역으로 받는 문 — 호표 B-AX-ST-<8hex>#<제원 키>
- 양식 일위대가로 셀 구조물도 장은 인계 줄 하나(코드 AX-ST · 갈래 = 제원 키 · 수량 연장 m) - 양식이 품은 줄(기초잡석)은 따로 인계 안 함 — 이중계상 막음 - B09 내역이 자기 단가표로 B08 일위대가 엔진을 돌려 금액 · 못 받거나 막히면 사유 - 수동 단가도 씀 — 내역 요약에 미확정 N건 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016VBGFXB9AbJBwXP19z75Qq
This commit is contained in:
@@ -753,8 +753,9 @@ async def get_bill(project_id: UUID) -> JSONResponse:
|
||||
⚠ 단가가 없거나 밑수를 모르는 줄은 **0 으로 안 때우고** `missing` 으로 드러낸다 —
|
||||
화면이 그 목록을 그대로 보인다.
|
||||
"""
|
||||
from B08_Quantity.B08_Quantity_Router_Material import get_handoff
|
||||
from B08_Quantity.B08_Quantity_Router_Material import get_handoff, structure_bill_prices
|
||||
|
||||
build = cached_build()
|
||||
try:
|
||||
response = await get_handoff(project_id)
|
||||
payload = json.loads(bytes(response.body).decode("utf-8"))
|
||||
@@ -767,9 +768,16 @@ async def get_bill(project_id: UUID) -> JSONResponse:
|
||||
if "work_items" not in payload:
|
||||
# B08 이 오류 응답을 준 경우 — 그 사유를 그대로 넘긴다(감추지 않는다).
|
||||
return JSONResponse(status_code=502, content={"status": "error", **payload})
|
||||
try:
|
||||
# 구조물도 호표 금액 — **이 내역과 같은 단가표**로(PLAN 6장 ②).
|
||||
structure_prices = await structure_bill_prices(project_id, build)
|
||||
except Exception:
|
||||
# 못 세면 호표 줄이 금액 없이 「못 받음」 사유로 섬 — 조용히 0 원 안 됨.
|
||||
logger.exception("B09 내역서 — 구조물도 호표 금액 실패: project_id=%s", project_id)
|
||||
structure_prices = {}
|
||||
|
||||
try:
|
||||
result = build_bill(payload)
|
||||
result = build_bill(payload, build=build, structure_prices=structure_prices)
|
||||
except DoubleCountError as error:
|
||||
# 이중계상 감시에 걸린 경우 — 표를 그리지 않고 멈춘다.
|
||||
logger.warning("B09 내역서 이중계상 감지: project_id=%s, %s", project_id, error)
|
||||
|
||||
Reference in New Issue
Block a user