260710_0
This commit is contained in:
@@ -198,6 +198,38 @@ async def get_input_file(
|
||||
}
|
||||
|
||||
|
||||
async def list_project_point_cloud_inputs(
|
||||
connection: aiomysql.Connection, project_id: UUID
|
||||
) -> list[dict[str, Any]]:
|
||||
"""프로젝트의 LAS/LAZ 원본 입력 파일 목록을 최신순으로 조회한다."""
|
||||
async with connection.cursor() as cursor:
|
||||
await cursor.execute(
|
||||
"""
|
||||
SELECT id, file_type, original_filename, raw_file_path, file_size_mb,
|
||||
crs_epsg, status, created_at
|
||||
FROM input_files
|
||||
WHERE project_id = %s AND file_type IN ('las', 'laz')
|
||||
ORDER BY created_at DESC, id DESC
|
||||
""",
|
||||
(str(project_id),),
|
||||
)
|
||||
rows = await cursor.fetchall()
|
||||
|
||||
return [
|
||||
{
|
||||
"id": int(row[0]),
|
||||
"file_type": row[1],
|
||||
"original_filename": row[2],
|
||||
"raw_file_path": row[3],
|
||||
"file_size_mb": float(row[4]) if row[4] is not None else None,
|
||||
"crs_epsg": row[5],
|
||||
"status": row[6],
|
||||
"created_at": row[7].isoformat() if row[7] else None,
|
||||
}
|
||||
for row in rows
|
||||
]
|
||||
|
||||
|
||||
async def list_surface_models(
|
||||
connection: aiomysql.Connection, project_id: UUID
|
||||
) -> list[dict[str, Any]]:
|
||||
|
||||
Reference in New Issue
Block a user