fix: [production] 자재투입 모달 개선 — lot_managed 필터링, BOM 그룹키, 셔터박스 순서

- getMaterialsForItem: lot_managed===false 품목 자재투입 목록에서 제외 (L-Bar, 보강평철)
- getMaterialsForItem: bom_group_key 필드 추가 (category+partType 기반 고유키)
- BendingInfoBuilder: shutterPartTypes에서 top_cover/fin_cover 제거 (별도 생성과 중복)
- BendingInfoBuilder: 셔터박스 루프 순서 파트→길이로 변경 (작업일지 순서 일치)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 20:57:44 +09:00
parent fefd129795
commit fc537898fc
2 changed files with 30 additions and 8 deletions

View File

@@ -220,14 +220,17 @@ public function buildDynamicBomForItem(array $context, int $width, int $height,
if ($boxSize) {
$isStandard = $boxSize === '500*380';
$dist = $this->shutterBoxDistribution($width);
$shutterPartTypes = ['front', 'lintel', 'inspection', 'rear_corner', 'top_cover', 'fin_cover'];
// 상부덮개(top_cover), 마구리(fin_cover)는 1219mm 기준으로 별도 생성 (아래 256행~)
$shutterPartTypes = ['front', 'lintel', 'inspection', 'rear_corner'];
// 작업일지와 동일한 순서: 파트 → 길이
foreach ($shutterPartTypes as $partType) {
foreach ($dist as $length => $count) {
$totalCount = $count * $qty;
if ($totalCount <= 0) {
continue;
}
foreach ($dist as $length => $count) {
$totalCount = $count * $qty;
if ($totalCount <= 0) {
continue;
}
foreach ($shutterPartTypes as $partType) {
$prefix = $resolver->resolveShutterBoxPrefix($partType, $isStandard);
$itemCode = $resolver->buildItemCode($prefix, $length);
if (! $itemCode) {