From 3c6d10a5e3a0345e5b6d2b961723db1ae8a0236b Mon Sep 17 00:00:00 2001 From: jsyang Date: Thu, 30 Oct 2025 16:19:21 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A4=91=EC=88=98=EB=8F=84=ED=86=B5=EA=B3=84,?= =?UTF-8?q?=20=EB=B9=97=EB=AC=BC=EC=8B=9C=EC=84=A4=20=ED=86=B5=EA=B3=84=20?= =?UTF-8?q?=EA=B1=B4=EC=88=98=20=EC=B6=94=EC=B6=9C=20=EC=88=98=EC=A0=95(?= =?UTF-8?q?=EC=B6=94=ED=9B=84=EC=97=90=20=EA=B3=B5=ED=86=B5=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B0=94=EB=A1=9C=20=EB=B0=94=EB=9D=BC=EB=B3=BC?= =?UTF-8?q?=EC=88=98=EC=9E=88=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=ED=95=84=EC=9A=94=ED=95=A0=EB=93=AF=3F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/store/common/type/header.tsx | 1 + apps/wr/app/store/stats/rainStat/headList.tsx | 7 +++++++ apps/wr/app/store/stats/rainStat/index.tsx | 12 ++++++++---- apps/wr/app/store/stats/rswtStat/headList.tsx | 6 ++++++ apps/wr/app/store/stats/rswtStat/index.tsx | 3 +-- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/apps/wr/app/store/common/type/header.tsx b/apps/wr/app/store/common/type/header.tsx index 29780ba03..75bf29433 100644 --- a/apps/wr/app/store/common/type/header.tsx +++ b/apps/wr/app/store/common/type/header.tsx @@ -24,5 +24,6 @@ export type TableUpperProps = { mergeCell?:boolean // 셀을 합칠경우 maxLength?:number readonly?:boolean + commonCode?:string // 공통코드 사용할경우 }; diff --git a/apps/wr/app/store/stats/rainStat/headList.tsx b/apps/wr/app/store/stats/rainStat/headList.tsx index 664e060c4..7601919d5 100644 --- a/apps/wr/app/store/stats/rainStat/headList.tsx +++ b/apps/wr/app/store/stats/rainStat/headList.tsx @@ -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, }, { diff --git a/apps/wr/app/store/stats/rainStat/index.tsx b/apps/wr/app/store/stats/rainStat/index.tsx index 80787ae43..90687a905 100644 --- a/apps/wr/app/store/stats/rainStat/index.tsx +++ b/apps/wr/app/store/stats/rainStat/index.tsx @@ -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") { diff --git a/apps/wr/app/store/stats/rswtStat/headList.tsx b/apps/wr/app/store/stats/rswtStat/headList.tsx index c0860fea7..47aeca57b 100644 --- a/apps/wr/app/store/stats/rswtStat/headList.tsx +++ b/apps/wr/app/store/stats/rswtStat/headList.tsx @@ -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, }, { diff --git a/apps/wr/app/store/stats/rswtStat/index.tsx b/apps/wr/app/store/stats/rswtStat/index.tsx index bd9a9c8e0..fa183f1a2 100644 --- a/apps/wr/app/store/stats/rswtStat/index.tsx +++ b/apps/wr/app/store/stats/rswtStat/index.tsx @@ -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; } }