Merge pull request '영상관리 등록 년도 tile 추가' (#8) from feat/infer_dev_260107 into develop
Reviewed-on: #8
This commit was merged in pull request #8.
This commit is contained in:
@@ -465,8 +465,7 @@ public class GlobalExceptionHandler {
|
||||
String stackTraceStr =
|
||||
Arrays.stream(stackTrace)
|
||||
.map(StackTraceElement::toString)
|
||||
.collect(Collectors.joining("\n"))
|
||||
.substring(0, 255);
|
||||
.collect(Collectors.joining("\n"));
|
||||
|
||||
String actionType = HeaderUtil.get(request, "kamco-action-type");
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.kamco.cd.kamcoback.common.utils.enums.EnumType;
|
||||
import com.kamco.cd.kamcoback.common.utils.enums.Enums;
|
||||
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
@@ -77,6 +78,31 @@ public class MapSheetMngDto {
|
||||
@Schema(description = "선택폴더경로", example = "D:\\app\\original-images\\2022")
|
||||
private String mngPath;
|
||||
|
||||
// Tile 등록 로직
|
||||
@Schema(description = "url")
|
||||
private String url;
|
||||
|
||||
@Schema(description = "좌측상단 경도", example = "126.0")
|
||||
private BigDecimal minLon;
|
||||
|
||||
@Schema(description = "좌측상단 위도", example = "34.0")
|
||||
private BigDecimal minLat;
|
||||
|
||||
@Schema(description = "우측하단 경도", example = "130.0")
|
||||
private BigDecimal maxLon;
|
||||
|
||||
@Schema(description = "우측하단 위도", example = "38.5")
|
||||
private BigDecimal maxLat;
|
||||
|
||||
@Schema(description = "zoom min", example = "5")
|
||||
private Short minZoom;
|
||||
|
||||
@Schema(description = "zoom max", example = "18")
|
||||
private Short maxZoom;
|
||||
|
||||
@Schema(description = "tag")
|
||||
private String tag;
|
||||
|
||||
@JsonIgnore private Long createdUid;
|
||||
}
|
||||
|
||||
|
||||
@@ -162,6 +162,9 @@ public class MapSheetMngCoreService {
|
||||
saved.getMngYyyy(), saved.getMngPath());
|
||||
mapSheetMngRepository.updateYearState(saved.getMngYyyy(), "DONE");
|
||||
|
||||
// 년도별 Tile 정보 등록
|
||||
mapSheetMngRepository.insertMapSheetMngTile(addReq);
|
||||
|
||||
return hstCnt;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.kamco.cd.kamcoback.postgres.entity;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.ZonedDateTime;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "tb_map_sheet_mng_tile")
|
||||
public class MapSheetMngTileEntity {
|
||||
|
||||
@Id
|
||||
@Column(name = "mng_yyyy", nullable = false)
|
||||
private Integer mngYyyy;
|
||||
|
||||
@Column(name = "url", length = Integer.MAX_VALUE)
|
||||
private String url;
|
||||
|
||||
@Column(name = "min_lon", precision = 10, scale = 7)
|
||||
private BigDecimal minLon;
|
||||
|
||||
@Column(name = "min_lat", precision = 10, scale = 7)
|
||||
private BigDecimal minLat;
|
||||
|
||||
@Column(name = "max_lon", precision = 10, scale = 7)
|
||||
private BigDecimal maxLon;
|
||||
|
||||
@Column(name = "max_lat", precision = 10, scale = 7)
|
||||
private BigDecimal maxLat;
|
||||
|
||||
@Column(name = "min_zoom")
|
||||
private Short minZoom;
|
||||
|
||||
@Column(name = "max_zoom")
|
||||
private Short maxZoom;
|
||||
|
||||
@Column(name = "tag")
|
||||
private String tag;
|
||||
|
||||
@NotNull
|
||||
@ColumnDefault("now()")
|
||||
@Column(name = "created_dttm", nullable = false)
|
||||
private ZonedDateTime createdDttm = ZonedDateTime.now();
|
||||
|
||||
@Column(name = "updated_dttm")
|
||||
private ZonedDateTime updatedDttm;
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.kamco.cd.kamcoback.postgres.repository.mapsheet;
|
||||
import com.kamco.cd.kamcoback.common.geometry.GeoJsonFileWriter.ImageFeature;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.AddReq;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngListDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.YearSearchReq;
|
||||
import com.kamco.cd.kamcoback.postgres.entity.MapSheetMngHstEntity;
|
||||
@@ -77,4 +78,6 @@ public interface MapSheetMngRepositoryCustom {
|
||||
List<ImageFeature> getSceneInference(String yyyy, List<String> mapSheetNums);
|
||||
|
||||
void updateMapSheetMngHstUploadId(Long hstUid, UUID uuid, String uploadId);
|
||||
|
||||
void insertMapSheetMngTile(@Valid AddReq addReq);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import static com.kamco.cd.kamcoback.postgres.entity.QMapInkx5kEntity.mapInkx5kE
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetMngEntity.mapSheetMngEntity;
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetMngFileEntity.mapSheetMngFileEntity;
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetMngHstEntity.mapSheetMngHstEntity;
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetMngTileEntity.mapSheetMngTileEntity;
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QYearEntity.yearEntity;
|
||||
import static com.querydsl.core.types.dsl.Expressions.nullExpression;
|
||||
|
||||
@@ -12,6 +13,7 @@ import com.kamco.cd.kamcoback.common.geometry.GeoJsonFileWriter.ImageFeature;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.MapSheetScope;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.AddReq;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngListDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.YearSearchReq;
|
||||
import com.kamco.cd.kamcoback.postgres.entity.MapSheetMngHstEntity;
|
||||
@@ -1040,6 +1042,34 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertMapSheetMngTile(AddReq addReq) {
|
||||
long execute =
|
||||
queryFactory
|
||||
.insert(mapSheetMngTileEntity)
|
||||
.columns(
|
||||
mapSheetMngTileEntity.mngYyyy,
|
||||
mapSheetMngTileEntity.url,
|
||||
mapSheetMngTileEntity.minLon,
|
||||
mapSheetMngTileEntity.minLat,
|
||||
mapSheetMngTileEntity.maxLon,
|
||||
mapSheetMngTileEntity.maxLat,
|
||||
mapSheetMngTileEntity.minZoom,
|
||||
mapSheetMngTileEntity.maxZoom,
|
||||
mapSheetMngTileEntity.tag)
|
||||
.values(
|
||||
addReq.getMngYyyy(),
|
||||
addReq.getUrl(),
|
||||
addReq.getMinLon(),
|
||||
addReq.getMinLat(),
|
||||
addReq.getMaxLon(),
|
||||
addReq.getMaxLat(),
|
||||
addReq.getMinZoom(),
|
||||
addReq.getMaxZoom(),
|
||||
addReq.getTag())
|
||||
.execute();
|
||||
}
|
||||
|
||||
private BooleanExpression eqYearStatus(QYearEntity years, String status) {
|
||||
if (status == null) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user