From 5bf4ff8d1fc4002809728267c41a53c0853c3d42 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Wed, 9 Sep 2026 19:43:12 +0900 Subject: [PATCH] auto: 2026-09-09 19:43 (EOMSANGDON-HOME) --- .../B09_Estimation_MachineOperating.py | 23 ++++++++++++ B09_Estimation/B09_Estimation_PriceBook.py | 3 ++ B09_Estimation/B09_Estimation_UnitPrice.py | 35 +++++++++++++++++++ .../01_임도/05_원가정보/원가_출력변수_사전.md | 2 +- 4 files changed, 62 insertions(+), 1 deletion(-) diff --git a/B09_Estimation/B09_Estimation_MachineOperating.py b/B09_Estimation/B09_Estimation_MachineOperating.py index f0ea7134..05d9d3f8 100644 --- a/B09_Estimation/B09_Estimation_MachineOperating.py +++ b/B09_Estimation/B09_Estimation_MachineOperating.py @@ -315,6 +315,29 @@ def load_operator_wages(labor_file: str = "labor_const_2026-01-01.json") -> dict } +#: 노임 신뢰도 기호 — 원문 「임금적용요령」이 직종 옆에 붙여 둔 표시. +#: `*` 조사현장 5개 미만 (적용 시 유의) +#: `**` 미조사 — 유사 직종 단가에 준하여 적용(재경원 회계 45101-45) +#: ⚠ **값이 없는 것과 다르다** — 단가는 서 있되 **표본이 얇다**는 뜻이라 막지 않고 알린다. +#: 지식DB `노임단가_적용 §2-3` 이 「프로그램에서 단가 채택 시 플래그 유지 필요」로 두었고, +#: `원가_입력변수_사전` 도 「해당 단가 사용 시 경고 표시」라 적었는데 노임 층에 없었다 +#: (2026-09-09에 이음). +LABOR_RELIABILITY_LABEL = { + "*": "조사현장 5개 미만 — 표본이 얇습니다", + "**": "미조사 직종 — 유사 직종 단가에 준해 적용(재경원 회계 45101-45)", +} + + +def load_labor_reliability(labor_file: str = "labor_const_2026-01-01.json") -> dict[str, str]: + """직종코드 → 신뢰도 기호(`*`·`**`). 정상 공표 직종은 아예 안 담는다.""" + records = _read_json(*_CATALOG_SUBPATH, labor_file)["variables"]["labor_rate"]["records"] + return { + str(r["occupation_code"]): str(r["reliability"]) + for r in records + if str(r.get("reliability") or "").strip() + } + + def hourly_cost_of(machine_code: str, *, region: str | None = None): """기종 하나의 **시간당 사용료 3분할**을 완성해 돌려준다. diff --git a/B09_Estimation/B09_Estimation_PriceBook.py b/B09_Estimation/B09_Estimation_PriceBook.py index fa09427a..afb10796 100644 --- a/B09_Estimation/B09_Estimation_PriceBook.py +++ b/B09_Estimation/B09_Estimation_PriceBook.py @@ -101,6 +101,9 @@ class PriceTitle: slot_pages: list[str | None] = field(default_factory=lambda: [None] * PRICE_SLOT_COUNT) #: 채택 슬롯(1-based). adopted_slot: int = DEFAULT_ADOPTED_SLOT + #: 노임 신뢰도 기호(`*`·`**`) — 노임 줄에만 붙는다. 빈 문자열이면 정상 공표 직종. + #: ⚠ **금액을 바꾸지 않는다.** 값은 그대로 쓰고 「표본이 얇다」는 사실만 나른다. + reliability: str = "" def adopted_price(self) -> Decimal: """채택 슬롯의 단가. 비어 있으면 0 으로 때우지 않고 멈춘다.""" diff --git a/B09_Estimation/B09_Estimation_UnitPrice.py b/B09_Estimation/B09_Estimation_UnitPrice.py index c4c02382..4fdc6e3d 100644 --- a/B09_Estimation/B09_Estimation_UnitPrice.py +++ b/B09_Estimation/B09_Estimation_UnitPrice.py @@ -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, diff --git a/resources/knowledge/technical_info/01_임도/05_원가정보/원가_출력변수_사전.md b/resources/knowledge/technical_info/01_임도/05_원가정보/원가_출력변수_사전.md index 858c5fa1..8acd0b79 100644 --- a/resources/knowledge/technical_info/01_임도/05_원가정보/원가_출력변수_사전.md +++ b/resources/knowledge/technical_info/01_임도/05_원가정보/원가_출력변수_사전.md @@ -70,7 +70,7 @@ last_updated: 2026-08-15 | B2-6 | 구조물터파기 (토질 3 × 육상/용수 × 심도 3 = 18구분) | 9-13 | ㎥ | 필수급 | | | B2-7 | 되메우기·다짐 | 9-14 | ㎥ | 필수급 | | | B2-8 | 노체 (포설·다짐·살수) | 9-16 | ㎥ | 필수급 | | -| B2-9 | 층따기 (원지반 1:4보다 급한 성토부) | 9-18 | ㎡·m | 높음 | | +| B2-9 | 층따기 (원지반 1:4보다 급한 성토부) | 9-18 | ㎥ | 높음 | ⚠ 밑수는 **㎥** — 품셈 9-18 이 ㎥ 당이다. 우리 화면·집계는 **면적(㎡)이 정본**이고 산출 조건의 **길이 칸을 곱해 ㎥** 로 내보낸다(2026-09-09 사용자 확정 2차 ①). 종전 「㎡·m」 표기는 그 두 축을 한 칸에 적어 **㎡ 로 내도 되는 것처럼** 읽혔다. | | B2-10 | 비탈면 다짐 | 9-17-1 | ㎡ | 중간 | | | B2-11 | 면고르기 (토사면/암절취/발파암) | 9-19 | ㎡ | 높음 | | | B2-12 | 무근·철근콘크리트 깨기, 석축헐기, 기존포장 깨기 | 9-7~10 | ㎥·㎡ | 낮음 (구조개량·보수 시) | |