Merge branch 'feat/infer_dev_260107' of https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice into feat/infer_dev_260107
This commit is contained in:
@@ -2,6 +2,7 @@ package com.kamco.cd.kamcoback.common.enums;
|
|||||||
|
|
||||||
import com.kamco.cd.kamcoback.common.utils.enums.CodeExpose;
|
import com.kamco.cd.kamcoback.common.utils.enums.CodeExpose;
|
||||||
import com.kamco.cd.kamcoback.common.utils.enums.EnumType;
|
import com.kamco.cd.kamcoback.common.utils.enums.EnumType;
|
||||||
|
import java.util.Arrays;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
@@ -23,4 +24,20 @@ public enum ImageryFitStatus implements EnumType {
|
|||||||
public String getText() {
|
public String getText() {
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ImageryFitStatus fromCode(String code) {
|
||||||
|
if (code == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
String c = code.trim();
|
||||||
|
return Arrays.stream(values())
|
||||||
|
.filter(v -> v.name().equalsIgnoreCase(c))
|
||||||
|
.findFirst()
|
||||||
|
.orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getDescByCode(String code) {
|
||||||
|
ImageryFitStatus status = fromCode(code);
|
||||||
|
return status != null ? status.getDesc() : null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,9 +168,9 @@ public class InferenceResultApiController {
|
|||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@DeleteMapping("/end")
|
@DeleteMapping("/end")
|
||||||
public ApiResponseDto<Void> getInferenceGeomList() {
|
public ApiResponseDto<UUID> getInferenceGeomList() {
|
||||||
inferenceResultService.deleteInferenceEnd();
|
UUID uuid = inferenceResultService.deleteInferenceEnd();
|
||||||
return ApiResponseDto.ok(null);
|
return ApiResponseDto.ok(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "분석 모델 선택 조회", description = "변화탐지 실행 정보 입력 모델선택 팝업 ")
|
@Operation(summary = "분석 모델 선택 조회", description = "변화탐지 실행 정보 입력 모델선택 팝업 ")
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ package com.kamco.cd.kamcoback.inference.dto;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.kamco.cd.kamcoback.common.enums.DetectionClassification;
|
import com.kamco.cd.kamcoback.common.enums.DetectionClassification;
|
||||||
|
import com.kamco.cd.kamcoback.common.enums.ImageryFitStatus;
|
||||||
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
||||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.DetectOption;
|
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.DetectOption;
|
||||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.MapSheetScope;
|
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.MapSheetScope;
|
||||||
@@ -308,6 +310,16 @@ public class InferenceDetailDto {
|
|||||||
String pnu;
|
String pnu;
|
||||||
String passYn;
|
String passYn;
|
||||||
|
|
||||||
|
@JsonProperty("passYn")
|
||||||
|
public String getPassYn() {
|
||||||
|
return this.passYn == null ? null : this.passYn;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty("passYnName")
|
||||||
|
public String getPassYnName() {
|
||||||
|
return ImageryFitStatus.getDescByCode(this.passYn);
|
||||||
|
}
|
||||||
|
|
||||||
// @JsonIgnore String gemoStr;
|
// @JsonIgnore String gemoStr;
|
||||||
// @JsonIgnore String geomCenterStr;
|
// @JsonIgnore String geomCenterStr;
|
||||||
// JsonNode gemo;
|
// JsonNode gemo;
|
||||||
|
|||||||
@@ -598,7 +598,7 @@ public class InferenceResultService {
|
|||||||
|
|
||||||
/** 추론 종료 */
|
/** 추론 종료 */
|
||||||
@Transactional
|
@Transactional
|
||||||
public void deleteInferenceEnd() {
|
public UUID deleteInferenceEnd() {
|
||||||
SaveInferenceAiDto dto = inferenceResultCoreService.getProcessing();
|
SaveInferenceAiDto dto = inferenceResultCoreService.getProcessing();
|
||||||
if (dto == null) {
|
if (dto == null) {
|
||||||
throw new CustomApiException("NOT_FOUND", HttpStatus.NOT_FOUND);
|
throw new CustomApiException("NOT_FOUND", HttpStatus.NOT_FOUND);
|
||||||
@@ -627,6 +627,7 @@ public class InferenceResultService {
|
|||||||
// upsertGeomData
|
// upsertGeomData
|
||||||
Long learnId = inferenceResultCoreService.getInferenceLearnIdByUuid(dto.getUuid());
|
Long learnId = inferenceResultCoreService.getInferenceLearnIdByUuid(dto.getUuid());
|
||||||
inferenceResultCoreService.upsertGeomData(learnId);
|
inferenceResultCoreService.upsertGeomData(learnId);
|
||||||
|
return dto.getUuid();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -446,7 +446,7 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
"substring({0} from 1 for 8)",
|
"substring({0} from 1 for 8)",
|
||||||
mapSheetAnalDataInferenceGeomEntity.resultUid),
|
mapSheetAnalDataInferenceGeomEntity.resultUid),
|
||||||
pnu,
|
pnu,
|
||||||
Expressions.nullExpression(String.class)))
|
mapSheetAnalDataInferenceGeomEntity.passYn))
|
||||||
.from(mapSheetAnalInferenceEntity)
|
.from(mapSheetAnalInferenceEntity)
|
||||||
.join(mapSheetAnalDataInferenceEntity)
|
.join(mapSheetAnalDataInferenceEntity)
|
||||||
.on(mapSheetAnalDataInferenceEntity.analUid.eq(mapSheetAnalInferenceEntity.id))
|
.on(mapSheetAnalDataInferenceEntity.analUid.eq(mapSheetAnalInferenceEntity.id))
|
||||||
|
|||||||
Reference in New Issue
Block a user