From 37972d370e76714a7b3a8e47c51030cce2e3490e Mon Sep 17 00:00:00 2001 From: 25W0104 <25W0104@P98020.kjbank.dom> Date: Tue, 25 Nov 2025 14:55:23 +0900 Subject: [PATCH] =?UTF-8?q?FileEventListener=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=EC=82=AC=ED=95=AD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/eactive/eai/inbound/FileEventListener.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/com/eactive/eai/inbound/FileEventListener.java b/src/com/eactive/eai/inbound/FileEventListener.java index cc2ee93..c076ae0 100644 --- a/src/com/eactive/eai/inbound/FileEventListener.java +++ b/src/com/eactive/eai/inbound/FileEventListener.java @@ -64,7 +64,7 @@ public class FileEventListener extends Process{ logger.info("[Send File Event] ※ Event 디렉토리 : [" + dirPath +"]"); logger.info("[Send File Event] ※ Event 파일명 : [" + fileName +"]"); // logger.info("[Send File Event] ========================================================================="); - if(dirPath.length() >= BatchDirUtil.getResponseRootDir().length()+11) {// 20251120 + if(dirPath.length() >= BatchDirUtil.getRequestRootDir().length()+10) {// 20251120 fileName = extractLastTwo(dirPath)[0]+"_"+extractLastTwo(dirPath)[1]+"_"+fileName; } logger.info("[Send File Event] ※ Event 수정 파일명 : [" + fileName +"]"); @@ -154,11 +154,13 @@ public class FileEventListener extends Process{ private void callFileMover() throws Exception { String renamedFileName = fileName; - if(dirPath.length() >= BatchDirUtil.getResponseRootDir().length()+11 && fileName.length() > 11) {// 20251120 + if(dirPath.length() >= BatchDirUtil.getRequestRootDir().length()+10 && fileName.length() > 11) {// 20251120 fileName = fileName.substring(11); renamedFileName = fileName + "_" + CalendarUtil.getCurrentTimeNoDash(); - }else { + }else if(fileName.length() > 11) { renamedFileName = fileName.substring(11) + "_" + CalendarUtil.getCurrentTimeNoDash(); + }else { + renamedFileName = fileName + "_" + CalendarUtil.getCurrentTimeNoDash(); } File realFile = new File(this.dirPath +"/"+ fileName);