모델,파일싱크 수정
This commit is contained in:
@@ -512,6 +512,16 @@ public class FIleChecker {
|
|||||||
return FileSystemUtils.deleteRecursively(new File(path));
|
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) {
|
public static boolean validationMultipart(MultipartFile mfile) {
|
||||||
// 파일 유효성 검증
|
// 파일 유효성 검증
|
||||||
if (mfile == null || mfile.isEmpty() || mfile.getSize() == 0) {
|
if (mfile == null || mfile.isEmpty() || mfile.getSize() == 0) {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import com.kamco.cd.kamcoback.upload.service.UploadService;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
import java.nio.file.Paths;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@@ -141,6 +142,9 @@ public class ModelMngService {
|
|||||||
|
|
||||||
modelMngCoreService.insertModelResultMetric(modelMetricAddReq);
|
modelMngCoreService.insertModelResultMetric(modelMetricAddReq);
|
||||||
|
|
||||||
|
String zipFilePath = addReq.getFilePath() + "/" + addReq.getFileName();
|
||||||
|
boolean isDeleted = FIleChecker.deleteFile(zipFilePath);
|
||||||
|
|
||||||
return new ApiResponseDto.ResponseObj(ApiResponseDto.ApiResponseCode.OK, "등록되었습니다.");
|
return new ApiResponseDto.ResponseObj(ApiResponseDto.ApiResponseCode.OK, "등록되었습니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -235,18 +235,18 @@ public class MapSheetMngFileJobService {
|
|||||||
// List<String> mapSheetNums = new ArrayList<>();
|
// List<String> mapSheetNums = new ArrayList<>();
|
||||||
// mapSheetNums.add(mapSheetNum);
|
// mapSheetNums.add(mapSheetNum);
|
||||||
|
|
||||||
int strtYyyy = mngYyyy - syncAutoExceptionBeforeYearCnt;
|
int strtYyyy = mngYyyy - syncAutoExceptionBeforeYearCnt + 1;
|
||||||
int endYyyy = mngYyyy - 1;
|
int endYyyy = mngYyyy;
|
||||||
|
|
||||||
// 이전년도가 3개년인 도엽 확인
|
// 본년도+이전년도가 3개년인 도엽 확인
|
||||||
Long beforeCnt =
|
Long beforeCnt =
|
||||||
mapSheetMngFileJobCoreService.findByHstMapSheetBeforeYyyyListCount(
|
mapSheetMngFileJobCoreService.findByHstMapSheetBeforeYyyyListCount(
|
||||||
strtYyyy, endYyyy, mapSheetNum);
|
strtYyyy, endYyyy, mapSheetNum);
|
||||||
|
|
||||||
System.out.println("mapSheetAutoExceptionUpdate mapSheetNum == " + mapSheetNum);
|
//System.out.println("mapSheetAutoExceptionUpdate mapSheetNum == " + mapSheetNum);
|
||||||
System.out.println("mapSheetAutoExceptionUpdate strtYyyy == " + strtYyyy);
|
//System.out.println("mapSheetAutoExceptionUpdate strtYyyy == " + strtYyyy);
|
||||||
System.out.println("mapSheetAutoExceptionUpdate endYyyy == " + endYyyy);
|
//System.out.println("mapSheetAutoExceptionUpdate endYyyy == " + endYyyy);
|
||||||
System.out.println("mapSheetAutoExceptionUpdate beforeCnt == " + beforeCnt);
|
//System.out.println("mapSheetAutoExceptionUpdate beforeCnt == " + beforeCnt);
|
||||||
if (beforeCnt == 0) {
|
if (beforeCnt == 0) {
|
||||||
System.out.println("mapSheetAutoExceptionUpdate inference == 자동추론제외");
|
System.out.println("mapSheetAutoExceptionUpdate inference == 자동추론제외");
|
||||||
mapSheetMngFileJobCoreService.updateException5kMapSheet(mapSheetNum);
|
mapSheetMngFileJobCoreService.updateException5kMapSheet(mapSheetNum);
|
||||||
|
|||||||
Reference in New Issue
Block a user