feat: [생산관리] 중간검사 데이터 저장/조회 API 구현
- POST /work-orders/{id}/items/{itemId}/inspection: 품목별 검사 데이터 저장
- GET /work-orders/{id}/inspection-data: 전체 품목 검사 데이터 조회
- GET /work-orders/{id}/inspection-report: 검사 성적서용 데이터 조회
- WorkOrderItem 모델에 getInspectionData/setInspectionData 헬퍼 추가
- StoreItemInspectionRequest FormRequest 생성
- work_order_items.options['inspection_data']에 검사 결과 저장
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -113,6 +113,24 @@ public function scopeHasResult($query)
|
||||
// 헬퍼 메서드
|
||||
// ──────────────────────────────────────────────────────────────
|
||||
|
||||
/**
|
||||
* 중간검사 데이터 가져오기
|
||||
*/
|
||||
public function getInspectionData(): ?array
|
||||
{
|
||||
return $this->options['inspection_data'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 중간검사 데이터 설정
|
||||
*/
|
||||
public function setInspectionData(array $data): void
|
||||
{
|
||||
$options = $this->options ?? [];
|
||||
$options['inspection_data'] = $data;
|
||||
$this->options = $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* 작업 결과 데이터 가져오기
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user