From 7bf5cbd1d14b48f1236e0d4fbe652b485ac915c2 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sun, 13 Sep 2026 22:45:45 +0900 Subject: [PATCH] =?UTF-8?q?fix(b09):=20=EB=82=B4=EC=97=AD=EC=84=9C=C2=B7?= =?UTF-8?q?=EB=8B=A8=EA=B0=80=EC=82=B0=EC=B6=9C=EC=84=9C=EB=8F=84=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8=EA=B0=80=20=EA=B3=A0?= =?UTF-8?q?=EB=A5=B8=20=EB=8B=A8=EA=B0=80=ED=91=9C=EB=A1=9C=20=E2=80=94=20?= =?UTF-8?q?=EA=B5=AC=EC=A1=B0=EB=AC=BC=EB=8F=84=20=EB=AF=B8=EB=A6=AC?= =?UTF-8?q?=EB=B3=B4=EA=B8=B0=EC=99=80=20=ED=95=9C=20=EB=B2=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 내역서 창구가 기본값 cached_build() 대신 _build_for(프로젝트) 를 씀 — 계수를 고른 프로젝트에서 화면과 내역이 갈리던 자리 - 단가산출서 한 장 창구도 같은 단가표 Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_016VBGFXB9AbJBwXP19z75Qq --- B09_Estimation/B09_Estimation_Router.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/B09_Estimation/B09_Estimation_Router.py b/B09_Estimation/B09_Estimation_Router.py index ed33fc40..9be99af8 100644 --- a/B09_Estimation/B09_Estimation_Router.py +++ b/B09_Estimation/B09_Estimation_Router.py @@ -755,8 +755,10 @@ async def get_bill(project_id: UUID) -> JSONResponse: """ from B08_Quantity.B08_Quantity_Router_Material import get_handoff, structure_bill_prices - build = cached_build() try: + # ⚠ **그 프로젝트가 고른 값**으로 조립한 단가표 — 구조물도 미리보기(`_build_for`)와 한 벌. + # 기본값(`cached_build()`)을 쓰면 계수를 고른 프로젝트에서 화면과 내역이 갈림(브레인). + build = await _build_for(project_id) response = await get_handoff(project_id) payload = json.loads(bytes(response.body).decode("utf-8")) except Exception: @@ -811,7 +813,8 @@ async def get_price_basis_detail(project_id: UUID, code: str) -> JSONResponse: from B09_Estimation.B09_Estimation_PriceBasis import price_basis_detail try: - body = price_basis_detail(code) + # 내역서와 같은 단가표 — 번호·금액이 내역 줄과 갈리지 않게. + body = price_basis_detail(code, await _build_for(project_id)) except Exception: logger.exception("B09 단가산출서 조회 실패: project_id=%s, code=%s", project_id, code) return JSONResponse(