Merge remote-tracking branch 'origin/feat/infer_dev_260107' into feat/infer_dev_260107

This commit is contained in:
2026-01-20 11:22:00 +09:00
4 changed files with 34 additions and 3 deletions

View File

@@ -74,11 +74,16 @@ public class ChangeDetectionApiController {
@Parameter(description = "5k/50k 구분(SCALE_5K/SCALE_50K))", required = true) @Parameter(description = "5k/50k 구분(SCALE_5K/SCALE_50K))", required = true)
@RequestParam(defaultValue = "SCALE_50K") @RequestParam(defaultValue = "SCALE_50K")
MapScaleType scale, MapScaleType scale,
@Parameter(
description = "변화탐지 년도(차수) /year-list 의 uuid",
example = "8584e8d4-53b3-4582-bde2-28a81495a626")
@RequestParam
UUID uuid,
@Parameter(description = "이전 년도", example = "2023") @RequestParam Integer beforeYear, @Parameter(description = "이전 년도", example = "2023") @RequestParam Integer beforeYear,
@Parameter(description = "이후 년도", example = "2024") @RequestParam Integer afterYear, @Parameter(description = "이후 년도", example = "2024") @RequestParam Integer afterYear,
@Parameter(description = "도엽번호(5k)", example = "35905086") @RequestParam String mapSheetNum) { @Parameter(description = "도엽번호(5k)", example = "35905086") @RequestParam String mapSheetNum) {
ChangeDetectionDto.CogUrlReq req = ChangeDetectionDto.CogUrlReq req =
new ChangeDetectionDto.CogUrlReq(beforeYear, afterYear, mapSheetNum, type, scale); new ChangeDetectionDto.CogUrlReq(uuid, beforeYear, afterYear, mapSheetNum, type, scale);
return ApiResponseDto.ok(changeDetectionService.getChangeDetectionCogUrl(req)); return ApiResponseDto.ok(changeDetectionService.getChangeDetectionCogUrl(req));
} }

View File

@@ -86,6 +86,7 @@ public class ChangeDetectionDto {
@AllArgsConstructor @AllArgsConstructor
public static class CogUrlReq { public static class CogUrlReq {
private UUID uuid;
private Integer beforeYear; private Integer beforeYear;
private Integer afterYear; private Integer afterYear;
private String mapSheetNum; private String mapSheetNum;

View File

@@ -12,6 +12,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto; import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto;
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.DetectSearchType;
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.MapScaleType; import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.MapScaleType;
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.MapSheetList; import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.MapSheetList;
import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalDataInferenceGeomEntity; import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalDataInferenceGeomEntity;
@@ -111,6 +112,26 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
@Override @Override
public ChangeDetectionDto.CogUrlDto getChangeDetectionCogUrl(ChangeDetectionDto.CogUrlReq req) { public ChangeDetectionDto.CogUrlDto getChangeDetectionCogUrl(ChangeDetectionDto.CogUrlReq req) {
String mapSheetNum = req.getMapSheetNum();
if (req.getType().equals(DetectSearchType.MAPSHEET)
&& req.getScale().equals(MapScaleType.SCALE_50K)) {
mapSheetNum =
queryFactory
.select(mapSheetAnalDataInferenceEntity.mapSheetNum.stringValue())
.from(mapSheetAnalInferenceEntity)
.innerJoin(mapSheetAnalDataInferenceEntity)
.on(mapSheetAnalInferenceEntity.id.eq(mapSheetAnalDataInferenceEntity.analUid))
.where(
mapSheetAnalInferenceEntity.uuid.eq(req.getUuid()),
mapSheetAnalDataInferenceEntity
.mapSheetNum
.stringValue()
.like("%" + req.getMapSheetNum() + "%"))
.orderBy(mapSheetAnalDataInferenceEntity.mapSheetNum.asc())
.fetchFirst();
}
ChangeDetectionDto.CogUrlData data = ChangeDetectionDto.CogUrlData data =
queryFactory queryFactory
.select( .select(
@@ -128,7 +149,7 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
.year .year
.eq(req.getBeforeYear()) .eq(req.getBeforeYear())
.or(imageryEntity.year.eq(req.getAfterYear())), .or(imageryEntity.year.eq(req.getAfterYear())),
imageryEntity.scene5k.eq(req.getMapSheetNum())) imageryEntity.scene5k.eq(mapSheetNum))
.groupBy(mapInkx5kEntity.geom) .groupBy(mapInkx5kEntity.geom)
.fetchOne(); .fetchOne();
@@ -191,6 +212,7 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
.where( .where(
mapSheetAnalInferenceEntity.uuid.eq(uuid), mapSheetAnalInferenceEntity.uuid.eq(uuid),
mapScaleTypeAnalDataSearchExpression(scale, mapSheetNum)) mapScaleTypeAnalDataSearchExpression(scale, mapSheetNum))
.orderBy(mapSheetAnalDataInferenceGeomEntity.mapSheetNum.asc())
.fetch(); .fetch();
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
@@ -313,7 +335,8 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
.on(mapSheetAnalDataInferenceEntity.mapSheetNum.stringValue().eq(mapInkx5kEntity.mapidcdNo)) .on(mapSheetAnalDataInferenceEntity.mapSheetNum.stringValue().eq(mapInkx5kEntity.mapidcdNo))
.innerJoin(mapInkx5kEntity.mapInkx50k, mapInkx50kEntity) .innerJoin(mapInkx5kEntity.mapInkx50k, mapInkx50kEntity)
.where(mapSheetAnalInferenceEntity.uuid.eq(uuid)) .where(mapSheetAnalInferenceEntity.uuid.eq(uuid))
.orderBy(mapInkx5kEntity.mapidcdNo.asc()) .groupBy(mapInkx50kEntity.mapidcdNo, mapInkx50kEntity.mapidNm)
.orderBy(mapInkx50kEntity.mapidcdNo.asc())
.fetch(); .fetch();
} }

View File

@@ -99,6 +99,7 @@ public class TrainingDataReviewJobRepositoryImpl extends QuerydslRepositorySuppo
.update(labelingAssignmentEntity) .update(labelingAssignmentEntity)
.set(labelingAssignmentEntity.inspectorUid, reviewerId) .set(labelingAssignmentEntity.inspectorUid, reviewerId)
.set(labelingAssignmentEntity.inspectState, InspectState.UNCONFIRM.getId()) .set(labelingAssignmentEntity.inspectState, InspectState.UNCONFIRM.getId())
.set(labelingAssignmentEntity.modifiedDate, ZonedDateTime.now())
.where(labelingAssignmentEntity.assignmentUid.eq(assignmentUid)) .where(labelingAssignmentEntity.assignmentUid.eq(assignmentUid))
.execute(); .execute();
} }
@@ -115,6 +116,7 @@ public class TrainingDataReviewJobRepositoryImpl extends QuerydslRepositorySuppo
.update(labelingAssignmentEntity) .update(labelingAssignmentEntity)
.set(labelingAssignmentEntity.inspectorUid, reviewerId) .set(labelingAssignmentEntity.inspectorUid, reviewerId)
.set(labelingAssignmentEntity.inspectState, InspectState.UNCONFIRM.getId()) .set(labelingAssignmentEntity.inspectState, InspectState.UNCONFIRM.getId())
.set(labelingAssignmentEntity.modifiedDate, ZonedDateTime.now())
.where(labelingAssignmentEntity.assignmentUid.in(assignmentUids)) .where(labelingAssignmentEntity.assignmentUid.in(assignmentUids))
.execute(); .execute();
} }