Merge remote-tracking branch 'origin/main_desktop_1' into sub_desktop_1

This commit is contained in:
2026-09-08 19:30:15 +09:00
@@ -406,6 +406,10 @@ def _structure_rows(
#: (넣으려면 돌쌓기 일위대가에 타설 품이 있는지부터 확인할 것 — B09 ㉢ 과 같은 자리.)
PLACING_TARGET_NAMES = frozenset({"콘크리트", "버림콘크리트", "레미콘"})
#: 버림 타설 줄의 갈래 이름 — **실무 내역 표기 그대로**(「레미콘타설(장비) 무근,버림」).
#: ⚠ 버림은 늘 무근이라 구조물 종류(무근/철근)를 따라가지 않는다.
BLINDING_PLACING_KIND = "무근,버림"
def _placing_rows(
unit_quantity_table: dict[str, Any],
@@ -435,15 +439,18 @@ def _placing_rows(
# ⚠ 묶음이 아직 미확보라 지금은 값이 안 걸렸을 뿐, 묶음이 서는 날 두 번이 된다.
if mapping.composite_for(str(structure.get("type_id") or "")):
continue
volume = sum(
float(component.get("amount") or 0.0)
for component in structure.get("components") or []
if str(component.get("name") or "").strip() in PLACING_TARGET_NAMES
and component.get("unit") == ""
)
if volume <= 0:
continue
buckets[structure_kind(structure)] = buckets.get(structure_kind(structure), 0.0) + volume
# ⚠ 버림은 **따로 센다** — 실무 내역이 「레미콘타설(장비) **무근,버림**」으로 갈라
# 적는다(봉화 제50호표, 2026-09-09 데스크탑 보조 확인). 같은 공종·같은 단가라
# 금액은 안 움직이고 **이름만 맞추는 것**이다.
for component in structure.get("components") or []:
name = str(component.get("name") or "").strip()
if name not in PLACING_TARGET_NAMES or component.get("unit") != "":
continue
volume = float(component.get("amount") or 0.0)
if volume <= 0:
continue
kind = BLINDING_PLACING_KIND if name == "버림콘크리트" else structure_kind(structure)
buckets[kind] = buckets.get(kind, 0.0) + volume
rows = [
{
"work_item_code": code,