중수도통계, 빗물시설 통계 건수 추출 수정(추후에 공통으로 바로 바라볼수있도록 수정 필요할듯?)
This commit is contained in:
@@ -24,5 +24,6 @@ export type TableUpperProps = {
|
||||
mergeCell?:boolean // 셀을 합칠경우
|
||||
maxLength?:number
|
||||
readonly?:boolean
|
||||
commonCode?:string // 공통코드 사용할경우
|
||||
};
|
||||
|
||||
|
||||
@@ -40,36 +40,43 @@ export const rainStatHeadListExport: TableUpperProps[] = [
|
||||
{
|
||||
id: "lndwtr",
|
||||
title: "조경용수",
|
||||
commonCode : "01",
|
||||
row:1,
|
||||
},
|
||||
{
|
||||
id: "cleanToilUswtr",
|
||||
title: "청소화장실용수",
|
||||
commonCode : "02",
|
||||
row:1,
|
||||
},
|
||||
{
|
||||
id:"resn",
|
||||
title:"세척살수용수",
|
||||
commonCode : "03",
|
||||
row:1,
|
||||
},
|
||||
{
|
||||
id: "farmUswtr",
|
||||
title: "농업용수",
|
||||
commonCode : "04",
|
||||
row:1,
|
||||
},
|
||||
{
|
||||
id: "indstUswtr",
|
||||
title: "공업용수",
|
||||
commonCode : "05",
|
||||
row:1,
|
||||
},
|
||||
{
|
||||
id: "hydUswtr",
|
||||
title: "친수용수",
|
||||
commonCode : "06",
|
||||
row:1,
|
||||
},
|
||||
{
|
||||
id: "ithlEtcUswtr",
|
||||
title: "기타",
|
||||
commonCode : "07",
|
||||
row:1,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -89,8 +89,6 @@ export const rainStatActionsExport = (
|
||||
searchRainStatList: async (year: string, city: SelectDataType[]) => {
|
||||
const res = await fetchRainStatList(year);
|
||||
const cityArr: any[] = [];
|
||||
|
||||
console.log('res ', res)
|
||||
|
||||
res.filter((resFilter: RainStatProps) =>
|
||||
city.some((cityCd) =>
|
||||
@@ -116,14 +114,20 @@ export const rainStatActionsExport = (
|
||||
obj.dtfcltCpct = item.dtfcltCpct;
|
||||
obj.wtrUsqty = item.wtrUsqty;
|
||||
obj.anlOperCst = item.anlOperCst;
|
||||
|
||||
obj.lndwtr = 0; //조경용수
|
||||
obj.cleanToilUswtr = 0; //청소화장실용수
|
||||
obj.resn = 0; //세척살수용수
|
||||
obj.farmUswtr = 0; //농업용수
|
||||
obj.indstUswtr = 0; //공업용수
|
||||
obj.hydUswtr = 0; //친수용수
|
||||
obj.ithlEtcUswtr = 0; //기타
|
||||
cityArr.push(obj);
|
||||
}
|
||||
|
||||
if (item.guideStats && item.guideStats.length > 0) {
|
||||
item.guideStats.forEach((guide: GuideStatProps) => {
|
||||
rainStatHeadListExport.forEach((headItem: TableUpperProps) => {
|
||||
if (headItem.title == guide.utztnUsgCd) {
|
||||
if (headItem.commonCode == guide.utztnUsgCd) {
|
||||
if (!obj[headItem.id] || typeof obj[headItem.id] !== "number")
|
||||
obj[headItem.id] = 0;
|
||||
if (typeof obj[headItem.id] === "number") {
|
||||
|
||||
@@ -64,31 +64,37 @@ export const rswtStatHeadListExport :TableUpperProps[]=[
|
||||
{
|
||||
id: "lndwtr",
|
||||
title: "조경용수",
|
||||
commonCode: "01",
|
||||
row:1,
|
||||
},
|
||||
{
|
||||
id: "cleanToilUswtr",
|
||||
title: "청소화장실용수",
|
||||
commonCode : "02",
|
||||
row:1,
|
||||
},
|
||||
{
|
||||
id: "farmUswtr",
|
||||
title: "농업용수",
|
||||
commonCode : "04",
|
||||
row:1,
|
||||
},
|
||||
{
|
||||
id: "indstUswtr",
|
||||
title: "공업용수",
|
||||
commonCode : "05",
|
||||
row:1,
|
||||
},
|
||||
{
|
||||
id: "hydUswtr",
|
||||
title: "친수용수",
|
||||
commonCode : "06",
|
||||
row:1,
|
||||
},
|
||||
{
|
||||
id: "ithlEtcUswtr",
|
||||
title: "기타",
|
||||
commonCode : "07",
|
||||
row:1,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -118,10 +118,9 @@ export const rswtStatActionsExport: (set: any) => rswtStatActions = (
|
||||
item.guideStats.forEach((guide: GuideStatProps) => {
|
||||
rswtStatHeadListExport.forEach((headItem: TableUpperProps) => {
|
||||
|
||||
if (headItem.title == guide.utztnUsgCd) {
|
||||
if (headItem.commonCode == guide.utztnUsgCd) {
|
||||
if (!obj[headItem.id] || typeof obj[headItem.id] !== "number") obj[headItem.id] = 0;
|
||||
if (typeof obj[headItem.id] === "number") {
|
||||
|
||||
obj[headItem.id] += guide.ruseFcltUtztnQnt;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user