41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import type { RainStatProps } from ".";
|
|
|
|
export const excelRainStat = (excelList:RainStatProps[]) : (string | number)[][] => {
|
|
const excelData: (string | number)[][] = [];
|
|
excelList.forEach((item) => {
|
|
excelData.push([
|
|
//시도
|
|
item.ctpvCd ?? "",
|
|
//시군구
|
|
item.sggCd ?? "",
|
|
//행정구역명
|
|
String(item.areaNm) ?? "",
|
|
//시설명
|
|
String(item.bdstNm) ?? "",
|
|
//건축물용도코드 (값 없음)
|
|
//String(item.bdstUsgCd) ?? "",
|
|
"",
|
|
//주소
|
|
String(item.daddr) ?? "",
|
|
//법적의무대상여부
|
|
String(item.lawTrgtYn)==="Y" ? "대상" : "미대상",
|
|
//설치완료일자
|
|
String(item.instlCmptnDt).substring(0, 10) ?? "",
|
|
//설치비용
|
|
item.instlCst ?? "",
|
|
//접수면종류
|
|
String(item.pntfColKnd) ?? "",
|
|
//여과등처리시설유무
|
|
String(item.filtrTrtmfctYn) ?? "",
|
|
//처리용량(저류조용량)
|
|
item.dtfcltCpct ?? "",
|
|
//연간사용량
|
|
item.wtrUsqty ?? "",
|
|
//이용용도코드
|
|
item.utztnUsgCd ?? "",
|
|
//연간운영비
|
|
item.anlOperCst ?? "",
|
|
]);
|
|
});
|
|
return excelData;
|
|
} |