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.EnumType;
|
||||
import java.util.Arrays;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -23,4 +24,20 @@ public enum ImageryFitStatus implements EnumType {
|
||||
public String getText() {
|
||||
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)
|
||||
})
|
||||
@DeleteMapping("/end")
|
||||
public ApiResponseDto<Void> getInferenceGeomList() {
|
||||
inferenceResultService.deleteInferenceEnd();
|
||||
return ApiResponseDto.ok(null);
|
||||
public ApiResponseDto<UUID> getInferenceGeomList() {
|
||||
UUID uuid = inferenceResultService.deleteInferenceEnd();
|
||||
return ApiResponseDto.ok(uuid);
|
||||
}
|
||||
|
||||
@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.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
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.inference.dto.InferenceResultDto.DetectOption;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.MapSheetScope;
|
||||
@@ -308,6 +310,16 @@ public class InferenceDetailDto {
|
||||
String pnu;
|
||||
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 geomCenterStr;
|
||||
// JsonNode gemo;
|
||||
|
||||
@@ -598,7 +598,7 @@ public class InferenceResultService {
|
||||
|
||||
/** 추론 종료 */
|
||||
@Transactional
|
||||
public void deleteInferenceEnd() {
|
||||
public UUID deleteInferenceEnd() {
|
||||
SaveInferenceAiDto dto = inferenceResultCoreService.getProcessing();
|
||||
if (dto == null) {
|
||||
throw new CustomApiException("NOT_FOUND", HttpStatus.NOT_FOUND);
|
||||
@@ -627,6 +627,7 @@ public class InferenceResultService {
|
||||
// upsertGeomData
|
||||
Long learnId = inferenceResultCoreService.getInferenceLearnIdByUuid(dto.getUuid());
|
||||
inferenceResultCoreService.upsertGeomData(learnId);
|
||||
return dto.getUuid();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -446,7 +446,7 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
||||
"substring({0} from 1 for 8)",
|
||||
mapSheetAnalDataInferenceGeomEntity.resultUid),
|
||||
pnu,
|
||||
Expressions.nullExpression(String.class)))
|
||||
mapSheetAnalDataInferenceGeomEntity.passYn))
|
||||
.from(mapSheetAnalInferenceEntity)
|
||||
.join(mapSheetAnalDataInferenceEntity)
|
||||
.on(mapSheetAnalDataInferenceEntity.analUid.eq(mapSheetAnalInferenceEntity.id))
|
||||
|
||||
Reference in New Issue
Block a user