From eb47698c2fa934efb165f802a4469ee78b0ce171 Mon Sep 17 00:00:00 2001 From: "gayoun.park" Date: Mon, 5 Jan 2026 16:31:43 +0900 Subject: [PATCH] =?UTF-8?q?labelState=20=EC=A1=B0=EA=B1=B4=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/kamco/cd/kamcoback/label/dto/LabelWorkDto.java | 3 ++- .../repository/label/LabelAllocateRepositoryImpl.java | 2 ++ .../postgres/repository/label/LabelWorkRepositoryImpl.java | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/kamco/cd/kamcoback/label/dto/LabelWorkDto.java b/src/main/java/com/kamco/cd/kamcoback/label/dto/LabelWorkDto.java index aaea021b..cdd0f1c0 100644 --- a/src/main/java/com/kamco/cd/kamcoback/label/dto/LabelWorkDto.java +++ b/src/main/java/com/kamco/cd/kamcoback/label/dto/LabelWorkDto.java @@ -40,6 +40,7 @@ public class LabelWorkDto { @JsonFormatDttm private ZonedDateTime createdDttm; private Long detectionTotCnt; private Long labelTotCnt; + private Long labelAssignCnt; private Long labelStopTotCnt; private Long labelIngTotCnt; private Long labelCompleteTotCnt; @@ -59,7 +60,7 @@ public class LabelWorkDto { if (this.labelTotCnt == 0) { mngState = "PENDING"; - } else if (this.labelTotCnt > 0 && this.labelIngTotCnt == 0) { + } else if (this.labelTotCnt > 0 && this.labelAssignCnt > 0 && this.labelIngTotCnt == 0) { mngState = "ASSIGNED"; } else if (this.labelIngTotCnt > 0) { mngState = "LABEL_ING"; diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelAllocateRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelAllocateRepositoryImpl.java index 1e68e5a9..f23bbaad 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelAllocateRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelAllocateRepositoryImpl.java @@ -72,6 +72,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto .from(mapSheetAnalDataInferenceGeomEntity) .where( lastId == null ? null : mapSheetAnalDataInferenceGeomEntity.geoUid.gt(lastId), + mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull(), mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq(compareYyyy), mapSheetAnalDataInferenceGeomEntity.targetYyyy.eq(targetYyyy), mapSheetAnalDataInferenceGeomEntity.stage.eq(stage), @@ -160,6 +161,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto .select(mapSheetAnalDataInferenceGeomEntity.geoUid.count()) .from(mapSheetAnalDataInferenceGeomEntity) .where( + mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull(), mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq(compareYyyy), mapSheetAnalDataInferenceGeomEntity.targetYyyy.eq(targetYyyy), mapSheetAnalDataInferenceGeomEntity.stage.eq(stage), diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelWorkRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelWorkRepositoryImpl.java index a7de04c2..c4010415 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelWorkRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelWorkRepositoryImpl.java @@ -137,6 +137,11 @@ public class LabelWorkRepositoryImpl extends QuerydslRepositorySupport .then(1L) .otherwise(0L) .sum(), + new CaseBuilder() + .when(mapSheetAnalDataInferenceGeomEntity.labelState.eq("ASSIGNED")) + .then(1L) + .otherwise(0L) + .sum(), new CaseBuilder() .when(mapSheetAnalDataInferenceGeomEntity.labelState.eq("STOP")) .then(1L)