기준년도 없을때 throw 추가

This commit is contained in:
2026-02-26 16:53:29 +09:00
parent 5c9f33d210
commit 046f4f06d3
2 changed files with 17 additions and 1 deletions

View File

@@ -133,7 +133,7 @@ public class InferenceResultApiController {
}
/** 변화탐지 실행 정보 입력화면에서 호출 */
@Operation(summary = "변화탐지 실행 정보 입력", description = "추론관리 > 추론목록 > 변화탐지 실행 정보 입력")
@Operation(summary = "변화탐지 실행 정보 입력, 추론실행", description = "추론관리 > 추론목록 > 변화탐지 실행 정보 입력")
@ApiResponses(
value = {
@ApiResponse(

View File

@@ -137,6 +137,10 @@ public class InferenceResultService {
// target 도엽 조회
List<MngListDto> targetDtoList = mapSheetMngCoreService.getHstMapSheetList(req);
if (targetDtoList == null || targetDtoList.isEmpty()) {
throw new CustomApiException("NOT_FOUND", HttpStatus.NOT_FOUND, "기준년도 추론가능한 도엽이 없습니다.");
}
// target 리스트 추출 (null 제거 + 중복 제거)
List<String> targetList =
targetDtoList.stream()
@@ -161,6 +165,10 @@ public class InferenceResultService {
// 도엽 비교 로그 출력
logYearComparison(targetList, compareList, filteredTargetList);
if (filteredTargetList == null || filteredTargetList.isEmpty()) {
throw new CustomApiException("NOT_FOUND", HttpStatus.NOT_FOUND, "추론 가능한 도엽을 확인해 주세요.");
}
// compare geojson 파일 생성
Scene compareScene =
getSceneInference(
@@ -198,6 +206,10 @@ public class InferenceResultService {
// target 목록 조회
List<MngListDto> targetDtoList = mapSheetMngCoreService.getHstMapSheetList(req);
if (targetDtoList == null || targetDtoList.isEmpty()) {
throw new CustomApiException("NOT_FOUND", HttpStatus.NOT_FOUND, "기준년도 추론가능한 도엽이 없습니다.");
}
// target 도엽번호 리스트 추출 중복 제거
List<String> targetList =
targetDtoList.stream()
@@ -276,6 +288,10 @@ public class InferenceResultService {
targetList.size() - filteredTargetList.size(), // compare에 존재하지 않는 target 도엽 수
compareOnlyCount); // target 에 존재하지 않는 compare 도엽수
if (filteredTargetList == null || filteredTargetList.isEmpty()) {
throw new CustomApiException("NOT_FOUND", HttpStatus.NOT_FOUND, "추론 가능한 도엽을 확인해 주세요.");
}
// compare 기준 geojson 생성 (년도 fallback 반영)
Scene compareScene =
getSceneInference(