eaiSvcCd 추출 로직 변경
- StandarMessage에 이미 eaiSvcCd가 설정되어 있으면 그것을 이용(비표준) - 표준전문에서 조합하도록 수정(표준)
This commit is contained in:
@@ -2,6 +2,7 @@ package com.eactive.eai.custom.message;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.eactive.eai.common.property.PropManager;
|
||||
import com.eactive.eai.common.server.EAIServerManager;
|
||||
import com.eactive.eai.message.StandardMessage;
|
||||
import com.eactive.eai.message.service.DefaultInterfaceMapper;
|
||||
@@ -28,17 +29,24 @@ public class InterfaceMapperDJB extends DefaultInterfaceMapper {
|
||||
// 처리결과구분코드 DJBank 값
|
||||
private static final String PROCS_RSLT_SUCCESS = "S";
|
||||
private static final String PROCS_RSLT_FAIL = "F";
|
||||
|
||||
private static String API_ID_PREFIX = StringUtils
|
||||
.defaultString(PropManager.getInstance().getProperty("API_ID_PREFIX"));
|
||||
|
||||
@Override
|
||||
public String getEaiSvcCode(StandardMessage standardMessage) {
|
||||
String interfaceId = getInterfaceId(standardMessage);
|
||||
if(StringUtils.isNotBlank(standardMessage.getEaiSvcCd()))
|
||||
return standardMessage.getEaiSvcCd();
|
||||
|
||||
// String interfaceId = getInterfaceId(standardMessage);
|
||||
String txId = getServiceId(standardMessage);
|
||||
String sendRecvDvcd = getSendRecvDivision(standardMessage); // S | R
|
||||
String inExDivision = getInExDivision(standardMessage); // 1 | 2
|
||||
|
||||
if(StringUtils.isEmpty(txId))
|
||||
throw new RuntimeException("not found txid");
|
||||
|
||||
if (interfaceId == null) interfaceId = "";
|
||||
interfaceId = interfaceId.trim();
|
||||
|
||||
return interfaceId + sendRecvDvcd + StringUtils.defaultString(inExDivision);
|
||||
return API_ID_PREFIX + txId + sendRecvDvcd + StringUtils.defaultString(inExDivision);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user