Files
sam-docs/plans/sub/structure-review-plan.md
kent 7b18ee1b10 docs: 개발 계획 및 변경 이력 문서 추가
- 작업지시 계획 문서 업데이트
- MES 통합 분석, 서버 컴포넌트 감사 계획 추가
- 수주관리, 인수인계서 API 연동 변경 이력 추가
- sub/ 하위 계획 문서들 추가 (카테고리, 계약, 품목, 단가 등)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-15 08:54:31 +09:00

138 lines
3.5 KiB
Markdown

# 구조검토관리 (Structure Review) API 연동 계획
> **작성일**: 2026-01-08
> **상위 문서**: [construction-api-integration-plan.md](../construction-api-integration-plan.md)
> **상태**: ⏳ 대기
---
## 1. 컴포넌트 분석
### 1.1 파일 위치
```
react/src/
├── app/[locale]/(protected)/construction/order/structure-review/
│ └── page.tsx
└── components/business/construction/structure-review/
├── StructureReviewListClient.tsx
├── actions.ts
└── types.ts
```
### 1.2 현재 Mock 데이터
**actions.ts 내 Mock 함수:**
```typescript
// getStructureReviewList에서 Mock 데이터 생성
// 검토 상태: pending, in_review, approved, rejected
// 검토 유형: structural, electrical, mechanical, fire_safety
```
### 1.3 현재 함수 목록
| 함수명 | 용도 | Mock 상태 |
|--------|------|:--------:|
| `getStructureReviewList` | 구조검토 목록 조회 | ✅ Mock |
| `getStructureReviewStats` | 구조검토 통계 조회 | ✅ Mock |
| `deleteStructureReview` | 구조검토 삭제 | ✅ Mock |
| `deleteStructureReviews` | 구조검토 일괄 삭제 | ✅ Mock |
| `updateStructureReviewStatus` | 상태 변경 | ✅ Mock |
---
## 2. API 설계
### 2.1 엔드포인트
| Method | Endpoint | 용도 |
|--------|----------|------|
| GET | `/api/construction/structure-reviews` | 목록 조회 |
| GET | `/api/construction/structure-reviews/stats` | 통계 조회 |
| GET | `/api/construction/structure-reviews/{id}` | 상세 조회 |
| POST | `/api/construction/structure-reviews` | 등록 |
| PUT | `/api/construction/structure-reviews/{id}` | 수정 |
| PATCH | `/api/construction/structure-reviews/{id}/status` | 상태 변경 |
| DELETE | `/api/construction/structure-reviews/{id}` | 삭제 |
| DELETE | `/api/construction/structure-reviews/bulk` | 일괄 삭제 |
### 2.2 요청/응답 스키마
**목록 조회 Request:**
```typescript
interface GetStructureReviewListParams {
page?: number;
size?: number;
startDate?: string;
endDate?: string;
siteId?: string;
partnerId?: string;
reviewType?: ReviewType;
status?: ReviewStatus;
search?: string;
}
```
---
## 3. 작업 항목
### 3.1 Backend (API)
| # | 작업 | 상태 | 비고 |
|---|------|:----:|------|
| 1 | StructureReviewController 생성 | ⏳ | |
| 2 | StructureReviewService 생성 | ⏳ | |
| 3 | StructureReviewFormRequest 생성 | ⏳ | |
| 4 | StructureReview 모델 생성 | ⏳ | |
| 5 | routes/api.php 등록 | ⏳ | |
| 6 | Swagger 문서 작성 | ⏳ | |
### 3.2 Frontend (React)
| # | 작업 | 상태 | 비고 |
|---|------|:----:|------|
| 1 | actions.ts Mock → API 변환 | ⏳ | |
| 2 | API 클라이언트 연동 | ⏳ | |
| 3 | 에러 핸들링 추가 | ⏳ | |
| 4 | types.ts 정합성 확인 | ⏳ | |
---
## 4. 타입 정의
### 4.1 StructureReview 타입
```typescript
interface StructureReview {
id: string;
reviewNumber: string;
siteId: string;
siteName: string;
partnerId: string;
partnerName: string;
reviewType: ReviewType;
title: string;
description?: string;
reviewerName?: string;
reviewDate?: string;
status: ReviewStatus;
comments?: string;
createdAt: string;
updatedAt: string;
}
type ReviewType = 'structural' | 'electrical' | 'mechanical' | 'fire_safety';
type ReviewStatus = 'pending' | 'in_review' | 'approved' | 'rejected';
```
---
## 5. 변경 이력
| 날짜 | 작업 | 상태 |
|------|------|------|
| 2026-01-08 | 문서 초안 작성 | ✅ |
---
*상위 문서: [construction-api-integration-plan.md](../construction-api-integration-plan.md)*