feat: [수주관리] 전환/동기화 로직에 OrderNode 생성 및 아이템 연결

- convertToOrder: calculation_inputs.items[]로 OrderNode(location) 생성, order_items에 order_node_id 연결
- resolveLocationIndex() 헬퍼 추가 (formula_source/note 기반 개소 인덱스 매칭)
- syncFromQuote: 기존 nodes 삭제 후 재생성, 아이템 node 연결 동기화
- show(): rootNodes + withRecursiveChildren eager loading 추가
- createFromQuoteItem: order_node_id 매핑 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-06 20:15:00 +09:00
parent 874bf97b8f
commit d2b0f028d4
3 changed files with 151 additions and 16 deletions

View File

@@ -177,6 +177,7 @@ public static function createFromQuoteItem(QuoteItem $quoteItem, int $orderId, i
return new self([
'tenant_id' => $quoteItem->tenant_id,
'order_id' => $orderId,
'order_node_id' => $productMapping['order_node_id'] ?? null,
'quote_id' => $quoteItem->quote_id,
'quote_item_id' => $quoteItem->id,
'serial_no' => str_pad($serialIndex, 3, '0', STR_PAD_LEFT),