Merge pull request '라벨 이관 로직 수정' (#139) from feat/dev_251201 into develop
Reviewed-on: https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice/pulls/139
This commit is contained in:
@@ -79,9 +79,14 @@ public class LabelAllocateCoreService {
|
||||
}
|
||||
|
||||
public List<Long> fetchNextMoveIds(
|
||||
Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage) {
|
||||
Long lastId,
|
||||
Long batchSize,
|
||||
Integer compareYyyy,
|
||||
Integer targetYyyy,
|
||||
Integer stage,
|
||||
String userId) {
|
||||
return labelAllocateRepository.fetchNextMoveIds(
|
||||
lastId, batchSize, compareYyyy, targetYyyy, stage);
|
||||
lastId, batchSize, compareYyyy, targetYyyy, stage, userId);
|
||||
}
|
||||
|
||||
public void assignOwnerMove(List<Long> sub, String userId) {
|
||||
|
||||
@@ -48,7 +48,12 @@ public interface LabelAllocateRepositoryCustom {
|
||||
InferenceDetail findInferenceDetail(String uuid);
|
||||
|
||||
List<Long> fetchNextMoveIds(
|
||||
Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage);
|
||||
Long lastId,
|
||||
Long batchSize,
|
||||
Integer compareYyyy,
|
||||
Integer targetYyyy,
|
||||
Integer stage,
|
||||
String userId);
|
||||
|
||||
void assignOwnerMove(List<Long> sub, String userId);
|
||||
|
||||
|
||||
@@ -493,20 +493,35 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
|
||||
@Override
|
||||
public List<Long> fetchNextMoveIds(
|
||||
Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage) {
|
||||
Long lastId,
|
||||
Long batchSize,
|
||||
Integer compareYyyy,
|
||||
Integer targetYyyy,
|
||||
Integer stage,
|
||||
String userId) {
|
||||
|
||||
MapSheetAnalInferenceEntity analEntity =
|
||||
queryFactory
|
||||
.selectFrom(mapSheetAnalInferenceEntity)
|
||||
.where(
|
||||
mapSheetAnalInferenceEntity.compareYyyy.eq(compareYyyy),
|
||||
mapSheetAnalInferenceEntity.targetYyyy.eq(targetYyyy),
|
||||
mapSheetAnalInferenceEntity.stage.eq(stage))
|
||||
.fetchOne();
|
||||
|
||||
if (Objects.isNull(analEntity)) {
|
||||
throw new EntityNotFoundException("MapSheetAnalInferenceEntity not found for analUid: ");
|
||||
}
|
||||
|
||||
return queryFactory
|
||||
.select(mapSheetAnalDataInferenceGeomEntity.geoUid)
|
||||
.from(mapSheetAnalDataInferenceGeomEntity)
|
||||
.select(labelingAssignmentEntity.inferenceGeomUid)
|
||||
.from(labelingAssignmentEntity)
|
||||
.where(
|
||||
// mapSheetAnalDataGeomEntity.pnu.isNotNull(), //TODO: Mockup 진행 이후 확인하기
|
||||
lastId == null ? null : mapSheetAnalDataInferenceGeomEntity.geoUid.gt(lastId),
|
||||
mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq(compareYyyy),
|
||||
mapSheetAnalDataInferenceGeomEntity.targetYyyy.eq(targetYyyy),
|
||||
mapSheetAnalDataInferenceGeomEntity.stage.eq(stage),
|
||||
mapSheetAnalDataInferenceGeomEntity.labelState.in(
|
||||
LabelState.ASSIGNED.getId(), LabelState.SKIP.getId()))
|
||||
.orderBy(mapSheetAnalDataInferenceGeomEntity.mapSheetNum.asc())
|
||||
labelingAssignmentEntity.workerUid.eq(userId),
|
||||
labelingAssignmentEntity.workState.eq(LabelState.ASSIGNED.getId()),
|
||||
labelingAssignmentEntity.analUid.eq(analEntity.getId()),
|
||||
lastId == null ? null : labelingAssignmentEntity.inferenceGeomUid.gt(lastId))
|
||||
.orderBy(labelingAssignmentEntity.inferenceGeomUid.asc())
|
||||
.limit(batchSize)
|
||||
.fetch();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user