Merge pull request 'feat/infer_dev_260107' (#349) from feat/infer_dev_260107 into develop
Reviewed-on: https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice/pulls/349
This commit is contained in:
@@ -457,6 +457,7 @@ public class InferenceDetailDto {
|
|||||||
|
|
||||||
private String bboxGeom;
|
private String bboxGeom;
|
||||||
private String bboxCenterPoint;
|
private String bboxCenterPoint;
|
||||||
|
private UUID inferenceUuid;
|
||||||
|
|
||||||
public AnalResultInfo(
|
public AnalResultInfo(
|
||||||
String analTitle,
|
String analTitle,
|
||||||
@@ -472,7 +473,8 @@ public class InferenceDetailDto {
|
|||||||
Integer stage,
|
Integer stage,
|
||||||
String subUid,
|
String subUid,
|
||||||
Boolean applyYn,
|
Boolean applyYn,
|
||||||
ZonedDateTime applyDttm) {
|
ZonedDateTime applyDttm,
|
||||||
|
UUID inferenceUuid) {
|
||||||
this.analTitle = analTitle;
|
this.analTitle = analTitle;
|
||||||
this.modelVer1 = modelVer1;
|
this.modelVer1 = modelVer1;
|
||||||
this.modelVer2 = modelVer2;
|
this.modelVer2 = modelVer2;
|
||||||
@@ -502,6 +504,7 @@ public class InferenceDetailDto {
|
|||||||
|
|
||||||
this.elapsedDuration = String.format("%02d:%02d:%02d", h, m, s);
|
this.elapsedDuration = String.format("%02d:%02d:%02d", h, m, s);
|
||||||
}
|
}
|
||||||
|
this.inferenceUuid = inferenceUuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonProperty("bboxGeom")
|
@JsonProperty("bboxGeom")
|
||||||
|
|||||||
@@ -38,8 +38,10 @@ import jakarta.validation.constraints.NotNull;
|
|||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
import java.util.stream.Stream;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
@@ -263,10 +265,12 @@ public class InferenceResultCoreService {
|
|||||||
applyModelUpdate(entity, request);
|
applyModelUpdate(entity, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Long> batchIds = new ArrayList<>();
|
List<Long> batchIds =
|
||||||
batchIds.add(entity.getM1ModelBatchId());
|
Stream.of(
|
||||||
batchIds.add(entity.getM2ModelBatchId());
|
entity.getM1ModelBatchId(), entity.getM2ModelBatchId(), entity.getM3ModelBatchId())
|
||||||
batchIds.add(entity.getM3ModelBatchId());
|
.filter(Objects::nonNull)
|
||||||
|
.distinct() // 중복 방지 (선택)
|
||||||
|
.toList();
|
||||||
|
|
||||||
// testing 추론결과 테이블 조회하여 탐지 개수 업데이트
|
// testing 추론결과 테이블 조회하여 탐지 개수 업데이트
|
||||||
Long testing = getInferenceResultCnt(batchIds);
|
Long testing = getInferenceResultCnt(batchIds);
|
||||||
@@ -509,10 +513,7 @@ public class InferenceResultCoreService {
|
|||||||
if (entity == null) {
|
if (entity == null) {
|
||||||
throw new CustomApiException("NOT_FOUND_DATA", HttpStatus.NOT_FOUND);
|
throw new CustomApiException("NOT_FOUND_DATA", HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
// inferenceResultRepository
|
|
||||||
// .getInferenceUid(uuid)
|
|
||||||
// .orElseThrow(() -> new CustomApiException("NOT_FOUND_DATA",
|
|
||||||
// HttpStatus.NOT_FOUND));
|
|
||||||
InferenceLearnDto dto = new InferenceLearnDto();
|
InferenceLearnDto dto = new InferenceLearnDto();
|
||||||
dto.setUid(entity.getUid());
|
dto.setUid(entity.getUid());
|
||||||
dto.setM1ModelBatchId(entity.getM1ModelBatchId());
|
dto.setM1ModelBatchId(entity.getM1ModelBatchId());
|
||||||
|
|||||||
@@ -328,7 +328,8 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
mapSheetLearnEntity.stage,
|
mapSheetLearnEntity.stage,
|
||||||
Expressions.stringTemplate("substring({0} from 1 for 8)", mapSheetLearnEntity.uid),
|
Expressions.stringTemplate("substring({0} from 1 for 8)", mapSheetLearnEntity.uid),
|
||||||
mapSheetLearnEntity.applyYn,
|
mapSheetLearnEntity.applyYn,
|
||||||
mapSheetLearnEntity.applyDttm))
|
mapSheetLearnEntity.applyDttm,
|
||||||
|
mapSheetAnalInferenceEntity.uuid))
|
||||||
.from(mapSheetLearnEntity)
|
.from(mapSheetLearnEntity)
|
||||||
.leftJoin(m1)
|
.leftJoin(m1)
|
||||||
.on(mapSheetLearnEntity.m1ModelUuid.eq(m1.uuid))
|
.on(mapSheetLearnEntity.m1ModelUuid.eq(m1.uuid))
|
||||||
@@ -336,6 +337,8 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
.on(mapSheetLearnEntity.m2ModelUuid.eq(m2.uuid))
|
.on(mapSheetLearnEntity.m2ModelUuid.eq(m2.uuid))
|
||||||
.leftJoin(m3)
|
.leftJoin(m3)
|
||||||
.on(mapSheetLearnEntity.m3ModelUuid.eq(m3.uuid))
|
.on(mapSheetLearnEntity.m3ModelUuid.eq(m3.uuid))
|
||||||
|
.leftJoin(mapSheetAnalInferenceEntity)
|
||||||
|
.on(mapSheetAnalInferenceEntity.learnId.eq(mapSheetLearnEntity.id))
|
||||||
.where(mapSheetLearnEntity.uuid.eq(uuid))
|
.where(mapSheetLearnEntity.uuid.eq(uuid))
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user