batchId list 생성 수정
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user