레이어명 추가
This commit is contained in:
@@ -31,6 +31,9 @@ public class LayerDto {
|
||||
@Schema(description = "uuid")
|
||||
private UUID uuid;
|
||||
|
||||
@Schema(description = "레이어명")
|
||||
private String layerName;
|
||||
|
||||
@Schema(example = "WMTS", description = "유형 (TILE/GEOJSON/WMTS/WMS)")
|
||||
private String layerType;
|
||||
|
||||
@@ -63,6 +66,9 @@ public class LayerDto {
|
||||
@Schema(description = "uuid")
|
||||
private UUID uuid;
|
||||
|
||||
@Schema(description = "레이어명")
|
||||
private String layerName;
|
||||
|
||||
@Schema(description = "유형 (TILE/GEOJSON/WMTS/WMS)")
|
||||
private String layerType;
|
||||
|
||||
@@ -119,6 +125,9 @@ public class LayerDto {
|
||||
@Schema(name = "LayerAddReq")
|
||||
public static class AddReq {
|
||||
|
||||
@Schema(description = "레이어명")
|
||||
private String layerName;
|
||||
|
||||
@Schema(description = "title WMS, WMTS 선택한 tile")
|
||||
private String title;
|
||||
|
||||
@@ -215,6 +224,9 @@ public class LayerDto {
|
||||
@Schema(name = "LayerMapDto")
|
||||
public static class LayerMapDto {
|
||||
|
||||
@Schema(description = "레이어명")
|
||||
private String layerName;
|
||||
|
||||
@Schema(example = "WMTS", description = "유형 (TILE/GEOJSON/WMTS/WMS)")
|
||||
private String layerType;
|
||||
|
||||
@@ -268,6 +280,7 @@ public class LayerDto {
|
||||
private String crs;
|
||||
|
||||
public LayerMapDto(
|
||||
String layerName,
|
||||
String layerType,
|
||||
String tag,
|
||||
Long sortOrder,
|
||||
@@ -282,6 +295,7 @@ public class LayerDto {
|
||||
UUID uuid,
|
||||
String rawJsonString,
|
||||
String crs) {
|
||||
this.layerName = layerName;
|
||||
this.layerType = layerType;
|
||||
this.tag = tag;
|
||||
this.sortOrder = sortOrder;
|
||||
|
||||
@@ -26,5 +26,6 @@ public class WmsDto {
|
||||
private String title;
|
||||
private String description;
|
||||
private String tag;
|
||||
private String layerName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,5 +26,6 @@ public class WmtsDto {
|
||||
private String title;
|
||||
private String description;
|
||||
private String tag;
|
||||
private String layerName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.kamco.cd.kamcoback.layer.dto.LayerDto.LayerMapDto;
|
||||
import com.kamco.cd.kamcoback.layer.dto.LayerDto.OrderReq;
|
||||
import com.kamco.cd.kamcoback.layer.dto.LayerDto.TileUrlDto;
|
||||
import com.kamco.cd.kamcoback.layer.dto.WmsDto.WmsAddDto;
|
||||
import com.kamco.cd.kamcoback.layer.dto.WmsDto.WmsAddReqDto;
|
||||
import com.kamco.cd.kamcoback.layer.dto.WmsLayerInfo;
|
||||
import com.kamco.cd.kamcoback.layer.dto.WmtsDto.WmtsAddDto;
|
||||
import com.kamco.cd.kamcoback.layer.dto.WmtsLayerInfo;
|
||||
@@ -79,6 +78,7 @@ public class LayerService {
|
||||
addDto.setDescription(dto.getDescription());
|
||||
addDto.setTitle(dto.getTitle());
|
||||
addDto.setTag(dto.getTag());
|
||||
addDto.setLayerName(dto.getLayerName());
|
||||
return mapLayerCoreService.saveWmts(addDto);
|
||||
}
|
||||
|
||||
@@ -89,6 +89,7 @@ public class LayerService {
|
||||
addDto.setDescription(dto.getDescription());
|
||||
addDto.setTitle(dto.getTitle());
|
||||
addDto.setTag(dto.getTag());
|
||||
addDto.setLayerName(dto.getLayerName());
|
||||
return mapLayerCoreService.saveWms(addDto);
|
||||
}
|
||||
|
||||
@@ -165,24 +166,6 @@ public class LayerService {
|
||||
return wmsService.getTile();
|
||||
}
|
||||
|
||||
/**
|
||||
* wms 저장
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Transactional
|
||||
public UUID saveWms(WmsAddReqDto dto) {
|
||||
// 선택한 tile 상세정보 조회
|
||||
WmsLayerInfo info = wmsService.getDetail(dto.getTitle());
|
||||
WmsAddDto addDto = new WmsAddDto();
|
||||
addDto.setWmsLayerInfo(info);
|
||||
addDto.setDescription(dto.getDescription());
|
||||
addDto.setTitle(dto.getTitle());
|
||||
addDto.setTag(dto.getTag());
|
||||
return mapLayerCoreService.saveWms(addDto);
|
||||
}
|
||||
|
||||
public List<LayerMapDto> findLayerMapList(String type) {
|
||||
List<LayerMapDto> layerMapDtoList = mapLayerCoreService.findLayerMapList(type);
|
||||
layerMapDtoList.forEach(
|
||||
|
||||
@@ -87,6 +87,10 @@ public class MapLayerCoreService {
|
||||
entity.setDescription(dto.getDescription());
|
||||
}
|
||||
|
||||
if (dto.getLayerName() != null) {
|
||||
entity.setLayerName(dto.getLayerName());
|
||||
}
|
||||
|
||||
if (dto.getUrl() != null) {
|
||||
entity.setUrl(dto.getUrl());
|
||||
}
|
||||
@@ -213,6 +217,7 @@ public class MapLayerCoreService {
|
||||
Long order = mapLayerRepository.findSortOrderDesc();
|
||||
|
||||
MapLayerEntity mapLayerEntity = new MapLayerEntity();
|
||||
mapLayerEntity.setLayerName(dto.getLayerName());
|
||||
mapLayerEntity.setDescription(dto.getDescription());
|
||||
mapLayerEntity.setUrl(dto.getUrl());
|
||||
mapLayerEntity.setTag(dto.getTag());
|
||||
@@ -243,6 +248,7 @@ public class MapLayerCoreService {
|
||||
Long order = mapLayerRepository.findSortOrderDesc();
|
||||
|
||||
MapLayerEntity mapLayerEntity = new MapLayerEntity();
|
||||
mapLayerEntity.setLayerName(addDto.getLayerName());
|
||||
mapLayerEntity.setDescription(addDto.getDescription());
|
||||
mapLayerEntity.setUrl(addDto.getUrl());
|
||||
mapLayerEntity.setTag(addDto.getTag());
|
||||
@@ -273,6 +279,7 @@ public class MapLayerCoreService {
|
||||
}
|
||||
|
||||
MapLayerEntity mapLayerEntity = new MapLayerEntity();
|
||||
mapLayerEntity.setLayerName(addDto.getLayerName());
|
||||
mapLayerEntity.setTitle(addDto.getTitle());
|
||||
mapLayerEntity.setDescription(addDto.getDescription());
|
||||
mapLayerEntity.setCreatedUid(userUtil.getId());
|
||||
@@ -305,6 +312,7 @@ public class MapLayerCoreService {
|
||||
}
|
||||
|
||||
MapLayerEntity mapLayerEntity = new MapLayerEntity();
|
||||
mapLayerEntity.setLayerName(addDto.getLayerName());
|
||||
mapLayerEntity.setTitle(addDto.getTitle());
|
||||
mapLayerEntity.setDescription(addDto.getDescription());
|
||||
mapLayerEntity.setCreatedUid(userUtil.getId());
|
||||
|
||||
@@ -43,6 +43,10 @@ public class MapLayerEntity {
|
||||
@Column(name = "title", length = 200)
|
||||
private String title;
|
||||
|
||||
@Size(max = 255)
|
||||
@Column(name = "layer_name")
|
||||
private String layerName;
|
||||
|
||||
@Column(name = "description", length = Integer.MAX_VALUE)
|
||||
private String description;
|
||||
|
||||
@@ -109,6 +113,7 @@ public class MapLayerEntity {
|
||||
public LayerDto.Detail toDto() {
|
||||
return new LayerDto.Detail(
|
||||
this.uuid,
|
||||
this.layerName,
|
||||
this.layerType,
|
||||
this.title,
|
||||
this.description,
|
||||
|
||||
@@ -58,6 +58,7 @@ public class MapLayerRepositoryImpl implements MapLayerRepositoryCustom {
|
||||
Projections.constructor(
|
||||
LayerDto.Basic.class,
|
||||
mapLayerEntity.uuid,
|
||||
mapLayerEntity.layerName,
|
||||
mapLayerEntity.layerType,
|
||||
mapLayerEntity.description,
|
||||
mapLayerEntity.tag,
|
||||
@@ -102,6 +103,7 @@ public class MapLayerRepositoryImpl implements MapLayerRepositoryCustom {
|
||||
.select(
|
||||
Projections.constructor(
|
||||
LayerMapDto.class,
|
||||
mapLayerEntity.layerName,
|
||||
mapLayerEntity.layerType,
|
||||
mapLayerEntity.tag,
|
||||
mapLayerEntity.order,
|
||||
|
||||
Reference in New Issue
Block a user