Merge branch 'iipbs/sn/dev' of https://www.onasys.co.kr:3000/ONAANDALL/frontend into iipbs/sn/dev

This commit is contained in:
swcho
2025-12-26 13:48:22 +09:00
+14 -5
View File
@@ -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<ApiResponse | null> => {
// 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<ApiResponse | null> => {
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
====================================*/