파일중복처리 수정
This commit is contained in:
@@ -108,25 +108,18 @@ public class MapSheetMngService {
|
|||||||
String targetYearDir = mngDto.getMngPath();
|
String targetYearDir = mngDto.getMngPath();
|
||||||
|
|
||||||
// 중복체크
|
// 중복체크
|
||||||
|
if( !overwrite ) {
|
||||||
|
|
||||||
|
/*
|
||||||
List<FIleChecker.Basic> basicTfwList =
|
List<FIleChecker.Basic> basicTfwList =
|
||||||
FIleChecker.getFilesFromAllDepth(targetYearDir, tfwFile.getOriginalFilename(), "tfw");
|
FIleChecker.getFilesFromAllDepth(targetYearDir, tfwFile.getOriginalFilename(), "tfw");
|
||||||
|
|
||||||
List<FIleChecker.Basic> basicTifList =
|
List<FIleChecker.Basic> basicTifList =
|
||||||
FIleChecker.getFilesFromAllDepth(targetYearDir, tifFile.getOriginalFilename(), "tif");
|
FIleChecker.getFilesFromAllDepth(targetYearDir, tifFile.getOriginalFilename(), "tif");
|
||||||
|
*/
|
||||||
|
int tfwCnt = FIleChecker.getFileCountFromAllDepth(targetYearDir, tfwFile.getOriginalFilename(), "tfw");
|
||||||
|
int tifCnt = FIleChecker.getFileCountFromAllDepth(targetYearDir, tfwFile.getOriginalFilename(), "tfw");
|
||||||
|
|
||||||
int tfwCnt =
|
|
||||||
(int)
|
|
||||||
basicTfwList.stream()
|
|
||||||
.filter(dto -> dto.getExtension().toString().equals("tfw"))
|
|
||||||
.count();
|
|
||||||
|
|
||||||
int tifCnt =
|
|
||||||
(int)
|
|
||||||
basicTifList.stream()
|
|
||||||
.filter(dto -> dto.getExtension().toString().equals("tif"))
|
|
||||||
.count();
|
|
||||||
|
|
||||||
if( !overwrite ) {
|
|
||||||
if (tfwCnt > 0 || tifCnt > 0) {
|
if (tfwCnt > 0 || tifCnt > 0) {
|
||||||
String tfwtifMsg = "";
|
String tfwtifMsg = "";
|
||||||
if (tfwCnt > 0)
|
if (tfwCnt > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user