Merge remote-tracking branch 'origin/feat/infer_dev_260107' into feat/infer_dev_260107
This commit is contained in:
@@ -33,8 +33,8 @@ public class TrainingDataReviewCoreService {
|
|||||||
return trainingDataReviewRepository.findReviewOperatorGeoUid(operatorUid);
|
return trainingDataReviewRepository.findReviewOperatorGeoUid(operatorUid);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateReviewStateOperator(String operatorUid, String status, String memo) {
|
public void updateReviewStateOperator(String operatorUid, String status) {
|
||||||
trainingDataReviewRepository.updateReviewStateOperator(operatorUid, status, memo);
|
trainingDataReviewRepository.updateReviewStateOperator(operatorUid, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateReviewExceptState(Long inferenceGeomUid, String status) {
|
public void updateReviewExceptState(Long inferenceGeomUid, String status) {
|
||||||
|
|||||||
@@ -73,14 +73,13 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
BooleanExpression doneToday =
|
BooleanExpression doneToday =
|
||||||
labelingAssignmentEntity
|
labelingAssignmentEntity
|
||||||
.workState
|
.workState
|
||||||
.eq(LabelState.DONE.getId())
|
.in(LabelState.DONE.getId(), LabelState.SKIP.getId())
|
||||||
.and(labelingAssignmentEntity.workStatDttm.goe(start))
|
.and(labelingAssignmentEntity.workStatDttm.goe(start))
|
||||||
.and(labelingAssignmentEntity.workStatDttm.lt(end));
|
.and(labelingAssignmentEntity.workStatDttm.lt(end));
|
||||||
|
|
||||||
BooleanExpression assignedOrSkip =
|
BooleanExpression assigned = labelingAssignmentEntity.workState.in(LabelState.ASSIGNED.getId());
|
||||||
labelingAssignmentEntity.workState.in(LabelState.SKIP.getId(), LabelState.ASSIGNED.getId());
|
|
||||||
|
|
||||||
BooleanExpression dayStateCondition = doneToday.or(assignedOrSkip);
|
BooleanExpression dayStateCondition = doneToday.or(assigned);
|
||||||
|
|
||||||
Pageable pageable = PageRequest.of(searchReq.getPage(), searchReq.getSize());
|
Pageable pageable = PageRequest.of(searchReq.getPage(), searchReq.getSize());
|
||||||
List<LabelingListDto> list =
|
List<LabelingListDto> list =
|
||||||
@@ -334,7 +333,8 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
.from(labelingAssignmentEntity)
|
.from(labelingAssignmentEntity)
|
||||||
.where(
|
.where(
|
||||||
labelingAssignmentEntity.workerUid.eq(userId),
|
labelingAssignmentEntity.workerUid.eq(userId),
|
||||||
labelingAssignmentEntity.workState.eq("DONE"),
|
labelingAssignmentEntity.workState.in(
|
||||||
|
LabelState.DONE.getId(), LabelState.SKIP.getId()),
|
||||||
labelingAssignmentEntity.workStatDttm.isNotNull(),
|
labelingAssignmentEntity.workStatDttm.isNotNull(),
|
||||||
labelingAssignmentEntity.workStatDttm.goe(startOfToday),
|
labelingAssignmentEntity.workStatDttm.goe(startOfToday),
|
||||||
labelingAssignmentEntity.workStatDttm.lt(endOfToday))
|
labelingAssignmentEntity.workStatDttm.lt(endOfToday))
|
||||||
@@ -589,14 +589,13 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
BooleanExpression doneToday =
|
BooleanExpression doneToday =
|
||||||
labelingAssignmentEntity
|
labelingAssignmentEntity
|
||||||
.workState
|
.workState
|
||||||
.eq(LabelState.DONE.getId())
|
.in(LabelState.DONE.getId(), LabelState.SKIP.getId())
|
||||||
.and(labelingAssignmentEntity.workStatDttm.goe(todayStart))
|
.and(labelingAssignmentEntity.workStatDttm.goe(todayStart))
|
||||||
.and(labelingAssignmentEntity.workStatDttm.lt(todayEnd));
|
.and(labelingAssignmentEntity.workStatDttm.lt(todayEnd));
|
||||||
|
|
||||||
BooleanExpression assignedOrSkip =
|
BooleanExpression assigned = labelingAssignmentEntity.workState.in(LabelState.ASSIGNED.getId());
|
||||||
labelingAssignmentEntity.workState.in(LabelState.SKIP.getId(), LabelState.ASSIGNED.getId());
|
|
||||||
|
|
||||||
BooleanExpression stateCondition = doneToday.or(assignedOrSkip);
|
BooleanExpression stateCondition = doneToday.or(assigned);
|
||||||
|
|
||||||
Tuple firstAssigned =
|
Tuple firstAssigned =
|
||||||
queryFactory
|
queryFactory
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public interface TrainingDataReviewRepositoryCustom {
|
|||||||
|
|
||||||
Long findReviewOperatorGeoUid(String operatorUid);
|
Long findReviewOperatorGeoUid(String operatorUid);
|
||||||
|
|
||||||
void updateReviewStateOperator(String operatorUid, String status, String memo);
|
void updateReviewStateOperator(String operatorUid, String status);
|
||||||
|
|
||||||
void updateReviewExceptState(Long inferenceGeomUid, String status);
|
void updateReviewExceptState(Long inferenceGeomUid, String status);
|
||||||
|
|
||||||
|
|||||||
@@ -72,15 +72,14 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
BooleanExpression doneToday =
|
BooleanExpression doneToday =
|
||||||
labelingAssignmentEntity
|
labelingAssignmentEntity
|
||||||
.inspectState
|
.inspectState
|
||||||
.eq(InspectState.COMPLETE.getId())
|
.in(InspectState.COMPLETE.getId(), InspectState.EXCEPT.getId())
|
||||||
.and(labelingAssignmentEntity.inspectStatDttm.goe(start))
|
.and(labelingAssignmentEntity.inspectStatDttm.goe(start))
|
||||||
.and(labelingAssignmentEntity.inspectStatDttm.lt(end));
|
.and(labelingAssignmentEntity.inspectStatDttm.lt(end));
|
||||||
|
|
||||||
BooleanExpression unconfirmOrExcept =
|
BooleanExpression unconfirm =
|
||||||
labelingAssignmentEntity.inspectState.in(
|
labelingAssignmentEntity.inspectState.in(InspectState.UNCONFIRM.getId());
|
||||||
InspectState.EXCEPT.getId(), InspectState.UNCONFIRM.getId());
|
|
||||||
|
|
||||||
BooleanExpression dayStateCondition = doneToday.or(unconfirmOrExcept);
|
BooleanExpression dayStateCondition = doneToday.or(unconfirm);
|
||||||
|
|
||||||
Pageable pageable = PageRequest.of(searchReq.getPage(), searchReq.getSize());
|
Pageable pageable = PageRequest.of(searchReq.getPage(), searchReq.getSize());
|
||||||
List<ReviewListDto> list =
|
List<ReviewListDto> list =
|
||||||
@@ -104,8 +103,7 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
.on(labelingAssignmentEntity.assignGroupId.eq(mapInkx5kEntity.mapidcdNo))
|
.on(labelingAssignmentEntity.assignGroupId.eq(mapInkx5kEntity.mapidcdNo))
|
||||||
.where(
|
.where(
|
||||||
labelingAssignmentEntity.inspectorUid.eq(userId),
|
labelingAssignmentEntity.inspectorUid.eq(userId),
|
||||||
dayStateCondition,
|
dayStateCondition) // 라벨링 완료된 것만 검수 대상
|
||||||
labelingAssignmentEntity.workState.eq("DONE")) // 라벨링 완료된 것만 검수 대상
|
|
||||||
.offset(pageable.getOffset())
|
.offset(pageable.getOffset())
|
||||||
.limit(pageable.getPageSize())
|
.limit(pageable.getPageSize())
|
||||||
.orderBy(
|
.orderBy(
|
||||||
@@ -124,10 +122,7 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
mapSheetAnalDataInferenceGeomEntity.geoUid))
|
mapSheetAnalDataInferenceGeomEntity.geoUid))
|
||||||
.innerJoin(mapInkx5kEntity)
|
.innerJoin(mapInkx5kEntity)
|
||||||
.on(labelingAssignmentEntity.assignGroupId.eq(mapInkx5kEntity.mapidcdNo))
|
.on(labelingAssignmentEntity.assignGroupId.eq(mapInkx5kEntity.mapidcdNo))
|
||||||
.where(
|
.where(labelingAssignmentEntity.inspectorUid.eq(userId), dayStateCondition)
|
||||||
labelingAssignmentEntity.inspectorUid.eq(userId),
|
|
||||||
dayStateCondition,
|
|
||||||
labelingAssignmentEntity.workState.eq("DONE"))
|
|
||||||
.fetchOne())
|
.fetchOne())
|
||||||
.orElse(0L);
|
.orElse(0L);
|
||||||
|
|
||||||
@@ -190,7 +185,7 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateReviewStateOperator(String operatorUid, String status, String memo) {
|
public void updateReviewStateOperator(String operatorUid, String status) {
|
||||||
queryFactory
|
queryFactory
|
||||||
.update(labelingAssignmentEntity)
|
.update(labelingAssignmentEntity)
|
||||||
.set(labelingAssignmentEntity.inspectState, status)
|
.set(labelingAssignmentEntity.inspectState, status)
|
||||||
@@ -201,8 +196,13 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateReviewExceptState(Long inferenceGeomUid, String status) {
|
public void updateReviewExceptState(Long inferenceGeomUid, String status) {
|
||||||
// 검수 제외 시 assignment 테이블만 업데이트
|
// 검수 제외 시 assignment 테이블 상태만 업데이트, geom 테이블도 상태만 업데이트
|
||||||
// (inference_geom 테이블에는 inspect_state 컬럼이 없음)
|
queryFactory
|
||||||
|
.update(mapSheetAnalDataInferenceGeomEntity)
|
||||||
|
.set(mapSheetAnalDataInferenceGeomEntity.testState, status)
|
||||||
|
.set(mapSheetAnalDataInferenceGeomEntity.testStateDttm, ZonedDateTime.now())
|
||||||
|
.where(mapSheetAnalDataInferenceGeomEntity.geoUid.eq(inferenceGeomUid))
|
||||||
|
.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -282,9 +282,7 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
queryFactory
|
queryFactory
|
||||||
.select(labelingAssignmentEntity.count())
|
.select(labelingAssignmentEntity.count())
|
||||||
.from(labelingAssignmentEntity)
|
.from(labelingAssignmentEntity)
|
||||||
.where(
|
.where(labelingAssignmentEntity.inspectorUid.eq(userId))
|
||||||
labelingAssignmentEntity.inspectorUid.eq(userId),
|
|
||||||
labelingAssignmentEntity.workState.eq("DONE"))
|
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
|
|
||||||
totalCnt = (result != null) ? result : 0L;
|
totalCnt = (result != null) ? result : 0L;
|
||||||
@@ -306,7 +304,6 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
.from(labelingAssignmentEntity)
|
.from(labelingAssignmentEntity)
|
||||||
.where(
|
.where(
|
||||||
labelingAssignmentEntity.inspectorUid.eq(userId),
|
labelingAssignmentEntity.inspectorUid.eq(userId),
|
||||||
labelingAssignmentEntity.workState.eq("DONE"),
|
|
||||||
labelingAssignmentEntity.inspectState.eq("UNCONFIRM"))
|
labelingAssignmentEntity.inspectState.eq("UNCONFIRM"))
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
|
|
||||||
@@ -335,7 +332,7 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
.from(labelingAssignmentEntity)
|
.from(labelingAssignmentEntity)
|
||||||
.where(
|
.where(
|
||||||
labelingAssignmentEntity.inspectorUid.eq(userId),
|
labelingAssignmentEntity.inspectorUid.eq(userId),
|
||||||
labelingAssignmentEntity.inspectState.eq("COMPLETE"),
|
labelingAssignmentEntity.inspectState.in("COMPLETE", "EXCEPT"),
|
||||||
labelingAssignmentEntity.inspectStatDttm.isNotNull(),
|
labelingAssignmentEntity.inspectStatDttm.isNotNull(),
|
||||||
labelingAssignmentEntity.inspectStatDttm.goe(startOfToday),
|
labelingAssignmentEntity.inspectStatDttm.goe(startOfToday),
|
||||||
labelingAssignmentEntity.inspectStatDttm.lt(endOfToday))
|
labelingAssignmentEntity.inspectStatDttm.lt(endOfToday))
|
||||||
@@ -589,15 +586,14 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
BooleanExpression doneToday =
|
BooleanExpression doneToday =
|
||||||
labelingAssignmentEntity
|
labelingAssignmentEntity
|
||||||
.inspectState
|
.inspectState
|
||||||
.eq(InspectState.COMPLETE.getId())
|
.in(InspectState.COMPLETE.getId(), InspectState.EXCEPT.getId())
|
||||||
.and(labelingAssignmentEntity.inspectStatDttm.goe(todayStart))
|
.and(labelingAssignmentEntity.inspectStatDttm.goe(todayStart))
|
||||||
.and(labelingAssignmentEntity.inspectStatDttm.lt(todayEnd));
|
.and(labelingAssignmentEntity.inspectStatDttm.lt(todayEnd));
|
||||||
|
|
||||||
BooleanExpression unconfirmOrExcept =
|
BooleanExpression unconfirm =
|
||||||
labelingAssignmentEntity.inspectState.in(
|
labelingAssignmentEntity.inspectState.in(InspectState.UNCONFIRM.getId());
|
||||||
InspectState.EXCEPT.getId(), InspectState.UNCONFIRM.getId());
|
|
||||||
|
|
||||||
BooleanExpression stateCondition = doneToday.or(unconfirmOrExcept);
|
BooleanExpression stateCondition = doneToday.or(unconfirm);
|
||||||
|
|
||||||
Tuple firstAssigned =
|
Tuple firstAssigned =
|
||||||
queryFactory
|
queryFactory
|
||||||
@@ -608,7 +604,6 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
.from(labelingAssignmentEntity)
|
.from(labelingAssignmentEntity)
|
||||||
.where(
|
.where(
|
||||||
labelingAssignmentEntity.inspectorUid.eq(userId),
|
labelingAssignmentEntity.inspectorUid.eq(userId),
|
||||||
labelingAssignmentEntity.workState.eq("DONE"),
|
|
||||||
stateCondition,
|
stateCondition,
|
||||||
operatorUid == null
|
operatorUid == null
|
||||||
? labelingAssignmentEntity.inspectState.eq(InspectState.UNCONFIRM.getId())
|
? labelingAssignmentEntity.inspectState.eq(InspectState.UNCONFIRM.getId())
|
||||||
@@ -643,7 +638,6 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
.from(labelingAssignmentEntity)
|
.from(labelingAssignmentEntity)
|
||||||
.where(
|
.where(
|
||||||
labelingAssignmentEntity.inspectorUid.eq(userId),
|
labelingAssignmentEntity.inspectorUid.eq(userId),
|
||||||
labelingAssignmentEntity.workState.eq("DONE"),
|
|
||||||
beforeCondition.and(stateCondition))
|
beforeCondition.and(stateCondition))
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
|
|
||||||
|
|||||||
@@ -44,13 +44,11 @@ public class TrainingDataReviewService {
|
|||||||
if (request.getGeometry() == null || request.getGeometry().isEmpty()) {
|
if (request.getGeometry() == null || request.getGeometry().isEmpty()) {
|
||||||
// EXCEPT 상태만 업데이트
|
// EXCEPT 상태만 업데이트
|
||||||
status = "EXCEPT";
|
status = "EXCEPT";
|
||||||
trainingDataReviewCoreService.updateReviewStateOperator(
|
trainingDataReviewCoreService.updateReviewStateOperator(operatorUid, status);
|
||||||
operatorUid, status, request.getProperties().getInspectMemo());
|
|
||||||
trainingDataReviewCoreService.updateReviewExceptState(inferenceGeomUid, status);
|
trainingDataReviewCoreService.updateReviewExceptState(inferenceGeomUid, status);
|
||||||
} else {
|
} else {
|
||||||
status = "COMPLETE";
|
status = "COMPLETE";
|
||||||
trainingDataReviewCoreService.updateReviewStateOperator(
|
trainingDataReviewCoreService.updateReviewStateOperator(operatorUid, status);
|
||||||
operatorUid, status, request.getProperties().getInspectMemo());
|
|
||||||
trainingDataReviewCoreService.updateReviewPolygonClass(
|
trainingDataReviewCoreService.updateReviewPolygonClass(
|
||||||
inferenceGeomUid, request.getGeometry(), request.getProperties(), status);
|
inferenceGeomUid, request.getGeometry(), request.getProperties(), status);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user