diff options
Diffstat (limited to 'lib/soap/ecc/mapper/bidding-and-pr-mapper.ts')
| -rw-r--r-- | lib/soap/ecc/mapper/bidding-and-pr-mapper.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/soap/ecc/mapper/bidding-and-pr-mapper.ts b/lib/soap/ecc/mapper/bidding-and-pr-mapper.ts index 4ab9a745..adbb3e1e 100644 --- a/lib/soap/ecc/mapper/bidding-and-pr-mapper.ts +++ b/lib/soap/ecc/mapper/bidding-and-pr-mapper.ts @@ -29,6 +29,7 @@ import { findMaterialNameByMATNR, parseSAPDateTime, parseSAPDateToString, + findSpecificationByMATNR, } from './common-mapper-utils'; // Note: POS 파일은 온디맨드 방식으로 다운로드됩니다. // 자동 동기화 관련 import는 제거되었습니다. @@ -267,6 +268,9 @@ export async function mapECCBiddingItemToPrItemForBidding( // PSPID(Project Code)로 프로젝트 ID 조회 const projectId = await findProjectIdByPSPID(eccItem.PSPID || null); + // Specification 조회 (MATNR 기반) + const specification = await findSpecificationByMATNR(eccItem.MATNR || null); + const mappedData: PrItemForBiddingData = { biddingId, // 부모 Bidding ID itemNumber: eccItem.ANFPS || null, // 아이템 번호 @@ -305,12 +309,14 @@ export async function mapECCBiddingItemToPrItemForBidding( prNumber: eccItem.BANFN || null, // PR번호 hasSpecDocument: false, // 기본값 false + specification, // MATNR로 조회한 Specification }; debugSuccess('ECC Bidding 아이템 매핑 완료', { itemNumber: eccItem.ANFPS, prNumber: eccItem.BANFN, projectId, + specification, }); return mappedData; } |
