빗물 통계 수정

This commit is contained in:
leedj312
2025-08-13 09:43:43 +09:00
parent 2edb56284e
commit a5f7fb7fe8
+10 -4
View File
@@ -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) => ({