feat(B01,B03): 프로젝트 생성 전 임시 보관함 (temp upload)

라이다 원본은 업로드에 오래 걸려 프로젝트 정보 확정 전에 미리 올릴 수 있어야 한다.
계정에 묶인 임시 보관함을 만들고, 나중에 만든 프로젝트로 자료를 옮겨 쓴다.

저장·DB
- storage/tmp/{user_id}/{batch_id}/ 아래에 프로젝트 저장소와 동일한 구조를 써서
  청크 저장·병합 엔진(resolve_upload_destination/merge_upload_chunks)을 그대로 재사용
- 010_temp_upload.sql: temp_upload_batches / temp_upload_files 신설,
  upload_sessions.project_id NULL 허용 + temp_batch_id 추가(FK명 조회 후 재생성)
- config: TEMP_UPLOAD_DIR_NAME / TEMP_UPLOAD_RETENTION_DAYS(30) /
  TEMP_UPLOAD_CLEANUP_INTERVAL_HOURS(6)

백엔드
- B03_FileInput_Router_Temp.py: 묶음 생성·목록·삭제, 일반/청크 업로드, finalize,
  이어올리기 상태 조회, 프로젝트 연결(attach)
- attach: 파일 이동 후 input_files 등록, stage 0 완료, WF1·자동 설계 체인 트리거
- common_util_temp_cleanup.py: 완료 시각 기준 만료분 주기 삭제(서버 시작 시 1회 포함)

프론트엔드
- B01 대시보드 임시 보관함 섹션: 프로젝트 등록과 같은 폼 + 보관 목록.
  진행률은 모달이 아니라 리스트 행에 표시, 새로고침 후 이어올리기 지원
- B03 업로드 컨테이너 내부 불러오기 버튼과 선택 모달.
  완료된 묶음만 노출하고, 선택 후 업로드를 누르면 이동과 분석으로 이어짐

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-08 12:55:14 +09:00
co-authored by Claude Fable 5
parent 336335c611
commit 17834d8189
16 changed files with 2251 additions and 1 deletions
+52
View File
@@ -76,6 +76,36 @@ export const ui_locales_b1 = {
B01_Dashboard_Companies: ["회사 관리", "Companies"],
B01_Dashboard_Users: ["사용자 관리", "Users"],
B01_Dashboard_AuditLogs: ["시스템 로그", "Audit logs"],
/* --- B01 임시 보관함 (프로젝트 생성 전 업로드, 2026-08-08) --- */
B01_Temp_Section: ["임시 보관함", "Temporary storage"],
B01_Temp_Field_Name: ["보관 이름", "Storage name"],
B01_Temp_Field_Name_Placeholder: ["예: 2026년 3공구 측량자료", "e.g. 2026 Section 3 survey"],
B01_Temp_Field_Files: ["파일 선택 (계획노선·라이다·좌표계·래스터)", "Select files"],
B01_Temp_Btn_Upload: ["보관함에 올리기", "Upload to storage"],
B01_Temp_Hint: [
"프로젝트를 만들기 전에 자료를 먼저 올려 둘 수 있습니다. 나중에 프로젝트 파일 입력 화면에서 불러오면 됩니다.",
"Upload files before creating a project, then pull them in from the project file input page.",
],
B01_Temp_Hint_Days: ["일 보관", " days retained"],
B01_Temp_Empty: ["보관 중인 자료가 없습니다.", "No stored files yet."],
B01_Temp_Status_Uploading: ["업로드 중", "Uploading"],
B01_Temp_Status_Ready: ["사용 가능", "Ready"],
B01_Temp_Status_Linked: ["프로젝트 연결됨", "Linked"],
B01_Temp_Meta_FileCount: ["개 파일", " files"],
B01_Temp_Meta_Expires: ["보관 만료", "Expires"],
B01_Temp_Meta_Linked: ["프로젝트로 이동 완료", "Moved to project"],
B01_Temp_Error_Name: ["보관 이름을 입력하세요.", "Enter a storage name."],
B01_Temp_Error_Files: ["올릴 파일을 선택하세요.", "Select files to upload."],
B01_Temp_Upload_Success: ["보관함에 저장했습니다.", "Saved to temporary storage."],
B01_Temp_Upload_Failed: ["보관함 업로드에 실패했습니다.", "Failed to upload."],
B01_Temp_Load_Failed: ["보관함을 불러오지 못했습니다.", "Failed to load storage."],
B01_Temp_Delete_Confirm: [
"이 보관 자료를 삭제할까요? 되돌릴 수 없습니다.",
"Delete this stored set? This cannot be undone.",
],
B01_Temp_Delete_Success: ["보관 자료를 삭제했습니다.", "Stored set deleted."],
B01_Temp_Delete_Failed: ["삭제에 실패했습니다.", "Failed to delete."],
B01_Dashboard_Profile: ["기본정보", "Profile"],
B01_Dashboard_SaveProfile: ["기본정보 저장", "Save profile"],
B01_Dashboard_Table_Project: ["프로젝트명", "Project"],
@@ -216,6 +246,28 @@ export const ui_locales_b1 = {
B03_File_Slot_RasterCoord: ["래스터 좌표", "Raster Coord 1"],
B03_File_Slot_TerrainDem: ["지형 래스터", "Terrain DEM"],
B03_File_Slot_CadDrawing: ["CAD 도면", "CAD Drawing"],
/* --- B03 임시 보관함 불러오기 (2026-08-08) --- */
B03_Temp_Btn_Open: ["임시 보관함에서 불러오기", "Load from temporary storage"],
B03_Temp_None: ["선택된 보관 자료 없음", "No stored set selected"],
B03_Temp_Selected: ["선택됨:", "Selected:"],
B03_Temp_FileCount: ["개 파일", " files"],
B03_Temp_Modal_Title: ["보관 자료 선택", "Select stored files"],
B03_Temp_Modal_Empty: [
"사용할 수 있는 보관 자료가 없습니다. 대시보드 임시 보관함에서 필수 파일을 모두 올려 주세요.",
"No usable stored set. Upload all required files in the dashboard temporary storage first.",
],
B03_Temp_Select_Required: ["보관 자료를 선택하세요.", "Select a stored set."],
B03_Temp_Load_Failed: ["보관 자료를 불러오지 못했습니다.", "Failed to load stored sets."],
B03_Temp_Attach_Success: [
"보관 자료를 프로젝트로 옮겼습니다. 분석을 시작합니다.",
"Stored files moved to the project. Analysis started.",
],
B03_Temp_Attach_Failed: ["보관 자료 연결에 실패했습니다.", "Failed to attach stored files."],
B03_Temp_Attach_NoAnalysis: [
"파일은 옮겼지만 라이다 파일이 없어 분석을 시작하지 못했습니다.",
"Files moved, but analysis did not start (no point cloud file).",
],
B03_File_Card_Select: ["파일 선택", "Select file"],
B03_File_Card_Remove: ["파일 제거", "Remove file"],
B03_File_Error_DuplicateSlot: [