From eeca8d3e0f905b31ea5e34e0d71f4d047c2d7299 Mon Sep 17 00:00:00 2001 From: hskwon Date: Mon, 22 Dec 2025 16:38:15 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EA=B2=AC=EC=A0=81=EC=88=98=EC=8B=9D=20?= =?UTF-8?q?=EC=BC=80=EC=9D=B4=EC=8A=A4=203600/6000=20=ED=92=88=EB=AA=A9=20?= =?UTF-8?q?=EB=B0=8F=20=EB=B2=94=EC=9C=84=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PT-CASE-3600 (3600mm, 180,000원) 품목 추가 - PT-CASE-6000 (6000mm, 280,000원) 품목 추가 - CASE_AUTO_SELECT 범위에 3600, 6000 구간 추가 - 5130 레거시 데이터 기반 가격 적용 --- database/seeders/QuoteFormulaItemSeeder.php | 144 +++++++++++++++++--- database/seeders/QuoteFormulaSeeder.php | 23 +++- 2 files changed, 144 insertions(+), 23 deletions(-) diff --git a/database/seeders/QuoteFormulaItemSeeder.php b/database/seeders/QuoteFormulaItemSeeder.php index d8046f3..c50010e 100644 --- a/database/seeders/QuoteFormulaItemSeeder.php +++ b/database/seeders/QuoteFormulaItemSeeder.php @@ -33,6 +33,16 @@ public function run(): void // ============================== if (isset($formulas['GR_AUTO_SELECT'])) { $items = array_merge($items, [ + [ + 'formula_id' => $formulas['GR_AUTO_SELECT'], + 'item_code' => 'PT-GR-1219', + 'item_name' => '가이드레일 1219', + 'specification' => '1219mm', + 'unit' => 'EA', + 'quantity_formula' => '2', + 'unit_price_formula' => '28000', + 'sort_order' => 1, + ], [ 'formula_id' => $formulas['GR_AUTO_SELECT'], 'item_code' => 'PT-GR-2438', @@ -41,7 +51,7 @@ public function run(): void 'unit' => 'EA', 'quantity_formula' => '2', 'unit_price_formula' => '35000', - 'sort_order' => 1, + 'sort_order' => 2, ], [ 'formula_id' => $formulas['GR_AUTO_SELECT'], @@ -51,7 +61,7 @@ public function run(): void 'unit' => 'EA', 'quantity_formula' => '2', 'unit_price_formula' => '42000', - 'sort_order' => 2, + 'sort_order' => 3, ], [ 'formula_id' => $formulas['GR_AUTO_SELECT'], @@ -61,7 +71,7 @@ public function run(): void 'unit' => 'EA', 'quantity_formula' => '2', 'unit_price_formula' => '50000', - 'sort_order' => 3, + 'sort_order' => 4, ], ]); } @@ -101,11 +111,31 @@ public function run(): void 'unit_price_formula' => '150000', 'sort_order' => 3, ], + [ + 'formula_id' => $formulas['CASE_AUTO_SELECT'], + 'item_code' => 'PT-CASE-3600', + 'item_name' => '케이스 3600', + 'specification' => '3600mm', + 'unit' => 'EA', + 'quantity_formula' => '1', + 'unit_price_formula' => '180000', + 'sort_order' => 4, + ], + [ + 'formula_id' => $formulas['CASE_AUTO_SELECT'], + 'item_code' => 'PT-CASE-6000', + 'item_name' => '케이스 6000', + 'specification' => '6000mm', + 'unit' => 'EA', + 'quantity_formula' => '1', + 'unit_price_formula' => '280000', + 'sort_order' => 5, + ], ]); } // ============================== - // 3. 모터(개폐전동기) 품목 + // 3. 모터(개폐전동기) 품목 - 5130 실제 가격 기준 // ============================== if (isset($formulas['MOTOR_AUTO_SELECT'])) { $items = array_merge($items, [ @@ -113,37 +143,97 @@ public function run(): void 'formula_id' => $formulas['MOTOR_AUTO_SELECT'], 'item_code' => 'PT-MOTOR-150', 'item_name' => '개폐전동기 150kg', - 'specification' => '150kg', + 'specification' => '150K(S)', 'unit' => 'EA', 'quantity_formula' => '1', - 'unit_price_formula' => '280000', + 'unit_price_formula' => '285000', // 5130: 285,000원 'sort_order' => 1, ], [ 'formula_id' => $formulas['MOTOR_AUTO_SELECT'], 'item_code' => 'PT-MOTOR-300', 'item_name' => '개폐전동기 300kg', - 'specification' => '300kg', + 'specification' => '300K', 'unit' => 'EA', 'quantity_formula' => '1', - 'unit_price_formula' => '380000', + 'unit_price_formula' => '300000', // 5130: 300,000원 'sort_order' => 2, ], [ 'formula_id' => $formulas['MOTOR_AUTO_SELECT'], 'item_code' => 'PT-MOTOR-400', 'item_name' => '개폐전동기 400kg', - 'specification' => '400kg', + 'specification' => '400K', 'unit' => 'EA', 'quantity_formula' => '1', - 'unit_price_formula' => '480000', + 'unit_price_formula' => '330000', // 5130: 330,000원 'sort_order' => 3, ], + [ + 'formula_id' => $formulas['MOTOR_AUTO_SELECT'], + 'item_code' => 'PT-MOTOR-500', + 'item_name' => '개폐전동기 500kg', + 'specification' => '500K', + 'unit' => 'EA', + 'quantity_formula' => '1', + 'unit_price_formula' => '370000', // 5130: 370,000원 + 'sort_order' => 4, + ], + [ + 'formula_id' => $formulas['MOTOR_AUTO_SELECT'], + 'item_code' => 'PT-MOTOR-600', + 'item_name' => '개폐전동기 600kg', + 'specification' => '600K', + 'unit' => 'EA', + 'quantity_formula' => '1', + 'unit_price_formula' => '380000', // 5130: 380,000원 + 'sort_order' => 5, + ], + [ + 'formula_id' => $formulas['MOTOR_AUTO_SELECT'], + 'item_code' => 'PT-MOTOR-800', + 'item_name' => '개폐전동기 800kg', + 'specification' => '800K', + 'unit' => 'EA', + 'quantity_formula' => '1', + 'unit_price_formula' => '550000', // 5130: 550,000원 + 'sort_order' => 6, + ], + [ + 'formula_id' => $formulas['MOTOR_AUTO_SELECT'], + 'item_code' => 'PT-MOTOR-1000', + 'item_name' => '개폐전동기 1000kg', + 'specification' => '1000K', + 'unit' => 'EA', + 'quantity_formula' => '1', + 'unit_price_formula' => '600000', // 5130: 600,000원 + 'sort_order' => 7, + ], + [ + 'formula_id' => $formulas['MOTOR_AUTO_SELECT'], + 'item_code' => 'PT-MOTOR-1500', + 'item_name' => '개폐전동기 1500kg', + 'specification' => '1500K', + 'unit' => 'EA', + 'quantity_formula' => '1', + 'unit_price_formula' => '1300000', // 5130: 1,300,000원 + 'sort_order' => 8, + ], + [ + 'formula_id' => $formulas['MOTOR_AUTO_SELECT'], + 'item_code' => 'PT-MOTOR-2000', + 'item_name' => '개폐전동기 2000kg', + 'specification' => '2000K', + 'unit' => 'EA', + 'quantity_formula' => '1', + 'unit_price_formula' => '1600000', // 5130: 1,600,000원 + 'sort_order' => 9, + ], ]); } // ============================== - // 4. 제어기 품목 + // 4. 제어기 품목 - 5130 실제 가격 기준 // ============================== if (isset($formulas['CTRL_AUTO_SELECT'])) { $items = array_merge($items, [ @@ -154,7 +244,7 @@ public function run(): void 'specification' => '매립형', 'unit' => 'EA', 'quantity_formula' => '1', - 'unit_price_formula' => '65000', + 'unit_price_formula' => '130000', // 5130: 130,000원 'sort_order' => 1, ], [ @@ -164,19 +254,39 @@ public function run(): void 'specification' => '노출형', 'unit' => 'EA', 'quantity_formula' => '1', - 'unit_price_formula' => '55000', + 'unit_price_formula' => '130000', // 5130: 130,000원 'sort_order' => 2, ], [ 'formula_id' => $formulas['CTRL_AUTO_SELECT'], - 'item_code' => 'PT-CTRL-INT', - 'item_name' => '일체형 제어기', - 'specification' => '모터일체형', + 'item_code' => 'PT-CTRL-BOX-1P', + 'item_name' => '콘트롤박스 단상', + 'specification' => '단상', 'unit' => 'EA', 'quantity_formula' => '1', - 'unit_price_formula' => '45000', + 'unit_price_formula' => '100000', // 5130: 100,000원 'sort_order' => 3, ], + [ + 'formula_id' => $formulas['CTRL_AUTO_SELECT'], + 'item_code' => 'PT-CTRL-BOX-3P', + 'item_name' => '콘트롤박스 삼상', + 'specification' => '삼상', + 'unit' => 'EA', + 'quantity_formula' => '1', + 'unit_price_formula' => '100000', // 5130: 100,000원 + 'sort_order' => 4, + ], + [ + 'formula_id' => $formulas['CTRL_AUTO_SELECT'], + 'item_code' => 'PT-CTRL-BOX-1500K', + 'item_name' => '콘트롤박스 1500K', + 'specification' => '1500K용', + 'unit' => 'EA', + 'quantity_formula' => '1', + 'unit_price_formula' => '150000', // 5130: 150,000원 + 'sort_order' => 5, + ], ]); } diff --git a/database/seeders/QuoteFormulaSeeder.php b/database/seeders/QuoteFormulaSeeder.php index 1cac292..7ceff15 100644 --- a/database/seeders/QuoteFormulaSeeder.php +++ b/database/seeders/QuoteFormulaSeeder.php @@ -157,8 +157,10 @@ public function run(): void 'metadata' => ['unit' => 'EA', 'input_variable' => 'G'], 'sort_order' => 2, 'ranges' => [ - ['min' => 1219, 'max' => 2438, 'result' => '2438 2개', 'quantity' => 2, 'description' => '1219 < G ≤ 2438'], - ['min' => 2438, 'max' => 3000, 'result' => '3000 2개', 'quantity' => 2, 'description' => '2438 < G ≤ 3000'], + ['min' => 0, 'max' => 1219, 'result' => '1219 2개', 'item_code' => 'PT-GR-1219', 'quantity' => 2, 'description' => '0 < G ≤ 1219'], + ['min' => 1219, 'max' => 2438, 'result' => '2438 2개', 'item_code' => 'PT-GR-2438', 'quantity' => 2, 'description' => '1219 < G ≤ 2438'], + ['min' => 2438, 'max' => 3000, 'result' => '3000 2개', 'item_code' => 'PT-GR-3000', 'quantity' => 2, 'description' => '2438 < G ≤ 3000'], + ['min' => 3000, 'max' => 3600, 'result' => '3600 2개', 'item_code' => 'PT-GR-3600', 'quantity' => 2, 'description' => '3000 < G ≤ 3600'], ], ], [ @@ -231,11 +233,14 @@ public function run(): void ['min' => 0, 'max' => 1219, 'result' => '1219 1개', 'item_code' => 'PT-CASE-1219', 'quantity' => 1, 'description' => '0 < S ≤ 1219'], ['min' => 1219, 'max' => 2438, 'result' => '2438 1개', 'item_code' => 'PT-CASE-2438', 'quantity' => 1, 'description' => '1219 < S ≤ 2438'], ['min' => 2438, 'max' => 3000, 'result' => '3000 1개', 'item_code' => 'PT-CASE-3000', 'quantity' => 1, 'description' => '2438 < S ≤ 3000'], + ['min' => 3000, 'max' => 3600, 'result' => '3600 1개', 'item_code' => 'PT-CASE-3600', 'quantity' => 1, 'description' => '3000 < S ≤ 3600'], + ['min' => 3600, 'max' => 6000, 'result' => '6000 1개', 'item_code' => 'PT-CASE-6000', 'quantity' => 1, 'description' => '3600 < S ≤ 6000'], ], ], // ============================== // 7. 모터 (MOTOR) - 1개 + // 5130 기준 모터 규격: 150K, 300K, 400K, 500K, 600K, 800K, 1000K, 1500K, 2000K // ============================== [ 'category_code' => 'MOTOR', @@ -243,13 +248,19 @@ public function run(): void 'name' => '모터 자동 선택', 'type' => 'range', 'formula' => null, - 'description' => '모터 중량 기반 자동 선택 (전원 유형 반영)', + 'description' => '모터 중량 기반 자동 선택 (5130 실제 규격 기준)', 'metadata' => ['unit' => 'EA', 'input_variable' => 'K'], 'sort_order' => 1, 'ranges' => [ - ['min' => 0, 'max' => 150, 'result' => '150k', 'quantity' => 1, 'description' => '0 < K ≤ 150kg'], - ['min' => 150, 'max' => 300, 'result' => '300k', 'quantity' => 1, 'description' => '150 < K ≤ 300kg'], - ['min' => 300, 'max' => 400, 'result' => '400k', 'quantity' => 1, 'description' => '300 < K ≤ 400kg'], + ['min' => 0, 'max' => 150, 'result' => '150K', 'item_code' => 'PT-MOTOR-150', 'quantity' => 1, 'description' => '0 < K ≤ 150kg'], + ['min' => 150, 'max' => 300, 'result' => '300K', 'item_code' => 'PT-MOTOR-300', 'quantity' => 1, 'description' => '150 < K ≤ 300kg'], + ['min' => 300, 'max' => 400, 'result' => '400K', 'item_code' => 'PT-MOTOR-400', 'quantity' => 1, 'description' => '300 < K ≤ 400kg'], + ['min' => 400, 'max' => 500, 'result' => '500K', 'item_code' => 'PT-MOTOR-500', 'quantity' => 1, 'description' => '400 < K ≤ 500kg'], + ['min' => 500, 'max' => 600, 'result' => '600K', 'item_code' => 'PT-MOTOR-600', 'quantity' => 1, 'description' => '500 < K ≤ 600kg'], + ['min' => 600, 'max' => 800, 'result' => '800K', 'item_code' => 'PT-MOTOR-800', 'quantity' => 1, 'description' => '600 < K ≤ 800kg'], + ['min' => 800, 'max' => 1000, 'result' => '1000K', 'item_code' => 'PT-MOTOR-1000', 'quantity' => 1, 'description' => '800 < K ≤ 1000kg'], + ['min' => 1000, 'max' => 1500, 'result' => '1500K', 'item_code' => 'PT-MOTOR-1500', 'quantity' => 1, 'description' => '1000 < K ≤ 1500kg'], + ['min' => 1500, 'max' => 2000, 'result' => '2000K', 'item_code' => 'PT-MOTOR-2000', 'quantity' => 1, 'description' => '1500 < K ≤ 2000kg'], ], ],