feat: 견적 시뮬레이터 개선 및 FlowTester 조건 평가기 추가
- 견적 시뮬레이터 UI 레이아웃 개선 (가로 배치, 반응형) - FlowTester ConditionEvaluator 클래스 추가 (조건부 실행 지원) - FormulaEvaluatorService 기능 확장 - DependencyResolver 의존성 해결 로직 개선 - PushDeviceToken 모델 확장 (FCM 토큰 관리) - QuoteFormula API 엔드포인트 추가 - FlowTester 가이드 모달 업데이트
This commit is contained in:
@@ -447,6 +447,28 @@ private function getFormulaData(): array
|
||||
'sort_order' => 4,
|
||||
],
|
||||
|
||||
// 제작사이즈 통합 변수 (제품 카테고리 기반)
|
||||
[
|
||||
'category_code' => 'MAKE_SIZE',
|
||||
'variable' => 'W1',
|
||||
'name' => '제작가로 통합',
|
||||
'type' => 'calculation',
|
||||
'formula' => 'W1_SCREEN', // TODO: PC 기반 분기 로직 필요
|
||||
'description' => '제품 카테고리에 따른 제작 가로 (기본: 스크린)',
|
||||
'metadata' => ['unit' => 'mm'],
|
||||
'sort_order' => 5,
|
||||
],
|
||||
[
|
||||
'category_code' => 'MAKE_SIZE',
|
||||
'variable' => 'H1',
|
||||
'name' => '제작세로 통합',
|
||||
'type' => 'calculation',
|
||||
'formula' => 'H1_SCREEN', // TODO: PC 기반 분기 로직 필요
|
||||
'description' => '제품 카테고리에 따른 제작 세로 (기본: 스크린)',
|
||||
'metadata' => ['unit' => 'mm'],
|
||||
'sort_order' => 6,
|
||||
],
|
||||
|
||||
// ==============================
|
||||
// 3. 면적 (AREA) - 1개
|
||||
// ==============================
|
||||
@@ -462,7 +484,7 @@ private function getFormulaData(): array
|
||||
],
|
||||
|
||||
// ==============================
|
||||
// 4. 중량 (WEIGHT) - 2개
|
||||
// 4. 중량 (WEIGHT) - 3개
|
||||
// ==============================
|
||||
[
|
||||
'category_code' => 'WEIGHT',
|
||||
@@ -484,6 +506,17 @@ private function getFormulaData(): array
|
||||
'metadata' => ['unit' => 'kg', 'product_type' => 'steel'],
|
||||
'sort_order' => 2,
|
||||
],
|
||||
// 중량 통합 변수 (모터 선택용)
|
||||
[
|
||||
'category_code' => 'WEIGHT',
|
||||
'variable' => 'K',
|
||||
'name' => '중량 통합',
|
||||
'type' => 'calculation',
|
||||
'formula' => 'K_SCREEN', // TODO: PC 기반 분기 로직 필요
|
||||
'description' => '제품 카테고리에 따른 중량 (기본: 스크린)',
|
||||
'metadata' => ['unit' => 'kg'],
|
||||
'sort_order' => 3,
|
||||
],
|
||||
|
||||
// ==============================
|
||||
// 5. 가이드레일 (GUIDE_RAIL) - 2개 (활성)
|
||||
@@ -516,7 +549,7 @@ private function getFormulaData(): array
|
||||
],
|
||||
|
||||
// ==============================
|
||||
// 6. 케이스 (CASE) - 3개
|
||||
// 6. 케이스 (CASE) - 4개
|
||||
// ==============================
|
||||
[
|
||||
'category_code' => 'CASE',
|
||||
@@ -538,6 +571,17 @@ private function getFormulaData(): array
|
||||
'metadata' => ['unit' => 'mm', 'product_type' => 'steel'],
|
||||
'sort_order' => 2,
|
||||
],
|
||||
// 케이스 사이즈 통합 변수
|
||||
[
|
||||
'category_code' => 'CASE',
|
||||
'variable' => 'S',
|
||||
'name' => '케이스 사이즈 통합',
|
||||
'type' => 'calculation',
|
||||
'formula' => 'S_SCREEN', // TODO: PC 기반 분기 로직 필요
|
||||
'description' => '제품 카테고리에 따른 케이스 사이즈 (기본: 스크린)',
|
||||
'metadata' => ['unit' => 'mm'],
|
||||
'sort_order' => 3,
|
||||
],
|
||||
[
|
||||
'category_code' => 'CASE',
|
||||
'variable' => 'CASE_AUTO_SELECT',
|
||||
@@ -718,41 +762,12 @@ private function seedItems(int $tenantId): int
|
||||
|
||||
/**
|
||||
* 품목 출력용 수식 데이터
|
||||
* Note: 가이드레일, 케이스, 모터는 range 수식에서 자동 선택되므로 별도 품목 수식 불필요
|
||||
*/
|
||||
private function getItemFormulaData(): array
|
||||
{
|
||||
return [
|
||||
// 가이드레일 품목 출력
|
||||
[
|
||||
'category_code' => 'GUIDE_RAIL',
|
||||
'variable' => 'ITEM_GUIDE_RAIL',
|
||||
'name' => '가이드레일 품목',
|
||||
'type' => 'calculation',
|
||||
'formula' => '1', // 항상 출력
|
||||
'description' => '가이드레일 품목 출력용',
|
||||
'sort_order' => 10,
|
||||
],
|
||||
// 케이스 품목 출력
|
||||
[
|
||||
'category_code' => 'CASE',
|
||||
'variable' => 'ITEM_CASE',
|
||||
'name' => '케이스 품목',
|
||||
'type' => 'calculation',
|
||||
'formula' => '1',
|
||||
'description' => '케이스 품목 출력용',
|
||||
'sort_order' => 10,
|
||||
],
|
||||
// 모터 품목 출력
|
||||
[
|
||||
'category_code' => 'MOTOR',
|
||||
'variable' => 'ITEM_MOTOR',
|
||||
'name' => '모터 품목',
|
||||
'type' => 'calculation',
|
||||
'formula' => '1',
|
||||
'description' => '모터 품목 출력용',
|
||||
'sort_order' => 10,
|
||||
],
|
||||
// 검사비 품목 출력
|
||||
// 검사비 품목 출력 (range가 아닌 고정 품목)
|
||||
[
|
||||
'category_code' => 'INSPECTION',
|
||||
'variable' => 'ITEM_INSPECTION',
|
||||
@@ -767,46 +782,11 @@ private function getItemFormulaData(): array
|
||||
|
||||
/**
|
||||
* 품목 데이터 정의
|
||||
* Note: 가이드레일, 케이스, 모터는 range 수식의 result_value에서 자동 추출됨
|
||||
*/
|
||||
private function getItemData(): array
|
||||
{
|
||||
return [
|
||||
// ========== 가이드레일 품목 ==========
|
||||
[
|
||||
'formula_variable' => 'ITEM_GUIDE_RAIL',
|
||||
'item_code' => 'PT-GR-3000',
|
||||
'item_name' => '가이드레일 3000',
|
||||
'specification' => '3000mm',
|
||||
'unit' => 'EA',
|
||||
'quantity_formula' => '2', // 기본 2개
|
||||
'unit_price_formula' => null, // DB에서 조회
|
||||
'sort_order' => 1,
|
||||
],
|
||||
|
||||
// ========== 케이스 품목 ==========
|
||||
[
|
||||
'formula_variable' => 'ITEM_CASE',
|
||||
'item_code' => 'PT-CASE-3600',
|
||||
'item_name' => '케이스 3600',
|
||||
'specification' => '3600mm',
|
||||
'unit' => 'EA',
|
||||
'quantity_formula' => '1',
|
||||
'unit_price_formula' => null,
|
||||
'sort_order' => 1,
|
||||
],
|
||||
|
||||
// ========== 모터 품목 ==========
|
||||
[
|
||||
'formula_variable' => 'ITEM_MOTOR',
|
||||
'item_code' => 'PT-MOTOR-150',
|
||||
'item_name' => '모터 150K',
|
||||
'specification' => '150kg',
|
||||
'unit' => 'EA',
|
||||
'quantity_formula' => '1',
|
||||
'unit_price_formula' => null,
|
||||
'sort_order' => 1,
|
||||
],
|
||||
|
||||
// ========== 검사비 품목 ==========
|
||||
[
|
||||
'formula_variable' => 'ITEM_INSPECTION',
|
||||
|
||||
Reference in New Issue
Block a user