auto: 2026-09-09 19:43 (EOMSANGDON-HOME)
This commit is contained in:
@@ -43,6 +43,8 @@ from B09_Estimation.B09_Estimation_MachineProductivity_Dozer import (
|
||||
from B09_Estimation.B09_Estimation_MachineOperating import (
|
||||
load_fuel_price,
|
||||
load_operating_records,
|
||||
LABOR_RELIABILITY_LABEL,
|
||||
load_labor_reliability,
|
||||
load_operator_wages,
|
||||
)
|
||||
from B09_Estimation.B09_Estimation_PriceBook import (
|
||||
@@ -116,10 +118,17 @@ class UnitPriceBuild:
|
||||
basis_missing: dict[str, str] = field(default_factory=dict)
|
||||
#: 계수를 못 세운 표 — **무엇이 없는지**를 들고 있는다.
|
||||
factor_gaps: dict[str, FactorGap] = field(default_factory=dict)
|
||||
#: 내역에 실린 노임 중 **신뢰도 기호가 붙은 것** — 직종코드 → (이름, 기호, 뜻).
|
||||
#: ⚠ 금액을 막지 않는다. 「표본이 얇다」는 사실을 화면이 말하게 하는 통로다
|
||||
#: (지식DB `노임단가_적용 §2-3` 「단가 채택 시 플래그 유지 필요」, 2026-09-09에 이음).
|
||||
labor_reliability: dict[str, tuple[str, str, str]] = field(default_factory=dict)
|
||||
|
||||
|
||||
def _add_labor_titles(book: PriceBook, wages: dict[str, Decimal]) -> None:
|
||||
catalog = load_labor_catalog()
|
||||
# ⚠ 신뢰도 기호(`*`·`**`)를 제목에 함께 싣는다 — 지식DB 가 「단가 채택 시 플래그 유지」로
|
||||
# 두었는데 노임 층에 없었다(2026-09-09). 금액은 안 바꾸고 **사실만** 나른다.
|
||||
reliability = load_labor_reliability()
|
||||
for entry in catalog.entries:
|
||||
wage = wages.get(entry.code)
|
||||
if wage is None or entry.code in book.titles:
|
||||
@@ -131,6 +140,7 @@ def _add_labor_titles(book: PriceBook, wages: dict[str, Decimal]) -> None:
|
||||
name=entry.name,
|
||||
unit="인",
|
||||
slots=_slots(wage),
|
||||
reliability=reliability.get(entry.code, ""),
|
||||
)
|
||||
)
|
||||
|
||||
@@ -322,6 +332,8 @@ def _add_machine_layers(book: PriceBook, machine_codes: set[str]) -> list[str]:
|
||||
name="조종원",
|
||||
unit="인",
|
||||
slots=_slots(wages[wage_code]),
|
||||
# ⚠ 조종원도 노임이다 — 같은 플래그가 붙어야 한다.
|
||||
reliability=load_labor_reliability().get(wage_code, ""),
|
||||
)
|
||||
)
|
||||
# 조합 층에도 조종원을 같이 단다 — 본체를 모는 사람은 하나뿐이다.
|
||||
@@ -757,9 +769,32 @@ def build_unit_prices(
|
||||
build.combined_swapped = _apply_combined_misc_rate(
|
||||
build.book, [code for code in build.book.titles if code.startswith("B-")]
|
||||
)
|
||||
build.labor_reliability = _labor_reliability_in_use(build.book)
|
||||
return build
|
||||
|
||||
|
||||
def _labor_reliability_in_use(book: PriceBook) -> dict[str, tuple[str, str, str]]:
|
||||
"""**실제로 일위대가에 붙은** 노임 중 신뢰도 기호가 있는 것만 모은다.
|
||||
|
||||
⚠ 카탈로그 전체(40직종)를 경고하면 **쓰지도 않는 직종까지** 화면을 채운다 —
|
||||
「이 내역서에 실린 단가 중 표본이 얇은 것」만 말해야 사용자가 볼 값어치가 있다.
|
||||
⚠ 값을 바꾸지 않는다. 지식DB `노임단가_적용 §2-3`·`원가_입력변수_사전` 이
|
||||
「단가 채택 시 플래그 유지 · 경고 표시」로 둔 자리를 잇는 것뿐이다(2026-09-09).
|
||||
"""
|
||||
used = {row.ref_code for rows in book.details.values() for row in rows}
|
||||
found: dict[str, tuple[str, str, str]] = {}
|
||||
for code in sorted(used):
|
||||
title = book.titles.get(code)
|
||||
if title is None or title.kind is not PriceKind.LABOR or not title.reliability:
|
||||
continue
|
||||
found[code] = (
|
||||
title.name,
|
||||
title.reliability,
|
||||
LABOR_RELIABILITY_LABEL.get(title.reliability, "신뢰도 기호가 붙은 직종"),
|
||||
)
|
||||
return found
|
||||
|
||||
|
||||
def _has_full_formula(
|
||||
master: dict,
|
||||
work_item_code: str,
|
||||
|
||||
Reference in New Issue
Block a user