분석결과 상세 수정
This commit is contained in:
@@ -1,6 +1,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;
|
||||
@@ -37,6 +38,16 @@ public class InferenceResultService {
|
||||
return inferenceResultCoreService.getInferenceResultSummary(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 분석결과 상세 class name별 탐지 개수
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public List<Dashboard> getDashboard(Long id) {
|
||||
return inferenceResultCoreService.getDashboard(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 분석결과 상세 목록
|
||||
*
|
||||
@@ -57,7 +68,14 @@ public class InferenceResultService {
|
||||
public Detail getDetail(Long id) {
|
||||
// summary
|
||||
InferenceResultDto.AnalResSummary summary = this.getInferenceResultSummary(id);
|
||||
return new Detail(summary);
|
||||
|
||||
// Dashboard
|
||||
List<Dashboard> dashboards = this.getDashboard(id);
|
||||
|
||||
// 전체 탐지건수
|
||||
Long totalCnt = dashboards.stream().mapToLong(Dashboard::getClassAfterCnt).sum();
|
||||
|
||||
return new Detail(summary, dashboards, totalCnt);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user