From 7b0de7ba6acf607f86790887ae540c4b87297b70 Mon Sep 17 00:00:00 2001 From: hskwon Date: Wed, 24 Dec 2025 18:00:36 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=AC=EC=A0=81=20=EC=8B=9C=EC=8A=A4?= =?UTF-8?q?=ED=85=9C=20=EA=B0=9C=EB=B0=9C=20=EA=B3=84=ED=9A=8D=20=EB=AC=B8?= =?UTF-8?q?=EC=84=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - quote-system-development-plan.md: mng 견적 시스템 확장 + API 개발 계획 - index_plans.md: 계획 인덱스 업데이트 - react-mock-to-api-migration-plan.md: 마이그레이션 계획 업데이트 --- plans/index_plans.md | 65 ++--- plans/quote-system-development-plan.md | 319 ++++++++++++++++++++++ plans/react-mock-to-api-migration-plan.md | 3 +- 3 files changed, 354 insertions(+), 33 deletions(-) create mode 100644 plans/quote-system-development-plan.md diff --git a/plans/index_plans.md b/plans/index_plans.md index 95d0a74..0efa838 100644 --- a/plans/index_plans.md +++ b/plans/index_plans.md @@ -1,7 +1,7 @@ # 기획 문서 인덱스 > SAM 시스템 개발 계획 및 기획 문서 모음 -> **최종 업데이트**: 2025-12-23 +> **최종 업데이트**: 2025-12-24 --- @@ -9,7 +9,7 @@ | 분류 | 개수 | 설명 | |------|------|------| -| 개발 계획서 | 9개 | 기능별 API 개발 계획 | +| 개발 계획서 | 13개 | 기능별 API 개발 계획 | | 스토리보드 | 2개 | ERP 화면 설계 (D0.8, D1.0) | | 플로우 테스트 | 32개 | API 검증용 JSON 테스트 케이스 | @@ -21,35 +21,34 @@ | 문서 | 상태 | 설명 | |------|------|------| -| [erp-api-development-plan.md](./erp-api-development-plan.md) | 🟡 Phase 3 진행중 | SAM ERP API 전체 개발 계획 | -| [erp-api-development-plan-d1.0-changes.md](./erp-api-development-plan-d1.0-changes.md) | 📚 참조 | D1.0 스토리보드 변경 사항 | +| [erp-api-development-plan.md](./erp-api-development-plan.md) | 🟡 Phase 3 진행중 | SAM ERP API 전체 개발 계획 (D0.8 기준) | +| [erp-api-development-plan-d1.0-changes.md](./erp-api-development-plan-d1.0-changes.md) | 🟢 완료 | D1.0 변경사항 (Phase 5-8 완료) | ### 기능별 계획 | 문서 | 상태 | 설명 | |------|------|------| | [mng-quote-formula-development-plan.md](./mng-quote-formula-development-plan.md) | 🟢 완료 | mng 견적 수식 관리 | -| [quote-auto-calculation-development-plan.md](./quote-auto-calculation-development-plan.md) | 🟡 진행중 | 견적 자동 계산 | -| [simulator-planning-page-sync-plan.md](./simulator-planning-page-sync-plan.md) | 🟡 진행중 | 견적 시뮬레이터 동기화 | -| [simulator-calculation-logic-mapping.md](./simulator-calculation-logic-mapping.md) | 📚 참조 | 계산 로직 매핑 분석 | -| [mng-item-field-management-plan.md](./mng-item-field-management-plan.md) | 🟡 진행중 | 품목 필드 관리 | -| [items-table-unification-plan.md](./items-table-unification-plan.md) | 🟢 완료 | items 테이블 통합 | -| [mng-menu-system-plan.md](./mng-menu-system-plan.md) | 🟡 진행중 | mng 메뉴 시스템 | +| [quote-auto-calculation-development-plan.md](./quote-auto-calculation-development-plan.md) | 🟢 완료 | 견적 자동 계산 (2025-12-22 완료) | +| [simulator-calculation-logic-mapping.md](./simulator-calculation-logic-mapping.md) | 📚 참조 | 견적 시뮬레이터 계산 로직 매핑 분석 | +| [mng-item-field-management-plan.md](./mng-item-field-management-plan.md) | ⚪ 계획수립 | 품목 필드 관리 (미착수) | +| [items-table-unification-plan.md](./items-table-unification-plan.md) | ⚪ 계획수립 | items 테이블 통합 (롤백 후 대기) | +| [mng-menu-system-plan.md](./mng-menu-system-plan.md) | 🔵 계획수립 | mng 메뉴 시스템 (설계 완료, 구현 대기) | ### 마이그레이션 & 연동 | 문서 | 상태 | 설명 | |------|------|------| -| [5130-to-mng-migration-plan.md](./5130-to-mng-migration-plan.md) | 🟡 진행중 | 5130 → mng 마이그레이션 | -| [react-api-integration-plan.md](./react-api-integration-plan.md) | 🟡 진행중 | React ↔ API 연동 | -| [react-mock-to-api-migration-plan.md](./react-mock-to-api-migration-plan.md) | ⚪ 대기 | Mock → API 전환 | +| [5130-to-mng-migration-plan.md](./5130-to-mng-migration-plan.md) | 🟡 진행중 | 5130 → mng 마이그레이션 (5/38 완료) | +| [react-api-integration-plan.md](./react-api-integration-plan.md) | 🟡 진행중 | React ↔ API 연동 테스트 | +| [react-mock-to-api-migration-plan.md](./react-mock-to-api-migration-plan.md) | 🟡 진행중 | Mock → API 전환 (Phase A 부분 완료) | ### 기타 | 문서 | 상태 | 설명 | |------|------|------| -| [dummy-data-seeding-plan.md](./dummy-data-seeding-plan.md) | 🟢 완료 | 더미 데이터 시딩 | -| [api-explorer-development-plan.md](./api-explorer-development-plan.md) | 🟡 진행중 | API Explorer 개발 | +| [dummy-data-seeding-plan.md](./dummy-data-seeding-plan.md) | ⚪ 계획수립 | 더미 데이터 시딩 (2025-12-23 작성) | +| [api-explorer-development-plan.md](./api-explorer-development-plan.md) | 🔵 계획수립 | API Explorer 개발 (설계 완료, 구현 대기) | --- @@ -158,20 +157,21 @@ ``` docs/plans/ -├── INDEX.md # 이 파일 +├── index_plans.md # 이 파일 │ -├── erp-api-development-plan.md # ERP API 개발 계획 (핵심) -├── erp-api-development-plan-d1.0-changes.md -├── mng-quote-formula-development-plan.md -├── quote-auto-calculation-development-plan.md -├── mng-item-field-management-plan.md -├── items-table-unification-plan.md -├── mng-menu-system-plan.md -├── 5130-to-mng-migration-plan.md -├── react-api-integration-plan.md -├── react-mock-to-api-migration-plan.md -├── dummy-data-seeding-plan.md -├── api-explorer-development-plan.md +├── erp-api-development-plan.md # ERP API 개발 계획 (D0.8) +├── erp-api-development-plan-d1.0-changes.md # D1.0 변경사항 +├── mng-quote-formula-development-plan.md # 견적 수식 관리 +├── quote-auto-calculation-development-plan.md # 견적 자동 계산 +├── simulator-calculation-logic-mapping.md # 시뮬레이터 로직 매핑 +├── mng-item-field-management-plan.md # 품목 필드 관리 +├── items-table-unification-plan.md # items 테이블 통합 +├── mng-menu-system-plan.md # mng 메뉴 시스템 +├── 5130-to-mng-migration-plan.md # 5130 마이그레이션 +├── react-api-integration-plan.md # React-API 연동 +├── react-mock-to-api-migration-plan.md # Mock→API 전환 +├── dummy-data-seeding-plan.md # 더미 데이터 시딩 +├── api-explorer-development-plan.md # API Explorer │ ├── SAM_ERP_Storyboard_D0.8_251216/ # 스토리보드 D0.8 (113장) │ └── 슬라이드*.jpeg @@ -198,7 +198,8 @@ docs/plans/ --- **범례**: -- 🟢 완료 -- 🟡 진행중 -- ⚪ 대기 -- 📚 참조용 \ No newline at end of file +- 🟢 완료: 구현 완료 +- 🟡 진행중: 현재 작업 중 +- 🔵 계획수립: 설계/계획 완료, 구현 대기 +- ⚪ 미착수: 계획만 수립, 작업 대기 +- 📚 참조: 분석/참조용 문서 \ No newline at end of file diff --git a/plans/quote-system-development-plan.md b/plans/quote-system-development-plan.md new file mode 100644 index 0000000..66e8147 --- /dev/null +++ b/plans/quote-system-development-plan.md @@ -0,0 +1,319 @@ +# 견적 시스템 개발 계획 + +> **작성일**: 2025-12-24 +> **목표**: mng 수식 시뮬레이터를 완전한 견적 시스템으로 확장 후 React API 개발 + +--- + +## 1. 개발 단계 + +### Stage 1: mng 견적 시스템 완성 (현재) +**목표**: 스크린샷과 동일한 견적 시스템을 mng Plain Blade로 구현 + +### Stage 2: API 개발 +**목표**: React 프론트엔드에서 호출할 견적 산출 REST API 개발 + +--- + +## 2. 현재 상태 vs 목표 상태 + +### 2.1 입력 폼 비교 + +| 필드 | 현재 시뮬레이터 | 목표 (스크린샷) | 상태 | +|------|----------------|----------------|------| +| 층수 | ❌ | 예: 1층, B1, 지하1층 | 추가 필요 | +| 부호 | ❌ | 예: A, B, C | 추가 필요 | +| 제품 카테고리 (PC) | ✅ | 스크린, 철재 등 | 완료 | +| 제품명 | ✅ | 방화 스크린 셔터 등 | 완료 | +| 오픈사이즈 W0 | ✅ | 가로 | 완료 | +| 오픈사이즈 H0 | ✅ | 세로 | 완료 | +| 가이드레일 설치유형 (GT) | ✅ | 벽면형, 측면형 | 완료 | +| 모터 전원 (MP) | ✅ | 220V, 380V | 완료 | +| 연동제어기 (CT) | ✅ | 단독, 연동 | 완료 | +| 수량 (QTY) | ✅ | 1, 2, 3... | 완료 | +| 마구리 날개치수 (WS) | ❌ | 50 등 | 추가 필요 | +| 검사비 (INSP) | ❌ | 50000 등 | 추가 필요 | + +### 2.2 출력 결과 비교 + +| 섹션 | 현재 시뮬레이터 | 목표 (스크린샷) | 상태 | +|------|----------------|----------------|------| +| 입력 정보 요약 | ❌ | 제품명, 카테고리, 오픈사이즈, 설치유형 등 요약 | 추가 필요 | +| 기본 산출 공식 | ❌ | 제작폭(W1), 제작높이(H1), 면적(M), 중량(K) 표시 | 추가 필요 | +| BOM 목록 테이블 | ⚠️ 공정별 그룹화 | 순번, 품목코드, 품목명, 품목유형, 규격, 기준수량, 산출수량, 단위, 단가, 금액, 작업 | 구조 변경 필요 | +| 품목 추가/삭제 | ❌ | + 품목 추가 버튼, 휴지통 삭제 버튼 | 추가 필요 | +| 할인율 | ❌ | 할인율(%) 입력 | 추가 필요 | +| 금액 요약 | ⚠️ 합계만 | 합계, 공급가, 최종 금액 | 확장 필요 | + +--- + +## 3. Stage 1: mng 견적 시스템 상세 계획 + +### Phase 1: UI 확장 (1일) +**파일**: `resources/views/quote-formulas/simulator.blade.php` + +#### 1.1 입력 폼 확장 +``` +추가 필드: +- 층수 (floor): text input, placeholder "예: 1층, B1, 지하1층" +- 부호 (code): text input, placeholder "예: A, B, C" +- 마구리 날개치수 (WS): number input, default 50 +- 검사비 (INSP): number input, default 50000 +``` + +#### 1.2 견적 항목 다중 입력 +``` +- 견적 1, 견적 2, ... 탭 형태 +- "+ 견적 추가" 버튼 +- 복사, 삭제 버튼 +``` + +#### 1.3 결과 출력 섹션 +``` +1. 입력 정보 요약 카드 + - 제품명, 제품 카테고리, 오픈사이즈, 가이드레일 설치, 모터 전원, 연동제어기, 수량 + +2. 기본 산출 공식 카드 + - 제작폭 (W1): 값 + 계산식 + - 제작높이 (H1): 값 + 계산식 + - 면적 (M): 값 + 단위 + - 중량 (K): 값 + 단위 + +3. 부품구성표(BOM) 목록 테이블 + - 컬럼: 순번, 품목코드, 품목명, 품목유형, 규격, 기준수량, 산출수량, 단위, 단가, 금액, 작업 + - "+ 품목 추가" 버튼 + - 행별 삭제 버튼 + +4. 금액 요약 + - 할인율(%) 입력 + - 합계, 공급가, 최종 금액 +``` + +### Phase 2: 백엔드 로직 확장 (1일) +**파일**: `app/Services/Quote/FormulaEvaluatorService.php` + +#### 2.1 executeAll() 반환 구조 확장 +```php +return [ + 'input_summary' => [ + 'product_name' => '방화 스크린 셔터 (소형)', + 'product_category' => '스크린', + 'open_size' => 'W2000 × H2500', + 'guide_rail_type' => '벽면형', + 'motor_power' => '220V', + 'controller' => '단독', + 'quantity' => 1, + ], + 'calculation_formula' => [ + 'W1' => ['value' => 2140, 'formula' => 'W0 + 140'], + 'H1' => ['value' => 2850, 'formula' => 'H0 + 350'], + 'M' => ['value' => 6.10, 'unit' => '㎡'], + 'K' => ['value' => 0.00, 'unit' => 'kg'], + ], + 'bom_items' => [ + [ + 'seq' => 1, + 'item_code' => 'SF-SCR-F01', + 'item_name' => '스크린 원단', + 'item_type' => 'SF', + 'spec' => '-', + 'base_quantity' => 1.10, + 'calculated_quantity' => 6.099, + 'unit' => 'M2', + 'unit_price' => 213465, + 'total_price' => 1301923.035, + 'editable' => true, + ], + // ... more items + ], + 'summary' => [ + 'subtotal' => 2806523.035, + 'discount_rate' => 0, + 'discount_amount' => 0, + 'supply_price' => 2806523.035, + 'total_amount' => 2806523.035, + ], +]; +``` + +### Phase 3: 검사비 품목 추가 (0.5일) +**파일**: `database/seeders/DesignItemSeeder.php` + +```php +// 서비스 품목 추가 +$serviceItems = [ + ['code' => 'SVC-INSP', 'name' => '검사비', 'unit' => '식', 'price' => 50000, 'type' => 'CS'], + ['code' => 'SVC-INSTALL', 'name' => '설치비', 'unit' => '식', 'price' => 100000, 'type' => 'CS'], + ['code' => 'SVC-DELIVERY', 'name' => '운송비', 'unit' => '식', 'price' => 80000, 'type' => 'CS'], +]; +``` + +### Phase 4: 테스트 및 검증 (0.5일) +- Playwright로 전체 플로우 테스트 +- Design 시스템 결과와 비교 검증 + +--- + +## 4. Stage 2: API 개발 상세 계획 + +### Phase 1: API 엔드포인트 설계 (0.5일) + +#### 4.1 견적 산출 API +``` +POST /api/v1/quotes/calculate + +Request: +{ + "items": [ + { + "floor": "1층", + "code": "A", + "product_category": "screen", + "product_id": "screen_standard", + "open_width": 2000, + "open_height": 2500, + "guide_rail_type": "wall", + "motor_power": "220V", + "controller": "single", + "quantity": 1, + "wing_size": 50, + "inspection_fee": 50000 + } + ], + "discount_rate": 0 +} + +Response: +{ + "success": true, + "data": { + "quotes": [ + { + "quote_id": "quote-1", + "input_summary": { ... }, + "calculation_formula": { ... }, + "bom_items": [ ... ], + "summary": { ... } + } + ], + "total_summary": { + "total_items": 1, + "total_amount": 2806523.035 + } + } +} +``` + +#### 4.2 제품 목록 API +``` +GET /api/v1/quotes/products?category=screen + +Response: +{ + "success": true, + "data": [ + { + "id": "screen_standard", + "name": "스크린 셔터 (표준형)", + "category": "screen" + } + ] +} +``` + +#### 4.3 옵션 목록 API +``` +GET /api/v1/quotes/options + +Response: +{ + "success": true, + "data": { + "product_categories": [...], + "guide_rail_types": [...], + "motor_powers": [...], + "controllers": [...] + } +} +``` + +### Phase 2: API 컨트롤러 구현 (1일) +**파일**: `api/app/Http/Controllers/Api/V1/QuoteCalculationController.php` + +### Phase 3: API 테스트 (0.5일) +- Postman/Swagger 테스트 +- React 연동 테스트 + +--- + +## 5. 일정 요약 + +| Stage | Phase | 작업 내용 | 예상 일정 | +|-------|-------|----------|----------| +| **Stage 1** | Phase 1 | mng UI 확장 | 1일 | +| | Phase 2 | 백엔드 로직 확장 | 1일 | +| | Phase 3 | 검사비 품목 추가 | 0.5일 | +| | Phase 4 | 테스트 및 검증 | 0.5일 | +| | **소계** | | **3일** | +| **Stage 2** | Phase 1 | API 설계 | 0.5일 | +| | Phase 2 | API 구현 | 1일 | +| | Phase 3 | API 테스트 | 0.5일 | +| | **소계** | | **2일** | +| **합계** | | | **5일** | + +--- + +## 6. 파일 구조 + +### Stage 1 (mng) +``` +/SAM/mng/ +├── app/Services/Quote/ +│ └── FormulaEvaluatorService.php # 로직 확장 +├── database/seeders/ +│ └── DesignItemSeeder.php # 서비스 품목 추가 +└── resources/views/quote-formulas/ + └── simulator.blade.php # UI 확장 +``` + +### Stage 2 (api) +``` +/SAM/api/ +├── app/Http/Controllers/Api/V1/ +│ └── QuoteCalculationController.php # 신규 +├── app/Services/Quote/ +│ └── QuoteCalculationService.php # 신규 (또는 mng 서비스 공유) +└── routes/ + └── api.php # 라우트 추가 +``` + +--- + +## 7. 성공 기준 + +### Stage 1 +1. ✅ 스크린샷과 동일한 입력 폼 (층수, 부호, WS, INSP 포함) +2. ✅ 입력 정보 요약 섹션 표시 +3. ✅ 기본 산출 공식 섹션 표시 +4. ✅ BOM 테이블 (순번~금액 컬럼) +5. ✅ 품목 추가/삭제 기능 +6. ✅ 할인율 + 최종 금액 계산 + +### Stage 2 +1. ✅ POST /api/v1/quotes/calculate 정상 작동 +2. ✅ GET /api/v1/quotes/products 정상 작동 +3. ✅ GET /api/v1/quotes/options 정상 작동 +4. ✅ Swagger 문서화 완료 +5. ✅ React에서 API 호출 테스트 완료 + +--- + +## 8. 참고 문서 + +- `docs/plans/simulator-calculation-logic-mapping.md` - 계산 로직 상세 +- `react/src/components/quotes/QuoteRegistration.tsx` - React UI 참조 +- `design/src/components/AutoCalculationSimulator.tsx` - Design 시뮬레이터 참조 + +--- + +*이 문서는 mng 견적 시스템 완성 및 API 개발 계획을 정의합니다.* \ No newline at end of file diff --git a/plans/react-mock-to-api-migration-plan.md b/plans/react-mock-to-api-migration-plan.md index d5853fb..ce37105 100644 --- a/plans/react-mock-to-api-migration-plan.md +++ b/plans/react-mock-to-api-migration-plan.md @@ -167,7 +167,7 @@ ListClient.tsx (클라이언트) | # | 페이지 | React 경로 | 리스트 | 상세 조회 | 등록 | 수정 | 삭제 | 비고 | |---|--------|-----------|--------|----------|------|------|------|------| -| C-1 | 직원 관리 | `/hr/employee-management` | 🔄 Mock | 🔄 Mock | 🔄 | 🔄 | 🔄 | `new/page.tsx`, `[id]/page.tsx`, `[id]/edit/page.tsx` - console.log | +| C-1 | 직원 관리 | `/hr/employee-management` | ✅ | ✅ | ✅ | ✅ | ✅ | **2025-12-24 연동 완료** - actions.ts, utils.ts 생성, 전체 CRUD API 연동 | | C-2 | 근태 관리 | `/hr/attendance` | 🔄 Mock | ⏭️ | 🔄 | ⏭️ | ⏭️ | `index.tsx:286` console.log('Save attendance') | | C-3 | 휴가 관리 | `/hr/vacation` | 🔄 Mock | ⏭️ | ⏭️ | ⏭️ | ⏭️ | `index.tsx:170` generateMockData | | C-4 | 부서 관리 | `/hr/departments` | 🔄 Mock | ⏭️ | ⏭️ | ⏭️ | ⏭️ | `index.tsx:27-74` mockDepartments | @@ -970,6 +970,7 @@ export function transformFrontendToApi(data: Record): Record