feat/infer_dev_260107 #14

Merged
gina merged 2 commits from feat/infer_dev_260107 into develop 2026-01-30 11:05:31 +09:00
2 changed files with 27 additions and 4 deletions
Showing only changes of commit ceebbdfa50 - Show all commits

View File

@@ -244,6 +244,14 @@ public class LayerDto {
@JsonIgnore private String bboxGeometry; @JsonIgnore private String bboxGeometry;
@Schema(description = "uuid")
private UUID uuid;
@JsonIgnore private String rawJsonString;
@Schema(description = "rawJson")
private JsonNode rawJson;
public LayerMapDto( public LayerMapDto(
String layerType, String layerType,
String tag, String tag,
@@ -255,7 +263,9 @@ public class LayerDto {
BigDecimal maxLat, BigDecimal maxLat,
Short minZoom, Short minZoom,
Short maxZoom, Short maxZoom,
String bboxGeometry) { String bboxGeometry,
UUID uuid,
String rawJsonString) {
this.layerType = layerType; this.layerType = layerType;
this.tag = tag; this.tag = tag;
this.sortOrder = sortOrder; this.sortOrder = sortOrder;
@@ -267,11 +277,13 @@ public class LayerDto {
this.minZoom = minZoom; this.minZoom = minZoom;
this.maxZoom = maxZoom; this.maxZoom = maxZoom;
this.bboxGeometry = bboxGeometry; this.bboxGeometry = bboxGeometry;
this.uuid = uuid;
this.rawJsonString = rawJsonString;
JsonNode geoJson = null; JsonNode geoJson = null;
JsonNode rawJson = null;
if (bboxGeometry != null) {
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
if (bboxGeometry != null) {
try { try {
geoJson = mapper.readTree(bboxGeometry); geoJson = mapper.readTree(bboxGeometry);
} catch (JsonProcessingException e) { } catch (JsonProcessingException e) {
@@ -279,6 +291,15 @@ public class LayerDto {
} }
} }
if (rawJsonString != null) {
try {
rawJson = mapper.readTree(rawJsonString);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
}
this.rawJson = rawJson;
this.bbox = geoJson; this.bbox = geoJson;
} }
} }

View File

@@ -109,7 +109,9 @@ public class MapLayerRepositoryImpl implements MapLayerRepositoryCustom {
mapLayerEntity.minLon, mapLayerEntity.minLon,
mapLayerEntity.minLat, mapLayerEntity.minLat,
mapLayerEntity.maxLon, mapLayerEntity.maxLon,
mapLayerEntity.maxLat))) mapLayerEntity.maxLat),
mapLayerEntity.uuid,
Expressions.stringTemplate("cast({0} as text)", mapLayerEntity.rawJson)))
.from(mapLayerEntity) .from(mapLayerEntity)
.where(layerTypeCondition(type), mapLayerEntity.isDeleted.isFalse()) .where(layerTypeCondition(type), mapLayerEntity.isDeleted.isFalse())
.orderBy(mapLayerEntity.order.asc()) .orderBy(mapLayerEntity.order.asc())