diff --git a/src/com/eactive/eai/inbound/remote/RemoteTransfer.java b/src/com/eactive/eai/inbound/remote/RemoteTransfer.java index d6f7a84..44a9eda 100644 --- a/src/com/eactive/eai/inbound/remote/RemoteTransfer.java +++ b/src/com/eactive/eai/inbound/remote/RemoteTransfer.java @@ -133,6 +133,10 @@ public class RemoteTransfer { } String rmtFileTrsmtPathName = vo.getRecvDir().replaceAll("#APP#", tarAppCode); + rmtFileTrsmtPathName = getPathDateTrans(rmtFileTrsmtPathName);// 20251209 + + logger.debug("RemoteTransfer rmtFileTrsmtPathName:"+rmtFileTrsmtPathName); + String rmtTrsmtFileName = procCode + "_" + instCode + "_" + fileName; loginfo.setRmtFileTrsmtPathName(rmtFileTrsmtPathName); loginfo.setRmtTrsmtFileName(rmtTrsmtFileName); @@ -311,6 +315,34 @@ public class RemoteTransfer { return "S:수신 성공[" + fullFileName +"]"; } + + public String getPathDateTrans(String inPath) { + String today = DatetimeUtil.getCurrentDate(); + if(inPath.lastIndexOf("#SDATE#") > -1) { + inPath = inPath.replaceAll("#SDATE#", today); + } + if(inPath.lastIndexOf("#SDATE-1#") > -1) { + inPath = inPath.replaceAll("#SDATE-1#", getDayAddedDate(today, -1)); + } + + if(inPath.lastIndexOf("#SDATE_YYYYMM#") > -1) { + inPath = inPath.replaceAll("#SDATE_YYYYMM#", today.substring(0,6)); + } + if(inPath.lastIndexOf("#SDATE_YYYY#") > -1) { + inPath = inPath.replaceAll("#SDATE_YYYY#", today.substring(0,4)); + } + if(inPath.lastIndexOf("#SDATE_MM#") > -1) { + inPath = inPath.replaceAll("#SDATE_MM#", today.substring(4,6)); + } + if(inPath.lastIndexOf("#SDATE_DD#") > -1) { + inPath = inPath.replaceAll("#SDATE_DD#", today.substring(6,8)); + } + if(inPath.lastIndexOf("#ODATE#") > -1) { + inPath = inPath.replaceAll("#ODATE#", today); + } + + return inPath; + } }