Merge pull request '변화지도 도엽 목록에 도엽별bbox 추가' (#119) from feat/infer_dev_260211 into develop

Reviewed-on: #119
This commit was merged in pull request #119.
This commit is contained in:
2026-02-27 15:31:52 +09:00
2 changed files with 30 additions and 3 deletions

View File

@@ -1,6 +1,9 @@
package com.kamco.cd.kamcoback.changedetection.dto;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.kamco.cd.kamcoback.common.utils.enums.CodeExpose;
import com.kamco.cd.kamcoback.common.utils.enums.EnumType;
import io.swagger.v3.oas.annotations.media.Schema;
@@ -143,6 +146,23 @@ public class ChangeDetectionDto {
private String mapSheetNum;
private String mapSheetName;
private String alias;
@JsonIgnore private String bboxStr;
private JsonNode bbox;
public MapSheetList(String mapSheetNum, String mapSheetName, String alias, String bboxStr) {
this.mapSheetNum = mapSheetNum;
this.mapSheetName = mapSheetName;
this.alias = alias;
if (bboxStr != null) {
ObjectMapper mapper = new ObjectMapper();
try {
this.bbox = mapper.readTree(bboxStr);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
}
}
}
@Schema(name = "PolygonFeatureList", description = "Geometry 리턴 객체")
@@ -262,6 +282,7 @@ public class ChangeDetectionDto {
@NoArgsConstructor
@AllArgsConstructor
public static class ChangeDetectionMapDto {
private Integer compareYyyy;
private Integer targetYyyy;
private String cdObjectId;

View File

@@ -341,7 +341,10 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
mapInkx5kEntity.mapidcdNo,
mapInkx5kEntity.mapidNm,
Expressions.stringTemplate(
"concat({0}, ' ', {1})", mapInkx5kEntity.mapidNm, mapInkx5kEntity.mapidcdNo)))
"concat({0}, ' ', {1})", mapInkx5kEntity.mapidNm, mapInkx5kEntity.mapidcdNo),
Expressions.stringTemplate(
"ST_AsGeoJSON(ST_Transform({0}, 5186))", mapInkx5kEntity.geom)
.as("bbox")))
.from(mapSheetAnalInferenceEntity)
.innerJoin(mapSheetAnalDataInferenceEntity)
.on(mapSheetAnalInferenceEntity.id.eq(mapSheetAnalDataInferenceEntity.analUid))
@@ -361,7 +364,10 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
mapInkx50kEntity.mapidcdNo,
mapInkx50kEntity.mapidNm,
Expressions.stringTemplate(
"concat({0}, ' ', {1})", mapInkx50kEntity.mapidNm, mapInkx50kEntity.mapidcdNo)))
"concat({0}, ' ', {1})", mapInkx50kEntity.mapidNm, mapInkx50kEntity.mapidcdNo),
Expressions.stringTemplate(
"ST_AsGeoJSON(ST_Transform({0}, 5186))", mapInkx50kEntity.geom)
.as("bbox")))
.from(mapSheetAnalInferenceEntity)
.innerJoin(mapSheetAnalDataInferenceEntity)
.on(mapSheetAnalInferenceEntity.id.eq(mapSheetAnalDataInferenceEntity.analUid))
@@ -369,7 +375,7 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
.on(mapSheetAnalDataInferenceEntity.mapSheetNum.stringValue().eq(mapInkx5kEntity.mapidcdNo))
.innerJoin(mapInkx5kEntity.mapInkx50k, mapInkx50kEntity)
.where(mapSheetAnalInferenceEntity.uuid.eq(uuid))
.groupBy(mapInkx50kEntity.mapidcdNo, mapInkx50kEntity.mapidNm)
.groupBy(mapInkx50kEntity.mapidcdNo, mapInkx50kEntity.mapidNm, mapInkx50kEntity.geom)
.orderBy(mapInkx50kEntity.mapidcdNo.asc())
.fetch();
}