diff options
Diffstat (limited to 'lib/soap/ecc/mapper')
| -rw-r--r-- | lib/soap/ecc/mapper/rfq-and-pr-mapper.ts | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/soap/ecc/mapper/rfq-and-pr-mapper.ts b/lib/soap/ecc/mapper/rfq-and-pr-mapper.ts index cc241aa6..85fbb918 100644 --- a/lib/soap/ecc/mapper/rfq-and-pr-mapper.ts +++ b/lib/soap/ecc/mapper/rfq-and-pr-mapper.ts @@ -240,9 +240,20 @@ export function mapECCRfqItemToRfqPrItem( // 날짜 파싱 let deliveryDate: Date | null = null; - if (eccItem.LFDAT) { - const dateStr = parseSAPDateTime(eccItem.LFDAT, '000000'); - deliveryDate = dateStr; + if (eccItem.LFDAT && eccItem.LFDAT.length === 8) { + try { + // YYYYMMDD 형식을 YYYY-MM-DD로 변환 후 한국 시간 기준으로 설정 + const year = eccItem.LFDAT.substring(0, 4); + const month = eccItem.LFDAT.substring(4, 6); + const day = eccItem.LFDAT.substring(6, 8); + // 한국 시간(KST, UTC+9) 기준으로 날짜 생성 + deliveryDate = new Date(`${year}-${month}-${day}T00:00:00+09:00`); + } catch (error) { + debugError('SAP 날짜 파싱 오류', { + lfdat: eccItem.LFDAT, + error, + }); + } } const mappedData: RfqPrItemData = { |
