변화탐지 COG URL API 로직 수정
This commit is contained in:
@@ -12,6 +12,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto;
|
||||
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.DetectSearchType;
|
||||
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.MapScaleType;
|
||||
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.MapSheetList;
|
||||
import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalDataInferenceGeomEntity;
|
||||
@@ -111,6 +112,26 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
|
||||
|
||||
@Override
|
||||
public ChangeDetectionDto.CogUrlDto getChangeDetectionCogUrl(ChangeDetectionDto.CogUrlReq req) {
|
||||
String mapSheetNum = req.getMapSheetNum();
|
||||
|
||||
if (req.getType().equals(DetectSearchType.MAPSHEET)
|
||||
&& req.getScale().equals(MapScaleType.SCALE_50K)) {
|
||||
mapSheetNum =
|
||||
queryFactory
|
||||
.select(mapSheetAnalDataInferenceEntity.mapSheetNum.stringValue())
|
||||
.from(mapSheetAnalInferenceEntity)
|
||||
.innerJoin(mapSheetAnalDataInferenceEntity)
|
||||
.on(mapSheetAnalInferenceEntity.id.eq(mapSheetAnalDataInferenceEntity.analUid))
|
||||
.where(
|
||||
mapSheetAnalInferenceEntity.uuid.eq(req.getUuid()),
|
||||
mapSheetAnalDataInferenceEntity
|
||||
.mapSheetNum
|
||||
.stringValue()
|
||||
.like("%" + req.getMapSheetNum() + "%"))
|
||||
.orderBy(mapSheetAnalDataInferenceEntity.mapSheetNum.asc())
|
||||
.fetchFirst();
|
||||
}
|
||||
|
||||
ChangeDetectionDto.CogUrlData data =
|
||||
queryFactory
|
||||
.select(
|
||||
@@ -128,7 +149,7 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
|
||||
.year
|
||||
.eq(req.getBeforeYear())
|
||||
.or(imageryEntity.year.eq(req.getAfterYear())),
|
||||
imageryEntity.scene5k.eq(req.getMapSheetNum()))
|
||||
imageryEntity.scene5k.eq(mapSheetNum))
|
||||
.groupBy(mapInkx5kEntity.geom)
|
||||
.fetchOne();
|
||||
|
||||
@@ -191,6 +212,7 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
|
||||
.where(
|
||||
mapSheetAnalInferenceEntity.uuid.eq(uuid),
|
||||
mapScaleTypeAnalDataSearchExpression(scale, mapSheetNum))
|
||||
.orderBy(mapSheetAnalDataInferenceGeomEntity.mapSheetNum.asc())
|
||||
.fetch();
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
|
||||
Reference in New Issue
Block a user