feat(B09): 자재단가대비표·환율및기초자료 신설 — 표 16개 중 남은 둘

사용자 확정 12번의 마지막 둘. ③(자재값 출처 둘 다)·⑮(유가 전국/지역)와 한 벌.

- 서식은 실무 시트(영월 기번6) 그대로 — 원천 5칸(단가+쪽수) + 적용(단가+출처) + 비고.
  원천 이름은 코드에 안 박고 PriceBook.slot_names 를 씀(사무소마다 다름, 9-4 미결).
- ⚠ 확정 ③ — 슬롯마다 출처를 남길 자리를 둠(쪽수·업체명·날짜). 값이 없는 원천은
  0 이 아니라 빈칸. 0 이면 「0원짜리 견적」으로 읽힘.
  견적이 국계법 시행령 §9 의 4순위라는 사실을 표가 스스로 밝힘.
- ⚠ 확정 ⑮ — 유가 전국/지역 고르는 칸을 냄. 다만 지역값이 아직 자료에 없어
  「고를 수 없음 + 까닭」으로 드러냄. 없는 값을 지어내지 않음.
- ⚠ 환율및기초자료 인건비 칸은 운전사 셋만. 직종 118개를 다 실으면 노무비목록표와
  같은 표가 두 벌이 됨 — 실무 시트도 셋뿐임.
- 조종원 시간당이 실무·교본과 다른 사실(× 16/12 × 25/20)을 표 비고에 그대로 냄.

라우터 조회 추가(GET .../estimation/price-sources). 시험 5건 추가, 267건 통과.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-08 19:44:53 +09:00
co-authored by Claude Opus 5
parent 1eff0931ae
commit 9bf739fa92
2 changed files with 201 additions and 0 deletions
+29
View File
@@ -236,6 +236,35 @@ async def get_base_data_lists(project_id: UUID) -> JSONResponse:
)
@router.get("/{project_id}/estimation/price-sources")
async def get_price_sources(project_id: UUID) -> JSONResponse:
"""**자재단가대비표(A9) · 환율및기초자료(A10)** — 사용자 확정 12번의 남은 둘.
③(자재값 출처 둘 다)·⑮(유가 전국/지역)와 한 벌이라 **출처를 고르는 칸**과
**업체명·날짜·쪽수 자리**를 함께 낸다.
"""
from B09_Estimation.B09_Estimation_Lists_Sources import (
base_reference_data,
material_price_comparison,
)
try:
build = cached_build()
return JSONResponse(
content={
"status": "success",
"material_comparison": material_price_comparison(build),
"base_reference": base_reference_data(build),
}
)
except Exception:
logger.exception("B09 단가 원천 표 실패: project_id=%s", project_id)
return JSONResponse(
status_code=500,
content={"status": "error", "message": "단가 원천 표를 못 만들었습니다."},
)
@router.get("/{project_id}/estimation/unit-prices/{code}")
async def get_unit_price_detail(project_id: UUID, code: str) -> JSONResponse:
"""일위대가 **본표** — 「무엇으로 이루어졌나」. 줄마다 원천·파고들기 표시가 붙는다."""