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