diff options
| author | joonhoekim <26rote@gmail.com> | 2025-08-27 01:52:54 +0000 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-08-27 01:52:54 +0000 |
| commit | 818a500d9969d1c03098f612bb0b68502b6a5ae2 (patch) | |
| tree | d1b52f040972696993502dfa8a71f7bb1bc89cc2 /lib/soap/ecc/send/create-po.ts | |
| parent | f61e9e9c6ea5b415d64ecb9f703a0633a5029da4 (diff) | |
(김준회) soap sender 함수 오류수정 및 벤더마스터 전송함수 리팩터링
Diffstat (limited to 'lib/soap/ecc/send/create-po.ts')
| -rw-r--r-- | lib/soap/ecc/send/create-po.ts | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/lib/soap/ecc/send/create-po.ts b/lib/soap/ecc/send/create-po.ts index d44f091b..0d992fb3 100644 --- a/lib/soap/ecc/send/create-po.ts +++ b/lib/soap/ecc/send/create-po.ts @@ -70,7 +70,7 @@ export interface POCreateRequest { // SOAP Body Content 생성 함수 function createPOSoapBodyContent(poData: POCreateRequest): Record<string, unknown> { return { - 'ns0:MT_P2MM3015_S': { + 'p1:MT_P2MM3015_S': { // WSDL에서 사용하는 p1 접두사 적용 'T_Bidding_HEADER': poData.T_Bidding_HEADER, 'T_Bidding_ITEM': poData.T_Bidding_ITEM, 'T_PR_RETURN': poData.T_PR_RETURN, @@ -155,7 +155,8 @@ async function sendPOToECC(poData: POCreateRequest): Promise<SoapSendResult> { timeout: 60000, // PO 생성은 60초 타임아웃 retryCount: 3, retryDelay: 2000, - namespace: 'http://shi.samsung.co.kr/P2_MM/MMM' // ECC MM 모듈 네임스페이스 + namespace: 'http://shi.samsung.co.kr/P2_MM/MMM', // ECC MM 모듈 네임스페이스 + prefix: 'p1' // WSDL에서 사용하는 p1 접두사 }; // 로그 정보 @@ -392,27 +393,4 @@ export async function checkPOCreationStatus(biddingNumber: string): Promise<{ } } -// ======================================== -// 유틸리티 함수들 -// ======================================== - -// PO 데이터 생성 헬퍼 함수 -function createPOData( - headers: POHeaderData[], - items: POItemData[], - prReturns: PRReturnData[], - options?: { - extractDate?: string; - extractTime?: string; - } -): POCreateRequest { - return { - T_Bidding_HEADER: headers, - T_Bidding_ITEM: items, - T_PR_RETURN: prReturns, - EV_ERDAT: options?.extractDate || getCurrentSAPDate(), - EV_ERZET: options?.extractTime || getCurrentSAPTime() - }; -} - -// 날짜/시간 포맷 변환 함수들은 @/lib/soap/utils에서 import하여 사용 +// 사용하지 않는 유틸리티 함수들 삭제 (linter 오류 해결) |
