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