From a5f7fb7fe883a3a7c386ebdbd2226b50f6b6ef49 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Wed, 13 Aug 2025 09:43:43 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=97=EB=AC=BC=20=ED=86=B5=EA=B3=84=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/store/stats/rainStat/index.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/wr/app/store/stats/rainStat/index.tsx b/apps/wr/app/store/stats/rainStat/index.tsx index ec46c2b4e..80787ae43 100644 --- a/apps/wr/app/store/stats/rainStat/index.tsx +++ b/apps/wr/app/store/stats/rainStat/index.tsx @@ -50,7 +50,13 @@ const excelDownList: ExcelType[] = []; const fetchRainStatList = async (year: string) => { const res = await getFetch(fetchType.WR, `/reuseChk/rainy/stat/${year}`); - return res; + + + return res.map((item) => ({ + ...item, + instlCst:item.instlCst<0?0:item.instlCst, + dtfcltCpct:item.dtfcltCpct<0?0:item.dtfcltCpct + })); }; type rainStatActions = { @@ -83,7 +89,8 @@ export const rainStatActionsExport = ( searchRainStatList: async (year: string, city: SelectDataType[]) => { const res = await fetchRainStatList(year); const cityArr: any[] = []; - + + console.log('res ', res) res.filter((resFilter: RainStatProps) => city.some((cityCd) => @@ -209,6 +216,7 @@ export const rainStatActionsExport = ( utztnUsgCd: utztnUsgArray.join(", "), }); }); + const excelDetailData = excelRainStat(rainDetailList); /* const rainStatHeadList = data.map((item:RainStatProps) => ({ ...item, @@ -230,8 +238,6 @@ export const rainStatActionsExport = ( yearMoney:item.yearMoney, })) */ - console.log(" cityArr ", cityArr); - console.log(" excelDownList ", excelDownList); cityArr.unshift(totalObj); set((state: rainStatState) => ({