diff --git a/B09_Estimation/B09_Estimation_Calc_Base.py b/B09_Estimation/B09_Estimation_Calc_Base.py index 0c0677cac..972268937 100644 --- a/B09_Estimation/B09_Estimation_Calc_Base.py +++ b/B09_Estimation/B09_Estimation_Calc_Base.py @@ -25,7 +25,8 @@ from typing import Any #: 떠도는 끝수(부동소수) — 이만큼은 자리 올림 · 버림에서 무시 EPS = 1e-7 -#: 자재단가대비표 출처 칸 차례 — 엑셀 조달 · 물가정보 · 물가자료 차례(같은 값이면 앞 칸) ↔ M01 재료_자재품목 값 열 · 유가 = 오피넷 +#: 자재단가대비표 출처 칸 차례 — 엑셀 조달 · 물가정보 · 물가자료(같은 값이면 앞 칸) +# ↔ M01 재료_자재품목 값 열 · 유가 = 오피넷 SOURCES = ("관급", "물가정보", "물가자료", "유통물가", "거래가격", "유가") #: 자재 줄 사용자 표시 diff --git a/B09_Estimation/B09_Estimation_Linked.py b/B09_Estimation/B09_Estimation_Linked.py index 8bf747390..e3495f1d1 100644 --- a/B09_Estimation/B09_Estimation_Linked.py +++ b/B09_Estimation/B09_Estimation_Linked.py @@ -1,9 +1,9 @@ """B09 연결된 사본 → 원가 수요 자원 키(PLAN 144 · 143-1 원천) — 서버 단독 · 읽기만. -연결된 사본 = `M02_Item_Snapshot.linked_snapshots`(지정 ∩ 같은 항목 사본 · B08 · B09 공용) · +연결된 사본 = `M02_Item_Snapshot.linked_snapshots`(지정 ∩ 같은 항목 사본 · B08 · B09 공용). 사본마다 `일위대가.json` 담은 로직을 그 사본 단가 묶음(`단가.json`) · 입력값 · 고른자재로 돌리며 -실제로 부른 자원 줄(인력 LB · 기계 EQ · 자재 MT · 유가 MO)만 모음 — 단가 묶음 통째(고르기 후보 전부)는 -안 씀 · 값은 쓰지 않음(단가는 원가 한 벌 `price_book.json` 이 맡음). +실제로 부른 자원 줄(인력 LB · 기계 EQ · 자재 MT · 유가 MO)만 모음 — 단가 묶음 통째 +(고르기 후보 전부)는 안 씀 · 값은 쓰지 않음(단가는 원가 한 벌 `price_book.json` 이 맡음). 구조물 조합 사본 없으면 그 구조물은 없음 · 일위대가 없는 사본은 자원 없음. """ diff --git a/B09_Estimation/B09_Estimation_Prices.py b/B09_Estimation/B09_Estimation_Prices.py index 967a0e423..2ac4ab7be 100644 --- a/B09_Estimation/B09_Estimation_Prices.py +++ b/B09_Estimation/B09_Estimation_Prices.py @@ -15,7 +15,6 @@ from __future__ import annotations from datetime import datetime from decimal import Decimal -from pathlib import Path from typing import Any from M01_MasterData import M01_MasterData_Store as m01 diff --git a/B09_Estimation/B09_Estimation_Router.py b/B09_Estimation/B09_Estimation_Router.py index cb94b6692..7ac339c94 100644 --- a/B09_Estimation/B09_Estimation_Router.py +++ b/B09_Estimation/B09_Estimation_Router.py @@ -1,12 +1,15 @@ """B09 원가계산 길(PLAN 144 · 145) — 결과는 저장하지 않고 GET 때 서버가 셈(B08 꼴). - GET /api/projects/{id}/estimation 입력(굳힌 단가 · 수요 · B08 수량) + 사용자 값 → 표 전부 - PUT /api/projects/{id}/estimation {user} [저장] — 사용자 값 · 책에 없는 새 단가 줄만 굳힘 - → 서버가 정본으로 다시 셈 - POST /api/projects/{id}/estimation/prices [단가 갱신] — 수요 단가 전부를 지금 M01 값으로 새로 굳힘 + GET /api/projects/{id}/estimation + 입력(굳힌 단가 · 수요 · B08 수량) + 사용자 값 → 표 전부 + PUT /api/projects/{id}/estimation {user} + [저장] — 사용자 값 · 책에 없는 새 단가 줄만 굳힘 → 서버가 정본으로 다시 셈 + POST /api/projects/{id}/estimation/prices + [단가 갱신] — 수요 단가 전부를 지금 M01 값으로 새로 굳힘 -저장 자리 = 프로젝트 안 `B09_Estimation/v1/`(`B09_Estimation_Store`) · 단가 = `B09_Estimation_Prices` · -셈 = `B09_Estimation_Calc`(화면 짝과 같은 식). +저장 자리 = 프로젝트 안 `B09_Estimation/v1/`(`B09_Estimation_Store`) · +단가 = `B09_Estimation_Prices` · +수요 = `B09_Estimation_Linked`(연결된 사본) · 셈 = `B09_Estimation_Calc_*`(화면 짝과 같은 식). """ from __future__ import annotations @@ -22,8 +25,8 @@ from B08_Quantity.B08_Quantity_Router_Hydro import _project_root from B08_Quantity.B08_Quantity_Router_Material import material_sheets from B09_Estimation import B09_Estimation_Prices as prices from B09_Estimation import B09_Estimation_Store as store -from B09_Estimation.B09_Estimation_Linked import linked_resource_keys from B09_Estimation.B09_Estimation_Calc_Base import compute_base +from B09_Estimation.B09_Estimation_Linked import linked_resource_keys router = APIRouter(prefix="/api/projects", tags=["B09 Estimation"]) diff --git a/B09_Estimation/B09_Estimation_Store.py b/B09_Estimation/B09_Estimation_Store.py index a97b14bce..1710b3f92 100644 --- a/B09_Estimation/B09_Estimation_Store.py +++ b/B09_Estimation/B09_Estimation_Store.py @@ -1,7 +1,9 @@ """B09 원가 저장 자리(PLAN 144-1) — 프로젝트 안 `B09_Estimation/v1/`. - price_book.json 굳힌 단가 한 벌 {"made": 시각, "rows": {키: 입력 줄}, "driver_factor": …} - — [단가 갱신] 때만 M01 로 새로 · [저장] 때 책에 없는 새 줄만 더함(있는 줄 안 바꿈) + price_book.json 굳힌 단가 한 벌 {"made": 시각, "rows": {키: 입력 줄}, + "driver_factor": …, "fx": […]} + — [단가 갱신] 때만 M01 로 새로 · + [저장] 때 책에 없는 새 줄만 더함(있는 줄 안 바꿈) user_values.json 사용자 값 {"materials": {자재 키: {applied?, supply?}}, "estimate": {…}} — 고친 칸만(키가 있으면 그 값 · null = 빈칸 · 없으면 기본) diff --git a/resources/tester/test_144_b09_base_calc.py b/resources/tester/test_144_b09_base_calc.py index 22cccf081..83df24dc8 100644 --- a/resources/tester/test_144_b09_base_calc.py +++ b/resources/tester/test_144_b09_base_calc.py @@ -17,8 +17,8 @@ if str(ROOT) not in sys.path: from B09_Estimation.B09_Estimation_Calc_Base import ( # noqa: E402 compute_base, - rounddown, round_half, + rounddown, roundup, ) diff --git a/resources/tester/test_144_b09_skeleton.py b/resources/tester/test_144_b09_skeleton.py index d24f7ce29..23cfd7ec7 100644 --- a/resources/tester/test_144_b09_skeleton.py +++ b/resources/tester/test_144_b09_skeleton.py @@ -2,7 +2,8 @@ - 탭 = 기번3 공통 엑셀 보이는 탭 차례(목차 · 안내 = 「연결 점검」 한 탭 · INITIAL 안 옮김) - 저장 = 프로젝트 안 `B09_Estimation/v1/`(사용자 값 · 굳힌 단가) · 결과는 저장 안 함 -- 줄 = 수요 따라(사용자 승인 ①) — 연결된 사본 없으면 노무 · 경비 · 중기 빈 표 · B08 자재만 줄 · 출처 빈칸 +- 줄 = 수요 따라(사용자 승인 ①) — 연결된 사본 없으면 노무 · 경비 · 중기 빈 표 + · B08 자재만 줄 · 출처 빈칸 """ import asyncio