From 76f1b245aa00deae5d0436b8c27ecbeb6df6c407 Mon Sep 17 00:00:00 2001 From: 25W0103 <25W0103@P98021.kjbank.dom> Date: Tue, 9 Dec 2025 10:54:53 +0900 Subject: [PATCH] =?UTF-8?q?SDATE=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eai/inbound/remote/RemoteTransfer.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) 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; + } }