분석결과 상세 수정
This commit is contained in:
@@ -148,47 +148,12 @@ public class InferenceResultDto {
|
|||||||
@Getter
|
@Getter
|
||||||
public static class Dashboard {
|
public static class Dashboard {
|
||||||
|
|
||||||
Integer compareYyyy;
|
|
||||||
Integer targetYyyy;
|
|
||||||
Long mapSheetNum;
|
|
||||||
String classBeforeName;
|
|
||||||
String classAfterName;
|
String classAfterName;
|
||||||
Long classBeforeCnt;
|
|
||||||
Long classAfterCnt;
|
Long classAfterCnt;
|
||||||
@JsonFormatDttm ZonedDateTime createdDttm;
|
|
||||||
Long createdUid;
|
|
||||||
@JsonFormatDttm ZonedDateTime updatedDttm;
|
|
||||||
Long updatedUid;
|
|
||||||
Long refMapSheetNum;
|
|
||||||
Long dataUid;
|
|
||||||
|
|
||||||
public Dashboard(
|
public Dashboard(String classAfterName, Long classAfterCnt) {
|
||||||
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;
|
|
||||||
this.classAfterName = classAfterName;
|
this.classAfterName = classAfterName;
|
||||||
this.classBeforeCnt = classBeforeCnt;
|
|
||||||
this.classAfterCnt = classAfterCnt;
|
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 {
|
public static class Detail {
|
||||||
|
|
||||||
AnalResSummary summary;
|
AnalResSummary summary;
|
||||||
|
List<Dashboard> dashboard;
|
||||||
|
Long totalCnt;
|
||||||
|
|
||||||
public Detail(AnalResSummary summary) {
|
public Detail(AnalResSummary summary, List<Dashboard> dashboard, Long totalCnt) {
|
||||||
this.summary = summary;
|
this.summary = summary;
|
||||||
|
this.dashboard = dashboard;
|
||||||
|
this.totalCnt = totalCnt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.kamco.cd.kamcoback.inference.service;
|
package com.kamco.cd.kamcoback.inference.service;
|
||||||
|
|
||||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
|
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.inference.dto.InferenceResultDto.Detail;
|
||||||
import com.kamco.cd.kamcoback.postgres.core.InferenceResultCoreService;
|
import com.kamco.cd.kamcoback.postgres.core.InferenceResultCoreService;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -37,6 +38,16 @@ public class InferenceResultService {
|
|||||||
return inferenceResultCoreService.getInferenceResultSummary(id);
|
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) {
|
public Detail getDetail(Long id) {
|
||||||
// summary
|
// summary
|
||||||
InferenceResultDto.AnalResSummary summary = this.getInferenceResultSummary(id);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.kamco.cd.kamcoback.postgres.core;
|
package com.kamco.cd.kamcoback.postgres.core;
|
||||||
|
|
||||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
|
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 com.kamco.cd.kamcoback.postgres.repository.Inference.InferenceResultRepository;
|
||||||
import jakarta.persistence.EntityNotFoundException;
|
import jakarta.persistence.EntityNotFoundException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -39,6 +40,16 @@ public class InferenceResultCoreService {
|
|||||||
return summary;
|
return summary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 분석결과 상세 class name별 탐지 개수
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Dashboard> getDashboard(Long id) {
|
||||||
|
return inferenceResultRepository.getDashboard(id);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 분석결과 상세 목록
|
* 분석결과 상세 목록
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.kamco.cd.kamcoback.postgres.repository.Inference;
|
package com.kamco.cd.kamcoback.postgres.repository.Inference;
|
||||||
|
|
||||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
|
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
|
||||||
|
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.Dashboard;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
@@ -16,4 +17,6 @@ public interface InferenceResultRepositoryCustom {
|
|||||||
Long id, InferenceResultDto.SearchGeoReq searchGeoReq);
|
Long id, InferenceResultDto.SearchGeoReq searchGeoReq);
|
||||||
|
|
||||||
List<Long> getSheets(Long id);
|
List<Long> getSheets(Long id);
|
||||||
|
|
||||||
|
List<Dashboard> getDashboard(Long id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.kamco.cd.kamcoback.postgres.repository.Inference;
|
package com.kamco.cd.kamcoback.postgres.repository.Inference;
|
||||||
|
|
||||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
|
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.inference.dto.InferenceResultDto.SearchGeoReq;
|
||||||
import com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataEntity;
|
import com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataEntity;
|
||||||
import com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataGeomEntity;
|
import com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataGeomEntity;
|
||||||
@@ -134,6 +135,17 @@ public class InferenceResultRepositoryImpl implements InferenceResultRepositoryC
|
|||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 분석결과 상세 class name별 탐지 개수
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Dashboard> getDashboard(Long id) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 분석결과 상세 목록
|
* 분석결과 상세 목록
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user