[KC-168] 라벨링 툴 > 목록, 기본 페이징 API 지정uuid 페이징 계산 추가
This commit is contained in:
@@ -20,9 +20,8 @@ public class TrainingDataLabelCoreService {
|
||||
|
||||
private final TrainingDataLabelRepository trainingDataLabelRepository;
|
||||
|
||||
public Page<LabelingListDto> findLabelingAssignedList(
|
||||
searchReq searchReq, String userId, String status) {
|
||||
return trainingDataLabelRepository.findLabelingAssignedList(searchReq, userId, status);
|
||||
public Page<LabelingListDto> findLabelingAssignedList(searchReq searchReq, String userId) {
|
||||
return trainingDataLabelRepository.findLabelingAssignedList(searchReq, userId);
|
||||
}
|
||||
|
||||
public LabelingGeometryInfo findLabelingAssignedGeom(String assignmentUid) {
|
||||
@@ -77,7 +76,7 @@ public class TrainingDataLabelCoreService {
|
||||
return trainingDataLabelRepository.getDetail(assignmentUid);
|
||||
}
|
||||
|
||||
public DefaultPaging getDefaultPagingNumber(String userId, Integer size) {
|
||||
return trainingDataLabelRepository.getDefaultPagingNumber(userId, size);
|
||||
public DefaultPaging getDefaultPagingNumber(String userId, Integer size, String assignmentUid) {
|
||||
return trainingDataLabelRepository.getDefaultPagingNumber(userId, size, assignmentUid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.springframework.data.domain.Page;
|
||||
|
||||
public interface TrainingDataLabelRepositoryCustom {
|
||||
|
||||
Page<LabelingListDto> findLabelingAssignedList(searchReq searchReq, String userId, String status);
|
||||
Page<LabelingListDto> findLabelingAssignedList(searchReq searchReq, String userId);
|
||||
|
||||
LabelingGeometryInfo findLabelingAssignedGeom(String assignmentUid);
|
||||
|
||||
@@ -30,5 +30,5 @@ public interface TrainingDataLabelRepositoryCustom {
|
||||
|
||||
DetailRes getDetail(UUID assignmentUid);
|
||||
|
||||
DefaultPaging getDefaultPagingNumber(String userId, Integer size);
|
||||
DefaultPaging getDefaultPagingNumber(String userId, Integer size, String assignmentUid);
|
||||
}
|
||||
|
||||
@@ -61,8 +61,7 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<LabelingListDto> findLabelingAssignedList(
|
||||
searchReq searchReq, String userId, String status) {
|
||||
public Page<LabelingListDto> findLabelingAssignedList(searchReq searchReq, String userId) {
|
||||
|
||||
// 완료된 라벨은 오늘만, 나머지는 전체 조회
|
||||
LocalDate today = LocalDate.now(ZoneId.of("Asia/Seoul"));
|
||||
@@ -106,9 +105,7 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport
|
||||
.limit(pageable.getPageSize())
|
||||
.orderBy(
|
||||
labelingAssignmentEntity.createdDate.asc(),
|
||||
labelingAssignmentEntity.inferenceGeomUid
|
||||
.asc() // 008288b5-5911-41d5-b8fc-b8c8f33d5434 / 362
|
||||
)
|
||||
labelingAssignmentEntity.inferenceGeomUid.asc())
|
||||
.fetch();
|
||||
|
||||
Long count =
|
||||
@@ -560,7 +557,7 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport
|
||||
}
|
||||
|
||||
@Override
|
||||
public DefaultPaging getDefaultPagingNumber(String userId, Integer size) {
|
||||
public DefaultPaging getDefaultPagingNumber(String userId, Integer size, String assignmentUid) {
|
||||
|
||||
ZoneId KST = ZoneId.of("Asia/Seoul");
|
||||
ZonedDateTime todayStart = ZonedDateTime.now(KST).toLocalDate().atStartOfDay(KST);
|
||||
@@ -588,7 +585,9 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport
|
||||
.where(
|
||||
labelingAssignmentEntity.workerUid.eq(userId),
|
||||
stateCondition,
|
||||
labelingAssignmentEntity.workState.eq(LabelState.ASSIGNED.getId()))
|
||||
assignmentUid == null
|
||||
? labelingAssignmentEntity.workState.eq(LabelState.ASSIGNED.getId())
|
||||
: labelingAssignmentEntity.assignmentUid.eq(UUID.fromString(assignmentUid)))
|
||||
.orderBy(
|
||||
labelingAssignmentEntity.createdDate.asc(),
|
||||
labelingAssignmentEntity.inferenceGeomUid.asc())
|
||||
|
||||
Reference in New Issue
Block a user