추론관리 분석결과 목록조회 추가

This commit is contained in:
2025-11-21 12:32:30 +09:00
parent d934f37488
commit 4cf550ef4f
8 changed files with 250 additions and 64 deletions

View File

@@ -1,10 +1,21 @@
package com.kamco.cd.kamcoback.inference;
import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
import com.kamco.cd.kamcoback.inference.service.InferenceResultService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@Tag(name = "분석결과", description = "추론관리 분석결과")
@@ -15,4 +26,34 @@ public class InferenceResultApiController {
private final InferenceResultService inferenceResultService;
@Operation(
summary = "추론관리 분석결과 목록 조회",
description =
"분석상태, 제목으로 분석결과를 조회 합니다.")
@ApiResponses(
value = {
@ApiResponse(
responseCode = "200",
description = "검색 성공",
content =
@Content(
mediaType = "application/json",
schema = @Schema(implementation = Page.class))),
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
})
@GetMapping("/list")
public ApiResponseDto<Page<InferenceResultDto.Basic>> getInferenceResultList(
@Parameter(description = "분석상태", example = "0000")
@RequestParam(required = false)
String statCode,
@Parameter(description = "검색", example = "2023_2024년도") @RequestParam(required = false)
String title,
@Parameter(description = "페이지 번호 (0부터 시작)", example = "0") @RequestParam(defaultValue = "0")
int page
) {
InferenceResultDto.SearchReq searchReq = new InferenceResultDto.SearchReq(statCode, title, page, 20, null);
Page<InferenceResultDto.Basic> zoos = inferenceResultService.getInferenceResultList(searchReq);
return ApiResponseDto.ok(zoos);
}
}