From 645a7db2e5aec536dffaccfaf6c4559c05aea3b8 Mon Sep 17 00:00:00 2001 From: ljpark Date: Mon, 23 Mar 2026 18:06:31 +0900 Subject: [PATCH] =?UTF-8?q?wr:=20=EC=A0=90=EA=B2=80=ED=98=84=ED=99=A9=20ex?= =?UTF-8?q?cel=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/(map-layout)/map/mainMap/page.tsx | 2 + .../prfmncSttn/chkgdnSttn/page.tsx | 2 +- .../chkgdnSttn/rainChkgdnSttn/excel.tsx | 39 ++++++----- .../chkgdnSttn/rswtChkgdnSttn/excel.tsx | 69 ++++++++++--------- 4 files changed, 62 insertions(+), 50 deletions(-) diff --git a/apps/wr/app/(map-layout)/map/mainMap/page.tsx b/apps/wr/app/(map-layout)/map/mainMap/page.tsx index 652fe1924..a03810b96 100644 --- a/apps/wr/app/(map-layout)/map/mainMap/page.tsx +++ b/apps/wr/app/(map-layout)/map/mainMap/page.tsx @@ -385,6 +385,8 @@ const Map = () => { if (moveEndDebounceRef.current) { clearTimeout(moveEndDebounceRef.current); moveEndDebounceRef.current = null; } }; }, [checkedLayers]); + + console.log(checkedLayers); return (
{ + if (value === null || value === undefined) return ""; + return String(value); +}; export const buildingExcelRainSttn = (excelList: any[]) => { const excelData: string[][] = []; excelList.forEach((item) => { excelData.push([ - String(item.cityText) ?? "", - String(item.sggText) ?? "", - String(item.bdstNm) ?? "", - item.operMngCd || String(item.operMngCd)===null? String(item.operMngCd) : "", - String(item.oilqMeasMthd) ?? "", - String(item.anlOperCst) ?? "", - String(item.dtfcltCpct) ?? "", - String(item.chckYmd) ?? "", - String(item.utztnUsgCd) ?? "", - String(item.totalSplyUswtrUtztnQnt) ?? "", - String(item.totalRuseFcltUtztnQnt) ?? "", - String(item.ph) ?? "", - String(item.trbt) ?? "", - String(item.grssClfg) ?? "", - String(item.vltnDt) ?? "", - String(item.vltnMttr) ?? "", - String(item.levyAmt) ?? "", + toExcelString(item.cityText), + toExcelString(item.sggText), + toExcelString(item.bdstNm), + toExcelString(item.operMngCd), + toExcelString(item.oilqMeasMthd), + toExcelString(item.anlOperCst), + toExcelString(item.dtfcltCpct), + formatYyyymmdd(item.chckYmd), // 점검일 + toExcelString(codeToText(item.utztnUsgCd, "dmdUszCd") ?? item.utztnUsgCd), + toExcelString(item.totalSplyUswtrUtztnQnt), + toExcelString(item.totalRuseFcltUtztnQnt), + toExcelString(item.ph), + toExcelString(item.trbt), + toExcelString(item.grssClfg), + toExcelString(item.vltnDt), + toExcelString(item.vltnMttr), + toExcelString(item.levyAmt), ]); }); diff --git a/apps/wr/app/store/prfmncSttn/chkgdnSttn/rswtChkgdnSttn/excel.tsx b/apps/wr/app/store/prfmncSttn/chkgdnSttn/rswtChkgdnSttn/excel.tsx index 55eaf2df1..579af0706 100644 --- a/apps/wr/app/store/prfmncSttn/chkgdnSttn/rswtChkgdnSttn/excel.tsx +++ b/apps/wr/app/store/prfmncSttn/chkgdnSttn/rswtChkgdnSttn/excel.tsx @@ -1,35 +1,40 @@ +import { codeToText, formatYyyymmdd } from "@/components/lib/func/common"; +const toExcelString = (value: unknown) => { + if (value === null || value === undefined) return ""; + return String(value); +}; export const buildingExcelRswtSttn = (excelList: any[]) => { - const excelData: string[][] = []; - excelList.forEach((item) => { - excelData.push([ - String(item.cityText) ?? "", - String(item.sggText) ?? "", - String(item.bdstNm) ?? "", - item.operMngCd===null ? "":item.operMngCd, - String(item.anlOperCst) ?? "", - String(item.prcsCpct) ?? "", - item.spwtPositn===null ? "":item.spwtPositn, - item.chckYmd ?? "", - String(item.utztnUsgCd) ?? "", - String(item.splyUswtrUtztnQnt) ?? "", - String(item.ruseFcltUtztnQnt) ?? "", - String(item.grssClfgUswtr) ?? "", - String(item.combResdch) ?? "", - String(item.trbt) ?? "", - String(item.bod) ?? "", - String(item.smll) ?? "", - String(item.crmty) ?? "", - String(item.tn) ?? "", - String(item.tph) ?? "", - String(item.ph) ?? "", - String(item.clIonQnt) ?? "", - String(item.vltnDt) ?? "", - String(item.vltnMttr) ?? "", - String(item.levyAmt) ?? "", - ]); - }); + const excelData: string[][] = []; + excelList.forEach((item) => { + excelData.push([ + toExcelString(item.cityText), + toExcelString(item.sggText), + toExcelString(item.bdstNm), + toExcelString(item.operMngCd), + toExcelString(item.anlOperCst), + toExcelString(item.prcsCpct), + toExcelString(item.spwtPositn), + formatYyyymmdd(item.chckYmd), // 점검일 + toExcelString(codeToText(item.utztnUsgCd, "dmdUszCd") ?? item.utztnUsgCd), // 이용용도 + toExcelString(item.splyUswtrUtztnQnt), + toExcelString(item.ruseFcltUtztnQnt), + toExcelString(item.grssClfgUswtr), + toExcelString(item.combResdch), + toExcelString(item.trbt), + toExcelString(item.bod), + toExcelString(item.smll), + toExcelString(item.crmty), + toExcelString(item.tn), + toExcelString(item.tph), + toExcelString(item.ph), + toExcelString(item.clIonQnt), + toExcelString(item.vltnDt), + toExcelString(item.vltnMttr), + toExcelString(item.levyAmt), + ]); + }); + + return excelData; +}; - return excelData; - }; - \ No newline at end of file