Merge pull request 'feat/infer_dev_260107' (#30) from feat/infer_dev_260107 into develop

Reviewed-on: #30
This commit was merged in pull request #30.
This commit is contained in:
2026-01-30 21:05:04 +09:00
8 changed files with 58 additions and 14 deletions

View File

@@ -0,0 +1,27 @@
package com.kamco.cd.kamcoback.common.enums;
import com.kamco.cd.kamcoback.common.utils.enums.CodeExpose;
import com.kamco.cd.kamcoback.common.utils.enums.EnumType;
import lombok.AllArgsConstructor;
import lombok.Getter;
@CodeExpose
@Getter
@AllArgsConstructor
public enum CrsType implements EnumType {
EPSG_3857("korea 2000, 미터단위"),
EPSG_4326("geojson, osm기본"),
EPSG_5186("google, EPSG:900913동일");
private final String desc;
@Override
public String getId() {
return name();
}
@Override
public String getText() {
return desc;
}
}

View File

@@ -103,6 +103,9 @@ public class LayerDto {
@JsonFormatDttm
@Schema(description = "등록일시")
private ZonedDateTime createdDttm;
@Schema(description = "좌표계")
private String crs;
}
@Getter
@@ -140,6 +143,9 @@ public class LayerDto {
@Schema(description = "zoom max", example = "18")
private Short max;
@Schema(description = "좌표계", example = "EPSG_3857")
private String crs;
}
@Getter

View File

@@ -65,7 +65,7 @@ public class LayerService {
}
case GEOJSON -> {
mapLayerCoreService.saveGeoJson(dto);
return mapLayerCoreService.saveGeoJson(dto);
}
case WMTS -> {
@@ -91,7 +91,6 @@ public class LayerService {
default -> throw new CustomApiException("BAD_REQUEST", HttpStatus.BAD_REQUEST);
}
return null;
}
/**

View File

@@ -103,6 +103,9 @@ public class MapSheetMngDto {
@Schema(description = "tag")
private String tag;
@Schema(description = "crs 좌표계")
private String crs;
@JsonIgnore private Long createdUid;
}

View File

@@ -131,6 +131,10 @@ public class MapLayerCoreService {
entity.setIsLabelingMap(dto.getIsLabelingMap());
}
if (dto.getCrs() != null) {
entity.setCrs(dto.getCrs());
}
entity.setUpdatedUid(userUtil.getId());
entity.setUpdatedDttm(ZonedDateTime.now());
}
@@ -210,13 +214,7 @@ public class MapLayerCoreService {
* @param dto
*/
public UUID saveTile(LayerDto.AddReq dto) {
LayerDto.SearchReq searchReq = new LayerDto.SearchReq();
searchReq.setLayerType(LayerType.TILE.getId());
List<LayerDto.Basic> entityList = mapLayerRepository.findAllLayer(searchReq);
if (!entityList.isEmpty()) {
throw new CustomApiException("DUPLICATE_DATA", HttpStatus.CONFLICT);
}
Long order = mapLayerRepository.findSortOrderDesc();
MapLayerEntity mapLayerEntity = new MapLayerEntity();
mapLayerEntity.setDescription(dto.getDescription());
@@ -228,11 +226,12 @@ public class MapLayerCoreService {
mapLayerEntity.setMaxLat(dto.getMaxLat());
mapLayerEntity.setMinZoom(dto.getMin());
mapLayerEntity.setMaxZoom(dto.getMax());
mapLayerEntity.setCrs(dto.getCrs());
mapLayerEntity.setCreatedUid(userUtil.getId());
mapLayerEntity.setIsChangeMap(true);
mapLayerEntity.setIsLabelingMap(false);
mapLayerEntity.setOrder(1L);
mapLayerEntity.setIsLabelingMap(true);
mapLayerEntity.setOrder(order + 1);
mapLayerEntity.setLayerType(LayerType.TILE.getId());
mapLayerEntity.setUpdatedDttm(ZonedDateTime.now());
return mapLayerRepository.save(mapLayerEntity).getUuid();
@@ -255,6 +254,7 @@ public class MapLayerCoreService {
mapLayerEntity.setIsChangeMap(true);
mapLayerEntity.setIsLabelingMap(true);
mapLayerEntity.setLayerType(LayerType.GEOJSON.getId());
mapLayerEntity.setCrs(addDto.getCrs());
mapLayerEntity.setUpdatedDttm(ZonedDateTime.now());
mapLayerEntity.setOrder(order + 1);
return mapLayerRepository.save(mapLayerEntity).getUuid();

View File

@@ -103,6 +103,9 @@ public class MapLayerEntity {
@Column(name = "is_deleted")
private Boolean isDeleted = false;
@Column(name = "crs")
private String crs;
public LayerDto.Detail toDto() {
return new LayerDto.Detail(
this.uuid,
@@ -120,6 +123,7 @@ public class MapLayerEntity {
this.maxLat,
this.minZoom,
this.maxZoom,
this.createdDttm);
this.createdDttm,
this.crs);
}
}

View File

@@ -45,6 +45,9 @@ public class MapSheetMngTileEntity {
@Column(name = "tag")
private String tag;
@Column(name = "crs")
private String crs;
@NotNull
@ColumnDefault("now()")
@Column(name = "created_dttm", nullable = false)

View File

@@ -1056,7 +1056,8 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
mapSheetMngTileEntity.maxLat,
mapSheetMngTileEntity.minZoom,
mapSheetMngTileEntity.maxZoom,
mapSheetMngTileEntity.tag)
mapSheetMngTileEntity.tag,
mapSheetMngTileEntity.crs)
.values(
addReq.getMngYyyy(),
addReq.getUrl(),
@@ -1066,7 +1067,8 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
addReq.getMaxLat(),
addReq.getMinZoom(),
addReq.getMaxZoom(),
addReq.getTag())
addReq.getTag(),
addReq.getCrs())
.execute();
}