690 lines
45 KiB
PHP
690 lines
45 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
/**
|
|
* Design 시뮬레이터 샘플 품목 시더
|
|
*
|
|
* Design 시스템과 동일한 품목 및 BOM 데이터를 생성합니다.
|
|
* - 원자재 (RM): 20종
|
|
* - 부자재 (SM): 25종
|
|
* - 스크린 반제품 (SF): 20종
|
|
* - 철재/절곡 반제품 (SF): 20종
|
|
* - 완제품 (FG): 14종 (스크린 5 + 철재 5 + 절곡 4)
|
|
*
|
|
* 사용법:
|
|
* php artisan db:seed --class=DesignItemSeeder
|
|
*/
|
|
class DesignItemSeeder extends Seeder
|
|
{
|
|
protected int $tenantId = 1;
|
|
|
|
public function run(): void
|
|
{
|
|
$this->command->info('Design 샘플 품목 시딩 시작...');
|
|
|
|
DB::transaction(function () {
|
|
// 기존 Design 샘플 품목 삭제 (RM-, SM-, SF-, FG- 접두사)
|
|
DB::table('items')
|
|
->where('tenant_id', $this->tenantId)
|
|
->where(function ($query) {
|
|
$query->where('code', 'like', 'RM-%')
|
|
->orWhere('code', 'like', 'SM-%')
|
|
->orWhere('code', 'like', 'SF-%')
|
|
->orWhere('code', 'like', 'FG-%')
|
|
->orWhere('code', 'like', 'PT-%');
|
|
})
|
|
->delete();
|
|
|
|
$this->seedRawMaterials();
|
|
$this->seedQuoteFormulaParts();
|
|
$this->seedSubMaterials();
|
|
$this->seedScreenSemiProducts();
|
|
$this->seedSteelSemiProducts();
|
|
$this->seedFinishedProducts();
|
|
});
|
|
|
|
$count = DB::table('items')
|
|
->where('tenant_id', $this->tenantId)
|
|
->where(function ($query) {
|
|
$query->where('code', 'like', 'RM-%')
|
|
->orWhere('code', 'like', 'SM-%')
|
|
->orWhere('code', 'like', 'SF-%')
|
|
->orWhere('code', 'like', 'FG-%')
|
|
->orWhere('code', 'like', 'PT-%');
|
|
})
|
|
->count();
|
|
|
|
$this->command->info("Design 샘플 품목 시딩 완료! (총 {$count}개)");
|
|
}
|
|
|
|
/**
|
|
* 원자재 (RM) 20종
|
|
*/
|
|
protected function seedRawMaterials(): void
|
|
{
|
|
$items = [
|
|
['code' => 'RM-S001', 'name' => '강판 1.2T', 'unit' => 'KG', 'price' => 3500, 'category' => '강판', 'process' => 'steel'],
|
|
['code' => 'RM-S002', 'name' => '강판 1.6T', 'unit' => 'KG', 'price' => 3800, 'category' => '강판', 'process' => 'steel'],
|
|
['code' => 'RM-S003', 'name' => '강판 2.0T', 'unit' => 'KG', 'price' => 4200, 'category' => '강판', 'process' => 'steel'],
|
|
['code' => 'RM-S004', 'name' => '강판 2.3T', 'unit' => 'KG', 'price' => 4500, 'category' => '강판', 'process' => 'steel'],
|
|
['code' => 'RM-A001', 'name' => '알루미늄 프로파일', 'unit' => 'M', 'price' => 15000, 'category' => '알루미늄', 'process' => 'bending'],
|
|
['code' => 'RM-A002', 'name' => '알루미늄 판재 2.0T', 'unit' => 'KG', 'price' => 8500, 'category' => '알루미늄', 'process' => 'bending'],
|
|
['code' => 'RM-P001', 'name' => '파우더 도료 (흰색)', 'unit' => 'KG', 'price' => 12000, 'category' => '도장', 'process' => 'screen'],
|
|
['code' => 'RM-P002', 'name' => '파우더 도료 (검정)', 'unit' => 'KG', 'price' => 12000, 'category' => '도장', 'process' => 'screen'],
|
|
['code' => 'RM-P003', 'name' => '파우더 도료 (회색)', 'unit' => 'KG', 'price' => 12000, 'category' => '도장', 'process' => 'screen'],
|
|
['code' => 'RM-F001', 'name' => '방화원단 A급', 'unit' => 'M2', 'price' => 28000, 'category' => '원단', 'process' => 'screen'],
|
|
['code' => 'RM-F002', 'name' => '방화원단 B급', 'unit' => 'M2', 'price' => 22000, 'category' => '원단', 'process' => 'screen'],
|
|
['code' => 'RM-R001', 'name' => '고무 패킹 3mm', 'unit' => 'M', 'price' => 3500, 'category' => '패킹', 'process' => 'assembly'],
|
|
['code' => 'RM-R002', 'name' => '고무 패킹 5mm', 'unit' => 'M', 'price' => 4200, 'category' => '패킹', 'process' => 'assembly'],
|
|
['code' => 'RM-W001', 'name' => '목재 (집성목)', 'unit' => 'M', 'price' => 25000, 'category' => '목재', 'process' => 'steel'],
|
|
['code' => 'RM-G001', 'name' => '유리섬유', 'unit' => 'KG', 'price' => 15000, 'category' => '유리', 'process' => 'steel'],
|
|
['code' => 'RM-I001', 'name' => '단열재 50mm', 'unit' => 'M2', 'price' => 12000, 'category' => '단열재', 'process' => 'steel'],
|
|
['code' => 'RM-I002', 'name' => '단열재 100mm', 'unit' => 'M2', 'price' => 18000, 'category' => '단열재', 'process' => 'steel'],
|
|
['code' => 'RM-C001', 'name' => '케이블 피복재', 'unit' => 'M', 'price' => 2800, 'category' => '전선', 'process' => 'electric'],
|
|
['code' => 'RM-ST001', 'name' => 'STS304 판재', 'unit' => 'KG', 'price' => 9500, 'category' => '스테인리스', 'process' => 'bending'],
|
|
['code' => 'RM-Z001', 'name' => '아연도금강판', 'unit' => 'KG', 'price' => 4800, 'category' => '강판', 'process' => 'steel'],
|
|
];
|
|
|
|
$this->insertItems($items, 'RM');
|
|
}
|
|
|
|
/**
|
|
* 견적공식 시뮬레이터용 파트 품목 (PT) 18종
|
|
* - 가이드레일 (PT-GR): 4종
|
|
* - 케이스 (PT-CASE): 5종
|
|
* - 모터 (PT-MOTOR): 9종
|
|
*/
|
|
protected function seedQuoteFormulaParts(): void
|
|
{
|
|
$items = [
|
|
// 가이드레일 (높이별 선택) - G 변수 기준
|
|
['code' => 'PT-GR-1219', 'name' => '가이드레일 1219mm', 'unit' => 'EA', 'price' => 35000, 'category' => '가이드레일', 'process' => 'screen'],
|
|
['code' => 'PT-GR-2438', 'name' => '가이드레일 2438mm', 'unit' => 'EA', 'price' => 55000, 'category' => '가이드레일', 'process' => 'screen'],
|
|
['code' => 'PT-GR-3000', 'name' => '가이드레일 3000mm', 'unit' => 'EA', 'price' => 68000, 'category' => '가이드레일', 'process' => 'screen'],
|
|
['code' => 'PT-GR-3600', 'name' => '가이드레일 3600mm', 'unit' => 'EA', 'price' => 82000, 'category' => '가이드레일', 'process' => 'screen'],
|
|
|
|
// 케이스 (폭별 선택) - S 변수 기준
|
|
['code' => 'PT-CASE-1219', 'name' => '상부 케이스 1219mm', 'unit' => 'EA', 'price' => 95000, 'category' => '케이스', 'process' => 'screen'],
|
|
['code' => 'PT-CASE-2438', 'name' => '상부 케이스 2438mm', 'unit' => 'EA', 'price' => 145000, 'category' => '케이스', 'process' => 'screen'],
|
|
['code' => 'PT-CASE-3000', 'name' => '상부 케이스 3000mm', 'unit' => 'EA', 'price' => 175000, 'category' => '케이스', 'process' => 'screen'],
|
|
['code' => 'PT-CASE-3600', 'name' => '상부 케이스 3600mm', 'unit' => 'EA', 'price' => 210000, 'category' => '케이스', 'process' => 'screen'],
|
|
['code' => 'PT-CASE-6000', 'name' => '상부 케이스 6000mm', 'unit' => 'EA', 'price' => 350000, 'category' => '케이스', 'process' => 'screen'],
|
|
|
|
// 모터 (무게별 선택) - K 변수 기준
|
|
['code' => 'PT-MOTOR-150', 'name' => '모터 150K', 'unit' => 'EA', 'price' => 280000, 'category' => '모터', 'process' => 'screen'],
|
|
['code' => 'PT-MOTOR-300', 'name' => '모터 300K', 'unit' => 'EA', 'price' => 350000, 'category' => '모터', 'process' => 'screen'],
|
|
['code' => 'PT-MOTOR-400', 'name' => '모터 400K', 'unit' => 'EA', 'price' => 420000, 'category' => '모터', 'process' => 'screen'],
|
|
['code' => 'PT-MOTOR-500', 'name' => '모터 500K', 'unit' => 'EA', 'price' => 480000, 'category' => '모터', 'process' => 'screen'],
|
|
['code' => 'PT-MOTOR-600', 'name' => '모터 600K', 'unit' => 'EA', 'price' => 550000, 'category' => '모터', 'process' => 'screen'],
|
|
['code' => 'PT-MOTOR-800', 'name' => '모터 800K', 'unit' => 'EA', 'price' => 620000, 'category' => '모터', 'process' => 'screen'],
|
|
['code' => 'PT-MOTOR-1000', 'name' => '모터 1000K', 'unit' => 'EA', 'price' => 720000, 'category' => '모터', 'process' => 'screen'],
|
|
['code' => 'PT-MOTOR-1500', 'name' => '모터 1500K', 'unit' => 'EA', 'price' => 850000, 'category' => '모터', 'process' => 'screen'],
|
|
['code' => 'PT-MOTOR-2000', 'name' => '모터 2000K', 'unit' => 'EA', 'price' => 980000, 'category' => '모터', 'process' => 'screen'],
|
|
];
|
|
|
|
$this->insertItems($items, 'PT');
|
|
}
|
|
|
|
/**
|
|
* 부자재 (SM) 25종
|
|
*/
|
|
protected function seedSubMaterials(): void
|
|
{
|
|
$items = [
|
|
['code' => 'SM-B001', 'name' => '볼트 M8x30', 'unit' => 'EA', 'price' => 150, 'category' => '볼트', 'process' => 'assembly'],
|
|
['code' => 'SM-B002', 'name' => '볼트 M10x40', 'unit' => 'EA', 'price' => 200, 'category' => '볼트', 'process' => 'assembly'],
|
|
['code' => 'SM-B003', 'name' => '볼트 M12x50', 'unit' => 'EA', 'price' => 280, 'category' => '볼트', 'process' => 'assembly'],
|
|
['code' => 'SM-N001', 'name' => '너트 M8', 'unit' => 'EA', 'price' => 80, 'category' => '너트', 'process' => 'assembly'],
|
|
['code' => 'SM-N002', 'name' => '너트 M10', 'unit' => 'EA', 'price' => 100, 'category' => '너트', 'process' => 'assembly'],
|
|
['code' => 'SM-N003', 'name' => '너트 M12', 'unit' => 'EA', 'price' => 120, 'category' => '너트', 'process' => 'assembly'],
|
|
['code' => 'SM-W001', 'name' => '와셔 M8', 'unit' => 'EA', 'price' => 50, 'category' => '와셔', 'process' => 'assembly'],
|
|
['code' => 'SM-W002', 'name' => '와셔 M10', 'unit' => 'EA', 'price' => 60, 'category' => '와셔', 'process' => 'assembly'],
|
|
['code' => 'SM-W003', 'name' => '와셔 M12', 'unit' => 'EA', 'price' => 70, 'category' => '와셔', 'process' => 'assembly'],
|
|
['code' => 'SM-R001', 'name' => '리벳 4x10', 'unit' => 'EA', 'price' => 40, 'category' => '리벳', 'process' => 'assembly'],
|
|
['code' => 'SM-R002', 'name' => '리벳 5x12', 'unit' => 'EA', 'price' => 50, 'category' => '리벳', 'process' => 'assembly'],
|
|
['code' => 'SM-A001', 'name' => '앵커볼트 M10', 'unit' => 'EA', 'price' => 350, 'category' => '앵커', 'process' => 'assembly'],
|
|
['code' => 'SM-A002', 'name' => '앵커볼트 M12', 'unit' => 'EA', 'price' => 450, 'category' => '앵커', 'process' => 'assembly'],
|
|
['code' => 'SM-S001', 'name' => '실리콘 (투명)', 'unit' => 'EA', 'price' => 8500, 'category' => '실링재', 'process' => 'assembly'],
|
|
['code' => 'SM-S002', 'name' => '실리콘 (백색)', 'unit' => 'EA', 'price' => 8500, 'category' => '실링재', 'process' => 'assembly'],
|
|
['code' => 'SM-T001', 'name' => '양면테이프 20mm', 'unit' => 'M', 'price' => 1200, 'category' => '테이프', 'process' => 'assembly'],
|
|
['code' => 'SM-C001', 'name' => '케이블타이 200mm', 'unit' => 'EA', 'price' => 100, 'category' => '케이블', 'process' => 'electric'],
|
|
['code' => 'SM-P001', 'name' => '보호필름', 'unit' => 'M2', 'price' => 2500, 'category' => '필름', 'process' => 'screen'],
|
|
['code' => 'SM-G001', 'name' => '그리스', 'unit' => 'EA', 'price' => 12000, 'category' => '윤활', 'process' => 'assembly'],
|
|
['code' => 'SM-O001', 'name' => '윤활유', 'unit' => 'L', 'price' => 15000, 'category' => '윤활', 'process' => 'assembly'],
|
|
['code' => 'SM-E001', 'name' => '전선 2.5SQ', 'unit' => 'M', 'price' => 1800, 'category' => '전선', 'process' => 'electric'],
|
|
['code' => 'SM-E002', 'name' => '전선 4.0SQ', 'unit' => 'M', 'price' => 2500, 'category' => '전선', 'process' => 'electric'],
|
|
['code' => 'SM-L001', 'name' => 'LED 표시등', 'unit' => 'EA', 'price' => 5500, 'category' => '전기', 'process' => 'electric'],
|
|
['code' => 'SM-WD001', 'name' => '용접봉 3.2mm', 'unit' => 'KG', 'price' => 8500, 'category' => '용접', 'process' => 'steel'],
|
|
['code' => 'SM-SP001', 'name' => '스프링와셔 M10', 'unit' => 'EA', 'price' => 90, 'category' => '와셔', 'process' => 'assembly'],
|
|
];
|
|
|
|
$this->insertItems($items, 'SM');
|
|
}
|
|
|
|
/**
|
|
* 스크린용 반제품 (SF-SCR) 20종
|
|
*/
|
|
protected function seedScreenSemiProducts(): void
|
|
{
|
|
$items = [
|
|
['code' => 'SF-SCR-F01', 'name' => '스크린 원단', 'unit' => 'M2', 'price' => 35000, 'category' => '스크린원단', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-F02', 'name' => '가이드레일 (좌)', 'unit' => 'M', 'price' => 42000, 'category' => '가이드레일', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-F03', 'name' => '가이드레일 (우)', 'unit' => 'M', 'price' => 42000, 'category' => '가이드레일', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-F04', 'name' => '상부 케이스', 'unit' => 'EA', 'price' => 145000, 'category' => '케이스', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-F05', 'name' => '하부 바텀바', 'unit' => 'EA', 'price' => 55000, 'category' => '바텀바', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-M01', 'name' => '모터 (0.75KW)', 'unit' => 'EA', 'price' => 350000, 'category' => '모터', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-M02', 'name' => '모터 (1.5KW)', 'unit' => 'EA', 'price' => 480000, 'category' => '모터', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-M03', 'name' => '모터 (2.2KW)', 'unit' => 'EA', 'price' => 620000, 'category' => '모터', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-M04', 'name' => '모터 (3.7KW)', 'unit' => 'EA', 'price' => 850000, 'category' => '모터', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-C01', 'name' => '제어반 (표준)', 'unit' => 'EA', 'price' => 280000, 'category' => '제어반', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-C02', 'name' => '제어반 (고급)', 'unit' => 'EA', 'price' => 450000, 'category' => '제어반', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-S01', 'name' => '감지기 세트', 'unit' => 'SET', 'price' => 180000, 'category' => '감지기', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-W01', 'name' => '권취축', 'unit' => 'EA', 'price' => 125000, 'category' => '권취축', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-B01', 'name' => '브라켓 세트', 'unit' => 'SET', 'price' => 78000, 'category' => '브라켓', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-E01', 'name' => '엣지윙 (좌)', 'unit' => 'M', 'price' => 15000, 'category' => '엣지윙', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-E02', 'name' => '엣지윙 (우)', 'unit' => 'M', 'price' => 15000, 'category' => '엣지윙', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-SP01', 'name' => '스프링 세트', 'unit' => 'SET', 'price' => 45000, 'category' => '스프링', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-CH01', 'name' => '체인 세트', 'unit' => 'SET', 'price' => 65000, 'category' => '체인', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-REM01', 'name' => '리모컨', 'unit' => 'EA', 'price' => 85000, 'category' => '리모컨', 'process' => 'screen'],
|
|
['code' => 'SF-SCR-SW01', 'name' => '스위치 BOX', 'unit' => 'EA', 'price' => 45000, 'category' => '스위치', 'process' => 'screen'],
|
|
];
|
|
|
|
$this->insertItems($items, 'SF');
|
|
}
|
|
|
|
/**
|
|
* 철재/절곡용 반제품 (SF-STL/BND) 20종
|
|
*/
|
|
protected function seedSteelSemiProducts(): void
|
|
{
|
|
$items = [
|
|
['code' => 'SF-STL-D01', 'name' => '철재 도어', 'unit' => 'EA', 'price' => 320000, 'category' => '도어', 'process' => 'steel'],
|
|
['code' => 'SF-STL-F01', 'name' => '철재 프레임', 'unit' => 'M', 'price' => 58000, 'category' => '프레임', 'process' => 'steel'],
|
|
['code' => 'SF-STL-P01', 'name' => '철재 패널', 'unit' => 'M2', 'price' => 68000, 'category' => '패널', 'process' => 'steel'],
|
|
['code' => 'SF-STL-H01', 'name' => '경첩 세트 (표준)', 'unit' => 'SET', 'price' => 42000, 'category' => '경첩', 'process' => 'steel'],
|
|
['code' => 'SF-STL-H02', 'name' => '경첩 세트 (중형)', 'unit' => 'SET', 'price' => 58000, 'category' => '경첩', 'process' => 'steel'],
|
|
['code' => 'SF-STL-L01', 'name' => '도어락 (기계식)', 'unit' => 'EA', 'price' => 95000, 'category' => '도어락', 'process' => 'steel'],
|
|
['code' => 'SF-STL-L02', 'name' => '도어락 (전자식)', 'unit' => 'EA', 'price' => 380000, 'category' => '도어락', 'process' => 'steel'],
|
|
['code' => 'SF-STL-C01', 'name' => '도어클로저', 'unit' => 'EA', 'price' => 115000, 'category' => '도어클로저', 'process' => 'steel'],
|
|
['code' => 'SF-STL-S01', 'name' => '실링재', 'unit' => 'M', 'price' => 9500, 'category' => '실링재', 'process' => 'steel'],
|
|
['code' => 'SF-STL-G01', 'name' => '유리 (방화)', 'unit' => 'M2', 'price' => 220000, 'category' => '유리', 'process' => 'steel'],
|
|
['code' => 'SF-STL-T01', 'name' => '문턱', 'unit' => 'EA', 'price' => 58000, 'category' => '문턱', 'process' => 'steel'],
|
|
['code' => 'SF-STL-V01', 'name' => '환기구', 'unit' => 'EA', 'price' => 75000, 'category' => '환기구', 'process' => 'steel'],
|
|
['code' => 'SF-STL-K01', 'name' => '킥플레이트', 'unit' => 'EA', 'price' => 45000, 'category' => '킥플레이트', 'process' => 'steel'],
|
|
['code' => 'SF-STL-W01', 'name' => '창틀', 'unit' => 'M', 'price' => 35000, 'category' => '창틀', 'process' => 'steel'],
|
|
['code' => 'SF-STL-B01', 'name' => '볼트/너트 세트', 'unit' => 'SET', 'price' => 18000, 'category' => '볼트', 'process' => 'steel'],
|
|
['code' => 'SF-STL-P02', 'name' => '파우더 도장', 'unit' => 'M2', 'price' => 32000, 'category' => '도장', 'process' => 'steel'],
|
|
['code' => 'SF-BND-L01', 'name' => '절곡 L형 브라켓', 'unit' => 'EA', 'price' => 28000, 'category' => '절곡', 'process' => 'bending'],
|
|
['code' => 'SF-BND-U01', 'name' => '절곡 U형 채널', 'unit' => 'M', 'price' => 42000, 'category' => '절곡', 'process' => 'bending'],
|
|
['code' => 'SF-BND-Z01', 'name' => '절곡 Z형 앵글', 'unit' => 'M', 'price' => 38000, 'category' => '절곡', 'process' => 'bending'],
|
|
['code' => 'SF-BND-C01', 'name' => '절곡 ㄷ형 보강재', 'unit' => 'M', 'price' => 35000, 'category' => '절곡', 'process' => 'bending'],
|
|
];
|
|
|
|
$this->insertItems($items, 'SF');
|
|
}
|
|
|
|
/**
|
|
* 완제품 (FG) 14종
|
|
*/
|
|
protected function seedFinishedProducts(): void
|
|
{
|
|
// 스크린 완제품 5종
|
|
$screenProducts = [
|
|
[
|
|
'code' => 'FG-SCR-001',
|
|
'name' => '방화 스크린 셔터 (소형)',
|
|
'unit' => 'EA',
|
|
'price' => 1050000,
|
|
'category' => 'SCREEN',
|
|
'process' => 'screen',
|
|
'bom' => $this->getScreenBom001(),
|
|
],
|
|
[
|
|
'code' => 'FG-SCR-002',
|
|
'name' => '방화 스크린 셔터 (중형)',
|
|
'unit' => 'EA',
|
|
'price' => 1150000,
|
|
'category' => 'SCREEN',
|
|
'process' => 'screen',
|
|
'bom' => $this->getScreenBom002(),
|
|
],
|
|
[
|
|
'code' => 'FG-SCR-003',
|
|
'name' => '방화 스크린 셔터 (대형)',
|
|
'unit' => 'EA',
|
|
'price' => 1300000,
|
|
'category' => 'SCREEN',
|
|
'process' => 'screen',
|
|
'bom' => $this->getScreenBom003(),
|
|
],
|
|
[
|
|
'code' => 'FG-SCR-004',
|
|
'name' => '방화 스크린 셔터 (특대)',
|
|
'unit' => 'EA',
|
|
'price' => 1500000,
|
|
'category' => 'SCREEN',
|
|
'process' => 'screen',
|
|
'bom' => $this->getScreenBom004(),
|
|
],
|
|
[
|
|
'code' => 'FG-SCR-005',
|
|
'name' => '방화 스크린 셔터 (맞춤형)',
|
|
'unit' => 'EA',
|
|
'price' => 1230000,
|
|
'category' => 'SCREEN',
|
|
'process' => 'screen',
|
|
'bom' => $this->getScreenBom005(),
|
|
],
|
|
];
|
|
|
|
foreach ($screenProducts as $item) {
|
|
$this->insertFinishedProduct($item);
|
|
}
|
|
|
|
// 철재 완제품 5종
|
|
$steelProducts = [
|
|
[
|
|
'code' => 'FG-STL-001',
|
|
'name' => '철재 방화문 (소형)',
|
|
'unit' => 'EA',
|
|
'price' => 1000000,
|
|
'category' => 'STEEL',
|
|
'process' => 'steel',
|
|
'bom' => $this->getSteelBom001(),
|
|
],
|
|
[
|
|
'code' => 'FG-STL-002',
|
|
'name' => '철재 방화문 (중형)',
|
|
'unit' => 'EA',
|
|
'price' => 1120000,
|
|
'category' => 'STEEL',
|
|
'process' => 'steel',
|
|
'bom' => $this->getSteelBom002(),
|
|
],
|
|
[
|
|
'code' => 'FG-STL-003',
|
|
'name' => '철재 방화문 (대형)',
|
|
'unit' => 'EA',
|
|
'price' => 1280000,
|
|
'category' => 'STEEL',
|
|
'process' => 'steel',
|
|
'bom' => $this->getSteelBom003(),
|
|
],
|
|
[
|
|
'code' => 'FG-STL-004',
|
|
'name' => '철재 방화문 (양개)',
|
|
'unit' => 'EA',
|
|
'price' => 1200000,
|
|
'category' => 'STEEL',
|
|
'process' => 'steel',
|
|
'bom' => $this->getSteelBom004(),
|
|
],
|
|
[
|
|
'code' => 'FG-STL-005',
|
|
'name' => '철재 방화문 (특수)',
|
|
'unit' => 'EA',
|
|
'price' => 1170000,
|
|
'category' => 'STEEL',
|
|
'process' => 'steel',
|
|
'bom' => $this->getSteelBom005(),
|
|
],
|
|
];
|
|
|
|
foreach ($steelProducts as $item) {
|
|
$this->insertFinishedProduct($item);
|
|
}
|
|
|
|
// 절곡 완제품 4종
|
|
$bendingProducts = [
|
|
[
|
|
'code' => 'FG-BND-001',
|
|
'name' => '절곡 철재 프레임 (L형)',
|
|
'unit' => 'EA',
|
|
'price' => 500000,
|
|
'category' => 'STEEL',
|
|
'process' => 'bending',
|
|
'bom' => $this->getBendingBom001(),
|
|
],
|
|
[
|
|
'code' => 'FG-BND-002',
|
|
'name' => '절곡 철재 패널 (U형)',
|
|
'unit' => 'EA',
|
|
'price' => 550000,
|
|
'category' => 'STEEL',
|
|
'process' => 'bending',
|
|
'bom' => $this->getBendingBom002(),
|
|
],
|
|
[
|
|
'code' => 'FG-BND-003',
|
|
'name' => '절곡 철재 커버 (Z형)',
|
|
'unit' => 'EA',
|
|
'price' => 470000,
|
|
'category' => 'STEEL',
|
|
'process' => 'bending',
|
|
'bom' => $this->getBendingBom003(),
|
|
],
|
|
[
|
|
'code' => 'FG-BND-004',
|
|
'name' => '절곡 철재 보강재 (ㄷ형)',
|
|
'unit' => 'EA',
|
|
'price' => 450000,
|
|
'category' => 'STEEL',
|
|
'process' => 'bending',
|
|
'bom' => $this->getBendingBom004(),
|
|
],
|
|
];
|
|
|
|
foreach ($bendingProducts as $item) {
|
|
$this->insertFinishedProduct($item);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 품목 일괄 삽입
|
|
*/
|
|
protected function insertItems(array $items, string $itemType): void
|
|
{
|
|
$now = now();
|
|
|
|
foreach ($items as $item) {
|
|
DB::table('items')->insert([
|
|
'tenant_id' => $this->tenantId,
|
|
'item_type' => $itemType,
|
|
'code' => $item['code'],
|
|
'name' => $item['name'],
|
|
'unit' => $item['unit'],
|
|
'process_type' => $item['process'] ?? null,
|
|
'item_category' => $item['category'] ?? null,
|
|
'attributes' => json_encode(['salesPrice' => $item['price']]),
|
|
'is_active' => true,
|
|
'created_at' => $now,
|
|
'updated_at' => $now,
|
|
]);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 완제품 삽입 (BOM 포함)
|
|
*/
|
|
protected function insertFinishedProduct(array $item): void
|
|
{
|
|
$now = now();
|
|
|
|
DB::table('items')->insert([
|
|
'tenant_id' => $this->tenantId,
|
|
'item_type' => 'FG',
|
|
'code' => $item['code'],
|
|
'name' => $item['name'],
|
|
'unit' => $item['unit'],
|
|
'process_type' => $item['process'],
|
|
'item_category' => $item['category'],
|
|
'bom' => json_encode($item['bom']),
|
|
'attributes' => json_encode(['salesPrice' => $item['price']]),
|
|
'is_active' => true,
|
|
'created_at' => $now,
|
|
'updated_at' => $now,
|
|
]);
|
|
}
|
|
|
|
// ===== 스크린 BOM 정의 =====
|
|
|
|
protected function getScreenBom001(): array
|
|
{
|
|
return [
|
|
['childItemCode' => 'SF-SCR-F01', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/1000000'],
|
|
['childItemCode' => 'SF-SCR-F02', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-F03', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-F04', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-F05', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-M01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '소형용'],
|
|
['childItemCode' => 'SF-SCR-C01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-S01', 'quantity' => 1, 'unit' => 'SET', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-W01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-B01', 'quantity' => 1, 'unit' => 'SET', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-SW01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-B002', 'quantity' => 20, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '조립용'],
|
|
['childItemCode' => 'SM-N002', 'quantity' => 20, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-W002', 'quantity' => 20, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
];
|
|
}
|
|
|
|
protected function getScreenBom002(): array
|
|
{
|
|
return [
|
|
['childItemCode' => 'SF-SCR-F01', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/1000000'],
|
|
['childItemCode' => 'SF-SCR-F02', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-F03', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-F04', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-F05', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-M02', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '중형용'],
|
|
['childItemCode' => 'SF-SCR-C01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-S01', 'quantity' => 1, 'unit' => 'SET', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-W01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-B01', 'quantity' => 2, 'unit' => 'SET', 'quantityFormula' => '', 'note' => '중형용 2세트'],
|
|
['childItemCode' => 'SF-SCR-E01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-E02', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-REM01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-B002', 'quantity' => 30, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '조립용'],
|
|
['childItemCode' => 'SM-N002', 'quantity' => 30, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-A001', 'quantity' => 8, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '고정용'],
|
|
];
|
|
}
|
|
|
|
protected function getScreenBom003(): array
|
|
{
|
|
return [
|
|
['childItemCode' => 'SF-SCR-F01', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/1000000'],
|
|
['childItemCode' => 'SF-SCR-F02', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-F03', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-F04', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-F05', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-M03', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '대형용'],
|
|
['childItemCode' => 'SF-SCR-C02', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '고급형'],
|
|
['childItemCode' => 'SF-SCR-S01', 'quantity' => 2, 'unit' => 'SET', 'quantityFormula' => '', 'note' => '대형용 2세트'],
|
|
['childItemCode' => 'SF-SCR-W01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-B01', 'quantity' => 3, 'unit' => 'SET', 'quantityFormula' => '', 'note' => '대형용 3세트'],
|
|
['childItemCode' => 'SF-SCR-E01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-E02', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-CH01', 'quantity' => 1, 'unit' => 'SET', 'quantityFormula' => '', 'note' => '보조 승강'],
|
|
['childItemCode' => 'SF-SCR-REM01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-B003', 'quantity' => 40, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '조립용'],
|
|
['childItemCode' => 'SM-N003', 'quantity' => 40, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-A002', 'quantity' => 12, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '고정용'],
|
|
];
|
|
}
|
|
|
|
protected function getScreenBom004(): array
|
|
{
|
|
return [
|
|
['childItemCode' => 'SF-SCR-F01', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/1000000'],
|
|
['childItemCode' => 'SF-SCR-F02', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-F03', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-F04', 'quantity' => 2, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '특대형 2개'],
|
|
['childItemCode' => 'SF-SCR-F05', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-M04', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '특대형용'],
|
|
['childItemCode' => 'SF-SCR-C02', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '고급형'],
|
|
['childItemCode' => 'SF-SCR-S01', 'quantity' => 2, 'unit' => 'SET', 'quantityFormula' => '', 'note' => '특대형용 2세트'],
|
|
['childItemCode' => 'SF-SCR-W01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-B01', 'quantity' => 4, 'unit' => 'SET', 'quantityFormula' => '', 'note' => '특대형용 4세트'],
|
|
['childItemCode' => 'SF-SCR-E01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-E02', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-SP01', 'quantity' => 2, 'unit' => 'SET', 'quantityFormula' => '', 'note' => '보조 스프링'],
|
|
['childItemCode' => 'SF-SCR-CH01', 'quantity' => 2, 'unit' => 'SET', 'quantityFormula' => '', 'note' => '보조 승강'],
|
|
['childItemCode' => 'SF-SCR-REM01', 'quantity' => 2, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '예비 포함'],
|
|
['childItemCode' => 'SM-B003', 'quantity' => 60, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '조립용'],
|
|
['childItemCode' => 'SM-N003', 'quantity' => 60, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-A002', 'quantity' => 16, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '고정용'],
|
|
['childItemCode' => 'SM-G001', 'quantity' => 2, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '윤활'],
|
|
];
|
|
}
|
|
|
|
protected function getScreenBom005(): array
|
|
{
|
|
return [
|
|
['childItemCode' => 'SF-SCR-F01', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/1000000'],
|
|
['childItemCode' => 'SF-SCR-F02', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-F03', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-F04', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-F05', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-M02', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '중형용'],
|
|
['childItemCode' => 'SF-SCR-C02', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '맞춤형 고급'],
|
|
['childItemCode' => 'SF-SCR-S01', 'quantity' => 1, 'unit' => 'SET', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-W01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-B01', 'quantity' => 2, 'unit' => 'SET', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-E01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-E02', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'H/1000'],
|
|
['childItemCode' => 'SF-SCR-REM01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-SCR-SW01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-B002', 'quantity' => 35, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '조립용'],
|
|
['childItemCode' => 'SM-N002', 'quantity' => 35, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-A001', 'quantity' => 10, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '고정용'],
|
|
];
|
|
}
|
|
|
|
// ===== 철재 BOM 정의 =====
|
|
|
|
protected function getSteelBom001(): array
|
|
{
|
|
return [
|
|
['childItemCode' => 'SF-STL-D01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-F01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => '(W+H)*2/1000'],
|
|
['childItemCode' => 'SF-STL-P01', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/1000000'],
|
|
['childItemCode' => 'SF-STL-H01', 'quantity' => 1, 'unit' => 'SET', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-L01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-C01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-S01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => '(W+H)*2/1000', 'note' => '둘레 기준'],
|
|
['childItemCode' => 'SF-STL-T01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-K01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-B01', 'quantity' => 2, 'unit' => 'SET', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-A001', 'quantity' => 8, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '고정용'],
|
|
['childItemCode' => 'SM-S001', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '실링'],
|
|
];
|
|
}
|
|
|
|
protected function getSteelBom002(): array
|
|
{
|
|
return [
|
|
['childItemCode' => 'SF-STL-D01', 'quantity' => 2, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '양쪽 도어'],
|
|
['childItemCode' => 'SF-STL-F01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => '(W+H)*2/1000'],
|
|
['childItemCode' => 'SF-STL-P01', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/1000000'],
|
|
['childItemCode' => 'SF-STL-H02', 'quantity' => 2, 'unit' => 'SET', 'quantityFormula' => '', 'note' => '중형 경첩'],
|
|
['childItemCode' => 'SF-STL-L01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-C01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-S01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => '(W+H)*2/1000'],
|
|
['childItemCode' => 'SF-STL-T01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-K01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-B01', 'quantity' => 3, 'unit' => 'SET', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-A001', 'quantity' => 12, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '고정용'],
|
|
['childItemCode' => 'SM-S001', 'quantity' => 2, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '실링'],
|
|
];
|
|
}
|
|
|
|
protected function getSteelBom003(): array
|
|
{
|
|
return [
|
|
['childItemCode' => 'SF-STL-D01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-F01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => '(W+H)*2/1000'],
|
|
['childItemCode' => 'SF-STL-P01', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/1000000'],
|
|
['childItemCode' => 'SF-STL-G01', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/4000000', 'note' => '창문 25%'],
|
|
['childItemCode' => 'SF-STL-H02', 'quantity' => 2, 'unit' => 'SET', 'quantityFormula' => '', 'note' => '대형 경첩'],
|
|
['childItemCode' => 'SF-STL-L02', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '전자식'],
|
|
['childItemCode' => 'SF-STL-C01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-S01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => '(W+H)*2/1000'],
|
|
['childItemCode' => 'SF-STL-T01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-V01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '환기구'],
|
|
['childItemCode' => 'SF-STL-W01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => 'W/1000', 'note' => '창틀'],
|
|
['childItemCode' => 'SF-STL-B01', 'quantity' => 4, 'unit' => 'SET', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-A002', 'quantity' => 16, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '고정용'],
|
|
['childItemCode' => 'SM-S002', 'quantity' => 2, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '실링'],
|
|
];
|
|
}
|
|
|
|
protected function getSteelBom004(): array
|
|
{
|
|
return [
|
|
['childItemCode' => 'SF-STL-D01', 'quantity' => 2, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '양개 도어'],
|
|
['childItemCode' => 'SF-STL-F01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => '(W+H)*2/1000'],
|
|
['childItemCode' => 'SF-STL-P01', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/1000000'],
|
|
['childItemCode' => 'SF-STL-H02', 'quantity' => 4, 'unit' => 'SET', 'quantityFormula' => '', 'note' => '양쪽 경첩'],
|
|
['childItemCode' => 'SF-STL-L01', 'quantity' => 2, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '양쪽 잠금'],
|
|
['childItemCode' => 'SF-STL-C01', 'quantity' => 2, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '양쪽 클로저'],
|
|
['childItemCode' => 'SF-STL-S01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => '(W+H)*2/1000'],
|
|
['childItemCode' => 'SF-STL-T01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-B01', 'quantity' => 4, 'unit' => 'SET', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-A001', 'quantity' => 16, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '고정용'],
|
|
['childItemCode' => 'SM-S001', 'quantity' => 2, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '실링'],
|
|
];
|
|
}
|
|
|
|
protected function getSteelBom005(): array
|
|
{
|
|
return [
|
|
['childItemCode' => 'SF-STL-D01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-F01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => '(W+H)*2/1000'],
|
|
['childItemCode' => 'SF-STL-P01', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/1000000'],
|
|
['childItemCode' => 'SF-STL-P02', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/1000000', 'note' => '특수 도장'],
|
|
['childItemCode' => 'SF-STL-H02', 'quantity' => 2, 'unit' => 'SET', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-L02', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '전자식'],
|
|
['childItemCode' => 'SF-STL-C01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-S01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => '(W+H)*2/1000'],
|
|
['childItemCode' => 'SF-STL-T01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-K01', 'quantity' => 1, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SF-STL-B01', 'quantity' => 3, 'unit' => 'SET', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-A002', 'quantity' => 12, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '고정용'],
|
|
['childItemCode' => 'SM-S002', 'quantity' => 2, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '실링'],
|
|
];
|
|
}
|
|
|
|
// ===== 절곡 BOM 정의 =====
|
|
|
|
protected function getBendingBom001(): array
|
|
{
|
|
return [
|
|
['childItemCode' => 'SF-BND-L01', 'quantity' => 4, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '코너 4개'],
|
|
['childItemCode' => 'SF-STL-F01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => '(W+H)*2/1000'],
|
|
['childItemCode' => 'SF-STL-P02', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/1000000'],
|
|
['childItemCode' => 'SF-STL-B01', 'quantity' => 2, 'unit' => 'SET', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-B002', 'quantity' => 16, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '조립용'],
|
|
['childItemCode' => 'SM-N002', 'quantity' => 16, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
];
|
|
}
|
|
|
|
protected function getBendingBom002(): array
|
|
{
|
|
return [
|
|
['childItemCode' => 'SF-BND-U01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => '(W+H)*2/1000'],
|
|
['childItemCode' => 'SF-STL-P01', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/1000000'],
|
|
['childItemCode' => 'SF-STL-P02', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/1000000'],
|
|
['childItemCode' => 'SF-STL-B01', 'quantity' => 2, 'unit' => 'SET', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-B002', 'quantity' => 20, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '조립용'],
|
|
['childItemCode' => 'SM-N002', 'quantity' => 20, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
];
|
|
}
|
|
|
|
protected function getBendingBom003(): array
|
|
{
|
|
return [
|
|
['childItemCode' => 'SF-BND-Z01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => '(W+H)*2/1000'],
|
|
['childItemCode' => 'SF-STL-P02', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/1000000'],
|
|
['childItemCode' => 'SF-STL-B01', 'quantity' => 1, 'unit' => 'SET', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-B001', 'quantity' => 12, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '조립용'],
|
|
['childItemCode' => 'SM-N001', 'quantity' => 12, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
];
|
|
}
|
|
|
|
protected function getBendingBom004(): array
|
|
{
|
|
return [
|
|
['childItemCode' => 'SF-BND-C01', 'quantity' => 1, 'unit' => 'M', 'quantityFormula' => '(W+H)*2/1000'],
|
|
['childItemCode' => 'SF-STL-P02', 'quantity' => 1, 'unit' => 'M2', 'quantityFormula' => 'W*H/1000000'],
|
|
['childItemCode' => 'SF-STL-B01', 'quantity' => 1, 'unit' => 'SET', 'quantityFormula' => ''],
|
|
['childItemCode' => 'SM-B001', 'quantity' => 10, 'unit' => 'EA', 'quantityFormula' => '', 'note' => '조립용'],
|
|
['childItemCode' => 'SM-N001', 'quantity' => 10, 'unit' => 'EA', 'quantityFormula' => ''],
|
|
];
|
|
}
|
|
}
|