diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/core/LabelAllocateCoreService.java b/src/main/java/com/kamco/cd/kamcoback/postgres/core/LabelAllocateCoreService.java index 56ec4ffd..a5cd7f07 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/core/LabelAllocateCoreService.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/core/LabelAllocateCoreService.java @@ -176,7 +176,8 @@ public class LabelAllocateCoreService { return detail; // analUid 없으면 순위 0으로 반환 } - List allInspectors = labelAllocateRepository.findAllInspectorsForRanking(analUid); + List allInspectors = + labelAllocateRepository.findAllInspectorsForRanking(analUid); // 3. 순위 계산 (DENSE_RANK 로직: 동점자는 같은 순위, 다음 순위는 연속) Long lastCompleteCnt = null; diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelAllocateRepositoryCustom.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelAllocateRepositoryCustom.java index f1168082..bc05fe58 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelAllocateRepositoryCustom.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelAllocateRepositoryCustom.java @@ -68,14 +68,10 @@ public interface LabelAllocateRepositoryCustom { LabelerDetail findLabelerDetail(String userId, String uuid); - /** - * 순위 계산용 - 특정 회차의 모든 라벨러 통계 조회 - */ + /** 순위 계산용 - 특정 회차의 모든 라벨러 통계 조회 */ List findAllLabelersForRanking(Long analUid); - /** - * UUID로 analUid 조회 - */ + /** UUID로 analUid 조회 */ Long findAnalUidByUuid(String uuid); Long findMapSheetAnalInferenceUid(Integer compareYyyy, Integer targetYyyy, Integer stage); @@ -90,9 +86,7 @@ public interface LabelAllocateRepositoryCustom { LabelerDetail findInspectorDetail(String userId, String uuid); - /** - * 순위 계산용 - 특정 회차의 모든 검수자 통계 조회 - */ + /** 순위 계산용 - 특정 회차의 모든 검수자 통계 조회 */ List findAllInspectorsForRanking(Long analUid); MoveInfo moveAvailUserList(String userId, String uuid); 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 19102175..e3ec3ff6 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 @@ -848,9 +848,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto .fetchOne(); } - /** - * 특정 회차의 모든 라벨러 통계 조회 (순위 계산용) - */ + /** 특정 회차의 모든 라벨러 통계 조회 (순위 계산용) */ public List findAllLabelersForRanking(Long analUid) { QMemberEntity worker = QMemberEntity.memberEntity; @@ -898,9 +896,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto .fetch(); } - /** - * UUID로 analUid 조회 - */ + /** UUID로 analUid 조회 */ @Override public Long findAnalUidByUuid(String uuid) { return queryFactory @@ -1355,9 +1351,9 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto inspector.userRole, inspector.name, inspector.employeeNo, - assignedCnt, // count (총 배정 건수) - completeCnt, // completeCnt (완료 건수) - skipCnt, // skipCnt (스킵 건수) + assignedCnt, // count (총 배정 건수) + completeCnt, // completeCnt (완료 건수) + skipCnt, // skipCnt (스킵 건수) percent, Expressions.constant(0), // 순위는 Service 레이어에서 계산 labelingAssignmentEntity.inspectStatDttm.min(), @@ -1375,9 +1371,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto .fetchOne(); } - /** - * 순위 계산용 - 특정 회차의 모든 검수자 통계 조회 - */ + /** 순위 계산용 - 특정 회차의 모든 검수자 통계 조회 */ public List findAllInspectorsForRanking(Long analUid) { QMemberEntity inspector = QMemberEntity.memberEntity; @@ -1403,7 +1397,8 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto .count(); Expression remainCnt = - Expressions.numberTemplate(Long.class, "({0} - {1} - {2})", assignedCnt, skipCnt, completeCnt); + Expressions.numberTemplate( + Long.class, "({0} - {1} - {2})", assignedCnt, skipCnt, completeCnt); return queryFactory .select( @@ -1412,9 +1407,9 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto inspector.userRole, inspector.name, inspector.employeeNo, - assignedCnt, // count (총 배정 건수) - completeCnt, // completeCnt (완료 건수) - skipCnt, // skipCnt (스킵 건수) + assignedCnt, // count (총 배정 건수) + completeCnt, // completeCnt (완료 건수) + skipCnt, // skipCnt (스킵 건수) Expressions.constant(0.0), // percent Expressions.constant(0), // ranking labelingAssignmentEntity.inspectStatDttm.min(),