모델관리 수정

This commit is contained in:
Moon
2026-01-09 12:03:42 +09:00
parent 13c8e7b09b
commit 85c7c53660
9 changed files with 195 additions and 10 deletions

View File

@@ -280,4 +280,24 @@ public class MapSheetMngApiController {
return ApiResponseDto.createOK(mapSheetMngService.getFilesAll(srchDto));
}
@Operation(summary = "영상 데이터 관리 완료 년도 목록 조회", description = "영상 데이터 관리 완료 년도 목록 조회")
@ApiResponses(
value = {
@ApiResponse(
responseCode = "200",
description = "조회 성공",
content =
@Content(
mediaType = "application/json",
schema = @Schema(implementation = CommonCodeDto.Basic.class))),
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
})
@PostMapping("/mng-done-yyyy-list")
public ApiResponseDto<List<Integer>> findMapSheetMngDoneYyyyList() {
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngDoneYyyyList());
}
}

View File

@@ -23,6 +23,7 @@ import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
@@ -338,4 +339,15 @@ public class MapSheetMngService {
public void getSceneInference(String yyyy) {
mapSheetMngCoreService.getSceneInference(yyyy);
}
public List<Integer> findMapSheetMngDoneYyyyList() {
List<MngDto> mngList = mapSheetMngCoreService.findMapSheetMngList();
List<Integer> yearList = mngList.stream()
.filter(dto -> "DONE".equals(dto.getMngState()))
.map(dto -> dto.getMngYyyy()) // 날짜 객체에서 연도(int)만 추출
.toList();
return yearList;
}
}