From 55c953d284390ae461c7a0ac2729752bad0ec346 Mon Sep 17 00:00:00 2001 From: ljpark Date: Mon, 23 Feb 2026 18:07:01 +0900 Subject: [PATCH] =?UTF-8?q?fo:=20excelDown=EC=8B=9C=20=EC=A1=B0=EA=B1=B4?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/fo/app/pages/(with-layout)/flowRate/page.tsx | 8 ++++++++ apps/fo/app/pages/(with-layout)/sewageOccur/page.tsx | 10 +++++++++- .../app/pages/(with-layout)/underWaterInput/page.tsx | 10 +++++++++- apps/fo/app/store/sewageOccur/index.tsx | 2 +- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/apps/fo/app/pages/(with-layout)/flowRate/page.tsx b/apps/fo/app/pages/(with-layout)/flowRate/page.tsx index be0f81b03..9c0bc2386 100644 --- a/apps/fo/app/pages/(with-layout)/flowRate/page.tsx +++ b/apps/fo/app/pages/(with-layout)/flowRate/page.tsx @@ -185,11 +185,19 @@ export default function ProcessFacilitySearch() { alert('엑셀 다운로드는 유역 조건을 선택한 후 이용 가능합니다.'); return; } + if (!ref.current.unitWaterShedValue || ref.current.unitWaterShedValue === '0') { + alert('엑셀 다운로드는 단위유역 조건을 선택한 후 이용 가능합니다.'); + return; + } } else if (ref.current.partValue === 'G') { // 환경청별 if (!ref.current.envPartValue || ref.current.envPartValue === '0') { alert('엑셀 다운로드는 환경청 조건을 선택한 후 이용 가능합니다.'); return; } + if (!ref.current.sidoValue || ref.current.sidoValue === '0') { + alert('엑셀 다운로드는 시도 조건을 선택한 후 이용 가능합니다.'); + return; + } } setIsExcelDownClick(true); try { diff --git a/apps/fo/app/pages/(with-layout)/sewageOccur/page.tsx b/apps/fo/app/pages/(with-layout)/sewageOccur/page.tsx index a70b6e6cd..7a4faf9cd 100644 --- a/apps/fo/app/pages/(with-layout)/sewageOccur/page.tsx +++ b/apps/fo/app/pages/(with-layout)/sewageOccur/page.tsx @@ -189,7 +189,7 @@ export default function PlanSewage() { // 엑셀다운로드 const excelDownload = useCallback(async () => { if (isExcelDownClick) return; - if (ref.current.partValue === 'A') { // + if (ref.current.partValue === 'A') { // 행정별 if (!ref.current.sidoValue || ref.current.sidoValue === '0') { alert('엑셀 다운로드는 시도 조건을 선택한 후 이용 가능합니다.'); return; @@ -199,11 +199,19 @@ export default function PlanSewage() { alert('엑셀 다운로드는 유역 조건을 선택한 후 이용 가능합니다.'); return; } + if (!ref.current.unitWaterShedValue || ref.current.unitWaterShedValue === '0') { + alert('엑셀 다운로드는 단위유역 조건을 선택한 후 이용 가능합니다.'); + return; + } } else if (ref.current.partValue === 'G') { // 환경청별 if (!ref.current.envPartValue || ref.current.envPartValue === '0') { alert('엑셀 다운로드는 환경청 조건을 선택한 후 이용 가능합니다.'); return; } + if (!ref.current.sidoValue || ref.current.sidoValue === '0') { + alert('엑셀 다운로드는 시도 조건을 선택한 후 이용 가능합니다.'); + return; + } } setIsExcelDownClick(true); try { diff --git a/apps/fo/app/pages/(with-layout)/underWaterInput/page.tsx b/apps/fo/app/pages/(with-layout)/underWaterInput/page.tsx index 9bf7eccb5..383bca9be 100644 --- a/apps/fo/app/pages/(with-layout)/underWaterInput/page.tsx +++ b/apps/fo/app/pages/(with-layout)/underWaterInput/page.tsx @@ -195,7 +195,7 @@ export default function UnderWaterInput() { // 엑셀다운로드 const excelDownload = useCallback(async () => { if (isExcelDownClick) return; - if (ref.current.partValue === 'A') { // + if (ref.current.partValue === 'A') { // 행정별 if (!ref.current.sidoValue || ref.current.sidoValue === '0') { alert('엑셀 다운로드는 시도 조건을 선택한 후 이용 가능합니다.'); return; @@ -205,11 +205,19 @@ export default function UnderWaterInput() { alert('엑셀 다운로드는 유역 조건을 선택한 후 이용 가능합니다.'); return; } + if (!ref.current.unitWaterShedValue || ref.current.unitWaterShedValue === '0') { + alert('엑셀 다운로드는 단위유역 조건을 선택한 후 이용 가능합니다.'); + return; + } } else if (ref.current.partValue === 'G') { // 환경청별 if (!ref.current.envPartValue || ref.current.envPartValue === '0') { alert('엑셀 다운로드는 환경청 조건을 선택한 후 이용 가능합니다.'); return; } + if (!ref.current.sidoValue || ref.current.sidoValue === '0') { + alert('엑셀 다운로드는 시도 조건을 선택한 후 이용 가능합니다.'); + return; + } } setIsExcelDownClick(true); try { diff --git a/apps/fo/app/store/sewageOccur/index.tsx b/apps/fo/app/store/sewageOccur/index.tsx index fd219c0f1..dfd7e2bca 100644 --- a/apps/fo/app/store/sewageOccur/index.tsx +++ b/apps/fo/app/store/sewageOccur/index.tsx @@ -413,7 +413,7 @@ export const sewageOccurReducer: (set: any) => SewageOccurActions = (set: any) = } item.sewageInputYear = parseFloat(avg.toFixed(2)); // 연간 하수유입량(m³/일) item.sewageInputChungchun = parseFloat((chungcunSumFlow === 0 ? 0 : (chungcunSumFlow / sumChungcunDay)).toFixed(2)); // 청천시 하수유입량 - item.estimationSewage = parseFloat((item.waterUsage * OSU_PERCENT).toFixed(2)); // 오수발생량 추정(m³/일) + item.estimationSewage = parseFloat((item.waterUsage * OSU_PERCENT).toFixed(2)); // 오수발생량 추정(m³/일) = 물사용량(m³/일) * 오수전환율 if (item.estimationSewage > maxEstimationSewage) maxEstimationSewage = item.estimationSewage; if (item.estimationSewage < minEstimationSewage) minEstimationSewage = item.estimationSewage; // 반올림 처리