fix(B07 표준도): 노선 저장값 일치

B06 계산과 같은 횡단경사 하한을 사용하고, 그리는 노선의 저장값을
도면과 지문에 함께 적용.
This commit is contained in:
2026-10-23 16:22:19 +09:00
parent bda7c319cf
commit 7a971494fc
4 changed files with 119 additions and 15 deletions
@@ -354,22 +354,18 @@ async def plan_copy_key(
return prints[drawing_id]["fingerprint"]
async def standard_cross_source(project_id: UUID) -> Any:
"""표준 횡단면 설정(B06) — GET 과 지문이 같은 값을 씀."""
from B06_Section.B06_Section_Repository import get_project_standard_cross_section
async def standard_cross_source(project_id: UUID, route_id: int) -> Any:
"""그리는 노선의 표준 횡단면 설정(B06) — GET 과 지문이 같은 값을 씀."""
from B06_Section.B06_Section_Repository import get_longitudinal_section
from config.config_db import get_db_pool
pool = get_db_pool()
async with pool.acquire() as connection:
async with connection.cursor() as cursor:
await cursor.execute(
"SELECT company_id FROM projects WHERE id = %s AND deleted_at IS NULL",
(str(project_id),),
)
row = await cursor.fetchone()
if not row:
return None
return await get_project_standard_cross_section(connection, int(row[0]), project_id)
section = await get_longitudinal_section(connection, project_id, route_id)
data = (section or {}).get("data") or {}
options = data.get("options") if isinstance(data, dict) else None
standard = options.get("standard_cross_section") if isinstance(options, dict) else None
return standard if isinstance(standard, dict) else None
async def drawing_fingerprints(
@@ -424,7 +420,7 @@ async def drawing_fingerprints(
async def read_standard() -> None:
if _STANDARD_ID in ids:
sources["standard"] = await standard_cross_source(project_id)
sources["standard"] = await standard_cross_source(project_id, route_id)
async def read_cross() -> None:
if not has_sheet: