모델,파일싱크 수정

This commit is contained in:
Moon
2026-01-23 18:29:58 +09:00
parent 1bb0ca2e40
commit d0d079f852
3 changed files with 21 additions and 7 deletions

View File

@@ -512,6 +512,16 @@ public class FIleChecker {
return FileSystemUtils.deleteRecursively(new File(path));
}
public static boolean deleteFile(String filePath) {
Path path = Paths.get(filePath);
try {
return Files.deleteIfExists(path);
} catch (IOException e) {
return false;
}
}
public static boolean validationMultipart(MultipartFile mfile) {
// 파일 유효성 검증
if (mfile == null || mfile.isEmpty() || mfile.getSize() == 0) {

View File

@@ -15,6 +15,7 @@ import com.kamco.cd.kamcoback.upload.service.UploadService;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.LocalDate;
import java.util.List;
import java.util.UUID;
@@ -141,6 +142,9 @@ public class ModelMngService {
modelMngCoreService.insertModelResultMetric(modelMetricAddReq);
String zipFilePath = addReq.getFilePath() + "/" + addReq.getFileName();
boolean isDeleted = FIleChecker.deleteFile(zipFilePath);
return new ApiResponseDto.ResponseObj(ApiResponseDto.ApiResponseCode.OK, "등록되었습니다.");
}

View File

@@ -235,18 +235,18 @@ public class MapSheetMngFileJobService {
// List<String> mapSheetNums = new ArrayList<>();
// mapSheetNums.add(mapSheetNum);
int strtYyyy = mngYyyy - syncAutoExceptionBeforeYearCnt;
int endYyyy = mngYyyy - 1;
int strtYyyy = mngYyyy - syncAutoExceptionBeforeYearCnt + 1;
int endYyyy = mngYyyy;
// 이전년도가 3개년인 도엽 확인
// 본년도+이전년도가 3개년인 도엽 확인
Long beforeCnt =
mapSheetMngFileJobCoreService.findByHstMapSheetBeforeYyyyListCount(
strtYyyy, endYyyy, mapSheetNum);
System.out.println("mapSheetAutoExceptionUpdate mapSheetNum == " + mapSheetNum);
System.out.println("mapSheetAutoExceptionUpdate strtYyyy == " + strtYyyy);
System.out.println("mapSheetAutoExceptionUpdate endYyyy == " + endYyyy);
System.out.println("mapSheetAutoExceptionUpdate beforeCnt == " + beforeCnt);
//System.out.println("mapSheetAutoExceptionUpdate mapSheetNum == " + mapSheetNum);
//System.out.println("mapSheetAutoExceptionUpdate strtYyyy == " + strtYyyy);
//System.out.println("mapSheetAutoExceptionUpdate endYyyy == " + endYyyy);
//System.out.println("mapSheetAutoExceptionUpdate beforeCnt == " + beforeCnt);
if (beforeCnt == 0) {
System.out.println("mapSheetAutoExceptionUpdate inference == 자동추론제외");
mapSheetMngFileJobCoreService.updateException5kMapSheet(mapSheetNum);