From 807774d01faa30c9d2b26610f77d664a23677620 Mon Sep 17 00:00:00 2001 From: teddy Date: Tue, 20 Jan 2026 21:25:01 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=EC=B6=94=EB=A1=A0=20=EB=B0=B0=EC=B9=98=20?= =?UTF-8?q?=EC=8B=9C=EA=B0=84=201=EB=B6=84=EC=9C=BC=EB=A1=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Inference/InferenceResultRepositoryImpl.java | 14 -------------- .../service/MapSheetInferenceJobService.java | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/InferenceResultRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/InferenceResultRepositoryImpl.java index 70ba071f..11f8f0f7 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/InferenceResultRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/InferenceResultRepositoryImpl.java @@ -4,9 +4,6 @@ import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetLearnEntity.mapShe import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.LabelMngState; import com.kamco.cd.kamcoback.postgres.entity.MapSheetLearnEntity; -import com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceEntity; -import com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceGeomEntity; -import com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalInferenceEntity; import com.querydsl.jpa.impl.JPAQueryFactory; import jakarta.persistence.EntityManager; import java.util.Optional; @@ -21,17 +18,6 @@ public class InferenceResultRepositoryImpl implements InferenceResultRepositoryC private final JPAQueryFactory queryFactory; private final EntityManager em; - private final QMapSheetAnalInferenceEntity inferenceEntity = - QMapSheetAnalInferenceEntity.mapSheetAnalInferenceEntity; - - /** tb_map_sheet_anal_data_inference */ - private final QMapSheetAnalDataInferenceEntity inferenceDataEntity = - QMapSheetAnalDataInferenceEntity.mapSheetAnalDataInferenceEntity; - - /** tb_map_sheet_anal_data_inference_geom */ - private final QMapSheetAnalDataInferenceGeomEntity inferenceGeomEntity = - QMapSheetAnalDataInferenceGeomEntity.mapSheetAnalDataInferenceGeomEntity; - // =============================== // Upsert (Native only) // =============================== diff --git a/src/main/java/com/kamco/cd/kamcoback/scheduler/service/MapSheetInferenceJobService.java b/src/main/java/com/kamco/cd/kamcoback/scheduler/service/MapSheetInferenceJobService.java index e7cc4a4b..a61476b8 100644 --- a/src/main/java/com/kamco/cd/kamcoback/scheduler/service/MapSheetInferenceJobService.java +++ b/src/main/java/com/kamco/cd/kamcoback/scheduler/service/MapSheetInferenceJobService.java @@ -60,7 +60,7 @@ public class MapSheetInferenceJobService { private String datasetDir; /** 추론 진행 배치 1분 60_000 */ - @Scheduled(fixedDelay = 30_000) + @Scheduled(fixedDelay = 60_000) public void runBatch() { if (isLocalProfile()) { return; From b8a0999a7e6ed1f87a99d59907bf8dab9a1fd9b0 Mon Sep 17 00:00:00 2001 From: teddy Date: Wed, 21 Jan 2026 09:48:09 +0900 Subject: [PATCH 2/3] =?UTF-8?q?shp=20=EC=83=9D=EC=84=B1=20jar=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=EB=AA=85=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-dev.yml | 2 +- src/main/resources/application-prod.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index ee19e1d3..a265ea9d 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -105,4 +105,4 @@ inference: url: http://10.100.0.11:8000/jobs batch-url: http://10.100.0.11:8000/batches geojson-dir: /kamco-nfs/requests/ - jar-path: /kamco-nfs/dataset/makeshp-1.0.0.jar + jar-path: /kamco-nfs/dataset/shp_exporter-1.0.0.jar diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index b9740f31..d3eafec4 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -61,5 +61,5 @@ inference: url: http://10.100.0.11:8000/jobs batch-url: http://10.100.0.11:8000/batches geojson-dir: /kamco-nfs/requests/ - jar-path: jar/makeshp-1.0.0.jar + jar-path: /kamco-nfs/dataset/shp_exporter-1.0.0.jar From 01d1745762454226d53d4610dbc2b108794da418 Mon Sep 17 00:00:00 2001 From: "gayoun.park" Date: Wed, 21 Jan 2026 09:52:51 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=EB=9D=BC=EB=B2=A8=EB=A7=81=ED=88=B4=20?= =?UTF-8?q?=EA=B8=B0=EB=B3=B8=20=ED=8E=98=EC=9D=B4=EC=A7=95=20=EA=B3=84?= =?UTF-8?q?=EC=82=B0=20=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TrainingDataLabelRepositoryImpl.java | 33 +++++++++++++---- .../TrainingDataReviewRepositoryImpl.java | 37 +++++++++++++++---- 2 files changed, 56 insertions(+), 14 deletions(-) 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 0aade587..c7259da1 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 @@ -616,7 +616,9 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport .select( labelingAssignmentEntity.assignmentUid, labelingAssignmentEntity.createdDate, - labelingAssignmentEntity.inferenceGeomUid) + labelingAssignmentEntity.inferenceGeomUid, + mapSheetAnalInferenceEntity.targetYyyy, + mapSheetAnalInferenceEntity.compareYyyy) .from(labelingAssignmentEntity) .innerJoin(mapSheetAnalInferenceEntity) .on(labelingAssignmentEntity.analUid.eq(mapSheetAnalInferenceEntity.id)) @@ -641,21 +643,38 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport UUID firstAssignedUid = firstAssigned.get(labelingAssignmentEntity.assignmentUid); ZonedDateTime createdDttm = firstAssigned.get(labelingAssignmentEntity.createdDate); Long inferenceGeomUid = firstAssigned.get(labelingAssignmentEntity.inferenceGeomUid); + Integer targetYyyy = firstAssigned.get(mapSheetAnalInferenceEntity.targetYyyy); + Integer compareYyyy = firstAssigned.get(mapSheetAnalInferenceEntity.compareYyyy); BooleanExpression beforeCondition = - labelingAssignmentEntity - .createdDate - .lt(createdDttm) + mapSheetAnalInferenceEntity + .targetYyyy + .lt(targetYyyy) .or( - labelingAssignmentEntity - .createdDate - .eq(createdDttm) + mapSheetAnalInferenceEntity + .targetYyyy + .eq(targetYyyy) + .and(mapSheetAnalInferenceEntity.compareYyyy.lt(compareYyyy))) + .or( + mapSheetAnalInferenceEntity + .targetYyyy + .eq(targetYyyy) + .and(mapSheetAnalInferenceEntity.compareYyyy.eq(compareYyyy)) + .and(labelingAssignmentEntity.createdDate.lt(createdDttm))) + .or( + mapSheetAnalInferenceEntity + .targetYyyy + .eq(targetYyyy) + .and(mapSheetAnalInferenceEntity.compareYyyy.eq(compareYyyy)) + .and(labelingAssignmentEntity.createdDate.eq(createdDttm)) .and(labelingAssignmentEntity.inferenceGeomUid.lt(inferenceGeomUid))); Long beforeCnt = queryFactory .select(labelingAssignmentEntity.count()) .from(labelingAssignmentEntity) + .innerJoin(mapSheetAnalInferenceEntity) + .on(mapSheetAnalInferenceEntity.id.eq(labelingAssignmentEntity.analUid)) .where( labelingAssignmentEntity.workerUid.eq(userId), beforeCondition.and(stateCondition)) .fetchOne(); 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 ba9e36ab..295eb0b4 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 @@ -645,8 +645,12 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport .select( labelingAssignmentEntity.assignmentUid, labelingAssignmentEntity.createdDate, - labelingAssignmentEntity.inferenceGeomUid) + labelingAssignmentEntity.inferenceGeomUid, + mapSheetAnalInferenceEntity.targetYyyy, + mapSheetAnalInferenceEntity.compareYyyy) .from(labelingAssignmentEntity) + .innerJoin(mapSheetAnalInferenceEntity) + .on(labelingAssignmentEntity.analUid.eq(mapSheetAnalInferenceEntity.id)) .where( labelingAssignmentEntity.inspectorUid.eq(userId), stateCondition, @@ -654,6 +658,8 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport ? labelingAssignmentEntity.inspectState.eq(InspectState.UNCONFIRM.getId()) : labelingAssignmentEntity.assignmentUid.eq(UUID.fromString(operatorUid))) .orderBy( + mapSheetAnalInferenceEntity.targetYyyy.asc(), + mapSheetAnalInferenceEntity.compareYyyy.asc(), labelingAssignmentEntity.createdDate.asc(), labelingAssignmentEntity.inferenceGeomUid.asc()) .limit(1) @@ -666,21 +672,38 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport UUID firstAssignedUid = firstAssigned.get(labelingAssignmentEntity.assignmentUid); ZonedDateTime createdDttm = firstAssigned.get(labelingAssignmentEntity.createdDate); Long inferenceGeomUid = firstAssigned.get(labelingAssignmentEntity.inferenceGeomUid); + Integer targetYyyy = firstAssigned.get(mapSheetAnalInferenceEntity.targetYyyy); + Integer compareYyyy = firstAssigned.get(mapSheetAnalInferenceEntity.compareYyyy); BooleanExpression beforeCondition = - labelingAssignmentEntity - .createdDate - .lt(createdDttm) + mapSheetAnalInferenceEntity + .targetYyyy + .lt(targetYyyy) .or( - labelingAssignmentEntity - .createdDate - .eq(createdDttm) + mapSheetAnalInferenceEntity + .targetYyyy + .eq(targetYyyy) + .and(mapSheetAnalInferenceEntity.compareYyyy.lt(compareYyyy))) + .or( + mapSheetAnalInferenceEntity + .targetYyyy + .eq(targetYyyy) + .and(mapSheetAnalInferenceEntity.compareYyyy.eq(compareYyyy)) + .and(labelingAssignmentEntity.createdDate.lt(createdDttm))) + .or( + mapSheetAnalInferenceEntity + .targetYyyy + .eq(targetYyyy) + .and(mapSheetAnalInferenceEntity.compareYyyy.eq(compareYyyy)) + .and(labelingAssignmentEntity.createdDate.eq(createdDttm)) .and(labelingAssignmentEntity.inferenceGeomUid.lt(inferenceGeomUid))); Long beforeCnt = queryFactory .select(labelingAssignmentEntity.count()) .from(labelingAssignmentEntity) + .innerJoin(mapSheetAnalInferenceEntity) + .on(mapSheetAnalInferenceEntity.id.eq(labelingAssignmentEntity.analUid)) .where( labelingAssignmentEntity.inspectorUid.eq(userId), beforeCondition.and(stateCondition))