From 6f14dbfc0f5a5763e3a1bfaee1abfd805d1b9d09 Mon Sep 17 00:00:00 2001 From: DanielLee <198891672+sanghyeonhd@users.noreply.github.com> Date: Thu, 15 Jan 2026 14:19:20 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EB=8B=A8?= =?UTF-8?q?=EC=9D=BC=EC=A1=B0=ED=9A=8C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TrainingDataLabelRepositoryImpl.java | 63 +++++++++++-------- .../TrainingDataReviewRepositoryImpl.java | 63 +++++++++++-------- .../TrainingDataLabelApiController.java | 7 ++- .../TrainingDataReviewApiController.java | 7 ++- .../service/TrainingDataLabelService.java | 6 +- .../service/TrainingDataReviewService.java | 6 +- 6 files changed, 90 insertions(+), 62 deletions(-) diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataLabelRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataLabelRepositoryImpl.java index cb22f514..ae383000 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataLabelRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataLabelRepositoryImpl.java @@ -772,34 +772,47 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport public TrainingDataLabelDto.CogImageResponse getCogImageUrl( String mapSheetNum, Integer beforeYear, Integer afterYear) { try { - // beforeYear COG URL 조회 - String beforeCogUrl = - queryFactory - .select( - Expressions.stringTemplate( - "{0} || {1}", imageryEntity.cogMiddlePath, imageryEntity.cogFilename)) - .from(imageryEntity) - .where(imageryEntity.scene5k.eq(mapSheetNum), imageryEntity.year.eq(beforeYear)) - .fetchFirst(); + // 최소 하나의 년도는 제공되어야 함 + if (beforeYear == null && afterYear == null) { + throw new IllegalArgumentException("At least one year parameter (beforeYear or afterYear) must be provided"); + } - // afterYear COG URL 조회 - String afterCogUrl = - queryFactory - .select( - Expressions.stringTemplate( - "{0} || {1}", imageryEntity.cogMiddlePath, imageryEntity.cogFilename)) - .from(imageryEntity) - .where(imageryEntity.scene5k.eq(mapSheetNum), imageryEntity.year.eq(afterYear)) - .fetchFirst(); + String beforeCogUrl = null; + String afterCogUrl = null; - if (beforeCogUrl == null && afterCogUrl == null) { + // beforeYear가 제공된 경우 COG URL 조회 + if (beforeYear != null) { + beforeCogUrl = + queryFactory + .select( + Expressions.stringTemplate( + "{0} || {1}", imageryEntity.cogMiddlePath, imageryEntity.cogFilename)) + .from(imageryEntity) + .where(imageryEntity.scene5k.eq(mapSheetNum), imageryEntity.year.eq(beforeYear)) + .fetchFirst(); + } + + // afterYear가 제공된 경우 COG URL 조회 + if (afterYear != null) { + afterCogUrl = + queryFactory + .select( + Expressions.stringTemplate( + "{0} || {1}", imageryEntity.cogMiddlePath, imageryEntity.cogFilename)) + .from(imageryEntity) + .where(imageryEntity.scene5k.eq(mapSheetNum), imageryEntity.year.eq(afterYear)) + .fetchFirst(); + } + + // 제공된 년도에 대해 하나도 찾지 못한 경우에만 예외 발생 + if ((beforeYear != null && beforeCogUrl == null) && (afterYear != null && afterCogUrl == null)) { throw new RuntimeException( "COG images not found for mapSheetNum: " + mapSheetNum + ", years: " - + beforeYear - + ", " - + afterYear); + + (beforeYear != null ? beforeYear : "") + + (beforeYear != null && afterYear != null ? ", " : "") + + (afterYear != null ? afterYear : "")); } return TrainingDataLabelDto.CogImageResponse.builder() @@ -817,9 +830,9 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport "Failed to get COG image URLs for mapSheetNum: " + mapSheetNum + ", years: " - + beforeYear - + ", " - + afterYear, + + (beforeYear != null ? beforeYear : "") + + (beforeYear != null && afterYear != null ? ", " : "") + + (afterYear != null ? afterYear : ""), e); } } diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataReviewRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataReviewRepositoryImpl.java index 956e336b..46d3b466 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataReviewRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataReviewRepositoryImpl.java @@ -776,34 +776,47 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport public TrainingDataReviewDto.CogImageResponse getCogImageUrl( String mapSheetNum, Integer beforeYear, Integer afterYear) { try { - // beforeYear COG URL 조회 - String beforeCogUrl = - queryFactory - .select( - Expressions.stringTemplate( - "{0} || {1}", imageryEntity.cogMiddlePath, imageryEntity.cogFilename)) - .from(imageryEntity) - .where(imageryEntity.scene5k.eq(mapSheetNum), imageryEntity.year.eq(beforeYear)) - .fetchFirst(); + // 최소 하나의 년도는 제공되어야 함 + if (beforeYear == null && afterYear == null) { + throw new IllegalArgumentException("At least one year parameter (beforeYear or afterYear) must be provided"); + } - // afterYear COG URL 조회 - String afterCogUrl = - queryFactory - .select( - Expressions.stringTemplate( - "{0} || {1}", imageryEntity.cogMiddlePath, imageryEntity.cogFilename)) - .from(imageryEntity) - .where(imageryEntity.scene5k.eq(mapSheetNum), imageryEntity.year.eq(afterYear)) - .fetchFirst(); + String beforeCogUrl = null; + String afterCogUrl = null; - if (beforeCogUrl == null && afterCogUrl == null) { + // beforeYear가 제공된 경우 COG URL 조회 + if (beforeYear != null) { + beforeCogUrl = + queryFactory + .select( + Expressions.stringTemplate( + "{0} || {1}", imageryEntity.cogMiddlePath, imageryEntity.cogFilename)) + .from(imageryEntity) + .where(imageryEntity.scene5k.eq(mapSheetNum), imageryEntity.year.eq(beforeYear)) + .fetchFirst(); + } + + // afterYear가 제공된 경우 COG URL 조회 + if (afterYear != null) { + afterCogUrl = + queryFactory + .select( + Expressions.stringTemplate( + "{0} || {1}", imageryEntity.cogMiddlePath, imageryEntity.cogFilename)) + .from(imageryEntity) + .where(imageryEntity.scene5k.eq(mapSheetNum), imageryEntity.year.eq(afterYear)) + .fetchFirst(); + } + + // 제공된 년도에 대해 하나도 찾지 못한 경우에만 예외 발생 + if ((beforeYear != null && beforeCogUrl == null) && (afterYear != null && afterCogUrl == null)) { throw new RuntimeException( "COG images not found for mapSheetNum: " + mapSheetNum + ", years: " - + beforeYear - + ", " - + afterYear); + + (beforeYear != null ? beforeYear : "") + + (beforeYear != null && afterYear != null ? ", " : "") + + (afterYear != null ? afterYear : "")); } return TrainingDataReviewDto.CogImageResponse.builder() @@ -821,9 +834,9 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport "Failed to get COG image URLs for mapSheetNum: " + mapSheetNum + ", years: " - + beforeYear - + ", " - + afterYear, + + (beforeYear != null ? beforeYear : "") + + (beforeYear != null && afterYear != null ? ", " : "") + + (afterYear != null ? afterYear : ""), e); } } diff --git a/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataLabelApiController.java b/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataLabelApiController.java index 510f5a20..7b61329b 100644 --- a/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataLabelApiController.java +++ b/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataLabelApiController.java @@ -465,7 +465,7 @@ public class TrainingDataLabelApiController { return ApiResponseDto.okObject(trainingDataLabelService.saveNewPolygon(request)); } - @Operation(summary = "COG 이미지 URL 조회", description = "변화 전/후 COG 이미지 URL을 함께 조회합니다") + @Operation(summary = "COG 이미지 URL 조회", description = "변화 전/후 COG 이미지 URL을 조회합니다. beforeYear와 afterYear 중 최소 하나는 필수입니다.") @ApiResponses( value = { @ApiResponse( @@ -476,6 +476,7 @@ public class TrainingDataLabelApiController { mediaType = "application/json", schema = @Schema(implementation = TrainingDataLabelDto.CogImageResponse.class))), + @ApiResponse(responseCode = "400", description = "년도 파라미터가 하나도 제공되지 않음", content = @Content), @ApiResponse(responseCode = "404", description = "이미지를 찾을 수 없음", content = @Content), @ApiResponse(responseCode = "500", description = "서버 오류", content = @Content) }) @@ -483,9 +484,9 @@ public class TrainingDataLabelApiController { public ApiResponseDto getCogImageUrl( @Parameter(description = "도엽번호", required = true, example = "35905086") @RequestParam String mapSheetNum, - @Parameter(description = "변화 전 년도", required = true, example = "2023") @RequestParam + @Parameter(description = "변화 전 년도", required = false, example = "2023") @RequestParam(required = false) Integer beforeYear, - @Parameter(description = "변화 후 년도", required = true, example = "2024") @RequestParam + @Parameter(description = "변화 후 년도", required = false, example = "2024") @RequestParam(required = false) Integer afterYear) { return ApiResponseDto.ok( trainingDataLabelService.getCogImageUrl(mapSheetNum, beforeYear, afterYear)); diff --git a/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataReviewApiController.java b/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataReviewApiController.java index 89d4e37d..425bb741 100644 --- a/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataReviewApiController.java +++ b/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataReviewApiController.java @@ -465,7 +465,7 @@ public class TrainingDataReviewApiController { return ApiResponseDto.okObject(trainingDataReviewService.saveNewPolygon(request)); } - @Operation(summary = "COG 이미지 URL 조회", description = "변화 전/후 COG 이미지 URL을 함께 조회합니다") + @Operation(summary = "COG 이미지 URL 조회", description = "변화 전/후 COG 이미지 URL을 조회합니다. beforeYear와 afterYear 중 최소 하나는 필수입니다.") @ApiResponses( value = { @ApiResponse( @@ -476,6 +476,7 @@ public class TrainingDataReviewApiController { mediaType = "application/json", schema = @Schema(implementation = TrainingDataReviewDto.CogImageResponse.class))), + @ApiResponse(responseCode = "400", description = "년도 파라미터가 하나도 제공되지 않음", content = @Content), @ApiResponse(responseCode = "404", description = "이미지를 찾을 수 없음", content = @Content), @ApiResponse(responseCode = "500", description = "서버 오류", content = @Content) }) @@ -483,9 +484,9 @@ public class TrainingDataReviewApiController { public ApiResponseDto getCogImageUrl( @Parameter(description = "도엽번호", required = true, example = "35905086") @RequestParam String mapSheetNum, - @Parameter(description = "변화 전 년도", required = true, example = "2023") @RequestParam + @Parameter(description = "변화 전 년도", required = false, example = "2023") @RequestParam(required = false) Integer beforeYear, - @Parameter(description = "변화 후 년도", required = true, example = "2024") @RequestParam + @Parameter(description = "변화 후 년도", required = false, example = "2024") @RequestParam(required = false) Integer afterYear) { return ApiResponseDto.ok( trainingDataReviewService.getCogImageUrl(mapSheetNum, beforeYear, afterYear)); diff --git a/src/main/java/com/kamco/cd/kamcoback/trainingdata/service/TrainingDataLabelService.java b/src/main/java/com/kamco/cd/kamcoback/trainingdata/service/TrainingDataLabelService.java index 9e31efce..6b5696da 100644 --- a/src/main/java/com/kamco/cd/kamcoback/trainingdata/service/TrainingDataLabelService.java +++ b/src/main/java/com/kamco/cd/kamcoback/trainingdata/service/TrainingDataLabelService.java @@ -106,9 +106,9 @@ public class TrainingDataLabelService { * COG 이미지 URL 조회 (변화 전/후) * * @param mapSheetNum 도엽번호 - * @param beforeYear 변화 전 년도 - * @param afterYear 변화 후 년도 - * @return 변화 전/후 COG 이미지 URL + * @param beforeYear 변화 전 년도 (선택적) + * @param afterYear 변화 후 년도 (선택적) + * @return 변화 전/후 COG 이미지 URL (최소 하나의 년도는 제공되어야 함) */ public TrainingDataLabelDto.CogImageResponse getCogImageUrl( String mapSheetNum, Integer beforeYear, Integer afterYear) { diff --git a/src/main/java/com/kamco/cd/kamcoback/trainingdata/service/TrainingDataReviewService.java b/src/main/java/com/kamco/cd/kamcoback/trainingdata/service/TrainingDataReviewService.java index 067fea66..b81f2895 100644 --- a/src/main/java/com/kamco/cd/kamcoback/trainingdata/service/TrainingDataReviewService.java +++ b/src/main/java/com/kamco/cd/kamcoback/trainingdata/service/TrainingDataReviewService.java @@ -108,9 +108,9 @@ public class TrainingDataReviewService { * COG 이미지 URL 조회 (변화 전/후) * * @param mapSheetNum 도엽번호 - * @param beforeYear 변화 전 년도 - * @param afterYear 변화 후 년도 - * @return 변화 전/후 COG 이미지 URL + * @param beforeYear 변화 전 년도 (선택적) + * @param afterYear 변화 후 년도 (선택적) + * @return 변화 전/후 COG 이미지 URL (최소 하나의 년도는 제공되어야 함) */ public TrainingDataReviewDto.CogImageResponse getCogImageUrl( String mapSheetNum, Integer beforeYear, Integer afterYear) { From f46d15ef095d6b23c9be8be6d87ad7d3209851b9 Mon Sep 17 00:00:00 2001 From: Moon Date: Thu, 15 Jan 2026 14:30:05 +0900 Subject: [PATCH 2/4] =?UTF-8?q?GPU=EC=82=AC=EC=9A=A9=EC=9C=A8=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kamcoback/inference/dto/InferenceResultDto.java | 11 ++++++++--- .../Inference/MapSheetLearnRepositoryImpl.java | 5 ++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/kamco/cd/kamcoback/inference/dto/InferenceResultDto.java b/src/main/java/com/kamco/cd/kamcoback/inference/dto/InferenceResultDto.java index b8ea9831..123ce8d8 100644 --- a/src/main/java/com/kamco/cd/kamcoback/inference/dto/InferenceResultDto.java +++ b/src/main/java/com/kamco/cd/kamcoback/inference/dto/InferenceResultDto.java @@ -514,7 +514,8 @@ public class InferenceResultDto { @JsonIgnore private float cpu_system; @JsonIgnore private float memused; private Long kbmemused; - private float gpuUtil; + @JsonIgnore private float gpuMemUsed; + @JsonIgnore private float gpuMemTotal; // private String cpuStatusName; // private String memStatusName; @@ -526,6 +527,9 @@ public class InferenceResultDto { public float getCpuUseRate() { return this.cpu_user + this.cpu_system; } + public double getGpuUtil() { + return (this.gpuMemUsed / this.gpuMemTotal ) * 100.0; + } public String getServerStatus() { String enumId = "SAFETY"; @@ -549,7 +553,8 @@ public class InferenceResultDto { public String getGpuStatus() { String enumId = "SAFETY"; - if (this.gpuUtil >= 80) { + + if (this.getGpuUtil() >= 80L) { enumId = "CAUTION"; } return enumId; @@ -571,7 +576,7 @@ public class InferenceResultDto { } public String getGpuStatusName() { - if (this.gpuUtil >= 80) { + if (this.getGpuUtil() >= 80) { return ServerStatus.CAUTION.getText(); } return ServerStatus.SAFETY.getText(); diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java index 8221a663..bd63e154 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java @@ -135,7 +135,10 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto systemMetricEntity.cpuSystem, systemMetricEntity.memused, systemMetricEntity.kbmemused, - gpuMetricEntity.gpuUtil)) + //gpuMetricEntity.gpuUtil, + gpuMetricEntity.gpuMemUsed, + gpuMetricEntity.gpuMemTotal + )) .from(systemMetricEntity) .leftJoin(gpuMetricEntity) .on( From 8af0b2ce6062aed6779af3df8b4178dfba97fe71 Mon Sep 17 00:00:00 2001 From: Moon Date: Thu, 15 Jan 2026 14:49:17 +0900 Subject: [PATCH 3/4] =?UTF-8?q?GPU=EC=82=AC=EC=9A=A9=EC=9C=A8=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kamcoback/inference/dto/InferenceResultDto.java | 11 +++-------- .../Inference/MapSheetLearnRepositoryImpl.java | 13 +++++++------ 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/kamco/cd/kamcoback/inference/dto/InferenceResultDto.java b/src/main/java/com/kamco/cd/kamcoback/inference/dto/InferenceResultDto.java index 123ce8d8..b8ea9831 100644 --- a/src/main/java/com/kamco/cd/kamcoback/inference/dto/InferenceResultDto.java +++ b/src/main/java/com/kamco/cd/kamcoback/inference/dto/InferenceResultDto.java @@ -514,8 +514,7 @@ public class InferenceResultDto { @JsonIgnore private float cpu_system; @JsonIgnore private float memused; private Long kbmemused; - @JsonIgnore private float gpuMemUsed; - @JsonIgnore private float gpuMemTotal; + private float gpuUtil; // private String cpuStatusName; // private String memStatusName; @@ -527,9 +526,6 @@ public class InferenceResultDto { public float getCpuUseRate() { return this.cpu_user + this.cpu_system; } - public double getGpuUtil() { - return (this.gpuMemUsed / this.gpuMemTotal ) * 100.0; - } public String getServerStatus() { String enumId = "SAFETY"; @@ -553,8 +549,7 @@ public class InferenceResultDto { public String getGpuStatus() { String enumId = "SAFETY"; - - if (this.getGpuUtil() >= 80L) { + if (this.gpuUtil >= 80) { enumId = "CAUTION"; } return enumId; @@ -576,7 +571,7 @@ public class InferenceResultDto { } public String getGpuStatusName() { - if (this.getGpuUtil() >= 80) { + if (this.gpuUtil >= 80) { return ServerStatus.CAUTION.getText(); } return ServerStatus.SAFETY.getText(); diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java index bd63e154..52d13ef8 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java @@ -28,6 +28,7 @@ import com.querydsl.core.types.dsl.Expressions; import com.querydsl.core.types.dsl.NumberExpression; import com.querydsl.jpa.impl.JPAQueryFactory; import jakarta.persistence.EntityNotFoundException; +import java.time.OffsetDateTime; import java.util.List; import java.util.Objects; import java.util.Optional; @@ -118,9 +119,9 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto .groupBy(systemMetricEntity.serverName) .fetch(); - List latestGpuIds = + List latestGpuIds = queryFactory - .select(gpuMetricEntity.id1.max()) + .select(gpuMetricEntity.timestamp.max()) .from(gpuMetricEntity) .groupBy(gpuMetricEntity.serverName) .fetch(); @@ -135,15 +136,15 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto systemMetricEntity.cpuSystem, systemMetricEntity.memused, systemMetricEntity.kbmemused, - //gpuMetricEntity.gpuUtil, - gpuMetricEntity.gpuMemUsed, - gpuMetricEntity.gpuMemTotal + gpuMetricEntity.gpuUtil + //gpuMetricEntity.gpuMemUsed, + //gpuMetricEntity.gpuMemTotal )) .from(systemMetricEntity) .leftJoin(gpuMetricEntity) .on( gpuMetricEntity - .id1 + .timestamp .in(latestGpuIds) .and(gpuMetricEntity.serverName.eq(systemMetricEntity.serverName))) .where(systemMetricEntity.id1.in(latestIds)) // In 절 사용 From 871fb4a6c643334c6355bbd948a970df1e4b8a9e Mon Sep 17 00:00:00 2001 From: teddy Date: Thu, 15 Jan 2026 15:12:30 +0900 Subject: [PATCH 4/4] =?UTF-8?q?spotless=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Inference/MapSheetLearnRepositoryImpl.java | 6 +++--- .../TrainingDataLabelRepositoryImpl.java | 6 ++++-- .../TrainingDataReviewRepositoryImpl.java | 6 ++++-- .../TrainingDataLabelApiController.java | 15 +++++++++++---- .../TrainingDataReviewApiController.java | 15 +++++++++++---- 5 files changed, 33 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java index 52d13ef8..4bca5c6a 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java @@ -137,9 +137,9 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto systemMetricEntity.memused, systemMetricEntity.kbmemused, gpuMetricEntity.gpuUtil - //gpuMetricEntity.gpuMemUsed, - //gpuMetricEntity.gpuMemTotal - )) + // gpuMetricEntity.gpuMemUsed, + // gpuMetricEntity.gpuMemTotal + )) .from(systemMetricEntity) .leftJoin(gpuMetricEntity) .on( diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataLabelRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataLabelRepositoryImpl.java index ae383000..93d7d7bd 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataLabelRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataLabelRepositoryImpl.java @@ -774,7 +774,8 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport try { // 최소 하나의 년도는 제공되어야 함 if (beforeYear == null && afterYear == null) { - throw new IllegalArgumentException("At least one year parameter (beforeYear or afterYear) must be provided"); + throw new IllegalArgumentException( + "At least one year parameter (beforeYear or afterYear) must be provided"); } String beforeCogUrl = null; @@ -805,7 +806,8 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport } // 제공된 년도에 대해 하나도 찾지 못한 경우에만 예외 발생 - if ((beforeYear != null && beforeCogUrl == null) && (afterYear != null && afterCogUrl == null)) { + if ((beforeYear != null && beforeCogUrl == null) + && (afterYear != null && afterCogUrl == null)) { throw new RuntimeException( "COG images not found for mapSheetNum: " + mapSheetNum diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataReviewRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataReviewRepositoryImpl.java index 46d3b466..6ce57794 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataReviewRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataReviewRepositoryImpl.java @@ -778,7 +778,8 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport try { // 최소 하나의 년도는 제공되어야 함 if (beforeYear == null && afterYear == null) { - throw new IllegalArgumentException("At least one year parameter (beforeYear or afterYear) must be provided"); + throw new IllegalArgumentException( + "At least one year parameter (beforeYear or afterYear) must be provided"); } String beforeCogUrl = null; @@ -809,7 +810,8 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport } // 제공된 년도에 대해 하나도 찾지 못한 경우에만 예외 발생 - if ((beforeYear != null && beforeCogUrl == null) && (afterYear != null && afterCogUrl == null)) { + if ((beforeYear != null && beforeCogUrl == null) + && (afterYear != null && afterCogUrl == null)) { throw new RuntimeException( "COG images not found for mapSheetNum: " + mapSheetNum diff --git a/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataLabelApiController.java b/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataLabelApiController.java index 7b61329b..a1948b18 100644 --- a/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataLabelApiController.java +++ b/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataLabelApiController.java @@ -465,7 +465,9 @@ public class TrainingDataLabelApiController { return ApiResponseDto.okObject(trainingDataLabelService.saveNewPolygon(request)); } - @Operation(summary = "COG 이미지 URL 조회", description = "변화 전/후 COG 이미지 URL을 조회합니다. beforeYear와 afterYear 중 최소 하나는 필수입니다.") + @Operation( + summary = "COG 이미지 URL 조회", + description = "변화 전/후 COG 이미지 URL을 조회합니다. beforeYear와 afterYear 중 최소 하나는 필수입니다.") @ApiResponses( value = { @ApiResponse( @@ -476,7 +478,10 @@ public class TrainingDataLabelApiController { mediaType = "application/json", schema = @Schema(implementation = TrainingDataLabelDto.CogImageResponse.class))), - @ApiResponse(responseCode = "400", description = "년도 파라미터가 하나도 제공되지 않음", content = @Content), + @ApiResponse( + responseCode = "400", + description = "년도 파라미터가 하나도 제공되지 않음", + content = @Content), @ApiResponse(responseCode = "404", description = "이미지를 찾을 수 없음", content = @Content), @ApiResponse(responseCode = "500", description = "서버 오류", content = @Content) }) @@ -484,9 +489,11 @@ public class TrainingDataLabelApiController { public ApiResponseDto getCogImageUrl( @Parameter(description = "도엽번호", required = true, example = "35905086") @RequestParam String mapSheetNum, - @Parameter(description = "변화 전 년도", required = false, example = "2023") @RequestParam(required = false) + @Parameter(description = "변화 전 년도", required = false, example = "2023") + @RequestParam(required = false) Integer beforeYear, - @Parameter(description = "변화 후 년도", required = false, example = "2024") @RequestParam(required = false) + @Parameter(description = "변화 후 년도", required = false, example = "2024") + @RequestParam(required = false) Integer afterYear) { return ApiResponseDto.ok( trainingDataLabelService.getCogImageUrl(mapSheetNum, beforeYear, afterYear)); diff --git a/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataReviewApiController.java b/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataReviewApiController.java index 425bb741..376a55a1 100644 --- a/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataReviewApiController.java +++ b/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataReviewApiController.java @@ -465,7 +465,9 @@ public class TrainingDataReviewApiController { return ApiResponseDto.okObject(trainingDataReviewService.saveNewPolygon(request)); } - @Operation(summary = "COG 이미지 URL 조회", description = "변화 전/후 COG 이미지 URL을 조회합니다. beforeYear와 afterYear 중 최소 하나는 필수입니다.") + @Operation( + summary = "COG 이미지 URL 조회", + description = "변화 전/후 COG 이미지 URL을 조회합니다. beforeYear와 afterYear 중 최소 하나는 필수입니다.") @ApiResponses( value = { @ApiResponse( @@ -476,7 +478,10 @@ public class TrainingDataReviewApiController { mediaType = "application/json", schema = @Schema(implementation = TrainingDataReviewDto.CogImageResponse.class))), - @ApiResponse(responseCode = "400", description = "년도 파라미터가 하나도 제공되지 않음", content = @Content), + @ApiResponse( + responseCode = "400", + description = "년도 파라미터가 하나도 제공되지 않음", + content = @Content), @ApiResponse(responseCode = "404", description = "이미지를 찾을 수 없음", content = @Content), @ApiResponse(responseCode = "500", description = "서버 오류", content = @Content) }) @@ -484,9 +489,11 @@ public class TrainingDataReviewApiController { public ApiResponseDto getCogImageUrl( @Parameter(description = "도엽번호", required = true, example = "35905086") @RequestParam String mapSheetNum, - @Parameter(description = "변화 전 년도", required = false, example = "2023") @RequestParam(required = false) + @Parameter(description = "변화 전 년도", required = false, example = "2023") + @RequestParam(required = false) Integer beforeYear, - @Parameter(description = "변화 후 년도", required = false, example = "2024") @RequestParam(required = false) + @Parameter(description = "변화 후 년도", required = false, example = "2024") + @RequestParam(required = false) Integer afterYear) { return ApiResponseDto.ok( trainingDataReviewService.getCogImageUrl(mapSheetNum, beforeYear, afterYear));