docs: Phase 6.1 악성채권 체크리스트 완료 상태 반영

- erp-api-development-plan-d1.0-changes.md: 악성채권 추심관리 구현 완료 체크
- quotation/PROGRESS.md: 견적 프로젝트 진행상황 업데이트
- phase-4-integration/README.md: API 통합 문서 수정
- react-api-integration-plan.md: React API 통합 계획 추가
This commit is contained in:
2025-12-22 15:53:31 +09:00
parent 2055524e19
commit 80bff661fc
4 changed files with 508 additions and 76 deletions

View File

@@ -22,10 +22,10 @@ React 화면과 API 실제 연동 및 오류 해결
### API 검증 방법
```bash
# 방법 1: Swagger UI
http://api.sam.kr/api-docs/index.html
https://api.sam.kr/api-docs/index.html
# 방법 2: curl 직접 호출
curl -X GET "http://api.sam.kr/api/v1/clients" \
curl -X GET "https://api.sam.kr/api/v1/clients" \
-H "X-API-KEY: {api_key}" \
-H "Authorization: Bearer {token}"

View File

@@ -2,7 +2,7 @@
> **마스터 플랜:** [MASTER_PLAN.md](./MASTER_PLAN.md)
> **공통 정책:** [PROJECT_DEVELOPMENT_POLICY.md](../../guides/PROJECT_DEVELOPMENT_POLICY.md)
> **최종 업데이트:** 2025-12-19 (Phase 4 prices 연동)
> **최종 업데이트:** 2025-12-19 (Phase 4 DB 기반 재작성 완료)
---
@@ -13,15 +13,15 @@
| Phase 1: 5130 분석 | ✅ 완료 | 100% | 2025-12-19 | 2025-12-19 |
| Phase 2: mng 분석 | ✅ 완료 | 100% | 2025-12-19 | 2025-12-19 |
| Phase 3: 구현 | ✅ 완료 | 100% | 2025-12-19 | 2025-12-19 |
| Phase 4: API 개발 | 🔄 진행 | 30% | 2025-12-19 | - |
| Phase 4: API 개발 | 🔄 진행 | 60% | 2025-12-19 | - |
---
## 🔄 현재 작업
**현재 Phase:** Phase 4 진행 중
**완료된 작업:** api 프로젝트 prices 테이블 연동
**다음 작업:** 견적 API 테스트 및 Swagger 문서화
**완료된 작업:** mng 패턴 적용 - DB 기반 견적 산출 서비스 재작성
**다음 작업:** 견적 API 통합 테스트 및 Swagger 문서화
---
@@ -146,6 +146,9 @@ php artisan db:seed --class=QuoteFormulaSeeder
- [x] api 프로젝트 prices 테이블 연동
- [x] Price 모델에 getCurrentPrice(), getSalesPriceByItemCode() 추가
- [x] QuoteCalculationService prices 조회로 변경
- [x] mng 패턴 적용 - Quote 수식 모델 생성
- [x] FormulaEvaluatorService DB 기반 확장
- [x] QuoteCalculationService DB 기반 재작성
- [ ] 견적 API 통합 테스트
- [ ] Swagger 문서화
- [ ] React 연동 스펙
@@ -157,7 +160,7 @@ php artisan db:seed --class=QuoteFormulaSeeder
### 완료된 작업 (2025-12-19)
#### api 프로젝트 prices 테이블 연동
#### 1. api 프로젝트 prices 테이블 연동
**수정된 파일:**
- `api/app/Models/Products/Price.php`
@@ -165,27 +168,42 @@ php artisan db:seed --class=QuoteFormulaSeeder
- getCurrentPrice(): 현재 유효 단가 조회
- getSalesPriceByItemCode(): 품목 코드로 단가 조회
- `api/app/Services/Quote/QuoteCalculationService.php`
- setTenantId(): 테넌트 ID 설정
- getUnitPrice(): 단가 조회 헬퍼 (fallback 지원)
- 모든 하드코딩 단가 → Price 모델 조회로 변경
**연동된 품목 코드:**
| 품목 코드 | 설명 | 기존 fallback |
|----------|------|--------------|
| SCR-FABRIC-001 | 스크린 원단 | 25,000 |
| SCR-CASE-001 | 알루미늄 케이스 | 85,000 |
| SCR-BRACKET-001 | 설치 브라켓 | 15,000 |
| SCR-MOTOR-50W~300W | 모터 용량별 | 120,000~280,000 |
| LAB-INSTALL-001 | 설치 인건비 | 50,000 |
| STL-PLATE-SS304/SS316/GALVANIZED | 철판 재질별 | 3,000~6,500 |
| STL-WELD-001 | 용접 | 15,000 |
| STL-FINISH-HAIRLINE/MIRROR/MATTE | 표면처리 | 5,000~15,000 |
| STL-PROCESS-001 | 가공비 | 50,000 |
**Git 커밋:**
- `4d3085e` feat: 견적 산출 서비스 prices 테이블 연동
#### 2. mng 패턴 적용 - DB 기반 견적 산출 재작성
**추가된 파일:**
- `api/app/Models/Quote/QuoteFormula.php` - 수식 정의 모델
- `api/app/Models/Quote/QuoteFormulaCategory.php` - 카테고리 모델
- `api/app/Models/Quote/QuoteFormulaItem.php` - 품목 출력 모델
- `api/app/Models/Quote/QuoteFormulaRange.php` - 범위별 값 모델
- `api/app/Models/Quote/QuoteFormulaMapping.php` - 매핑 값 모델
**수정된 파일:**
- `api/app/Models/Products/Price.php`
- items 테이블 연동 (products/materials 대체)
- ITEM_TYPE 상수 업데이트 (FG/PT/RM/SM/CS)
- `api/app/Services/Quote/FormulaEvaluatorService.php`
- executeAll(): 카테고리별 수식 실행 (mng 패턴)
- evaluateRangeFormula(): QuoteFormula 기반 범위 평가
- evaluateMappingFormula(): QuoteFormula 기반 매핑 평가
- getItemPrice(): prices 테이블 연동
- `api/app/Services/Quote/QuoteCalculationService.php`
- 하드코딩된 품목 코드/로직 제거
- quote_formulas 테이블 기반 동적 계산
- getFormulasByCategory(): DB에서 수식 조회
- getInputSchema(): DB 기반 입력 스키마 생성
**핵심 변경:**
- 기존: 하드코딩된 품목 코드 (SCR-FABRIC-001 등)
- 변경: quote_formula_items 테이블에서 동적 조회
**Git 커밋:**
- `0d49e4c` refactor: 견적 산출 서비스 DB 기반으로 재작성
---
## 🏷️ Git 태그
@@ -204,6 +222,9 @@ php artisan db:seed --class=QuoteFormulaSeeder
| 2025-12-19 | 신규 테이블 정책 | options JSON 적용 | Hybrid EAV 전략 |
| 2025-12-19 | 견적 유형 | 스크린/슬랫 2가지 | 5130 기존 구조 유지 |
| 2025-12-19 | 체크박스 옵션 | JSON으로 통합 저장 | 확장성 고려 |
| 2025-12-19 | 품목 테이블 | items 테이블 사용 | products/materials 통합 완료 |
| 2025-12-19 | 견적 산출 방식 | mng 패턴 (DB 기반) | 하드코딩 제거, 동적 수식 관리 |
| 2025-12-19 | tenant_id 없을 때 | 예외 발생 (fallback 금지) | 데이터 무결성 보장 |
---