From cc5b3f3096250526e90e5de59e232380ef189827 Mon Sep 17 00:00:00 2001 From: "gayoun.park" Date: Tue, 20 Jan 2026 18:35:45 +0900 Subject: [PATCH] =?UTF-8?q?=EB=9D=BC=EB=B2=A8=EB=A7=81=ED=88=B4=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=20=EA=B8=B0=EC=A4=80=EB=85=84=EB=8F=84=20asc?= =?UTF-8?q?,=EB=B9=84=EA=B5=90=EB=85=84=EB=8F=84=20asc=20=EA=B8=B0?= =?UTF-8?q?=EC=A4=80=EC=9C=BC=EB=A1=9C=20sorting,=20=EB=B3=80=ED=99=94?= =?UTF-8?q?=ED=83=90=EC=A7=80=20cog=20API=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ChangeDetectionRepositoryImpl.java | 4 ++++ .../TrainingDataLabelRepositoryImpl.java | 14 +++++++++++++- .../TrainingDataReviewRepositoryImpl.java | 10 +++++++++- .../trainingdata/dto/TrainingDataLabelDto.java | 14 +++++++++++++- .../trainingdata/dto/TrainingDataReviewDto.java | 14 +++++++++++++- 5 files changed, 52 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/changedetection/ChangeDetectionRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/changedetection/ChangeDetectionRepositoryImpl.java index 7397864e..930c334a 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/changedetection/ChangeDetectionRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/changedetection/ChangeDetectionRepositoryImpl.java @@ -153,6 +153,10 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport .groupBy(mapInkx5kEntity.geom) .fetchOne(); + if (data == null) { + return null; + } + ObjectMapper mapper = new ObjectMapper(); String geoJson = Objects.requireNonNull(data).getBbox(); JsonNode jsonNode; diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataLabelRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataLabelRepositoryImpl.java index c67abff1..0aade587 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataLabelRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataLabelRepositoryImpl.java @@ -95,8 +95,14 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport labelingAssignmentEntity.workState, labelingAssignmentEntity.assignGroupId, mapInkx5kEntity.mapidNm, - mapSheetAnalDataInferenceGeomEntity.pnu)) + mapSheetAnalDataInferenceGeomEntity.pnu, + mapSheetAnalInferenceEntity.uuid, + mapSheetAnalInferenceEntity.compareYyyy, + mapSheetAnalInferenceEntity.targetYyyy, + mapSheetAnalInferenceEntity.stage)) .from(labelingAssignmentEntity) + .innerJoin(mapSheetAnalInferenceEntity) + .on(labelingAssignmentEntity.analUid.eq(mapSheetAnalInferenceEntity.id)) .innerJoin(mapSheetAnalDataInferenceGeomEntity) .on( labelingAssignmentEntity.inferenceGeomUid.eq( @@ -107,6 +113,8 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport .offset(pageable.getOffset()) .limit(pageable.getPageSize()) .orderBy( + mapSheetAnalInferenceEntity.targetYyyy.asc(), + mapSheetAnalInferenceEntity.compareYyyy.asc(), labelingAssignmentEntity.createdDate.asc(), labelingAssignmentEntity.inferenceGeomUid.asc()) .fetch(); @@ -610,6 +618,8 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport labelingAssignmentEntity.createdDate, labelingAssignmentEntity.inferenceGeomUid) .from(labelingAssignmentEntity) + .innerJoin(mapSheetAnalInferenceEntity) + .on(labelingAssignmentEntity.analUid.eq(mapSheetAnalInferenceEntity.id)) .where( labelingAssignmentEntity.workerUid.eq(userId), stateCondition, @@ -617,6 +627,8 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport ? labelingAssignmentEntity.workState.eq(LabelState.ASSIGNED.getId()) : labelingAssignmentEntity.assignmentUid.eq(UUID.fromString(assignmentUid))) .orderBy( + mapSheetAnalInferenceEntity.targetYyyy.asc(), + mapSheetAnalInferenceEntity.compareYyyy.asc(), labelingAssignmentEntity.createdDate.asc(), labelingAssignmentEntity.inferenceGeomUid.asc()) .limit(1) diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataReviewRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataReviewRepositoryImpl.java index 566e6fab..ba9e36ab 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataReviewRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/trainingdata/TrainingDataReviewRepositoryImpl.java @@ -96,8 +96,14 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport labelingAssignmentEntity.inspectState, labelingAssignmentEntity.assignGroupId, mapInkx5kEntity.mapidNm, - mapSheetAnalDataInferenceGeomEntity.pnu)) + mapSheetAnalDataInferenceGeomEntity.pnu, + mapSheetAnalInferenceEntity.uuid, + mapSheetAnalInferenceEntity.compareYyyy, + mapSheetAnalInferenceEntity.targetYyyy, + mapSheetAnalInferenceEntity.stage)) .from(labelingAssignmentEntity) + .innerJoin(mapSheetAnalInferenceEntity) + .on(labelingAssignmentEntity.analUid.eq(mapSheetAnalInferenceEntity.id)) .innerJoin(mapSheetAnalDataInferenceGeomEntity) .on( labelingAssignmentEntity.inferenceGeomUid.eq( @@ -110,6 +116,8 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport .offset(pageable.getOffset()) .limit(pageable.getPageSize()) .orderBy( + mapSheetAnalInferenceEntity.targetYyyy.asc(), + mapSheetAnalInferenceEntity.compareYyyy.asc(), labelingAssignmentEntity.createdDate.asc(), labelingAssignmentEntity.inferenceGeomUid.asc()) .fetch(); diff --git a/src/main/java/com/kamco/cd/kamcoback/trainingdata/dto/TrainingDataLabelDto.java b/src/main/java/com/kamco/cd/kamcoback/trainingdata/dto/TrainingDataLabelDto.java index fe6113c3..1e2628b0 100644 --- a/src/main/java/com/kamco/cd/kamcoback/trainingdata/dto/TrainingDataLabelDto.java +++ b/src/main/java/com/kamco/cd/kamcoback/trainingdata/dto/TrainingDataLabelDto.java @@ -35,6 +35,10 @@ public class TrainingDataLabelDto { private String mapSheetNum; private String mapIdNm; private Long pnu; + private UUID stageUuid; + private Integer compareYyyy; + private Integer targetYyyy; + private Integer stage; public LabelingListDto( UUID assignmentUid, @@ -43,7 +47,11 @@ public class TrainingDataLabelDto { String workState, String mapSheetNum, String mapIdNm, - Long pnu) { + Long pnu, + UUID stageUuid, + Integer compareYyyy, + Integer targetYyyy, + Integer stage) { this.assignmentUid = assignmentUid; this.inferenceGeomUid = inferenceGeomUid; this.workerUid = workerUid; @@ -51,6 +59,10 @@ public class TrainingDataLabelDto { this.mapSheetNum = mapSheetNum; this.mapIdNm = mapIdNm; this.pnu = pnu; + this.stageUuid = stageUuid; + this.compareYyyy = compareYyyy; + this.targetYyyy = targetYyyy; + this.stage = stage; } } diff --git a/src/main/java/com/kamco/cd/kamcoback/trainingdata/dto/TrainingDataReviewDto.java b/src/main/java/com/kamco/cd/kamcoback/trainingdata/dto/TrainingDataReviewDto.java index 9eb914c4..87ac558e 100644 --- a/src/main/java/com/kamco/cd/kamcoback/trainingdata/dto/TrainingDataReviewDto.java +++ b/src/main/java/com/kamco/cd/kamcoback/trainingdata/dto/TrainingDataReviewDto.java @@ -35,6 +35,10 @@ public class TrainingDataReviewDto { private String mapSheetNum; private String mapIdNm; private Long pnu; + private UUID stageUuid; + private Integer compareYyyy; + private Integer targetYyyy; + private Integer stage; public ReviewListDto( UUID operatorUid, @@ -43,7 +47,11 @@ public class TrainingDataReviewDto { String inspectState, String mapSheetNum, String mapIdNm, - Long pnu) { + Long pnu, + UUID stageUuid, + Integer compareYyyy, + Integer targetYyyy, + Integer stage) { this.operatorUid = operatorUid; this.inferenceGeomUid = inferenceGeomUid; this.inspectorUid = inspectorUid; @@ -51,6 +59,10 @@ public class TrainingDataReviewDto { this.mapSheetNum = mapSheetNum; this.mapIdNm = mapIdNm; this.pnu = pnu; + this.stageUuid = stageUuid; + this.compareYyyy = compareYyyy; + this.targetYyyy = targetYyyy; + this.stage = stage; } }