diff --git a/app/Services/Production/BendingInfoBuilder.php b/app/Services/Production/BendingInfoBuilder.php index 37ac551..a35677c 100644 --- a/app/Services/Production/BendingInfoBuilder.php +++ b/app/Services/Production/BendingInfoBuilder.php @@ -218,7 +218,6 @@ public function buildDynamicBomForItem(array $context, int $width, int $height, // ─── 3. 셔터박스 세부품목 ─── if ($boxSize) { - $isStandard = $boxSize === '500*380'; $dist = $this->shutterBoxDistribution($width); // 상부덮개(top_cover), 마구리(fin_cover)는 1219mm 기준으로 별도 생성 (아래 256행~) $shutterPartTypes = ['front', 'lintel', 'inspection', 'rear_corner']; @@ -231,7 +230,7 @@ public function buildDynamicBomForItem(array $context, int $width, int $height, continue; } - $prefix = $resolver->resolveShutterBoxPrefix($partType, $isStandard); + $prefix = $resolver->resolveShutterBoxPrefix($partType); $itemCode = $resolver->buildItemCode($prefix, $length); if (! $itemCode) { continue; @@ -259,7 +258,7 @@ public function buildDynamicBomForItem(array $context, int $width, int $height, // 상부덮개 수량: ceil(width / 1219) × qty (1219mm 단위) $coverQty = (int) ceil($width / 1219) * $qty; if ($coverQty > 0) { - $coverPrefix = $resolver->resolveShutterBoxPrefix('top_cover', $isStandard); + $coverPrefix = $resolver->resolveShutterBoxPrefix('top_cover'); $coverCode = $resolver->buildItemCode($coverPrefix, 1219); if ($coverCode) { $coverId = $resolver->resolveItemId($coverCode, $tenantId); @@ -281,7 +280,7 @@ public function buildDynamicBomForItem(array $context, int $width, int $height, // 마구리 수량: qty × 2 $finQty = $qty * 2; if ($finQty > 0) { - $finPrefix = $resolver->resolveShutterBoxPrefix('fin_cover', $isStandard); + $finPrefix = $resolver->resolveShutterBoxPrefix('fin_cover'); // 마구리는 박스 높이 기준이므로 셔터박스 최소 단위 사용 $finCode = $resolver->buildItemCode($finPrefix, 1219); if ($finCode) { diff --git a/app/Services/Production/PrefixResolver.php b/app/Services/Production/PrefixResolver.php index 772b995..75f915d 100644 --- a/app/Services/Production/PrefixResolver.php +++ b/app/Services/Production/PrefixResolver.php @@ -189,16 +189,14 @@ public function resolveBottomBarPrefix(string $partType, string $productCode, st /** * 셔터박스 세부품목의 prefix 결정 * + * CF/CL/CP/CB 품목은 모든 길이에 등록되어 있으므로 boxSize 무관하게 적용. + * top_cover, fin_cover는 전용 품목 없이 XX(하부BASE/상부/마구리) 공용. + * * @param string $partType 'front', 'lintel', 'inspection', 'rear_corner', 'top_cover', 'fin_cover' - * @param bool $isStandardSize 500*380인지 * @return string prefix */ - public function resolveShutterBoxPrefix(string $partType, bool $isStandardSize): string + public function resolveShutterBoxPrefix(string $partType): string { - if (! $isStandardSize) { - return 'XX'; - } - return self::SHUTTER_STANDARD[$partType] ?? 'XX'; }