diff --git a/src/main/java/kr/xit/fims/biz/ec/service/EcCctvCrackdownService.java b/src/main/java/kr/xit/fims/biz/ec/service/EcCctvCrackdownService.java
index af823231..f0908d6f 100644
--- a/src/main/java/kr/xit/fims/biz/ec/service/EcCctvCrackdownService.java
+++ b/src/main/java/kr/xit/fims/biz/ec/service/EcCctvCrackdownService.java
@@ -11,6 +11,7 @@ import java.util.Objects;
import java.util.stream.Collectors;
import org.apache.commons.collections4.ListUtils;
+import org.apache.commons.io.FileExistsException;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.ibatis.session.RowBounds;
@@ -194,7 +195,7 @@ public class EcCctvCrackdownService implements IEcCctvCrackdownService {
cmmFileService.saveFiles(fileMstDTO, busOnlyDTO.getBusonlyImgList());
});
- // FIXME: src file backup
+ // FIXME: src file backup - rollback이 필요한 경우 BizException throw 필요
// rollback시 파일이 move 않되도록 모든 데이타 처리후 file move
dto.getFileInfoList().forEach((fi) -> {
try {
@@ -203,7 +204,12 @@ public class EcCctvCrackdownService implements IEcCctvCrackdownService {
, new File(rcvBackupRoot + uploadBusCctvPath + "/" + fi.getFileNm())
);
- } catch (IOException ie) {
+ } catch (NullPointerException npe){
+ log.error("{}[{}]", "버스전용차로 데이타 parsing 에러::처리할 파일이 부정확 합니다.", fi.getFileNm());
+ } catch (FileExistsException fee){
+ log.error("{}[{}]", "버스전용차로 데이타 parsing 에러::처리된 데이타 입니다.", fi.getFileNm());
+ } catch (IOException ie){
+ log.error("버스전용차로 데이타 parsing 에러::{}", ie.getLocalizedMessage());
ie.printStackTrace();
}
});
diff --git a/src/main/java/kr/xit/fims/biz/ec/service/EcNatlNewspaperService.java b/src/main/java/kr/xit/fims/biz/ec/service/EcNatlNewspaperService.java
index ec7d398b..68f5ea1b 100644
--- a/src/main/java/kr/xit/fims/biz/ec/service/EcNatlNewspaperService.java
+++ b/src/main/java/kr/xit/fims/biz/ec/service/EcNatlNewspaperService.java
@@ -15,6 +15,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
+import org.apache.commons.io.FileExistsException;
import org.apache.commons.io.FileUtils;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Value;
@@ -160,10 +161,23 @@ public class EcNatlNewspaperService implements IEcNatlNewspaperService {
};
});
- // FIXME: src file backup
+ // FIXME: src file backup - rollback이 필요한 경우 BizException throw 필요
// rollback시 파일이 move 않되도록 모든 데이타 처리후 file move
dto.getFileInfoList().forEach((fi) -> {
- processOrgFileBackup(filePath, fi);
+ try {
+ FileUtils.moveFile(
+ new File(filePath + "/" + fi.getFileNm())
+ , new File(rcvBackupRoot + uploadNewsPaperPath + "/" + fi.getFileNm())
+ );
+
+ } catch (NullPointerException npe){
+ log.error("{}[{}]", "시민신고[국민신문고] 데이타 parsing 에러::처리할 파일이 부정확 합니다.", fi.getFileNm());
+ } catch (FileExistsException fee){
+ log.error("{}[{}]", "시민신고[국민신문고] 데이타 parsing 에러::처리된 데이타 입니다.", fi.getFileNm());
+ } catch (IOException ie){
+ log.error("시민신고[국민신문고] 데이타 parsing 에러::{}", ie.getLocalizedMessage());
+ ie.printStackTrace();
+ }
});
}
@@ -472,16 +486,4 @@ public class EcNatlNewspaperService implements IEcNatlNewspaperService {
dateStr = dateStr.substring(0,4) + "/" + dateStr.substring(4);
return "/" + dateStr;
}
-
- private void processOrgFileBackup(String filePath, FolderReqDTO.FileInfo fi) {
- try {
- FileUtils.moveFile(
- new File(filePath + "/" + fi.getFileNm())
- , new File(rcvBackupRoot + uploadNewsPaperPath + "/" + fi.getFileNm())
- );
-
- } catch (IOException fee){
- fee.printStackTrace();
- }
- }
}
diff --git a/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/biz/cmmn/BizIncludeBase.jsp b/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/biz/cmmn/BizIncludeBase.jsp
index 9936f649..735c830f 100644
--- a/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/biz/cmmn/BizIncludeBase.jsp
+++ b/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/biz/cmmn/BizIncludeBase.jsp
@@ -64,6 +64,26 @@
+
+
+
+
<%--TODO: 보완 필요 : 공통 ajax 호출 모듈과 통합 필요 --%>