From 0692456b5b1bb2139a0aacba2bf9187938463aaf Mon Sep 17 00:00:00 2001 From: "gayoun.park" Date: Fri, 27 Feb 2026 22:52:45 +0900 Subject: [PATCH] =?UTF-8?q?=ED=95=99=EC=8A=B5=EB=8D=B0=EC=9D=B4=ED=84=B0?= =?UTF-8?q?=EC=A0=9C=EC=9E=91=20>=20=EC=9E=91=EC=97=85=ED=98=84=ED=99=A9?= =?UTF-8?q?=20>=20=ED=8F=B4=EB=A6=AC=EA=B3=A4=20=EC=88=98=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kamcoback/label/dto/WorkerStatsDto.java | 3 ++ .../label/LabelAllocateRepositoryImpl.java | 35 ++++++++++++++++--- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/kamco/cd/kamcoback/label/dto/WorkerStatsDto.java b/src/main/java/com/kamco/cd/kamcoback/label/dto/WorkerStatsDto.java index 42d924d5..0bf6924b 100644 --- a/src/main/java/com/kamco/cd/kamcoback/label/dto/WorkerStatsDto.java +++ b/src/main/java/com/kamco/cd/kamcoback/label/dto/WorkerStatsDto.java @@ -219,6 +219,9 @@ public class WorkerStatsDto { @Deprecated @Schema(description = "[Deprecated] inspectionRemainingCount 사용 권장") private Long remainingInspectCount; + + @Schema(description = "파일 다운로드 가능한 폴리곤 수") + private Long downloadPolygonCnt; } @Getter diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelAllocateRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelAllocateRepositoryImpl.java index 82cc330d..0bbb7962 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelAllocateRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelAllocateRepositoryImpl.java @@ -6,6 +6,7 @@ import static com.kamco.cd.kamcoback.postgres.entity.QLabelingLabelerEntity.labe import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceEntity.mapSheetAnalDataInferenceEntity; import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceGeomEntity.mapSheetAnalDataInferenceGeomEntity; import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalInferenceEntity.mapSheetAnalInferenceEntity; +import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetLearnDataGeomEntity.mapSheetLearnDataGeomEntity; import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetLearnEntity.mapSheetLearnEntity; import static com.kamco.cd.kamcoback.postgres.entity.QMemberEntity.memberEntity; @@ -388,12 +389,8 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq(analEntity.getCompareYyyy()), mapSheetAnalDataInferenceGeomEntity.targetYyyy.eq(analEntity.getTargetYyyy()), mapSheetAnalDataInferenceGeomEntity.stage.eq(analEntity.getStage()), - // mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull() mapSheetAnalDataInferenceGeomEntity.pnu.gt(0L), - mapSheetAnalDataInferenceGeomEntity.fitState.eq( - ImageryFitStatus.UNFIT.getId()) // TODO: - // 추후 라벨링 대상 조건 수정하기 - ) + mapSheetAnalDataInferenceGeomEntity.fitState.eq(ImageryFitStatus.UNFIT.getId())) .fetchOne(); } @@ -493,6 +490,19 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto inspectionStatus = inspectionRemaining > 0 ? "진행중" : "완료"; } + Long downloadPolygonCnt = + queryFactory + .select(mapSheetLearnDataGeomEntity.geoUid.count()) + .from(mapSheetLearnDataGeomEntity) + .innerJoin(labelingAssignmentEntity) + .on(labelingAssignmentEntity.inferenceGeomUid.eq(mapSheetLearnDataGeomEntity.geoUid)) + .innerJoin(mapSheetAnalInferenceEntity) + .on( + labelingAssignmentEntity.analUid.eq(mapSheetAnalInferenceEntity.id), + mapSheetAnalInferenceEntity.id.eq(analUid)) + .where(mapSheetLearnDataGeomEntity.fileCreateYn.isTrue()) + .fetchOne(); + return WorkProgressInfo.builder() // 라벨링 (pass_yn = false인 부적합 데이터 기준) .labelingProgressRate(labelingRate) @@ -516,6 +526,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto .completedCount(labelCompleted) .remainingLabelCount(labelingRemaining) .remainingInspectCount(inspectionRemaining) + .downloadPolygonCnt(downloadPolygonCnt) .build(); } @@ -659,6 +670,19 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto inspectionStatus = inspectionRemaining > 0 ? "진행중" : "완료"; } + Long downloadPolygonCnt = + queryFactory + .select(mapSheetLearnDataGeomEntity.geoUid.count()) + .from(mapSheetLearnDataGeomEntity) + .innerJoin(labelingAssignmentEntity) + .on(labelingAssignmentEntity.inferenceGeomUid.eq(mapSheetLearnDataGeomEntity.geoUid)) + .innerJoin(mapSheetAnalInferenceEntity) + .on( + labelingAssignmentEntity.analUid.eq(mapSheetAnalInferenceEntity.id), + mapSheetAnalInferenceEntity.uuid.eq(targetUuid)) + .where(mapSheetLearnDataGeomEntity.fileCreateYn.isTrue()) + .fetchOne(); + return WorkProgressInfo.builder() .labelingProgressRate(labelingRate) .labelingStatus(labelingStatus) @@ -679,6 +703,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto .completedCount(labelCompleted) .remainingLabelCount(labelingRemaining) .remainingInspectCount(inspectionRemaining) + .downloadPolygonCnt(downloadPolygonCnt) .build(); }