fix(428 관 옮김 횡단 한 값): 옮긴 시설 측점 기본 설계 · 다시 셈 미교차 넓힘 · 관 PUT 끝 측점 세움 · 따라가기만 한 관 서버 누가거리

- 측점 갈아끼움 — 상단측 새 지반으로 · 0.5 m 넘게 옮긴 관 · 구조물 측점 = 기본 설계 + 사용자가 만진 칸
- 노선 초안 동안 관 길이 = 계산 줄 새 노선 상세
- 저장 노선 다시 셈 창구에 미교차 넓힘(서버 extend_unclosed 짝 · 격자 유무 지문)
- 관 PUT 끝 서버가 측점 다시 세움 · GET 관 지점에 x · y
- rebasePipeDraft — 땅 위 자리 = 정본인 관은 서버 누가거리
- 「측점이 없는 구조물」 알림 — 관 · 구조물 초안이 비면 저장 끝난 뒤 다시 봄
- 시험 test_428_pipe_move_mirror(옮긴 관 관 길이 브라우저 대 서버) · 416 출처 글 맞춤

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VmC34fsxxbweEG3RUjs3Mn
This commit is contained in:
2026-10-18 15:53:03 +09:00
co-authored by Claude Opus 5.5
parent 5c5d318508
commit 35758ac6ea
10 changed files with 552 additions and 12 deletions
@@ -366,6 +366,9 @@ def _raw_payload(
**point.as_dict(),
"chainage_m": round(pipe.chainage_m, 2),
"lonlat": list(to_lonlat(pipe.x, pipe.y)),
# 노선 위 자리(사업지 CRS) — 화면이 따라가기만 한 관을 가림(rebasePipeDraft · 428)
"x": round(float(pipe.x), 3),
"y": round(float(pipe.y), 3),
"source": pipe.reason,
}
for pipe, point in zip(detail.pipes, points)
@@ -568,6 +571,20 @@ async def delete_pipe_points(project_id: UUID) -> dict[str, Any] | JSONResponse:
return _payload(project_id, context, detail, points, False, stale)
async def _stand_pipe_stations(project_id: UUID) -> None:
"""관 PUT 끝 — 측점을 지금 관 자리로 다시 세움(`put_plus_stations` 처럼 · 부르는 길 모두 · 428).
노선 [저장] 뒤 관 차례가 화면 누가거리로 관을 덮으면 서버가 노선 저장 때 세운 측점과 어긋남 —
여기서 맞추지 않으면 「측점이 없는 구조물」 · 옛 자리 카드가 남음. 실패해도 관 저장은 그대로.
"""
from B06_Section.B06_Section_Router_Stations import ensure_structure_stations
try:
await ensure_structure_stations(project_id)
except Exception:
logger.exception("관 저장: 측점 맞춤 실패(저장은 그대로): project_id=%s", project_id)
@router.put("/{project_id}/drainage/pipe-points", response_model=None)
async def put_pipe_points(
project_id: UUID,
@@ -610,6 +627,7 @@ async def put_pipe_points(
failed = await asyncio.to_thread(
safe_sync, resolve_stored_project_path(context.stored_path), importer(session)
)
await _stand_pipe_stations(project_id)
result = _payload(project_id, context, detail, points, True, stale)
result["saved_count"] = saved
result["snapshot_failed"] = failed # 못 만든 구조물 조합 복사본(142-2) — [저장] 알림