파일싱크 수정

This commit is contained in:
Harry M. You
2025-12-05 16:42:44 +09:00
parent fba9a14035
commit 21cc84f86a
5 changed files with 29 additions and 16 deletions

View File

@@ -36,35 +36,35 @@ public class MapSheetMngFileCheckerCoreService {
private String activeEnv;
public MapSheetMngDto.DmlReturn syncProcess(ImageryDto.searchReq searchReq) {
int count = 0;
public ImageryDto.SyncReturn syncProcess(ImageryDto.searchReq searchReq) {
String flag = "SUCCESS";
int syncCnt = 0;
int tfwErrCnt = 0;
int tifErrCnt = 0;
//대상파일목록 가저오기
Page<ImageryDto.SyncDto> pageImagerySyncDto = mapSheetMngFileCheckerRepository.findImagerySyncList(searchReq);
for (ImageryDto.SyncDto dto : pageImagerySyncDto.getContent()) {
boolean isTfwFile = true;
isTfwFile = FIleChecker.checkTfw(dto.getMiddlePath()+dto.getFilename());
//boolean isCogTiffFile = true;
//isCogTiffFile = FIleChecker.checkGeoTiff("D:\\kamco_cog\\36713\\36713073_cog.tif");
boolean isGdalInfoTiffFile = true;
//isGdalInfoTiffFile = FIleChecker.cmmndGdalInfo("D:\\kamco_cog\\36713\\36713073_cog.tif");
isGdalInfoTiffFile = FIleChecker.cmmndGdalInfo("D:/kamco_cog/36713/36713073_cog.tif");
System.out.println("isTfwFile == " + isTfwFile);
System.out.println("isGdalInfoTiffFile == " + isGdalInfoTiffFile);
// 여기에 처리 로직 작성
isGdalInfoTiffFile = FIleChecker.cmmndGdalInfo(dto.getCogMiddlePath()+dto.getCogFilename());
//isGdalInfoTiffFile = FIleChecker.cmmndGdalInfo("D:/kamco_cog/36713/36713073_cog.tif");
syncCnt = syncCnt + 1;
if( !isTfwFile )tfwErrCnt = tfwErrCnt + 1;
if( !isGdalInfoTiffFile )tifErrCnt = tifErrCnt + 1;
// 예: 특정 작업 수행
// someService.process(dto);
}
return new MapSheetMngDto.DmlReturn("success", count + "개 업로드 성공하였습니다.");
if( tfwErrCnt > 0 || tifErrCnt > 0 )flag = "ERROR";
return new ImageryDto.SyncReturn(flag, syncCnt, tfwErrCnt, tifErrCnt);
}
}