FileEventListener 수정 사항 반영

This commit is contained in:
25W0104
2025-11-25 14:55:23 +09:00
parent beb36e6367
commit 37972d370e
@@ -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);