From 317f9ff38ffb84c92f894bb410f9ffbab2a826c4 Mon Sep 17 00:00:00 2001 From: "gayoun.park" Date: Fri, 9 Jan 2026 16:30:25 +0900 Subject: [PATCH] =?UTF-8?q?=EB=9D=BC=EB=B2=A8=EB=9F=AC=20detail=20?= =?UTF-8?q?=EC=BF=BC=EB=A6=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../label/LabelAllocateRepositoryImpl.java | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) 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 95a5105a..cb64cfe3 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 @@ -439,13 +439,17 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto // 라벨링 남은 건수: 라벨링 대상 건수 - 완료 - 스킵 long labelingRemaining = labelingTotal - labelCompleted - skipped; - if (labelingRemaining < 0) labelingRemaining = 0; + if (labelingRemaining < 0) { + labelingRemaining = 0; + } // 검수 대상 건수: 라벨링 대상 건수와 동일 (기획서 기준) long inspectionTotal = labelingTotal; // 검수 남은 건수: 검수 대상 건수 - 검수완료(DONE) - 스킵 long inspectionRemaining = inspectionTotal - inspectCompleted - skipped; - if (inspectionRemaining < 0) inspectionRemaining = 0; + if (inspectionRemaining < 0) { + inspectionRemaining = 0; + } // 진행률 계산 (라벨링 대상 건수 기준) double labelingRate = labelingTotal > 0 ? (double) labelCompleted / labelingTotal * 100 : 0.0; @@ -595,11 +599,15 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto long skipped = skipCount != null ? skipCount : 0L; long labelingRemaining = labelingTotal - labelCompleted - skipped; - if (labelingRemaining < 0) labelingRemaining = 0; + if (labelingRemaining < 0) { + labelingRemaining = 0; + } long inspectionTotal = labelingTotal; long inspectionRemaining = inspectionTotal - inspectCompleted - skipped; - if (inspectionRemaining < 0) inspectionRemaining = 0; + if (inspectionRemaining < 0) { + inspectionRemaining = 0; + } double labelingRate = labelingTotal > 0 ? (double) labelCompleted / labelingTotal * 100 : 0.0; double inspectionRate = @@ -768,6 +776,8 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto @Override public LabelerDetail findLabelerDetail(String userId, String uuid) { + NumberExpression totalCnt = labelingAssignmentEntity.assignmentUid.count(); + NumberExpression assignedCnt = new CaseBuilder() .when(labelingAssignmentEntity.workState.eq(LabelState.ASSIGNED.getId())) @@ -816,8 +826,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto // remainCnt Expression remainCnt = - Expressions.numberTemplate( - Long.class, "({0} - {1} - {2})", assignedCnt, skipCnt, completeCnt); + Expressions.numberTemplate(Long.class, "({0} - {1} - {2})", totalCnt, skipCnt, completeCnt); return queryFactory .select( @@ -826,9 +835,9 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto worker.userRole, worker.name, worker.employeeNo, - assignedCnt, - skipCnt, + totalCnt, completeCnt, + skipCnt, percent, Expressions.constant(0), // TODO: 순위, 꼭 해야할지? labelingAssignmentEntity.workStatDttm.min(),