wr: 점검현황 excel 수정

This commit is contained in:
2026-03-23 18:06:31 +09:00
parent edf0d30b95
commit 645a7db2e5
4 changed files with 62 additions and 50 deletions
@@ -385,6 +385,8 @@ const Map = () => {
if (moveEndDebounceRef.current) { clearTimeout(moveEndDebounceRef.current); moveEndDebounceRef.current = null; }
};
}, [checkedLayers]);
console.log(checkedLayers);
return (
<div className="bg-container">
<Gis
@@ -174,7 +174,7 @@ export default function Page() {
headerRange: "A1:X2",
sheetName: 'sheet1',
startCol: 'A',
decimalArray0: [4,5,9,10,11,12,13,14,17,18,19,23], // 0부터 시작
decimalArray0: [4,5,9,10,11,12,13,14,17,18,19,20,23], // 0부터 시작
}];
excelDownloadNumStyle(
"중수도시설 지도점검 현황",
@@ -1,25 +1,30 @@
import { codeToText, formatYyyymmdd } from "@/components/lib/func/common";
const toExcelString = (value: unknown) => {
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),
]);
});
@@ -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;
};