From 0964eddc0ede45f6ee8f1402a8e7ce05ed69dfe9 Mon Sep 17 00:00:00 2001 From: truthwing Date: Wed, 13 Aug 2025 11:18:50 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20filt?= =?UTF-8?q?er=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0.=20jsyang=20product(tit?= =?UTF-8?q?anume=20knife=20=EC=A4=80=EB=B9=84=20=EC=99=84=EB=A3=8C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/(with-layout)/stats/rswtStat/page.tsx | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/apps/wr/app/(with-layout)/stats/rswtStat/page.tsx b/apps/wr/app/(with-layout)/stats/rswtStat/page.tsx index 99a8bc4f3..21ca5112a 100644 --- a/apps/wr/app/(with-layout)/stats/rswtStat/page.tsx +++ b/apps/wr/app/(with-layout)/stats/rswtStat/page.tsx @@ -132,7 +132,7 @@ export default function RswtStat() { } return item; }); - + // 시도별 합계 계산 transformedRswtDetailList.forEach((item: RswtStatProps[]) => { const sidoText = item[0]?.toString(); @@ -144,18 +144,21 @@ export default function RswtStat() { sidoData[i] = '합계'; } else if (i == 3) { // 해당 시도의 데이터 개수를 계산 - const sidoDataCount = rswtDetailList.filter((data: unknown[]) => - Array.isArray(data) && data.length > 0 && String(data[0]) === sidoText - ).length; - sidoData[i] = sidoDataCount; + if (typeof sidoData[i] === "number") { + sidoData[i] = (sidoData[i] as number) + 1; + } else if ((sidoData[i] === undefined || isNaN(Number(sidoData[i])))) { + sidoData[i] = 1; + } } else if (i == 4) { sidoData[i] = ''; } else if (i == 6) { // 법정 대상 건축물 개수 (인덱스 6이 'Y'인 경우) - const bumCnt = rswtDetailList.filter((data: unknown[]) => - Array.isArray(data) && data.length > 6 && String(data[0]) === sidoText - ).filter((data: unknown[]) => String(data[6]) === '대상').length; - sidoData[i] = bumCnt; + + if (item[i]?.toString() == '대상'&&typeof sidoData[i] === "number") { + sidoData[i] = (sidoData[i] as number) + 1; + } else if (item[i]?.toString() == '대상'&&(sidoData[i] === undefined || isNaN(Number(sidoData[i])))) { + sidoData[i] = 1; + } } else if (i == 9) { const value = Number(item[9]) || 0; sidoData[i] = (Number(sidoData[i]) + value) as string | number; @@ -256,14 +259,14 @@ export default function RswtStat() { From aec7e7de3a006936c703d0d6e40c5d0c42aab84b Mon Sep 17 00:00:00 2001 From: truthwing Date: Wed, 13 Aug 2025 11:40:07 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=EB=85=84=EB=8F=84=20=EC=97=AD=20=EC=A0=95?= =?UTF-8?q?=EB=A0=AC=20=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/components/lib/func/commom.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/wr/components/lib/func/commom.tsx b/apps/wr/components/lib/func/commom.tsx index 343852e39..ef4baa67b 100644 --- a/apps/wr/components/lib/func/commom.tsx +++ b/apps/wr/components/lib/func/commom.tsx @@ -180,8 +180,8 @@ const currentYear = new Date().getFullYear(); export const yearOptions: { val: string; text: string }[] = Array.from( { length: currentYear - 1969 }, (_, i) => ({ - val: String(1970 + i), - text: `${1970 + i}년`, + val: String(currentYear - i), + text: `${currentYear - i}년`, }) );