[st] feat: 검증이력 그리드에 분석실패 시 에러 툴팁 추가

This commit is contained in:
2026-03-12 16:10:22 +09:00
parent 9d6902f521
commit e610b3b8e8
3 changed files with 112 additions and 13 deletions
@@ -208,8 +208,7 @@ const HbStatisticsVerification = () => {
},
});
const historyRowData: StAnlsMstResponse[] = (analysisHistory?.content ??
[]) as StAnlsMstResponse[];
const historyRowData: StAnlsMstResponse[] = analysisHistory?.content ?? [];
const table = useReactTable({
data: historyRowData,
@@ -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<StAnlsMstResponse>;
/** 기존 인터페이스 호환을 위한 별칭 (필요 시 유지) */
export type StAnlsMstResponse = StAnlsMstResponseDto;
export type StAnlsMstSearchParams = StAnlsMstSearchDto;
export type StAnlsOutlierDataResponse = StAnlsOutlierDataResponseDto;
export type StAnlsOutlierListResponse = StAnlsOutlierListResponseDto;
export type StAnlsMstListApiResponse = PageableList<StAnlsMstResponseDto>;
@@ -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<StAnlsMstResponse>();
@@ -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 (
<div className="flex min-w-[8rem] items-center gap-2">
@@ -35,6 +44,23 @@ export const verificationHistoryColumns = [
</div>
);
}
if (anlsSttsCd === "FAILED") {
return (
<div className="flex w-full items-center justify-center gap-1">
{anlsSttsNm}
<Tooltip>
<TooltipTrigger>
<i className="diveicon di-info-circle text-destructive" />
</TooltipTrigger>
<TooltipContent className="max-w-[64rem]">
<p className="p-1 text-[1.2rem] leading-6">
{errMsgCn}
</p>
</TooltipContent>
</Tooltip>
</div>
);
}
return anlsSttsNm;
},
},