import type { RswtStatProps } from "."; import { bdstUsgCd } from "../../common/code/basicCode"; export const excelRswtStat = (excelList:RswtStatProps[]) : (string | number)[][] => { const excelData: (string | number)[][] = []; excelList.forEach((item) => { excelData.push([ //시도 String(item.ctpvCd) ?? "", //시군구 String(item.sggCd) ?? "", //행정구역명 String(item.areaNm) ?? "", //건축물명 String(item.bdstNm) ?? "", //건축물용도코드(빈칸) //String(item.bdstUsgCd) ?? "", bdstUsgCd.find((cd)=> cd.val === item.bdstUsgCd.toString())?.text ?? "", //건축물용도 //주소 String(item.daddr) ?? "", //법적의무대상여부 String(item.lawTrgtYn)==="Y" ? "대상" : "미대상", //설치완료일자 item.instlCmptnDt ? String(item.instlCmptnDt).substring(0, 10) : "", //가동개시일(빈칸) //String(item.instlCst) ?? "", "", //건축물면적 // item.archArea ?? "", //처리용량 item.filtrTrtmfctCpct ?? "", //물사용량 item.wtrUsqty ?? "", //중수도+대체수이용량 item.rswtAltSum ?? "", //중수도이용량 item.rswtrUsqty ?? "", //대체수이용량 item.altUswtrUtztnQnt ?? "", //중수도용도 String(item.utztnUsgCd) ?? "", //연간운영비 item.anlOperCst ?? "", ]); }); return excelData; }