Merge pull request '라벨러 detail 쿼리 수정' (#173) from feat/infer_dev_260107 into develop
Reviewed-on: https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice/pulls/173
This commit is contained in:
@@ -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<Long> totalCnt = labelingAssignmentEntity.assignmentUid.count();
|
||||
|
||||
NumberExpression<Long> assignedCnt =
|
||||
new CaseBuilder()
|
||||
.when(labelingAssignmentEntity.workState.eq(LabelState.ASSIGNED.getId()))
|
||||
@@ -816,8 +826,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
|
||||
// remainCnt
|
||||
Expression<Long> 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(),
|
||||
|
||||
Reference in New Issue
Block a user