분석결과 상세 수정

This commit is contained in:
2025-11-28 17:29:09 +09:00
parent e6d9da5eaf
commit 9a06955e32
5 changed files with 51 additions and 38 deletions

View File

@@ -148,47 +148,12 @@ public class InferenceResultDto {
@Getter
public static class Dashboard {
Integer compareYyyy;
Integer targetYyyy;
Long mapSheetNum;
String classBeforeName;
String classAfterName;
Long classBeforeCnt;
Long classAfterCnt;
@JsonFormatDttm ZonedDateTime createdDttm;
Long createdUid;
@JsonFormatDttm ZonedDateTime updatedDttm;
Long updatedUid;
Long refMapSheetNum;
Long dataUid;
public Dashboard(
Integer compareYyyy,
Integer targetYyyy,
Long mapSheetNum,
String classBeforeName,
String classAfterName,
Long classBeforeCnt,
Long classAfterCnt,
ZonedDateTime createdDttm,
Long createdUid,
ZonedDateTime updatedDttm,
Long updatedUid,
Long refMapSheetNum,
Long dataUid) {
this.compareYyyy = compareYyyy;
this.targetYyyy = targetYyyy;
this.mapSheetNum = mapSheetNum;
this.classBeforeName = classBeforeName;
public Dashboard(String classAfterName, Long classAfterCnt) {
this.classAfterName = classAfterName;
this.classBeforeCnt = classBeforeCnt;
this.classAfterCnt = classAfterCnt;
this.createdDttm = createdDttm;
this.createdUid = createdUid;
this.updatedDttm = updatedDttm;
this.updatedUid = updatedUid;
this.refMapSheetNum = refMapSheetNum;
this.dataUid = dataUid;
}
}
@@ -196,9 +161,13 @@ public class InferenceResultDto {
public static class Detail {
AnalResSummary summary;
List<Dashboard> dashboard;
Long totalCnt;
public Detail(AnalResSummary summary) {
public Detail(AnalResSummary summary, List<Dashboard> dashboard, Long totalCnt) {
this.summary = summary;
this.dashboard = dashboard;
this.totalCnt = totalCnt;
}
}

View File

@@ -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);
}
/**

View File

@@ -1,6 +1,7 @@
package com.kamco.cd.kamcoback.postgres.core;
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.Dashboard;
import com.kamco.cd.kamcoback.postgres.repository.Inference.InferenceResultRepository;
import jakarta.persistence.EntityNotFoundException;
import java.util.List;
@@ -39,6 +40,16 @@ public class InferenceResultCoreService {
return summary;
}
/**
* 분석결과 상세 class name별 탐지 개수
*
* @param id
* @return
*/
public List<Dashboard> getDashboard(Long id) {
return inferenceResultRepository.getDashboard(id);
}
/**
* 분석결과 상세 목록
*

View File

@@ -1,6 +1,7 @@
package com.kamco.cd.kamcoback.postgres.repository.Inference;
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.Dashboard;
import java.util.List;
import java.util.Optional;
import org.springframework.data.domain.Page;
@@ -16,4 +17,6 @@ public interface InferenceResultRepositoryCustom {
Long id, InferenceResultDto.SearchGeoReq searchGeoReq);
List<Long> getSheets(Long id);
List<Dashboard> getDashboard(Long id);
}

View File

@@ -1,6 +1,7 @@
package com.kamco.cd.kamcoback.postgres.repository.Inference;
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.SearchGeoReq;
import com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataEntity;
import com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataGeomEntity;
@@ -134,6 +135,17 @@ public class InferenceResultRepositoryImpl implements InferenceResultRepositoryC
return content;
}
/**
* 분석결과 상세 class name별 탐지 개수
*
* @param id
* @return
*/
@Override
public List<Dashboard> getDashboard(Long id) {
return null;
}
/**
* 분석결과 상세 목록
*