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;
|
long labelingRemaining = labelingTotal - labelCompleted - skipped;
|
||||||
if (labelingRemaining < 0) labelingRemaining = 0;
|
if (labelingRemaining < 0) {
|
||||||
|
labelingRemaining = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// 검수 대상 건수: 라벨링 대상 건수와 동일 (기획서 기준)
|
// 검수 대상 건수: 라벨링 대상 건수와 동일 (기획서 기준)
|
||||||
long inspectionTotal = labelingTotal;
|
long inspectionTotal = labelingTotal;
|
||||||
// 검수 남은 건수: 검수 대상 건수 - 검수완료(DONE) - 스킵
|
// 검수 남은 건수: 검수 대상 건수 - 검수완료(DONE) - 스킵
|
||||||
long inspectionRemaining = inspectionTotal - inspectCompleted - skipped;
|
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 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 skipped = skipCount != null ? skipCount : 0L;
|
||||||
|
|
||||||
long labelingRemaining = labelingTotal - labelCompleted - skipped;
|
long labelingRemaining = labelingTotal - labelCompleted - skipped;
|
||||||
if (labelingRemaining < 0) labelingRemaining = 0;
|
if (labelingRemaining < 0) {
|
||||||
|
labelingRemaining = 0;
|
||||||
|
}
|
||||||
|
|
||||||
long inspectionTotal = labelingTotal;
|
long inspectionTotal = labelingTotal;
|
||||||
long inspectionRemaining = inspectionTotal - inspectCompleted - skipped;
|
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 labelingRate = labelingTotal > 0 ? (double) labelCompleted / labelingTotal * 100 : 0.0;
|
||||||
double inspectionRate =
|
double inspectionRate =
|
||||||
@@ -768,6 +776,8 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LabelerDetail findLabelerDetail(String userId, String uuid) {
|
public LabelerDetail findLabelerDetail(String userId, String uuid) {
|
||||||
|
NumberExpression<Long> totalCnt = labelingAssignmentEntity.assignmentUid.count();
|
||||||
|
|
||||||
NumberExpression<Long> assignedCnt =
|
NumberExpression<Long> assignedCnt =
|
||||||
new CaseBuilder()
|
new CaseBuilder()
|
||||||
.when(labelingAssignmentEntity.workState.eq(LabelState.ASSIGNED.getId()))
|
.when(labelingAssignmentEntity.workState.eq(LabelState.ASSIGNED.getId()))
|
||||||
@@ -816,8 +826,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
|||||||
|
|
||||||
// remainCnt
|
// remainCnt
|
||||||
Expression<Long> remainCnt =
|
Expression<Long> remainCnt =
|
||||||
Expressions.numberTemplate(
|
Expressions.numberTemplate(Long.class, "({0} - {1} - {2})", totalCnt, skipCnt, completeCnt);
|
||||||
Long.class, "({0} - {1} - {2})", assignedCnt, skipCnt, completeCnt);
|
|
||||||
|
|
||||||
return queryFactory
|
return queryFactory
|
||||||
.select(
|
.select(
|
||||||
@@ -826,9 +835,9 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
|||||||
worker.userRole,
|
worker.userRole,
|
||||||
worker.name,
|
worker.name,
|
||||||
worker.employeeNo,
|
worker.employeeNo,
|
||||||
assignedCnt,
|
totalCnt,
|
||||||
skipCnt,
|
|
||||||
completeCnt,
|
completeCnt,
|
||||||
|
skipCnt,
|
||||||
percent,
|
percent,
|
||||||
Expressions.constant(0), // TODO: 순위, 꼭 해야할지?
|
Expressions.constant(0), // TODO: 순위, 꼭 해야할지?
|
||||||
labelingAssignmentEntity.workStatDttm.min(),
|
labelingAssignmentEntity.workStatDttm.min(),
|
||||||
|
|||||||
Reference in New Issue
Block a user