From 8cd394d9464b03848605c1c31943811c7493f79c Mon Sep 17 00:00:00 2001 From: ljpark Date: Fri, 26 Dec 2025 13:06:55 +0900 Subject: [PATCH] =?UTF-8?q?fo:=20api=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/fo/app/store/planSewage/index.tsx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/apps/fo/app/store/planSewage/index.tsx b/apps/fo/app/store/planSewage/index.tsx index 39a95483c..29a919977 100644 --- a/apps/fo/app/store/planSewage/index.tsx +++ b/apps/fo/app/store/planSewage/index.tsx @@ -1,6 +1,6 @@ import DataForm from "@/app/components/common/DataForm"; import type { TableUpperProps } from "../dashboard"; -import { getFetch } from "@/app/components/api"; +import { getFetch, postFetch } from "@/app/components/api"; import { type ApiResponse } from "../underWaterInput"; // import CalcRainEffect from "@/app/components/common/CalcRainEffect"; import { roundUp } from "../common"; @@ -108,19 +108,28 @@ const fetchPlanSewageList = async (pageNo: number, pageSize: number, searchYear: return { data: res.data, count: res.count } } +// 시설들 유량 정보 조회 +// export const fetchFlow = async (searchYear: string | undefined, fcltCdList: string[]): Promise => { +// try { +// const params = new URLSearchParams(); +// fcltCdList.forEach(cd => params.append('fcltCds', cd)); +// const res = await getFetch('fo', '/fclt/flow/' + searchYear + '?' + params.toString()); +// return res; +// } catch (error) { +// console.error('시설정보 유량 데이터를 가져오는데 실패했습니다:', error); +// return null; +// } +// }; // 시설들 유량 정보 조회 export const fetchFlow = async (searchYear: string | undefined, fcltCdList: string[]): Promise => { try { - const params = new URLSearchParams(); - fcltCdList.forEach(cd => params.append('fcltCds', cd)); - const res = await getFetch('fo', '/fclt/flow/' + searchYear + '?' + params.toString()); + const res = await postFetch('fo', '/fclt/flow/' + searchYear, fcltCdList); return res; } catch (error) { console.error('시설정보 유량 데이터를 가져오는데 실패했습니다:', error); return null; } }; - /**==================================== * Store - expaort ====================================*/