From 4376054562f09fa27d7abbf2f24c61475d92e880 Mon Sep 17 00:00:00 2001 From: Moon Date: Mon, 12 Jan 2026 22:18:36 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B6=94=EB=A1=A0=EC=A7=84=ED=96=89=EC=9C=A8?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inference/dto/InferenceResultDto.java | 24 +++++++++++++++---- .../MapSheetLearnRepositoryImpl.java | 1 + 2 files changed, 21 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 69b85394..005b32ff 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 @@ -207,7 +207,8 @@ public class InferenceResultDto { private String mapSheetScope; @JsonFormatDttm private ZonedDateTime inferStartDttm; @JsonFormatDttm private ZonedDateTime inferEndDttm; - private Long detectingCnt; + private Long detectingCnt = 0L; + private Long detectingEndCnt = 0L; private String model1Ver; private String model2Ver; @@ -222,6 +223,7 @@ public class InferenceResultDto { ZonedDateTime inferStartDttm, ZonedDateTime inferEndDttm, Long detectingCnt, + Long detectingEndCnt, String model1Ver, String model2Ver, String model3Ver) { @@ -233,19 +235,22 @@ public class InferenceResultDto { this.inferStartDttm = inferStartDttm; this.inferEndDttm = inferEndDttm; this.detectingCnt = detectingCnt; + this.detectingEndCnt = detectingEndCnt; this.model1Ver = model1Ver; this.model2Ver = model2Ver; this.model3Ver = model3Ver; + + if( this.detectingEndCnt == null )this.detectingEndCnt = 0L; + } private String usedServerName; - private Long detectingEndCnt = 7L; private String model1VerStatus = "PROCCESING"; private String model1VerStatusName = "진행중"; private String model2VerStatus = "PROCCESING"; private String model2VerStatusName = "진행중"; private String model3VerStatus = "PROCCESING"; - private String model4VerStatusName = "진행중"; + private String model3VerStatusName = "진행중"; public String getDetectOptionName() { if (this.detectOption.equals("EXCL")) return "추론제외"; @@ -253,9 +258,20 @@ public class InferenceResultDto { } public String getMapSheetScopeName() { - if (this.detectOption.equals("ALL")) return "전체"; + if (this.mapSheetScope.equals("ALL")) return "전체"; return "부분"; } + + public double getDetectingRate() { + if (this.detectingCnt == null || this.detectingCnt == 0L) { + return 0.0; + } + + if( this.detectingEndCnt == null )this.detectingEndCnt = 0L; + + return (double) (this.detectingEndCnt / this.detectingCnt) * 100.0; + } + } @Getter 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 a6522291..fe6c21f4 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 @@ -171,6 +171,7 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto mapSheetLearnEntity.inferStartDttm, mapSheetLearnEntity.inferEndDttm, mapSheetLearnEntity.detectingCnt, + mapSheetLearnEntity.detectEndCnt, m1Model.modelVer.as("model1Ver"), m2Model.modelVer.as("model2Ver"), m3Model.modelVer.as("model3Ver")))