사용자등록 추가, 추론결과 dashboard 수정

This commit is contained in:
2025-11-26 17:07:08 +09:00
parent 7e26a31d67
commit 704173840f
17 changed files with 246 additions and 62 deletions

View File

@@ -2,6 +2,7 @@ package com.kamco.cd.kamcoback.inference.service;
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.Dashboard;
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.Detail;
import com.kamco.cd.kamcoback.postgres.core.InferenceResultCoreService;
import java.util.List;
import lombok.RequiredArgsConstructor;
@@ -57,4 +58,21 @@ public class InferenceResultService {
InferenceResultDto.SearchGeoReq searchGeoReq) {
return inferenceResultCoreService.getInferenceResultGeomList(searchGeoReq);
}
/**
* 분석결과 상제 정보 Summary, DashBoard
*
* @param id
* @return
*/
public Detail getDetail(Long id) {
// summary
InferenceResultDto.AnalResSummary summary = this.getInferenceResultSummary(id);
// 탐지건수 dashBoard
List<InferenceResultDto.Dashboard> dashboardList = this.getInferenceResultBasic(id);
// 전체 탐지건수
Long totalCnt = dashboardList.stream().mapToLong(Dashboard::getClassAfterCnt).sum();
return new Detail(summary, dashboardList, totalCnt);
}
}