diff options
| author | joonhoekim <26rote@gmail.com> | 2025-09-12 11:38:30 +0000 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-09-12 11:38:30 +0000 |
| commit | 04752b7096554c4a961ebc1f09ff0e81ea9def68 (patch) | |
| tree | fb68465b0ff94c4e9d94eeaec016b1f22c29be26 /app/api/(S-ERP)/(ECC)/IF_ECC_EVCP_PCR/route.ts | |
| parent | a9575387c3a765a1a65ebc179dae16a21af6eb25 (diff) | |
(김준회) ECC 데이터 응답 구조 오류 수정
Diffstat (limited to 'app/api/(S-ERP)/(ECC)/IF_ECC_EVCP_PCR/route.ts')
| -rw-r--r-- | app/api/(S-ERP)/(ECC)/IF_ECC_EVCP_PCR/route.ts | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/app/api/(S-ERP)/(ECC)/IF_ECC_EVCP_PCR/route.ts b/app/api/(S-ERP)/(ECC)/IF_ECC_EVCP_PCR/route.ts index 97ebdb4b..ec04e176 100644 --- a/app/api/(S-ERP)/(ECC)/IF_ECC_EVCP_PCR/route.ts +++ b/app/api/(S-ERP)/(ECC)/IF_ECC_EVCP_PCR/route.ts @@ -73,7 +73,14 @@ export async function POST(request: NextRequest) { // 6) 성공 응답 반환 return createSoapResponse('http://60.101.108.100/', { 'tns:IF_ECC_EVCP_PCRRes': { - EV_TYPE: 'S', + ZMM_RT: { + PCR_REQ: processedData[0]?.PCR_REQ || '', + PCR_REQ_SEQ: processedData[0]?.PCR_REQ_SEQ || '', + EBELN: processedData[0]?.EBELN || '', + EBELP: processedData[0]?.EBELP || '', + MSGTY: 'S', + MSGTXT: '', + }, }, }); } @@ -81,9 +88,14 @@ export async function POST(request: NextRequest) { // withSoapLogging에서 이미 에러 로그를 처리하므로, 여기서는 응답만 생성 return createSoapResponse('http://60.101.108.100/', { 'tns:IF_ECC_EVCP_PCRRes': { - EV_TYPE: 'E', - EV_MESSAGE: - error instanceof Error ? error.message.slice(0, 100) : 'Unknown error', + ZMM_RT: { + PCR_REQ: '', // 에러 시에는 빈 값으로 설정 + PCR_REQ_SEQ: '', + EBELN: '', + EBELP: '', + MSGTY: 'E', + MSGTXT: error instanceof Error ? error.message.slice(0, 100) : 'Unknown error', + }, }, }); }); |
