SDATE 로직 추가
This commit is contained in:
@@ -133,6 +133,10 @@ public class RemoteTransfer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String rmtFileTrsmtPathName = vo.getRecvDir().replaceAll("#APP#", tarAppCode);
|
String rmtFileTrsmtPathName = vo.getRecvDir().replaceAll("#APP#", tarAppCode);
|
||||||
|
rmtFileTrsmtPathName = getPathDateTrans(rmtFileTrsmtPathName);// 20251209
|
||||||
|
|
||||||
|
logger.debug("RemoteTransfer rmtFileTrsmtPathName:"+rmtFileTrsmtPathName);
|
||||||
|
|
||||||
String rmtTrsmtFileName = procCode + "_" + instCode + "_" + fileName;
|
String rmtTrsmtFileName = procCode + "_" + instCode + "_" + fileName;
|
||||||
loginfo.setRmtFileTrsmtPathName(rmtFileTrsmtPathName);
|
loginfo.setRmtFileTrsmtPathName(rmtFileTrsmtPathName);
|
||||||
loginfo.setRmtTrsmtFileName(rmtTrsmtFileName);
|
loginfo.setRmtTrsmtFileName(rmtTrsmtFileName);
|
||||||
@@ -312,5 +316,33 @@ public class RemoteTransfer {
|
|||||||
return "S:수신 성공[" + fullFileName +"]";
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user