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) => ({