"""암석 작업 기계손료 보정 — 건설품셈 8-1-7 1 (2026-09-14 브레인 661 ①②). 원문: 「암석굴착, 암석적재, 암석운반 등의 가혹한 작업에 사용되는 경우에는 손료(관리비 제외)를 보정 가산」 불도저(19톤 이상 제외) 25 · 굴착기(무한궤도) 및 로더(무한궤도) 20 · 덤프트럭 25 (%) [주]① 전용덤프트럭(18톤 이상)과 불도저(19톤 이상)는 보정하지 않음(타이어·습지 불도저는 보정) 실무 봉화 2024 중기목록 「(암석)」 줄 셋이 (상각 + 정비) × (1 + 가산) + 관리 로 역산됨 — 굴착기 1.0 0.2405 · 덤프 2.5 0.3533 · 덤프 15 0.2679. B09 는 이 보정을 한 번도 안 걸고 있었음. ⚠ 브레이커 조합 본체(`#조합`)는 안 걺 — 봉화 「굴삭기 0.7 브레이커조합」 손료 = 비암석 23,128 + 브레이커. ⚠ 전석섞인토사 10% 는 혼입율 입력이 없어 안 걺(② · 칸도 안 만듦). """ from __future__ import annotations from decimal import ROUND_FLOOR, Decimal from B09_Estimation.B09_Estimation_UnitPrice import cached_build HAUL = ("164.23",) def _rows(book, code: str) -> list: """그 제목과 제 단가산출(D) 줄.""" own = book.details.get(code) or [] return [ *own, *(r for d in own if d.ref_code.startswith("D-") for r in book.details[d.ref_code]), ] def _machines(book, code: str) -> set[str]: """그 제목과 제 단가산출(D) 줄이 부르는 기계 호표.""" return {r.ref_code for r in _rows(book, code) if r.ref_code.startswith("X-")} def test_실무_암석_손료계수_셋이_원천표로_역산됨() -> None: from B09_Estimation.B09_Estimation_RockLoss import rock_coefficient # 실무 표기는 취득가 천원당 — 우리 계수는 원당(× 1000 이 실무 값) assert rock_coefficient("0201-0100") * 1000 == Decimal("0.2405") # 굴착기 1.0 (900+700)×1.2+485 assert rock_coefficient("0602-0025") * 1000 == Decimal("0.3533") # 덤프 2.5 3533.75 버림 assert rock_coefficient("0602-0150") * 1000 == Decimal("0.2679") # 덤프 15 assert rock_coefficient("0101-0019") is None # 불도저 19톤 — [주]① 보정 안 함 assert rock_coefficient("0602-0240") is None # 덤프 24톤 — [주]① 18톤 이상 assert rock_coefficient("0211-0060") is None # 굴착기(타이어) — 표에 없음 def test_암_공종의_대상_기계는_암석_호표를_부름() -> None: book = cached_build(dump_haul_m=HAUL).book assert "X-0201-0070#암석" in _machines(book, "B-FP-10-12-02#적재") assert "X-0602-0150#암석" in _machines(book, "B-FP-10-12-02#L164.23m") assert "X-0602-0150#암석" in _machines(book, "B-FP-10-12-03#L164.23m") assert "X-0201-0070#암석" in _machines(book, "B-FP-09-04-02") # 암절취 집토 assert "X-0201-0070#암석" in _machines(book, "B-FP-09-19-02") # 비탈면 면고르기(암절취) def test_토사_공종과_브레이커_조합_본체는_그대로() -> None: book = cached_build(dump_haul_m=HAUL).book assert _machines(book, "B-FP-10-12-01#적재") == {"X-0201-0070"} assert "X-0602-0150" in _machines(book, "B-FP-10-12-01#L164.23m") assert "X-0201-0070#조합" in _machines(book, "B-FP-09-04-01#연암") assert not any(m.endswith("#암석") for m in _machines(book, "B-FP-09-19-01#절토면·풍화암")) def test_불도저_19톤_발파암_운반은_보정_안_하고_까닭을_남김() -> None: book = cached_build(dump_haul_m=HAUL).book rows = [r for r in _rows(book, "B-FP-10-11#발파암") if r.ref_code == "X-0101-0019"] assert rows and "8-1-7" in rows[0].note and "19톤" in rows[0].note, rows def test_암석_호표_손료는_취득가_곱하기_보정_계수() -> None: from B09_Estimation.B09_Estimation_MachineCost import load_machine_catalog book = cached_build(dump_haul_m=HAUL).book price = load_machine_catalog().machines["0201-0070"].price_thousand_krw * 1000 rock = book.resolve("X-0201-0070#암석").expense plain = book.resolve("X-0201-0070").expense assert rock == (price * Decimal("0.0002405")).quantize(Decimal(1), rounding=ROUND_FLOOR) assert plain == (price * Decimal("0.0002085")).quantize(Decimal(1), rounding=ROUND_FLOOR) assert book.resolve("X-0201-0070#암석").labor == book.resolve("X-0201-0070").labor