From e610b3b8e81e37fc2423dbc9c9f7b8e4c93cf998 Mon Sep 17 00:00:00 2001 From: bicochan Date: Thu, 12 Mar 2026 16:10:22 +0900 Subject: [PATCH] =?UTF-8?q?[st]=20feat:=20=EA=B2=80=EC=A6=9D=EC=9D=B4?= =?UTF-8?q?=EB=A0=A5=20=EA=B7=B8=EB=A6=AC=EB=93=9C=EC=97=90=20=EB=B6=84?= =?UTF-8?q?=EC=84=9D=EC=8B=A4=ED=8C=A8=20=EC=8B=9C=20=EC=97=90=EB=9F=AC=20?= =?UTF-8?q?=ED=88=B4=ED=8C=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../verification/HbStatisticsVerification.tsx | 3 +- .../model/analysis-history-interface.ts | 92 +++++++++++++++++-- .../model/verification-history-columns.tsx | 30 +++++- 3 files changed, 112 insertions(+), 13 deletions(-) diff --git a/apps/st/src/components/statistics/verification/HbStatisticsVerification.tsx b/apps/st/src/components/statistics/verification/HbStatisticsVerification.tsx index 831fa6057..99a4a6e0b 100644 --- a/apps/st/src/components/statistics/verification/HbStatisticsVerification.tsx +++ b/apps/st/src/components/statistics/verification/HbStatisticsVerification.tsx @@ -208,8 +208,7 @@ const HbStatisticsVerification = () => { }, }); - const historyRowData: StAnlsMstResponse[] = (analysisHistory?.content ?? - []) as StAnlsMstResponse[]; + const historyRowData: StAnlsMstResponse[] = analysisHistory?.content ?? []; const table = useReactTable({ data: historyRowData, diff --git a/apps/st/src/entities/statistics/model/analysis-history-interface.ts b/apps/st/src/entities/statistics/model/analysis-history-interface.ts index ee31b936d..a680dcc77 100644 --- a/apps/st/src/entities/statistics/model/analysis-history-interface.ts +++ b/apps/st/src/entities/statistics/model/analysis-history-interface.ts @@ -1,49 +1,123 @@ import type { PageableList, PageableParams } from "@/shared/model"; -export interface StAnlsMstResponse { +/** + * 분석 현황 마스터 응답 DTO + */ +export interface StAnlsMstResponseDto { + /** 분석번호 */ anlsSn: number; + /** 분석실행일시 (yyyy-MM-dd HH:mm:ss) */ anlsBgngDt: string; + /** 분석종료일시 (yyyy-MM-dd HH:mm:ss) */ anlsEndDt: string | null; + /** 분석상태코드 */ anlsSttsCd: string; + /** 분석상태코드명 */ anlsSttsNm: string; - anlsPrgrsRt?: number; + /** 정상건수 */ nmlDataNocs: number; + /** 제외건수 */ exclDataNocs: number; + /** 이상건수 */ otlrDataNocs: number; + /** 작업UUID */ jobUuid: string; + /** 등록일시 (yyyy-MM-dd HH:mm:ss) */ regDt: string; + /** 등록자 */ rgtr: string; + /** 등록자명 */ rgtrNm: string; + /** 오류메세지내용 */ + errMsgCn?: string; + /** 통계년도 */ + statsYr: string; + /** 검증대상명 */ + vrfcTrgtNm: string; + /** 분석진행비율 */ + anlsPrgrsRt: number; + /** 하수도사업자코드 */ + sewerBzmnCd: string; + /** 통계코드 */ + statsCd: string; + /** 검증방법코드 */ + vrfcMthdCd: string; } -export interface StAnlsMstSearchParams extends PageableParams { +/** + * 분석 현황 마스터 검색 DTO + */ +export interface StAnlsMstSearchDto extends PageableParams { + /** 분석상태코드 (COMPLETED, FAILED, QUEUED, PROCESSING) */ anlsSttsCd?: string; + /** 작업UUID */ jobUuid?: string; - verifyDtStart?: string; - verifyDtEnd?: string; + /** 통계년도 */ + statsYr?: string; + /** 검증대상명 */ + vrfcTrgtNm?: string; + /** 하수도사업자코드 */ + sewerBzmnCd?: string; + /** 통계코드 */ + statsCd?: string; + /** 검증방법코드 */ vrfcMthdCd?: string; + /** 검증일시 시작 (yyyy-MM-dd) */ + verifyDtStart?: string; + /** 검증일시 종료 (yyyy-MM-dd) */ + verifyDtEnd?: string; } -export interface StAnlsOutlierDataResponse { +/** + * 분석 이상치 상세 데이터 응답 DTO + */ +export interface StAnlsOutlierDataResponseDto { + /** 결과 일련번호 */ rsltSn: number; + /** 검증 대상 일련번호 */ vrfcTrgtSn: number; + /** 행정구역 코드 */ admdstCd: string; + /** 시도 */ sido: string; + /** 시군구 */ gugun: string; + /** 행정동 */ adstDong: string; + /** 시설명 */ + fcltNm: string; + /** 주소 */ addr: string; + /** 당해년도 값 */ cryrVl: number; + /** 이상치 변환 비율 */ otlrTrsfRt: number; } -export interface StAnlsOutlierListResponse { +/** + * 분석 순번별 이상치 분석항목 응답 DTO + */ +export interface StAnlsOutlierListResponseDto { + /** 분석번호 */ anlsSn: number; + /** 검증 대상 일련번호 */ vrfcTrgtSn: number; + /** 검증대상명 */ vrfcTrgtNm: string; + /** 정상건수 */ nmlDataNocs: number; + /** 제외건수 */ exclDataNocs: number; + /** 이상건수 */ otlrDataNocs: number; - outlierDataList: StAnlsOutlierDataResponse[]; + /** 이상치 상세 데이터 목록 */ + outlierDataList: StAnlsOutlierDataResponseDto[]; } -export type StAnlsMstListApiResponse = PageableList; +/** 기존 인터페이스 호환을 위한 별칭 (필요 시 유지) */ +export type StAnlsMstResponse = StAnlsMstResponseDto; +export type StAnlsMstSearchParams = StAnlsMstSearchDto; +export type StAnlsOutlierDataResponse = StAnlsOutlierDataResponseDto; +export type StAnlsOutlierListResponse = StAnlsOutlierListResponseDto; + +export type StAnlsMstListApiResponse = PageableList; diff --git a/apps/st/src/entities/statistics/model/verification-history-columns.tsx b/apps/st/src/entities/statistics/model/verification-history-columns.tsx index 766709217..f5fc29b38 100644 --- a/apps/st/src/entities/statistics/model/verification-history-columns.tsx +++ b/apps/st/src/entities/statistics/model/verification-history-columns.tsx @@ -1,5 +1,12 @@ import { createColumnHelper } from "@tanstack/react-table"; -import { Progress } from "@common/components"; + +import { + Progress, + Tooltip, + TooltipContent, + TooltipTrigger, +} from "@common/components"; + import type { StAnlsMstResponse } from "./analysis-history-interface"; const columnHelper = createColumnHelper(); @@ -16,12 +23,14 @@ export const verificationHistoryColumns = [ anlsSttsCd: row.anlsSttsCd, anlsSttsNm: row.anlsSttsNm, anlsPrgrsRt: row.anlsPrgrsRt, + errMsgCn: row.errMsgCn, }), { id: "anlsSttsNm", header: "진행 상태", cell: (info) => { - const { anlsSttsCd, anlsSttsNm, anlsPrgrsRt } = info.getValue(); + const { anlsSttsCd, anlsSttsNm, anlsPrgrsRt, errMsgCn } = + info.getValue(); if (anlsSttsCd === "PROCESSING") { return (
@@ -35,6 +44,23 @@ export const verificationHistoryColumns = [
); } + if (anlsSttsCd === "FAILED") { + return ( +
+ {anlsSttsNm} + + + + + +

+ {errMsgCn} +

+
+
+
+ ); + } return anlsSttsNm; }, },