feat:중간검사 API 다중단계/resolve/upsert 지원 (Phase 5.1.3)

- getInspectionTemplate: 전체 검사 단계 templates[] 반환 (기존 첫번째만→다중)
- resolveInspectionDocument 신규: step_id 기반 기존 문서 조회 또는 템플릿 반환
- createInspectionDocument 개선: step_id 파라미터, 기존 DRAFT/REJECTED 문서 update 지원
- GET inspection-resolve 라우트 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-10 16:55:29 +09:00
parent d8fd221278
commit 6733a431bb
3 changed files with 144 additions and 30 deletions

View File

@@ -77,7 +77,8 @@
Route::get('/{id}/inspection-data', [WorkOrderController::class, 'inspectionData'])->whereNumber('id')->name('v1.work-orders.inspection-data'); // 검사 데이터 조회
Route::get('/{id}/inspection-report', [WorkOrderController::class, 'inspectionReport'])->whereNumber('id')->name('v1.work-orders.inspection-report'); // 검사 성적서 조회
Route::get('/{id}/inspection-template', [WorkOrderController::class, 'inspectionTemplate'])->whereNumber('id')->name('v1.work-orders.inspection-template'); // 검사 문서 템플릿 조회
Route::post('/{id}/inspection-document', [WorkOrderController::class, 'createInspectionDocument'])->whereNumber('id')->name('v1.work-orders.inspection-document'); // 검사 문서 생성
Route::get('/{id}/inspection-resolve', [WorkOrderController::class, 'resolveInspectionDocument'])->whereNumber('id')->name('v1.work-orders.inspection-resolve'); // 검사 문서 resolve (기존 문서/템플릿)
Route::post('/{id}/inspection-document', [WorkOrderController::class, 'createInspectionDocument'])->whereNumber('id')->name('v1.work-orders.inspection-document'); // 검사 문서 생성/수정
});
// Work Result API (작업실적 관리)