diff options
| author | joonhoekim <26rote@gmail.com> | 2025-11-19 17:44:48 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-11-19 17:44:48 +0900 |
| commit | 60382940bac4ac8309be64be16f4774b6820df22 (patch) | |
| tree | 976909a239b0712de59131ee10055735568447fc /lib/soap/ecc/mapper/bidding-and-pr-mapper.ts | |
| parent | ec74a7862eb33a9da1e3d6ba2877d5b9662dbfca (diff) | |
(김준회) PR 데이터 수신시 Spec 정보도 넣어주도록 수정
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; } |
