라벨링 작업이력 수정, 상태 수정
This commit is contained in:
@@ -1515,12 +1515,20 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
mapSheetAnalInferenceEntity.createdDttm,
|
||||
mapSheetAnalInferenceEntity.inspectionClosedYn,
|
||||
mapSheetAnalInferenceEntity.updatedDttm)
|
||||
.orderBy(mapSheetAnalInferenceEntity.id.desc())
|
||||
.orderBy(
|
||||
// 진행중인 작업이 최상단 (remainCnt > 0)
|
||||
new CaseBuilder()
|
||||
.when(totalCnt.subtract(completeCnt).subtract(skipCnt).gt(0L))
|
||||
.then(0)
|
||||
.otherwise(1)
|
||||
.asc(),
|
||||
// 최신 작업순 (반영일 기준)
|
||||
mapSheetAnalInferenceEntity.gukyuinApplyDttm.desc())
|
||||
.offset(pageable.getOffset())
|
||||
.limit(pageable.getPageSize())
|
||||
.fetch();
|
||||
|
||||
// rowNum과 remainCnt, percent를 Java에서 계산
|
||||
// rowNum, remainCnt, percent, status를 Java에서 계산
|
||||
int startRow = (int) pageable.getOffset() + 1;
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
WorkHistoryDto dto = list.get(i);
|
||||
@@ -1538,6 +1546,13 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
} else {
|
||||
dto.setPercent(0.0);
|
||||
}
|
||||
|
||||
// status 계산 (잔여건수가 0이고 진행률이 100%면 "완료", 아니면 "진행중")
|
||||
if (dto.getRemainCnt() == 0 && dto.getPercent() >= 100.0) {
|
||||
dto.setStatus("완료");
|
||||
} else {
|
||||
dto.setStatus("진행중");
|
||||
}
|
||||
}
|
||||
|
||||
Long countQuery =
|
||||
@@ -1606,12 +1621,20 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
mapSheetAnalInferenceEntity.createdDttm,
|
||||
mapSheetAnalInferenceEntity.inspectionClosedYn,
|
||||
mapSheetAnalInferenceEntity.updatedDttm)
|
||||
.orderBy(mapSheetAnalInferenceEntity.id.desc())
|
||||
.orderBy(
|
||||
// 진행중인 작업이 최상단 (remainCnt > 0)
|
||||
new CaseBuilder()
|
||||
.when(totalCnt.subtract(completeCnt).subtract(skipCnt).gt(0L))
|
||||
.then(0)
|
||||
.otherwise(1)
|
||||
.asc(),
|
||||
// 최신 작업순 (반영일 기준)
|
||||
mapSheetAnalInferenceEntity.gukyuinApplyDttm.desc())
|
||||
.offset(pageable.getOffset())
|
||||
.limit(pageable.getPageSize())
|
||||
.fetch();
|
||||
|
||||
// rowNum과 remainCnt, percent를 Java에서 계산
|
||||
// rowNum, remainCnt, percent, status를 Java에서 계산
|
||||
int startRow = (int) pageable.getOffset() + 1;
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
WorkHistoryDto dto = list.get(i);
|
||||
@@ -1629,6 +1652,13 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
} else {
|
||||
dto.setPercent(0.0);
|
||||
}
|
||||
|
||||
// status 계산 (잔여건수가 0이고 진행률이 100%면 "완료", 아니면 "진행중")
|
||||
if (dto.getRemainCnt() == 0 && dto.getPercent() >= 100.0) {
|
||||
dto.setStatus("완료");
|
||||
} else {
|
||||
dto.setStatus("진행중");
|
||||
}
|
||||
}
|
||||
|
||||
Long countQuery =
|
||||
|
||||
Reference in New Issue
Block a user