feat:개소별 자재 투입 관리 API 추가
- work_order_material_inputs 테이블 신규 생성 (개소별 자재 투입 추적) - 개소별 자재 조회/투입/이력/삭제/수정 API 5개 추가 - StockService.increaseToLot: LOT 수량 복원 메서드 추가 - WorkOrderService에 개소별 자재 투입 비즈니스 로직 구현 - WorkOrder, WorkOrderItem 모델에 materialInputs 관계 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,13 @@
|
||||
Route::get('/{id}/material-input-history', [WorkOrderController::class, 'materialInputHistory'])->whereNumber('id')->name('v1.work-orders.material-input-history'); // 자재 투입 이력
|
||||
Route::get('/{id}/material-input-lots', [WorkOrderController::class, 'materialInputLots'])->whereNumber('id')->name('v1.work-orders.material-input-lots'); // 투입 LOT 번호 조회
|
||||
|
||||
// 개소별 자재 관리
|
||||
Route::get('/{id}/items/{itemId}/materials', [WorkOrderController::class, 'materialsForItem'])->whereNumber('id')->whereNumber('itemId')->name('v1.work-orders.items.materials'); // 개소별 자재 조회
|
||||
Route::post('/{id}/items/{itemId}/material-inputs', [WorkOrderController::class, 'registerMaterialInputForItem'])->whereNumber('id')->whereNumber('itemId')->name('v1.work-orders.items.material-inputs'); // 개소별 자재 투입
|
||||
Route::get('/{id}/items/{itemId}/material-inputs', [WorkOrderController::class, 'materialInputsForItem'])->whereNumber('id')->whereNumber('itemId')->name('v1.work-orders.items.material-inputs.index'); // 개소별 투입 이력
|
||||
Route::delete('/{id}/material-inputs/{inputId}', [WorkOrderController::class, 'deleteMaterialInput'])->whereNumber('id')->whereNumber('inputId')->name('v1.work-orders.material-inputs.delete'); // 자재 투입 삭제
|
||||
Route::patch('/{id}/material-inputs/{inputId}', [WorkOrderController::class, 'updateMaterialInput'])->whereNumber('id')->whereNumber('inputId')->name('v1.work-orders.material-inputs.update'); // 자재 투입 수정
|
||||
|
||||
// 공정 단계 진행 관리
|
||||
Route::get('/{id}/step-progress', [WorkOrderController::class, 'stepProgress'])->whereNumber('id')->name('v1.work-orders.step-progress'); // 단계 진행 조회
|
||||
Route::patch('/{id}/step-progress/{progressId}/toggle', [WorkOrderController::class, 'toggleStepProgress'])->whereNumber('id')->whereNumber('progressId')->name('v1.work-orders.step-progress.toggle'); // 단계 토글
|
||||
|
||||
Reference in New Issue
Block a user