refactor: [절곡] bending_items code를 'BD' 단일값으로 통일
- bending_items.code: prod+spec(CP,RS 등) → 'BD' (절곡품 공통 접두사) - bending_models 패턴(GR/SB/BB)과 동일 레벨로 통일 - import 스크립트 3개 + BendingCodeService.resolveItem 수정 - 마이그레이션 SQL 업데이트 - DB 266건 업데이트 완료
This commit is contained in:
@@ -134,9 +134,9 @@ public function getCodeMap(): array
|
||||
*/
|
||||
public function resolveItem(string $prodCode, string $specCode, string $lengthCode): ?array
|
||||
{
|
||||
// 1차: code(코드 체계) + length_code로 조회
|
||||
// 1차: lot_no 앞 2자리(prod+spec) + length_code로 조회
|
||||
$item = BendingItem::where('tenant_id', $this->tenantId())
|
||||
->where('code', "{$prodCode}{$specCode}")
|
||||
->where('lot_no', 'like', "{$prodCode}{$specCode}%")
|
||||
->where('length_code', $lengthCode)
|
||||
->where('is_active', true)
|
||||
->first();
|
||||
|
||||
Reference in New Issue
Block a user