summaryrefslogtreecommitdiff
path: root/lib/soap/ecc/mapper/bidding-and-pr-mapper.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/soap/ecc/mapper/bidding-and-pr-mapper.ts')
-rw-r--r--lib/soap/ecc/mapper/bidding-and-pr-mapper.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/soap/ecc/mapper/bidding-and-pr-mapper.ts b/lib/soap/ecc/mapper/bidding-and-pr-mapper.ts
index 99373555..a02ef9bf 100644
--- a/lib/soap/ecc/mapper/bidding-and-pr-mapper.ts
+++ b/lib/soap/ecc/mapper/bidding-and-pr-mapper.ts
@@ -209,11 +209,11 @@ async function generateBiddingCodes(eccHeaders: ECCBidHeader[]): Promise<Map<str
maxBiddingNumber: max(biddings.biddingNumber)
})
.from(biddings)
- .where(sql`${biddings.biddingNumber} LIKE ${`BID${ekgrp}%`}`);
+ .where(sql`${biddings.biddingNumber} LIKE ${`B${ekgrp}%`}`);
let nextSeq = 1;
if (maxResult[0]?.maxBiddingNumber) {
- const prefix = `BID${ekgrp}`;
+ const prefix = `B${ekgrp}`;
const currentCode = maxResult[0].maxBiddingNumber;
if (currentCode.startsWith(prefix)) {
const seqPart = currentCode.substring(prefix.length);
@@ -227,7 +227,7 @@ async function generateBiddingCodes(eccHeaders: ECCBidHeader[]): Promise<Map<str
// 동일 EKGRP 내에서 순차적으로 새 코드 생성
for (const header of headers) {
const seqString = nextSeq.toString().padStart(5, '0');
- const biddingCode = `BID${ekgrp}${seqString}`;
+ const biddingCode = `B${ekgrp}${seqString}`;
biddingCodeMap.set(header.ANFNR || '', biddingCode);
nextSeq++; // 다음 시퀀스로 증가
}
@@ -247,7 +247,7 @@ async function generateBiddingCodes(eccHeaders: ECCBidHeader[]): Promise<Map<str
eccHeaders.forEach((header, index) => {
const ekgrp = header.EKGRP || 'UNKNOWN';
const seqString = (index + 1).toString().padStart(5, '0');
- fallbackMap.set(header.ANFNR, `BID${ekgrp}${seqString}`);
+ fallbackMap.set(header.ANFNR, `B${ekgrp}${seqString}`);
});
return fallbackMap;
}
@@ -275,7 +275,7 @@ export async function mapECCBiddingHeaderToBidding(
// 담당자 찾기
const inChargeUserInfo = await findUserInfoByEKGRP(eccHeader.EKGRP || null);
-
+
// 첫번째 PR Item 기반으로 projectId, projectName, itemName 설정
let projectId: number | null = null;
let projectName: string | null = null;
@@ -342,7 +342,7 @@ export async function mapECCBiddingHeaderToBidding(
// 담당자 정보 - EKGRP 기반으로 설정
managerName: inChargeUserInfo?.userName || null,
- managerEmail: null,
+ managerEmail: inChargeUserInfo?.userEmail || null,
managerPhone: inChargeUserInfo?.userPhone || null,
// 메타 정보