./gradlew :spotlessApply 실행
This commit is contained in:
@@ -4,7 +4,6 @@ import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.Dashboard;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.Detail;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.SearchReq;
|
||||
import com.kamco.cd.kamcoback.inference.service.InferenceResultService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
@@ -29,132 +28,125 @@ public class InferenceResultApiController {
|
||||
|
||||
private final InferenceResultService inferenceResultService;
|
||||
|
||||
@Operation(
|
||||
summary = "추론관리 분석결과 목록 조회",
|
||||
description =
|
||||
"분석상태, 제목으로 분석결과를 조회 합니다.")
|
||||
@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)
|
||||
})
|
||||
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.AnalResList>> 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,
|
||||
@Parameter(description = "페이지 크기", example = "20") @RequestParam(defaultValue = "20")
|
||||
int size,
|
||||
@Parameter(description = "정렬 조건 (형식: 필드명,방향)", example = "name,asc")
|
||||
@RequestParam(required = false)
|
||||
String sort
|
||||
) {
|
||||
InferenceResultDto.SearchReq searchReq = new InferenceResultDto.SearchReq(statCode, title, page, size, sort);
|
||||
Page<InferenceResultDto.AnalResList> analResList = inferenceResultService.getInferenceResultList(searchReq);
|
||||
@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,
|
||||
@Parameter(description = "페이지 크기", example = "20") @RequestParam(defaultValue = "20")
|
||||
int size,
|
||||
@Parameter(description = "정렬 조건 (형식: 필드명,방향)", example = "name,asc")
|
||||
@RequestParam(required = false)
|
||||
String sort) {
|
||||
InferenceResultDto.SearchReq searchReq =
|
||||
new InferenceResultDto.SearchReq(statCode, title, page, size, sort);
|
||||
Page<InferenceResultDto.AnalResList> analResList =
|
||||
inferenceResultService.getInferenceResultList(searchReq);
|
||||
return ApiResponseDto.ok(analResList);
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "추론관리 분석결과 요약정보",
|
||||
description =
|
||||
"분석결과 요약정보를 조회합니다.")
|
||||
@Operation(summary = "추론관리 분석결과 요약정보", description = "분석결과 요약정보를 조회합니다.")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "검색 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = InferenceResultDto.AnalResSummary.class))),
|
||||
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "검색 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = InferenceResultDto.AnalResSummary.class))),
|
||||
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@GetMapping("/summary")
|
||||
public ApiResponseDto<InferenceResultDto.AnalResSummary> getInferenceResultSummary(
|
||||
@Parameter(description = "목록 id", example = "1")
|
||||
@RequestParam Long id) {
|
||||
@Parameter(description = "목록 id", example = "1") @RequestParam Long id) {
|
||||
return ApiResponseDto.ok(inferenceResultService.getInferenceResultSummary(id));
|
||||
}
|
||||
|
||||
|
||||
@Operation(
|
||||
summary = "추론관리 분석결과 상세",
|
||||
description =
|
||||
"분석결과 상제 정보 Summary, DashBoard")
|
||||
@Operation(summary = "추론관리 분석결과 상세", description = "분석결과 상제 정보 Summary, DashBoard")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "검색 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = InferenceResultDto.Detail.class))),
|
||||
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "검색 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = InferenceResultDto.Detail.class))),
|
||||
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@GetMapping("/detail")
|
||||
public ApiResponseDto<InferenceResultDto.Detail> getInferenceDetail(
|
||||
@Parameter(description = "목록 id", example = "1")
|
||||
@RequestParam Long id) {
|
||||
@Parameter(description = "목록 id", example = "1") @RequestParam Long id) {
|
||||
// summary
|
||||
InferenceResultDto.AnalResSummary summary = inferenceResultService.getInferenceResultSummary(id);
|
||||
//dashBoard
|
||||
InferenceResultDto.AnalResSummary summary =
|
||||
inferenceResultService.getInferenceResultSummary(id);
|
||||
// dashBoard
|
||||
List<InferenceResultDto.Dashboard> dashboardList = this.getInferenceResultDashboard(id);
|
||||
return ApiResponseDto.ok(new Detail(summary, dashboardList));
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "추론관리 분석결과 상세 목록",
|
||||
description =
|
||||
"추론관리 분석결과 상세 목록 geojson 데이터 조회")
|
||||
@Operation(summary = "추론관리 분석결과 상세 목록", description = "추론관리 분석결과 상세 목록 geojson 데이터 조회")
|
||||
@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)
|
||||
})
|
||||
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("/geom")
|
||||
public ApiResponseDto<Page<InferenceResultDto.Geom>> getInferenceResultGeomList(
|
||||
@Parameter(description = "기준년도 분류", example = "0001") @RequestParam(required = false) String targetClass,
|
||||
@Parameter(description = "비교년도 분류", example = "0002") @RequestParam(required = false) String compareClass,
|
||||
@Parameter(description = "5000:1 도협번호 37801011,37801012") @RequestParam(required = false) List<Long> mapSheetNum,
|
||||
@Parameter(description = "페이지 번호 (0부터 시작)", example = "0") @RequestParam(defaultValue = "0") int page,
|
||||
@Parameter(description = "페이지 크기", example = "20") @RequestParam(defaultValue = "20") int size,
|
||||
@Parameter(description = "정렬 조건 (형식: 필드명,방향)", example = "name,asc") @RequestParam(required = false) String sort
|
||||
) {
|
||||
InferenceResultDto.SearchGeoReq searchGeoReq = new InferenceResultDto.SearchGeoReq(targetClass, compareClass, mapSheetNum, page, size, sort);
|
||||
Page<InferenceResultDto.Geom> geomList = inferenceResultService.getInferenceResultGeomList(searchGeoReq);
|
||||
@Parameter(description = "기준년도 분류", example = "0001") @RequestParam(required = false)
|
||||
String targetClass,
|
||||
@Parameter(description = "비교년도 분류", example = "0002") @RequestParam(required = false)
|
||||
String compareClass,
|
||||
@Parameter(description = "5000:1 도협번호 37801011,37801012") @RequestParam(required = false)
|
||||
List<Long> mapSheetNum,
|
||||
@Parameter(description = "페이지 번호 (0부터 시작)", example = "0") @RequestParam(defaultValue = "0")
|
||||
int page,
|
||||
@Parameter(description = "페이지 크기", example = "20") @RequestParam(defaultValue = "20")
|
||||
int size,
|
||||
@Parameter(description = "정렬 조건 (형식: 필드명,방향)", example = "name,asc")
|
||||
@RequestParam(required = false)
|
||||
String sort) {
|
||||
InferenceResultDto.SearchGeoReq searchGeoReq =
|
||||
new InferenceResultDto.SearchGeoReq(
|
||||
targetClass, compareClass, mapSheetNum, page, size, sort);
|
||||
Page<InferenceResultDto.Geom> geomList =
|
||||
inferenceResultService.getInferenceResultGeomList(searchGeoReq);
|
||||
return ApiResponseDto.ok(geomList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 분석결과 상세 대시보드 조회
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
private List<Dashboard> getInferenceResultDashboard(Long id) {
|
||||
return inferenceResultService.getInferenceResultBasic(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user