From d4f21f06d6e134a80049d360e8f952a198ebfaf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Thu, 5 Mar 2026 11:01:04 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20[production]=20=EC=85=94=ED=84=B0?= =?UTF-8?q?=EB=B0=95=EC=8A=A4=20prefix=20=E2=80=94=20isStandard=20?= =?UTF-8?q?=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CF/CL/CP/CB 품목이 모든 길이에 등록되어 boxSize 무관하게 적용 - resolveShutterBoxPrefix()에서 불필요한 isStandard 분기 제거 Co-Authored-By: Claude Opus 4.6 --- app/Services/Production/BendingInfoBuilder.php | 7 +++---- app/Services/Production/PrefixResolver.php | 10 ++++------ 2 files changed, 7 insertions(+), 10 deletions(-) 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'; }