From 7fb9454c74415550cace91d1b65b3b627a3a5d21 Mon Sep 17 00:00:00 2001 From: jsyang Date: Fri, 5 Sep 2025 14:17:23 +0900 Subject: [PATCH 01/46] =?UTF-8?q?=EC=A3=BC=EC=9A=94=EA=B7=B8=EB=9E=98?= =?UTF-8?q?=ED=94=84=20=EC=8B=9C=EC=84=A4=EC=9A=A9=EB=9F=89=20>=20?= =?UTF-8?q?=EC=A7=80=ED=95=98=EC=88=98=EC=9C=A0=EC=9E=85=EB=9F=89=20?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(with-layout)/dashboard/maingraph/page.tsx | 2 +- .../app/pages/(with-layout)/dashboard/page.tsx | 2 +- apps/fo/app/store/dashboard/index.tsx | 16 +++++++++++++++- apps/fo/app/store/underWaterInput/index.tsx | 1 + 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/apps/fo/app/pages/(with-layout)/dashboard/maingraph/page.tsx b/apps/fo/app/pages/(with-layout)/dashboard/maingraph/page.tsx index 3f193e035..b0759e336 100644 --- a/apps/fo/app/pages/(with-layout)/dashboard/maingraph/page.tsx +++ b/apps/fo/app/pages/(with-layout)/dashboard/maingraph/page.tsx @@ -63,7 +63,7 @@ export default function DashBoardChart({searchYear = '', fcltyList = []}: facili color: colors[2], }, lineVal0: { - label: '시설용량', + label: '지하수유입량', color: colors[1], }, lineVal1: { diff --git a/apps/fo/app/pages/(with-layout)/dashboard/page.tsx b/apps/fo/app/pages/(with-layout)/dashboard/page.tsx index 2003addee..7a2c3d8a0 100644 --- a/apps/fo/app/pages/(with-layout)/dashboard/page.tsx +++ b/apps/fo/app/pages/(with-layout)/dashboard/page.tsx @@ -240,7 +240,7 @@ export default function DashBoard() { const sheetParameter = [ { - data: [['날짜', '강수량', '유입하수량', '시설용량', '유입BOD', '유입T-P','총인유입T-P', '방류T-P', '유입T-N', '방류T-N'],...yearValueData], + data: [['날짜', '강수량', '유입하수량', '지하수유입량', '유입BOD', '유입T-P','총인유입T-P', '방류T-P', '유입T-N', '방류T-N'],...yearValueData], headerNum: 1, headerRange: 'A1:J1', sheetName: '주요그래프' diff --git a/apps/fo/app/store/dashboard/index.tsx b/apps/fo/app/store/dashboard/index.tsx index b263c2288..f07e8a933 100644 --- a/apps/fo/app/store/dashboard/index.tsx +++ b/apps/fo/app/store/dashboard/index.tsx @@ -1868,6 +1868,20 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType) const res = await fetchMainGraph(searchYear, fcltyCd); const res2 = await fetchFacilityWaterQltyInfo(fcltyCd); + let chungcunSumFlow = 0; + const calData = CalcRainEffect(res.data.wqltObjs, 'SUNNY') + calData.forEach((flowItem: any) => { + chungcunSumFlow += flowItem.inflAmnt && flowItem.inflAmnt !== 'x' ? Number(flowItem.inflAmnt.toString().trim()) : 0; + }); + const usage = chungcunSumFlow&&chungcunSumFlow>0?chungcunSumFlow / calData.length:0; + + //bscFctCd === '11200PB001R') 중랑 - 테스트할 때 코드넣고 해야 보기편해요~ + /* if(bscFctCd === '11200PB001R') { + console.log('calData.length : ', calData.length); + console.log('usage : ', usage, 'summerUsage : ', summerUsage, 'winterUsage : ', winterUsage); + } */ + const underWaterInputYear = Math.round((usage-(usage*0.65*OSU_PERCENT)) * 1) / 1; + // 법적방류수질 데이터 const sortedWaterQltyInfo = [...res2].sort((a, b) => { // 숫자로 변환하여 비교 @@ -1908,7 +1922,7 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType) const chart_inflowRain = res.data.wqltObjs.map((item: FacilityWaterQltyProps) => ({ label: item.msrDt.substring(0, 4)+"-"+item.msrDt.substring(4, 6)+"-"+item.msrDt.substring(6, 8), barVal0: item.infoRnDay ?? 0, - lineVal0: item.fctCpc ?? 0, + lineVal0: underWaterInputYear, lineVal1: item.inflAmnt ?? 0, })); diff --git a/apps/fo/app/store/underWaterInput/index.tsx b/apps/fo/app/store/underWaterInput/index.tsx index 816860469..dc29412ad 100644 --- a/apps/fo/app/store/underWaterInput/index.tsx +++ b/apps/fo/app/store/underWaterInput/index.tsx @@ -288,6 +288,7 @@ export const underWaterReducer:(set:(fn: (state: UnderWaterType) => UnderWaterTy const bscFctCd = item.bscFctCd; const res2 = await getFetch('fo', '/fclt/flow/' + bscFctCd + '/' + searchYear) as ApiResponse; const calData = CalcRainEffect(res2.data, 'SUNNY'); + let chungcunSumFlow = 0; let sumSummerChungcunDay = 0; From 79faffdfee9b857acbbd1314c2e870f30e1db84c Mon Sep 17 00:00:00 2001 From: jsyang Date: Fri, 5 Sep 2025 17:55:05 +0900 Subject: [PATCH 02/46] =?UTF-8?q?=EC=88=98=EC=A7=88=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EB=AA=A8=EB=8B=AC=202021=EB=85=84=EC=9D=B4=EC=A0=84=20toc=20?= =?UTF-8?q?=EB=8C=80=EC=8B=A0=20cod=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20?= =?UTF-8?q?=EB=B3=B4=EC=97=AC=EC=A7=80=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../facilityWaterQlty/modal/page.tsx | 59 +++++++++++++------ apps/fo/app/store/common/index.tsx | 4 ++ apps/fo/app/store/facilityWaterQlty/index.tsx | 37 ++++++++++-- 3 files changed, 77 insertions(+), 23 deletions(-) diff --git a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx index d7cad3367..64c748eeb 100644 --- a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx @@ -40,9 +40,10 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe searchFacilityWaterQltyListHist, Common } = useFoStore((state) => state); - const {btnClass} = Common; + const {btnClass, COD_YEAR} = Common; const { upHeadListModalYear, + upHeadListModalYearCod, facilityWaterQltyYearList, upHeadListModalTms, tmsList, @@ -65,12 +66,14 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe let maxEfflWqltTn = 0; let maxEfflWqltTp = 0; let maxefflWqltToc = 0; + let maxefflWqltCod = 0; let maxEfflWqltSs = 0; let maxinflAssctBfrWqltBod = 0; let maxinflAssctBfrWqltTn = 0; let maxInflAssctBfrWqltTp = 0; let maxinflAssctBfrWqltToc = 0; + let maxinflAssctBfrWqltCod = 0; let maxinflAssctBfrWqltSs = 0; let maxTpInflWqltBod = 0; @@ -84,12 +87,14 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe let minEfflWqltTn = filteredData.length > 0 ? parseNumber(filteredData[0]?.efflWqltTn) : 0; let minEfflWqltTp = filteredData.length > 0 ? parseNumber(filteredData[0]?.efflWqltTp) : 0; let minefflWqltToc = filteredData.length > 0 ? parseNumber(filteredData[0]?.efflWqltToc) : 0; + let minefflWqltCod = filteredData.length > 0 ? parseNumber(filteredData[0]?.efflWqltCod) : 0; let minEfflWqltSs = filteredData.length > 0 ? parseNumber(filteredData[0]?.efflWqltSs) : 0; let mininflAssctBfrWqltBod = filteredData.length > 0 ? parseNumber(filteredData[0]?.inflAssctBfrWqltBod) : 0; let mininflAssctBfrWqltTn = filteredData.length > 0 ? parseNumber(filteredData[0]?.inflAssctBfrWqltTn) : 0; let minInflAssctBfrWqltTp = filteredData.length > 0 ? parseNumber(filteredData[0]?.inflAssctBfrWqltTp) : 0; let mininflAssctBfrWqltToc = filteredData.length > 0 ? parseNumber(filteredData[0]?.inflAssctBfrWqltToc) : 0; + let mininflAssctBfrWqltCod = filteredData.length > 0 ? parseNumber(filteredData[0]?.inflAssctBfrWqltCod) : 0; let mininflAssctBfrWqltSs = filteredData.length > 0 ? parseNumber(filteredData[0]?.inflAssctBfrWqltSs) : 0; let minTpInflWqltBod = 99999999; @@ -101,12 +106,14 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe let avgEfflWqltTn = 0; let avgEfflWqltTp = 0; let avgefflWqltToc = 0; + let avgefflWqltCod = 0; let avgEfflWqltSs = 0; let avginflAssctBfrWqltBod = 0; let avginflAssctBfrWqltTn = 0; let avgInflAssctBfrWqltTp = 0; let avginflAssctBfrWqltToc = 0; + let avginflAssctBfrWqltCod = 0; let avginflAssctBfrWqltSs = 0; let avgTpInflWqltBod = 0; @@ -123,11 +130,13 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe const efflWqltTn = parseNumber(item.efflWqltTn); const efflWqltTp = parseNumber(item.efflWqltTp); const efflWqltToc = parseNumber(item.efflWqltToc); + const efflWqltCod = parseNumber(item.efflWqltCod?item.efflWqltCod.replaceAll("(","").replaceAll(")",""):0); const efflWqltSs = parseNumber(item.efflWqltSs); const inflAssctBfrWqltBod = parseNumber(item.inflAssctBfrWqltBod); const inflAssctBfrWqltTn = parseNumber(item.inflAssctBfrWqltTn); const inflAssctBfrWqltTp = parseNumber(item.inflAssctBfrWqltTp); const inflAssctBfrWqltToc = parseNumber(item.inflAssctBfrWqltToc); + const inflAssctBfrWqltCod = parseNumber(item.inflAssctBfrWqltCod?item.inflAssctBfrWqltCod.replaceAll("(","").replaceAll(")",""):0); const inflAssctBfrWqltSs = parseNumber(item.inflAssctBfrWqltSs); const tpInflWqltBod = parseNumber(item.tpInflWqltBod); @@ -145,12 +154,14 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe maxEfflWqltTn = Math.max(maxEfflWqltTn, efflWqltTn); maxEfflWqltTp = Math.max(maxEfflWqltTp, efflWqltTp); maxefflWqltToc = Math.max(maxefflWqltToc, efflWqltToc); + maxefflWqltCod = Math.max(maxefflWqltCod, efflWqltCod); maxEfflWqltSs = Math.max(maxEfflWqltSs, efflWqltSs); maxinflAssctBfrWqltBod = Math.max(maxinflAssctBfrWqltBod, inflAssctBfrWqltBod); maxinflAssctBfrWqltTn = Math.max(maxinflAssctBfrWqltTn, inflAssctBfrWqltTn); maxInflAssctBfrWqltTp = Math.max(maxInflAssctBfrWqltTp, inflAssctBfrWqltTp); maxinflAssctBfrWqltToc = Math.max(maxinflAssctBfrWqltToc, inflAssctBfrWqltToc); + maxinflAssctBfrWqltCod = Math.max(maxinflAssctBfrWqltCod, inflAssctBfrWqltCod); maxinflAssctBfrWqltSs = Math.max(maxinflAssctBfrWqltSs, inflAssctBfrWqltSs); maxTpInflWqltBod = Math.max(maxTpInflWqltBod, tpInflWqltBod); @@ -162,12 +173,14 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe minEfflWqltTn = Math.min(minEfflWqltTn, efflWqltTn); minEfflWqltTp = Math.min(minEfflWqltTp, efflWqltTp); minefflWqltToc = Math.min(minefflWqltToc, efflWqltToc); + minefflWqltCod = Math.min(minefflWqltCod, efflWqltCod); minEfflWqltSs = Math.min(minEfflWqltSs, efflWqltSs); mininflAssctBfrWqltBod = Math.min(mininflAssctBfrWqltBod, inflAssctBfrWqltBod); mininflAssctBfrWqltTn = Math.min(mininflAssctBfrWqltTn, inflAssctBfrWqltTn); minInflAssctBfrWqltTp = Math.min(minInflAssctBfrWqltTp, inflAssctBfrWqltTp); mininflAssctBfrWqltToc = Math.min(mininflAssctBfrWqltToc, inflAssctBfrWqltToc); + mininflAssctBfrWqltCod = Math.min(mininflAssctBfrWqltToc, inflAssctBfrWqltCod); mininflAssctBfrWqltSs = Math.min(mininflAssctBfrWqltSs, inflAssctBfrWqltSs); if(item.tpInflWqltBod != null && item.tpInflWqltBod.trim() != '' && item.tpInflWqltBod != undefined ){ @@ -185,12 +198,14 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe avgEfflWqltTn += efflWqltTn; avgEfflWqltTp += efflWqltTp; avgefflWqltToc += efflWqltToc; + avgefflWqltCod += efflWqltCod; avgEfflWqltSs += efflWqltSs; avginflAssctBfrWqltBod += inflAssctBfrWqltBod; avginflAssctBfrWqltTn += inflAssctBfrWqltTn; avgInflAssctBfrWqltTp += inflAssctBfrWqltTp; avginflAssctBfrWqltToc += inflAssctBfrWqltToc; + avginflAssctBfrWqltCod += inflAssctBfrWqltCod; avginflAssctBfrWqltSs += inflAssctBfrWqltSs; if(item.noProcessInflAmnt && item.noProcessInflAmnt.toString().trim() != '' && item.noProcessInflAmnt != undefined){ @@ -207,16 +222,18 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe const newFilteredData = [ { msrDt: '평균', - efflWqltBod: filteredData.length==0?'0.0':(Math.round(avgEfflWqltBod / filteredData.length * 10) / 10).toFixed(1), - efflWqltToc: filteredData.length==0?'0.0':(Math.round(avgefflWqltToc / filteredData.length * 10) / 10).toFixed(1), - efflWqltSs: filteredData.length==0?'0.0':(Math.round(avgEfflWqltSs / filteredData.length * 10) / 10).toFixed(1), - efflWqltTn: filteredData.length==0?'0.000':(Math.round(avgEfflWqltTn / filteredData.length * 1000) / 1000).toFixed(3), - efflWqltTp: filteredData.length==0?'0.000':(Math.round(avgEfflWqltTp / filteredData.length * 1000) / 1000).toFixed(3), - inflAssctBfrWqltBod: filteredData.length==0?'0.0':(Math.round(avginflAssctBfrWqltBod / filteredData.length * 10) / 10).toFixed(1), - inflAssctBfrWqltTn: filteredData.length==0?'0.000':(Math.round(avginflAssctBfrWqltTn / filteredData.length * 1000) / 1000).toFixed(3), - inflAssctBfrWqltTp: filteredData.length==0?'0.000':(Math.round(avgInflAssctBfrWqltTp / filteredData.length * 1000) / 1000).toFixed(3), - inflAssctBfrWqltToc: filteredData.length==0?'0.0':(Math.round(avginflAssctBfrWqltToc / filteredData.length * 10) / 10).toFixed(1), - inflAssctBfrWqltSs: filteredData.length==0?'0.0':(Math.round(avginflAssctBfrWqltSs / filteredData.length * 10) / 10).toFixed(1), + efflWqltBod: filteredData.length==0 || avgEfflWqltBod===0?'0.0':(Math.round(avgEfflWqltBod / filteredData.length * 10) / 10).toFixed(1), + efflWqltToc: filteredData.length==0 || avgefflWqltToc===0?'0.0':(Math.round(avgefflWqltToc / filteredData.length * 10) / 10).toFixed(1), + efflWqltCod: filteredData.length==0 || avgefflWqltCod===0?"(0.0)":"("+(Math.round(avgefflWqltCod / filteredData.length * 10) / 10).toFixed(1)+")", + efflWqltSs: filteredData.length==0 || avgEfflWqltSs===0?'0.0':(Math.round(avgEfflWqltSs / filteredData.length * 10) / 10).toFixed(1), + efflWqltTn: filteredData.length==0 || avgEfflWqltTn ===0?'0.000':(Math.round(avgEfflWqltTn / filteredData.length * 1000) / 1000).toFixed(3), + efflWqltTp: filteredData.length==0 || avgEfflWqltTp ===0?'0.000':(Math.round(avgEfflWqltTp / filteredData.length * 1000) / 1000).toFixed(3), + inflAssctBfrWqltBod: filteredData.length==0 || avginflAssctBfrWqltBod===0?'0.0':(Math.round(avginflAssctBfrWqltBod / filteredData.length * 10) / 10).toFixed(1), + inflAssctBfrWqltTn: filteredData.length==0 || avginflAssctBfrWqltTn===0?'0.000':(Math.round(avginflAssctBfrWqltTn / filteredData.length * 1000) / 1000).toFixed(3), + inflAssctBfrWqltTp: filteredData.length==0 || avgInflAssctBfrWqltTp===0?'0.000':(Math.round(avgInflAssctBfrWqltTp / filteredData.length * 1000) / 1000).toFixed(3), + inflAssctBfrWqltToc: filteredData.length==0 || avginflAssctBfrWqltToc===0?'0.0':(Math.round(avginflAssctBfrWqltToc / filteredData.length * 10) / 10).toFixed(1), + inflAssctBfrWqltCod: filteredData.length==0 || avginflAssctBfrWqltCod===0?'(0.0)':"("+(Math.round(avginflAssctBfrWqltCod / filteredData.length * 10) / 10).toFixed(1)+")", + inflAssctBfrWqltSs: filteredData.length==0 || avginflAssctBfrWqltSs===0?'0.0':(Math.round(avginflAssctBfrWqltSs / filteredData.length * 10) / 10).toFixed(1), bscFctCd: "", bscFctNm: "", lclgvrnmntNm: "", @@ -225,14 +242,15 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe addr: "", fctCpc: 0, noProcessInflAmnt : roundNumber(avgNoProcessInflAmnt / noProcessInflAmntCnt, 0), - infoRnDay: filteredData.length==0?'0.0':(Math.round(avgInfoRnDay / filteredData.length * 10) / 10).toFixed(1), - tpInflWqltBod: filteredData.length==0?'0.0':(Math.round(avgTpInflWqltBod / tpInflWqltBodCnt * 10) / 10).toFixed(1), - tpInflWqltTp: filteredData.length==0?'0.000':(Math.round(avgTpInflWqltTp / tpInflWqltTpCnt * 1000) / 1000).toFixed(3) + infoRnDay: filteredData.length==0 || avgInfoRnDay===0?'0.0':(Math.round(avgInfoRnDay / filteredData.length * 10) / 10).toFixed(1), + tpInflWqltBod: filteredData.length==0 || avgTpInflWqltBod ===0 ?'0.0':(Math.round(avgTpInflWqltBod / tpInflWqltBodCnt * 10) / 10).toFixed(1), + tpInflWqltTp: filteredData.length==0 || avgTpInflWqltTp === 0?'0.000':(Math.round(avgTpInflWqltTp / tpInflWqltTpCnt * 1000) / 1000).toFixed(3) }, { msrDt : '최대', efflWqltBod : Math.round(maxEfflWqltBod * 10) / 10?(Math.round(maxEfflWqltBod * 10) / 10).toFixed(1):'0.0', efflWqltToc : Math.round(maxefflWqltToc * 10) / 10?(Math.round(maxefflWqltToc * 10) / 10).toFixed(1):'0.0', + efflWqltCod : Math.round(maxefflWqltCod * 10) / 10?"("+(Math.round(maxefflWqltCod * 10) / 10).toFixed(1)+")":'(0.0)', efflWqltSs : Math.round(maxEfflWqltSs * 10) / 10?(Math.round(maxEfflWqltSs * 10) / 10).toFixed(1):'0.0', efflWqltTn : Math.round(maxEfflWqltTn * 1000) / 1000?(Math.round(maxEfflWqltTn * 1000) / 1000).toFixed(3):'0.000', efflWqltTp : Math.round(maxEfflWqltTp * 1000) / 1000?(Math.round(maxEfflWqltTp * 1000) / 1000).toFixed(3):'0.000', @@ -240,6 +258,7 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe inflAssctBfrWqltTn : Math.round(maxinflAssctBfrWqltTn * 1000) / 1000?(Math.round(maxinflAssctBfrWqltTn * 1000) / 1000).toFixed(3):'0.000', inflAssctBfrWqltTp : Math.round(maxInflAssctBfrWqltTp * 1000) / 1000?(Math.round(maxInflAssctBfrWqltTp * 1000) / 1000).toFixed(3):'0.000', inflAssctBfrWqltToc : Math.round(maxinflAssctBfrWqltToc * 10) / 10?(Math.round(maxinflAssctBfrWqltToc * 10) / 10).toFixed(1):'0.0', + inflAssctBfrWqltCod : Math.round(maxinflAssctBfrWqltCod * 10) / 10?"("+(Math.round(maxinflAssctBfrWqltCod * 10) / 10).toFixed(1)+")":'(0.0)', inflAssctBfrWqltSs : Math.round(maxinflAssctBfrWqltSs * 10) / 10?(Math.round(maxinflAssctBfrWqltSs * 10) / 10).toFixed(1):'0.0', bscFctCd: "", bscFctNm: "", @@ -257,6 +276,7 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe msrDt : '최소', efflWqltBod : Math.round(minEfflWqltBod * 10) / 10?(Math.round(minEfflWqltBod * 10) / 10).toFixed(1) : '0.0', efflWqltToc : Math.round(minefflWqltToc * 10) / 10?(Math.round(minefflWqltToc * 10) / 10).toFixed(1) : '0.0', + efflWqltCod : Math.round(minefflWqltCod * 10) / 10?"("+(Math.round(minefflWqltCod * 10) / 10).toFixed(1)+")" : '(0.0)', efflWqltSs : Math.round(minEfflWqltSs * 10) / 10?(Math.round(minEfflWqltSs * 10) / 10).toFixed(1) : '0.0', efflWqltTn : Math.round(minEfflWqltTn * 1000) / 1000?(Math.round(minEfflWqltTn * 1000) / 1000).toFixed(3) : '0.000', efflWqltTp : Math.round(minEfflWqltTp * 1000) / 1000?(Math.round(minEfflWqltTp * 1000) / 1000).toFixed(3) : '0.000', @@ -264,6 +284,7 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe inflAssctBfrWqltTn : Math.round(mininflAssctBfrWqltTn * 1000) / 1000?(Math.round(mininflAssctBfrWqltTn * 1000) / 1000).toFixed(3) : '0.000', inflAssctBfrWqltTp : Math.round(minInflAssctBfrWqltTp * 1000) / 1000?(Math.round(minInflAssctBfrWqltTp * 1000) / 1000).toFixed(3) : '0.000', inflAssctBfrWqltToc : Math.round(mininflAssctBfrWqltToc * 10) / 10?(Math.round(mininflAssctBfrWqltToc * 10) / 10).toFixed(1) : '0.0', + inflAssctBfrWqltCod : Math.round(mininflAssctBfrWqltCod * 10) / 10?"("+(Math.round(mininflAssctBfrWqltCod * 10) / 10).toFixed(1)+")" : '(0.0)', inflAssctBfrWqltSs : Math.round(mininflAssctBfrWqltSs * 10) / 10?(Math.round(mininflAssctBfrWqltSs * 10) / 10).toFixed(1) : '0.0', bscFctCd: "", bscFctNm: "", @@ -364,7 +385,7 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe { return value > 0 ? roundUp((value/day), digit).toFixed(digit) : toZero; }; +export const COD_YEAR = 2021; + /** * STORE - API */ @@ -392,6 +394,7 @@ export type CommonType = { selectFlowPanel: SelectDataType[]; selectEnvPartData: envPartSelectDataType[]; btnClass: string; + COD_YEAR : number; }; auth: { @@ -421,6 +424,7 @@ export const commonState: CommonType = { selectFlowPanel: selectFlowPanel, selectEnvPartData: selectEnvPartData, btnClass: "p-4 m-2 !mr-10 text-white rounded-sm text-lg font-medium", + COD_YEAR : COD_YEAR, }, auth: { diff --git a/apps/fo/app/store/facilityWaterQlty/index.tsx b/apps/fo/app/store/facilityWaterQlty/index.tsx index f8b874c85..bcfb6326c 100644 --- a/apps/fo/app/store/facilityWaterQlty/index.tsx +++ b/apps/fo/app/store/facilityWaterQlty/index.tsx @@ -2,6 +2,7 @@ import DataForm, { roundNumber } from "@/app/components/common/DataForm"; import type { TableUpperProps } from "../dashboard"; import CalcRainEffect from "@/app/components/common/CalcRainEffect"; +import { COD_YEAR } from "../common"; export type { TableUpperProps }; /**==================================== @@ -26,6 +27,8 @@ export interface FacilityWaterQltyProps { inflAssctAftWqltBod: string | '', inflAssctBfrWqltToc: string | '', inflAssctAftWqltToc: string | '', + inflAssctBfrWqltCod : string | '', + inflAssctAftWqltCod : string | '', inflAssctBfrWqltSs: string | '', inflAssctAftWqltSs: string | '', inflAssctBfrWqltTn: string | '', @@ -34,6 +37,7 @@ export interface FacilityWaterQltyProps { inflAssctAftWqltTp: string | '', efflWqltBod: string | '', efflWqltToc: string | '', + efflWqltCod : string | '', efflWqltSs: string | '', efflWqltTn: string | '', efflWqltTp: string | '', @@ -214,6 +218,23 @@ const upHeadListModalYear: TableUpperProps[] = [ { id: "infoRnDay", title: "강우량\n(mm/일)", align: "right" } ]; +// 처리시설 수질현황 헤더(모달-연간) +const upHeadListModalYearCod: TableUpperProps[] = [ + { id: "msrDt", title: "날짜" }, + { id: "inflAssctBfrWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe1", upSequnce: 1, align: "right" }, + { id: "inflAssctBfrWqltCod", title: "TOC(COD)\n(mg/L)", upName: "upChangeRe1", upSequnce: 2, align: "right" }, + { id: "inflAssctBfrWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe1", upSequnce: 3, align: "right" }, + { id: "inflAssctBfrWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe1", upSequnce: 2, align: "right" }, + { id: "inflAssctBfrWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe1", upSequnce: 3, align: "right" }, + { id: "efflWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe2", upSequnce: 1, align: "right" }, + { id: "efflWqltCod", title: "TOC(COD)\n(mg/L)", upName: "upChangeRe2", upSequnce: 2, align: "right" }, + { id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe2", upSequnce: 3, align: "right" }, + { id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe2", upSequnce: 2, align: "right" }, + { id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe2", upSequnce: 3, align: "right" }, + { id: "noProcessInflAmnt", title: "미처리하수량\n(m³/일)", align:"right"}, + { id: "infoRnDay", title: "강우량\n(mm/일)", align: "right" } +]; + // 처리시설 수질현황 헤더(모달-수질TMS) const upHeadListModalTms: TableUpperProps[] = [ { id: "part", title: "구분" }, @@ -298,6 +319,7 @@ export type FacilityWaterQltyType = { FacilityWaterQltyModal: { // 처리시설 수질현황 upHeadListModalYear: TableUpperProps[]; + upHeadListModalYearCod : TableUpperProps[]; facilityWaterQltyYearList: FacilityWaterQltyProps[]; upHeadListModalTms: TableUpperProps[]; facilityWaterQltyTmsList: FacilityWaterQltyTmsProps[]; @@ -327,6 +349,7 @@ export const facilityWaterQltyInitState: FacilityWaterQltyType = { FacilityWaterQltyModal: { // 처리시설 수질현황 upHeadListModalYear: upHeadListModalYear, + upHeadListModalYearCod: upHeadListModalYearCod, facilityWaterQltyYearList: facilityWaterQltyYearList, upHeadListModalTms: upHeadListModalTms, facilityWaterQltyTmsList: facilityWaterQltyTmsList, @@ -453,8 +476,8 @@ export const facilityWaterQltyReducer = (set: (fn: (state: FacilityWaterQltyType item.fctCpc = parseFloat(item.fctCpc.toString().replace(/,/g, '')); item.sidoNm = item.lclgvrnmntNm.split(' ')[0]?.toString() || ''; item.sggNm = item.lclgvrnmntNm.split(' ')[1]?.toString() || ''; - item.inflAssctBfrWqltToc = Number(searchYear)<2021? "("+item.inflAssctBfrWqltToc+")" : item.inflAssctBfrWqltToc; - item.efflWqltToc = Number(searchYear)<2021? "("+item.efflWqltToc+")" : item.efflWqltToc; + item.inflAssctBfrWqltToc = Number(searchYear) ({ @@ -625,6 +648,12 @@ export const facilityWaterQltyReducer = (set: (fn: (state: FacilityWaterQltyType if(item.efflWqltToc){ item.efflWqltToc = Number(Math.round(Number(item.efflWqltToc) * 10)/10).toFixed(1); } + if(item.inflAssctBfrWqltCod){ + item.inflAssctBfrWqltCod = "("+Number(Math.round(Number(item.inflAssctBfrWqltCod) * 10)/10).toFixed(1)+")"; + } + if(item.efflWqltCod){ + item.efflWqltCod = "("+Number(Math.round(Number(item.efflWqltCod) * 10)/10).toFixed(1)+")"; + } if(item.inflAssctBfrWqltBod){ item.inflAssctBfrWqltBod = Number(Math.round(Number(item.inflAssctBfrWqltBod) * 10)/10).toFixed(1); } From 6df0f45fa39a2f02d48e24575bab82daf64a9d56 Mon Sep 17 00:00:00 2001 From: jsyang Date: Mon, 8 Sep 2025 18:03:47 +0900 Subject: [PATCH 03/46] =?UTF-8?q?=ED=95=98=EB=8B=A8=EC=A3=BC=EC=84=9D=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fo/app/components/common/UnderComment.tsx | 32 +++++ .../facilityPrecipitation/page.tsx | 3 +- .../facilityWaterQlty/modal/page.tsx | 132 +++++++++--------- .../(with-layout)/flowRate/modal/page.tsx | 33 ++--- .../pages/(with-layout)/planSewage/page.tsx | 15 +- .../(with-layout)/processFacility/page.tsx | 3 +- apps/fo/app/pages/(with-layout)/rdi/page.tsx | 9 +- 7 files changed, 131 insertions(+), 96 deletions(-) create mode 100644 apps/fo/app/components/common/UnderComment.tsx diff --git a/apps/fo/app/components/common/UnderComment.tsx b/apps/fo/app/components/common/UnderComment.tsx new file mode 100644 index 000000000..f8a03769b --- /dev/null +++ b/apps/fo/app/components/common/UnderComment.tsx @@ -0,0 +1,32 @@ +import React from 'react' + +/** + * 하단 주석 영역 + */ + +type CommentType={ + commentStartPoint? : string, + commentArray? : string[], + divHeight? : string, +} + +function UnderComment({commentStartPoint="☞", commentArray=[], divHeight="14"} :CommentType) { + const height = "mt-"+divHeight; + + if(commentArray && commentArray.length > 0){ + return ( +
+ {commentArray.map((item, index) => ( + + + {commentStartPoint} {item} + +
+
+ ))} +
+ ) + } +} + +export default UnderComment; \ No newline at end of file diff --git a/apps/fo/app/pages/(with-layout)/facilityPrecipitation/page.tsx b/apps/fo/app/pages/(with-layout)/facilityPrecipitation/page.tsx index 0d66de569..e2d7ef5cc 100644 --- a/apps/fo/app/pages/(with-layout)/facilityPrecipitation/page.tsx +++ b/apps/fo/app/pages/(with-layout)/facilityPrecipitation/page.tsx @@ -6,6 +6,7 @@ import ListDiv from "@common/business_components/ui/list_div"; import { useCallback, useEffect, useRef, useState } from "react"; import PrecipitationModal from "./modal/page"; import LoadingOverlay from "@common/business_components/ui/loadingBar"; +import UnderComment from "@/app/components/common/UnderComment"; export default function FacilityPrecipitation() { const {Common @@ -225,7 +226,7 @@ export default function FacilityPrecipitation() {
index !== undefined && cellClick(index)} headName={"시설별 강수현황"} tableData={mainList} headlist={upheadList} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} />
- ☞ 강우일은 3mm 이상만 해당 / 강우영향일은 강우일 및 강우일 후 연속 2일간으로 정의 + diff --git a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx index 64c748eeb..33530a6fd 100644 --- a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx @@ -8,6 +8,22 @@ import type { ReturnType } from "../../../../components/common/FacilityTermModal import FacilityTermModalHeader from "../../../../components/common/FacilityTermModalHeader"; import { HeadMakeColSpan } from "../HeadMakeColSpan"; import { roundNumber } from "@/app/components/common/DataForm"; +import UnderComment from "@/app/components/common/UnderComment"; + +const commentArrayDefault = [ + "미처리하수량 =[(강우시 일별유입유량*강우시 일별유입BOD)-(청천시 연평균유입유량*청천시 연평균유입BOD)]​ / (강우시 일별유입BOD)​", + "음수값 발생시 제외(null, 평균값 산정시 제외)" +]; + +const commentArrayChungchun = [ + ...commentArrayDefault, + "청천시 : 강우량이 3mm미만의 날" +]; + +const commentArrayRain = [ + ...commentArrayDefault, + "강우량 3mm 이상만 날과 강우영향일(강우일+2일)의 날" +]; type ModalProps ={ fcltyName: string; @@ -222,18 +238,18 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe const newFilteredData = [ { msrDt: '평균', - efflWqltBod: filteredData.length==0 || avgEfflWqltBod===0?'0.0':(Math.round(avgEfflWqltBod / filteredData.length * 10) / 10).toFixed(1), - efflWqltToc: filteredData.length==0 || avgefflWqltToc===0?'0.0':(Math.round(avgefflWqltToc / filteredData.length * 10) / 10).toFixed(1), - efflWqltCod: filteredData.length==0 || avgefflWqltCod===0?"(0.0)":"("+(Math.round(avgefflWqltCod / filteredData.length * 10) / 10).toFixed(1)+")", - efflWqltSs: filteredData.length==0 || avgEfflWqltSs===0?'0.0':(Math.round(avgEfflWqltSs / filteredData.length * 10) / 10).toFixed(1), - efflWqltTn: filteredData.length==0 || avgEfflWqltTn ===0?'0.000':(Math.round(avgEfflWqltTn / filteredData.length * 1000) / 1000).toFixed(3), - efflWqltTp: filteredData.length==0 || avgEfflWqltTp ===0?'0.000':(Math.round(avgEfflWqltTp / filteredData.length * 1000) / 1000).toFixed(3), - inflAssctBfrWqltBod: filteredData.length==0 || avginflAssctBfrWqltBod===0?'0.0':(Math.round(avginflAssctBfrWqltBod / filteredData.length * 10) / 10).toFixed(1), - inflAssctBfrWqltTn: filteredData.length==0 || avginflAssctBfrWqltTn===0?'0.000':(Math.round(avginflAssctBfrWqltTn / filteredData.length * 1000) / 1000).toFixed(3), - inflAssctBfrWqltTp: filteredData.length==0 || avgInflAssctBfrWqltTp===0?'0.000':(Math.round(avgInflAssctBfrWqltTp / filteredData.length * 1000) / 1000).toFixed(3), - inflAssctBfrWqltToc: filteredData.length==0 || avginflAssctBfrWqltToc===0?'0.0':(Math.round(avginflAssctBfrWqltToc / filteredData.length * 10) / 10).toFixed(1), - inflAssctBfrWqltCod: filteredData.length==0 || avginflAssctBfrWqltCod===0?'(0.0)':"("+(Math.round(avginflAssctBfrWqltCod / filteredData.length * 10) / 10).toFixed(1)+")", - inflAssctBfrWqltSs: filteredData.length==0 || avginflAssctBfrWqltSs===0?'0.0':(Math.round(avginflAssctBfrWqltSs / filteredData.length * 10) / 10).toFixed(1), + efflWqltBod: filteredData.length==0 || avgEfflWqltBod===0?'0.0':roundNumber((avgEfflWqltBod / filteredData.length), 1), + efflWqltToc: filteredData.length==0 || avgefflWqltToc===0?'0.0':roundNumber((avgefflWqltToc / filteredData.length), 1), + efflWqltCod: filteredData.length==0 || avgefflWqltCod===0?"(0.0)":"("+roundNumber((avgefflWqltCod / filteredData.length), 1)+")", + efflWqltSs: filteredData.length==0 || avgEfflWqltSs===0?'0.0':roundNumber((avgEfflWqltSs / filteredData.length), 1), + efflWqltTn: filteredData.length==0 || avgEfflWqltTn ===0?'0.000':roundNumber((avgEfflWqltTn / filteredData.length), 3), + efflWqltTp: filteredData.length==0 || avgEfflWqltTp ===0?'0.000':roundNumber((avgEfflWqltTp / filteredData.length), 3), + inflAssctBfrWqltBod: filteredData.length==0 || avginflAssctBfrWqltBod===0?'0.0':roundNumber((avginflAssctBfrWqltBod / filteredData.length), 1), + inflAssctBfrWqltTn: filteredData.length==0 || avginflAssctBfrWqltTn===0?'0.000':roundNumber((avginflAssctBfrWqltTn / filteredData.length), 3), + inflAssctBfrWqltTp: filteredData.length==0 || avgInflAssctBfrWqltTp===0?'0.000':roundNumber((avgInflAssctBfrWqltTp / filteredData.length), 3), + inflAssctBfrWqltToc: filteredData.length==0 || avginflAssctBfrWqltToc===0?'0.0':roundNumber((avginflAssctBfrWqltToc / filteredData.length), 1), + inflAssctBfrWqltCod: filteredData.length==0 || avginflAssctBfrWqltCod===0?'(0.0)':"("+roundNumber((avginflAssctBfrWqltCod / filteredData.length), 1)+")", + inflAssctBfrWqltSs: filteredData.length==0 || avginflAssctBfrWqltSs===0?'0.0':roundNumber((avginflAssctBfrWqltSs / filteredData.length), 1), bscFctCd: "", bscFctNm: "", lclgvrnmntNm: "", @@ -242,24 +258,24 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe addr: "", fctCpc: 0, noProcessInflAmnt : roundNumber(avgNoProcessInflAmnt / noProcessInflAmntCnt, 0), - infoRnDay: filteredData.length==0 || avgInfoRnDay===0?'0.0':(Math.round(avgInfoRnDay / filteredData.length * 10) / 10).toFixed(1), - tpInflWqltBod: filteredData.length==0 || avgTpInflWqltBod ===0 ?'0.0':(Math.round(avgTpInflWqltBod / tpInflWqltBodCnt * 10) / 10).toFixed(1), - tpInflWqltTp: filteredData.length==0 || avgTpInflWqltTp === 0?'0.000':(Math.round(avgTpInflWqltTp / tpInflWqltTpCnt * 1000) / 1000).toFixed(3) + infoRnDay: filteredData.length==0 || avgInfoRnDay===0?'0.0':roundNumber(avgInfoRnDay / filteredData.length, 1), + tpInflWqltBod: filteredData.length==0 || avgTpInflWqltBod ===0 ?'0.0':roundNumber(avgTpInflWqltBod / tpInflWqltBodCnt, 1), + tpInflWqltTp: filteredData.length==0 || avgTpInflWqltTp === 0?'0.000':roundNumber(avgTpInflWqltTp / tpInflWqltTpCnt, 3) }, { msrDt : '최대', - efflWqltBod : Math.round(maxEfflWqltBod * 10) / 10?(Math.round(maxEfflWqltBod * 10) / 10).toFixed(1):'0.0', - efflWqltToc : Math.round(maxefflWqltToc * 10) / 10?(Math.round(maxefflWqltToc * 10) / 10).toFixed(1):'0.0', - efflWqltCod : Math.round(maxefflWqltCod * 10) / 10?"("+(Math.round(maxefflWqltCod * 10) / 10).toFixed(1)+")":'(0.0)', - efflWqltSs : Math.round(maxEfflWqltSs * 10) / 10?(Math.round(maxEfflWqltSs * 10) / 10).toFixed(1):'0.0', - efflWqltTn : Math.round(maxEfflWqltTn * 1000) / 1000?(Math.round(maxEfflWqltTn * 1000) / 1000).toFixed(3):'0.000', - efflWqltTp : Math.round(maxEfflWqltTp * 1000) / 1000?(Math.round(maxEfflWqltTp * 1000) / 1000).toFixed(3):'0.000', - inflAssctBfrWqltBod : Math.round(maxinflAssctBfrWqltBod * 10) / 10?(Math.round(maxinflAssctBfrWqltBod * 10) / 10).toFixed(1):'0.0', - inflAssctBfrWqltTn : Math.round(maxinflAssctBfrWqltTn * 1000) / 1000?(Math.round(maxinflAssctBfrWqltTn * 1000) / 1000).toFixed(3):'0.000', - inflAssctBfrWqltTp : Math.round(maxInflAssctBfrWqltTp * 1000) / 1000?(Math.round(maxInflAssctBfrWqltTp * 1000) / 1000).toFixed(3):'0.000', - inflAssctBfrWqltToc : Math.round(maxinflAssctBfrWqltToc * 10) / 10?(Math.round(maxinflAssctBfrWqltToc * 10) / 10).toFixed(1):'0.0', - inflAssctBfrWqltCod : Math.round(maxinflAssctBfrWqltCod * 10) / 10?"("+(Math.round(maxinflAssctBfrWqltCod * 10) / 10).toFixed(1)+")":'(0.0)', - inflAssctBfrWqltSs : Math.round(maxinflAssctBfrWqltSs * 10) / 10?(Math.round(maxinflAssctBfrWqltSs * 10) / 10).toFixed(1):'0.0', + efflWqltBod : Math.round(maxEfflWqltBod * 10) / 10?roundNumber(maxEfflWqltBod, 1):'0.0', + efflWqltToc : Math.round(maxefflWqltToc * 10) / 10?roundNumber(maxefflWqltToc, 1):'0.0', + efflWqltCod : Math.round(maxefflWqltCod * 10) / 10?"("+roundNumber(maxefflWqltCod, 1)+")":'(0.0)', + efflWqltSs : Math.round(maxEfflWqltSs * 10) / 10?roundNumber(maxEfflWqltSs, 1):'0.0', + efflWqltTn : Math.round(maxEfflWqltTn * 1000) / 1000?roundNumber(maxEfflWqltTn, 3):'0.000', + efflWqltTp : Math.round(maxEfflWqltTp * 1000) / 1000?roundNumber(maxEfflWqltTp, 3):'0.000', + inflAssctBfrWqltBod : Math.round(maxinflAssctBfrWqltBod * 10) / 10?roundNumber(maxinflAssctBfrWqltBod, 1):'0.0', + inflAssctBfrWqltTn : Math.round(maxinflAssctBfrWqltTn * 1000) / 1000?roundNumber(maxinflAssctBfrWqltTn, 3):'0.000', + inflAssctBfrWqltTp : Math.round(maxInflAssctBfrWqltTp * 1000) / 1000?roundNumber(maxInflAssctBfrWqltTp, 3):'0.000', + inflAssctBfrWqltToc : Math.round(maxinflAssctBfrWqltToc * 10) / 10?roundNumber(maxinflAssctBfrWqltToc, 1):'0.0', + inflAssctBfrWqltCod : Math.round(maxinflAssctBfrWqltCod * 10) / 10?"("+roundNumber(maxinflAssctBfrWqltCod, 1)+")":'(0.0)', + inflAssctBfrWqltSs : Math.round(maxinflAssctBfrWqltSs * 10) / 10?roundNumber(maxinflAssctBfrWqltSs, 1):'0.0', bscFctCd: "", bscFctNm: "", lclgvrnmntNm: "", @@ -268,24 +284,24 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe addr: "", fctCpc: 0, noProcessInflAmnt : roundNumber(maxNoProcessInflAmnt, 0), - infoRnDay: Math.round(maxInfoRnDay * 10) / 10?(Math.round(maxInfoRnDay * 10) / 10).toFixed(1):'0.0', - tpInflWqltBod: Math.round(maxTpInflWqltBod * 10) / 10?(Math.round(maxTpInflWqltBod * 10) / 10).toFixed(1):'0.0', - tpInflWqltTp: Math.round(maxTpInflWqltTp * 1000) / 1000?(Math.round(maxTpInflWqltTp * 1000) / 1000).toFixed(3):'0.000' + infoRnDay: Math.round(maxInfoRnDay * 10) / 10?roundNumber(maxInfoRnDay, 1):'0.0', + tpInflWqltBod: Math.round(maxTpInflWqltBod * 10) / 10?roundNumber(maxTpInflWqltBod, 1):'0.0', + tpInflWqltTp: Math.round(maxTpInflWqltTp * 1000) / 1000?roundNumber(maxTpInflWqltTp, 3):'0.000' }, { msrDt : '최소', - efflWqltBod : Math.round(minEfflWqltBod * 10) / 10?(Math.round(minEfflWqltBod * 10) / 10).toFixed(1) : '0.0', - efflWqltToc : Math.round(minefflWqltToc * 10) / 10?(Math.round(minefflWqltToc * 10) / 10).toFixed(1) : '0.0', - efflWqltCod : Math.round(minefflWqltCod * 10) / 10?"("+(Math.round(minefflWqltCod * 10) / 10).toFixed(1)+")" : '(0.0)', - efflWqltSs : Math.round(minEfflWqltSs * 10) / 10?(Math.round(minEfflWqltSs * 10) / 10).toFixed(1) : '0.0', - efflWqltTn : Math.round(minEfflWqltTn * 1000) / 1000?(Math.round(minEfflWqltTn * 1000) / 1000).toFixed(3) : '0.000', - efflWqltTp : Math.round(minEfflWqltTp * 1000) / 1000?(Math.round(minEfflWqltTp * 1000) / 1000).toFixed(3) : '0.000', - inflAssctBfrWqltBod : Math.round(mininflAssctBfrWqltBod * 10) / 10?(Math.round(mininflAssctBfrWqltBod * 10) / 10).toFixed(1) : '0.0', - inflAssctBfrWqltTn : Math.round(mininflAssctBfrWqltTn * 1000) / 1000?(Math.round(mininflAssctBfrWqltTn * 1000) / 1000).toFixed(3) : '0.000', - inflAssctBfrWqltTp : Math.round(minInflAssctBfrWqltTp * 1000) / 1000?(Math.round(minInflAssctBfrWqltTp * 1000) / 1000).toFixed(3) : '0.000', - inflAssctBfrWqltToc : Math.round(mininflAssctBfrWqltToc * 10) / 10?(Math.round(mininflAssctBfrWqltToc * 10) / 10).toFixed(1) : '0.0', - inflAssctBfrWqltCod : Math.round(mininflAssctBfrWqltCod * 10) / 10?"("+(Math.round(mininflAssctBfrWqltCod * 10) / 10).toFixed(1)+")" : '(0.0)', - inflAssctBfrWqltSs : Math.round(mininflAssctBfrWqltSs * 10) / 10?(Math.round(mininflAssctBfrWqltSs * 10) / 10).toFixed(1) : '0.0', + efflWqltBod : Math.round(minEfflWqltBod * 10) / 10?roundNumber(minEfflWqltBod, 1) : '0.0', + efflWqltToc : Math.round(minefflWqltToc * 10) / 10?roundNumber(minefflWqltToc, 1) : '0.0', + efflWqltCod : Math.round(minefflWqltCod * 10) / 10?"("+roundNumber(minefflWqltCod, 1)+")" : '(0.0)', + efflWqltSs : Math.round(minEfflWqltSs * 10) / 10?roundNumber(minEfflWqltSs, 1) : '0.0', + efflWqltTn : Math.round(minEfflWqltTn * 1000) / 1000?roundNumber(minEfflWqltTn, 3) : '0.000', + efflWqltTp : Math.round(minEfflWqltTp * 1000) / 1000?roundNumber(minEfflWqltTp, 3) : '0.000', + inflAssctBfrWqltBod : Math.round(mininflAssctBfrWqltBod * 10) / 10?roundNumber(mininflAssctBfrWqltBod, 1) : '0.0', + inflAssctBfrWqltTn : Math.round(mininflAssctBfrWqltTn * 1000) / 1000?roundNumber(mininflAssctBfrWqltTn, 3) : '0.000', + inflAssctBfrWqltTp : Math.round(minInflAssctBfrWqltTp * 1000) / 1000?roundNumber(minInflAssctBfrWqltTp, 3) : '0.000', + inflAssctBfrWqltToc : Math.round(mininflAssctBfrWqltToc * 10) / 10?roundNumber(mininflAssctBfrWqltToc, 1) : '0.0', + inflAssctBfrWqltCod : Math.round(mininflAssctBfrWqltCod * 10) / 10?"("+roundNumber(mininflAssctBfrWqltCod, 1)+")" : '(0.0)', + inflAssctBfrWqltSs : Math.round(mininflAssctBfrWqltSs * 10) / 10?roundNumber(mininflAssctBfrWqltSs, 1) : '0.0', bscFctCd: "", bscFctNm: "", lclgvrnmntNm: "", @@ -294,9 +310,9 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe addr: "", fctCpc: 0, noProcessInflAmnt : roundNumber(minNoProcessInflAmnt, 0), - infoRnDay: Math.round(minInfoRnDay * 10) / 10?'0.0':(Math.round(minInfoRnDay * 10) / 10).toFixed(1), - tpInflWqltBod: Math.round(minTpInflWqltBod * 10) / 10 && minTpInflWqltBod != 99999999?(Math.round(minTpInflWqltBod * 10) / 10).toFixed(1):'0.0', - tpInflWqltTp: Math.round(minTpInflWqltTp * 1000) / 1000 && minTpInflWqltTp != 99999999?(Math.round(minTpInflWqltTp * 1000) / 1000).toFixed(3):'0.000' + infoRnDay: Math.round(minInfoRnDay * 10) / 10?'0.0':roundNumber(minInfoRnDay, 1), + tpInflWqltBod: Math.round(minTpInflWqltBod * 10) / 10 && minTpInflWqltBod != 99999999?roundNumber(minTpInflWqltBod, 1):'0.0', + tpInflWqltTp: Math.round(minTpInflWqltTp * 1000) / 1000 && minTpInflWqltTp != 99999999?roundNumber(minTpInflWqltTp, 3):'0.000' }, ...filteredData ]; @@ -413,7 +429,9 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe >
- {msrmtDate != yesterDayStr?.replaceAll('-','')?

※전날 데이터 결측으로 인해 가장 최근 데이터 표출함

: ''} + {msrmtDate != yesterDayStr?.replaceAll('-','') ? ( + + ) : null} @@ -442,10 +460,7 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe -
- ☞ 미처리하수량 =[(강우시 일별유입유량*강우시 일별유입BOD)-(청천시 연평균유입유량*청천시 연평균유입BOD)]​/강우시 일별유입BOD)​

- ☞ 음수값 발생시 제외(null, 평균값 산정시 제외)

-
+ @@ -473,10 +488,7 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe -
- ☞ 미처리하수량 =[(강우시 일별유입유량*강우시 일별유입BOD)-(청천시 연평균유입유량*청천시 연평균유입BOD)]​/강우시 일별유입BOD)​

- ☞ 음수값 발생시 제외(null, 평균값 산정시 제외)

-
+
@@ -504,11 +516,7 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe -
- ☞ 미처리하수량 =[(강우시 일별유입유량*강우시 일별유입BOD)-(청천시 연평균유입유량*청천시 연평균유입BOD)]​/강우시 일별유입BOD)​

- ☞ 음수값 발생시 제외(null, 평균값 산정시 제외)

- ☞ 청천시 : 강우량이 3mm미만의 날 -
+
@@ -536,11 +544,7 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe -
- ☞ 미처리하수량 =[(강우시 일별유입유량*강우시 일별유입BOD)-(청천시 연평균유입유량*청천시 연평균유입BOD)]​/강우시 일별유입BOD)​

- ☞ 음수값 발생시 제외(null, 평균값 산정시 제외)

- ☞ 강우량 3mm 이상만 날과 강우영향일(강우일+2일)의 날 -
+
diff --git a/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx b/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx index 5a38ad8f0..f82f92835 100644 --- a/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx @@ -8,6 +8,12 @@ import { useCallback, useEffect, useRef, useState } from "react"; import type { ReturnType } from "../../../../components/common/FacilityTermModalHeader"; import { roundUp } from "@/app/store/common"; import { roundNumber } from "@/app/components/common/DataForm"; +import UnderComment from "@/app/components/common/UnderComment"; + +const commentDefault = [ + "미처리하수량 =[(강우시 일별유입유량*강우시 일별유입BOD)-(청천시 연평균유입유량*청천시 연평균유입BOD)]​ / (강우시 일별유입BOD)​" , + "음수값 발생시 제외(null, 평균값 산정시 제외)" +]; const tabList = [ { value: 'tab_term_year', label: '연간' }, @@ -225,10 +231,7 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st boldArray={[0,1,2]} /> -
- ☞ 미처리하수량 =[(강우시 일별유입유량*강우시 일별유입BOD)-(청천시 연평균유입유량*청천시 연평균유입BOD)]​/강우시 일별유입BOD)​

- ☞ 음수값 발생시 제외(null, 평균값 산정시 제외)

-
+ @@ -253,10 +256,7 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st boldArray={[0,1,2]} /> -
- ☞ 미처리하수량 =[(강우시 일별유입유량*강우시 일별유입BOD)-(청천시 연평균유입유량*청천시 연평균유입BOD)]​/강우시 일별유입BOD)​

- ☞ 음수값 발생시 제외(null, 평균값 산정시 제외)

-
+
@@ -281,10 +281,7 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st boldArray={[0,1,2]} /> -
- ☞ 미처리하수량 =[(강우시 일별유입유량*강우시 일별유입BOD)-(청천시 연평균유입유량*청천시 연평균유입BOD)]​/강우시 일별유입BOD)​

- ☞ 음수값 발생시 제외(null, 평균값 산정시 제외)

-
+
@@ -309,11 +306,7 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st boldArray={[0,1,2]} /> -
- ☞ 미처리하수량 =[(강우시 일별유입유량*강우시 일별유입BOD)-(청천시 연평균유입유량*청천시 연평균유입BOD)]​/강우시 일별유입BOD)​

- ☞ 음수값 발생시 제외(null, 평균값 산정시 제외)

- ☞ 청천시 : 강우량이 3mm미만의 날 -
+
@@ -328,11 +321,7 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st
{}} className="h-[370px]" boldArray={[0,1,2]}/>
-
- ☞ 미처리하수량 =[(강우시 일별유입유량*강우시 일별유입BOD)-(청천시 연평균유입유량*청천시 연평균유입BOD)]​/강우시 일별유입BOD)​

- ☞ 음수값 발생시 제외(null, 평균값 산정시 제외)

- ☞ 강우량 3mm 이상만 날과 강우영향일(강우일+2일)의 날 -
+
diff --git a/apps/fo/app/pages/(with-layout)/planSewage/page.tsx b/apps/fo/app/pages/(with-layout)/planSewage/page.tsx index 00539da13..dd7b263a2 100644 --- a/apps/fo/app/pages/(with-layout)/planSewage/page.tsx +++ b/apps/fo/app/pages/(with-layout)/planSewage/page.tsx @@ -5,7 +5,14 @@ import { downloadExcel, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, import ListDiv from "@common/business_components/ui/list_div"; import { useCallback, useEffect, useRef, useState } from "react"; import LoadingOverlay from "@common/business_components/ui/loadingBar"; - +import UnderComment from "@/app/components/common/UnderComment"; + +const commentArray = [ + "여유용량 = 하수처리시설 시설용량 – 건기시 유입유량(평균)​", + "변동부하율 = 건기시 일최대 유량/일평균​유량(기준 최근 3개년)​", + "분류식화율 = 분류식지역 면적(㎢) / 처리​구역 면적합계(㎢) ×100" +] + export default function PlanSewage() { const {Common ,PlanSewage @@ -193,11 +200,7 @@ export default function PlanSewage() {
-
- ☞ 여유용량 = 하수처리시설 시설용량 – 건기시 유입유량(평균)​
- ☞ 변동부하율 = 건기시 일최대 유량/일평균​유량(기준 최근 3개년)​
- ☞ 분류식화율 = 분류식지역 면적(㎢) / 처리​구역 면적합계(㎢) ×100
-
+ diff --git a/apps/fo/app/pages/(with-layout)/processFacility/page.tsx b/apps/fo/app/pages/(with-layout)/processFacility/page.tsx index 381c64ea5..189238bdf 100644 --- a/apps/fo/app/pages/(with-layout)/processFacility/page.tsx +++ b/apps/fo/app/pages/(with-layout)/processFacility/page.tsx @@ -6,6 +6,7 @@ import ListDiv from "@common/business_components/ui/list_div"; import { useCallback, useEffect, useRef, useState } from "react"; import ProcessFacilityInfoModal from "./modal/page"; import LoadingOverlay from "@common/business_components/ui/loadingBar"; +import UnderComment from "@/app/components/common/UnderComment"; export default function ProcessFacilitySearch() { const {Common @@ -278,9 +279,9 @@ export default function ProcessFacilitySearch() { + - ※계획유입수질 및 설계유입수질은 해당 BOD를 나타냄 {selectedRow !== null && ( - ※ 강우시 총 추정유입량 = 청천시 유입하수량 + RDII 추정값

- ※ 주) 처리장 유입부에서 측정된 유량 및 수질조사 자료를 기준으로 산정된 결과임 + From 00ecc1dc722ff3fd1a6844d209e77f0f90ed5290 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Tue, 9 Sep 2025 13:39:34 +0900 Subject: [PATCH 04/46] =?UTF-8?q?=EC=B0=A8=ED=8A=B8=20=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20,=20=EC=A0=9C=EA=B1=B0=20=EB=B0=8F=20=EB=85=84?= =?UTF-8?q?=EB=8F=84=20=EA=B3=B5=ED=86=B5=20=EB=B3=80=EC=88=98=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/dm/app/(base-layout)/pages/wrStatus/page.tsx | 10 +++++----- apps/dm/app/common/comFunction.ts | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/dm/app/(base-layout)/pages/wrStatus/page.tsx b/apps/dm/app/(base-layout)/pages/wrStatus/page.tsx index 263d9e42e..5552c2f53 100644 --- a/apps/dm/app/(base-layout)/pages/wrStatus/page.tsx +++ b/apps/dm/app/(base-layout)/pages/wrStatus/page.tsx @@ -36,7 +36,7 @@ export default function WrStatusPage() { { label: '온배수', color: '#FED16A', key: 'thermal' }, ]; const facilityTotalsColor = ['#FF6B6B', '#4ECDC4', '#45B7D1', '#FED16A']; - + const defaultYear= '2023' const handleMarkerClick = (regionId: string) => { @@ -142,7 +142,7 @@ export default function WrStatusPage() { useEffect(() => { - getDmStatusData('2023'); + getDmStatusData(defaultYear); },[]) @@ -245,7 +245,7 @@ export default function WrStatusPage() {
{/* 타이틀 영역 */}
-

재이용시설현황(2023)

+

{`재이용시설현황(${defaultYear})`}

행정구역별 재이용시설현황(개소)

@@ -306,7 +306,7 @@ export default function WrStatusPage() { {/* 타이틀 + 버튼 영역 */}
-

재이용시설현황(2023)

+

{`재이용시설현황(${defaultYear})`}

행정구역별 재이용시설현황[개소(천m³/년)]

@@ -350,7 +350,7 @@ export default function WrStatusPage() { {/* 재이용통계 차트 */}
-

재이용통계(2023)

+

{`재이용통계(${defaultYear})`}

행정구역별 재이용시설 현황 개소수 그래프

diff --git a/apps/dm/app/common/comFunction.ts b/apps/dm/app/common/comFunction.ts index 6d7274b95..02db72e8d 100644 --- a/apps/dm/app/common/comFunction.ts +++ b/apps/dm/app/common/comFunction.ts @@ -66,9 +66,9 @@ const makeRegion = (region: string) => { export const changeStatusMapData= (data: DmStatusDataType[]) : DmStatusChartType[]=> { return data.map((item) => ({ label: makeRegion(item.region??''), - 하수: item.sewage.split('(')[0]??'', - 빗물: item.rainwater.split('(')[0]??'', - 중수도: item.reclaimed.split('(')[0] ??'', - 온배수: item.thermal.split('(')[0] ??'', + 하수: item.sewage.split('(')[0]?.replaceAll(',','') ??'', + 빗물: item.rainwater.split('(')[0]?.replaceAll(',','')??'', + 중수도: item.reclaimed.split('(')[0]?.replaceAll(',','') ??'', + 온배수: item.thermal.split('(')[0]?.replaceAll(',','') ??'', })); } \ No newline at end of file From 8b2efad803ed7d1a24cb5d99bdb8a359280c15b8 Mon Sep 17 00:00:00 2001 From: jsyang Date: Tue, 9 Sep 2025 14:46:11 +0900 Subject: [PATCH 05/46] =?UTF-8?q?-=EC=A3=BC=EC=84=9D=20style=EC=A0=81?= =?UTF-8?q?=EC=9A=A9=20=EB=B0=A9=EC=8B=9D=20=EC=88=98=EC=A0=95=20-?= =?UTF-8?q?=EB=8C=80=EC=8B=9C=EB=B3=B4=EB=93=9C,=20rdii=EC=A1=B0=ED=9A=8C?= =?UTF-8?q?=20rdi=EA=B3=84=EC=82=B0=20=EC=9B=90=EB=B3=B8=EA=B0=92=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=B0=98=EC=98=AC=EB=A6=BC=ED=95=9C=20=ED=9B=84=20?= =?UTF-8?q?=EA=B3=84=EC=82=B0=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fo/app/components/common/UnderComment.tsx | 3 +-- apps/fo/app/store/dashboard/index.tsx | 26 ++++++++++++------- apps/fo/app/store/rdi/index.tsx | 17 +++++++++--- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/apps/fo/app/components/common/UnderComment.tsx b/apps/fo/app/components/common/UnderComment.tsx index f8a03769b..898eb861e 100644 --- a/apps/fo/app/components/common/UnderComment.tsx +++ b/apps/fo/app/components/common/UnderComment.tsx @@ -11,11 +11,10 @@ type CommentType={ } function UnderComment({commentStartPoint="☞", commentArray=[], divHeight="14"} :CommentType) { - const height = "mt-"+divHeight; if(commentArray && commentArray.length > 0){ return ( -
+
{commentArray.map((item, index) => ( diff --git a/apps/fo/app/store/dashboard/index.tsx b/apps/fo/app/store/dashboard/index.tsx index f07e8a933..460365ff3 100644 --- a/apps/fo/app/store/dashboard/index.tsx +++ b/apps/fo/app/store/dashboard/index.tsx @@ -404,7 +404,7 @@ const upHeadListDrainageEquipment : TableUpperProps[] = [ { id: "etc", title: "비고", row:0, upName:"upChangeRe7", upSequnce:1 }, ] -let operationalStatusList : OperationalStatusListProps[] = [ +const operationalStatusListOrg : OperationalStatusListProps[] = [ { flowRate : '유량\n(㎥/일)', waterQlty : '유입', @@ -1084,7 +1084,7 @@ export const dashBoardInitState:DashBoardType = { OperationStatus : { isInit : false, upHeadListOperationStatus : upHeadListOperationStatus, - operationalStatusList : operationalStatusList, + operationalStatusList : operationalStatusListOrg, isLoadingOperationStatus : false, }, @@ -1395,8 +1395,10 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType) let winterChungchunEfflMax = 1 ; let winterChungchunEfflMin = 1 ; - let rdiPercent = 0; + const clone = (arr: any[]) => arr?.map(v => ({ ...v })) ?? []; + let rdiPercent = 0; + let operationalStatusList = clone(operationalStatusListOrg); if(data && operationalStatusList){ // 유량 - 유입 if (operationalStatusList?.[0]) { @@ -1512,7 +1514,6 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType) } }); - const clone = (arr: any[]) => arr?.map(v => ({ ...v })) ?? []; const calData = CalcRainEffect(clone(res2.data), 'SUNNY'); const calRainData = CalcRainEffect(clone(res2.data), 'RAIN'); @@ -1712,10 +1713,15 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType) winterCnt += 1; }); - const winterBodAvg = winterBodSunny / winterCnt; + const roundMinSummerBodInfl = Number(roundNumber(minSummerBodInfl, 0).toString().replaceAll(',','')); + const roundMinSummerBod = Number(roundNumber(minSummerBod, 1).toString().replaceAll(',','')); + const roundWinterBodSunny = Number(roundNumber(winterBodSunny, 1).toString().replaceAll(',','')); + + const winterBodAvg = Number(roundNumber((roundWinterBodSunny / winterCnt), 1).toString().replaceAll(',','')); // 하절기(6~8월) 중 최저 유입 BOD일때 유입유량 x ((동절기 청천시 유입BOD - 하절기(6~8월) 중 최저 유입BOD) / (동절기 청천시 유입BOD)) - const winMinusSum = winterBodAvg - minSummerBod; - const rdiValue = winMinusSum===0 ? 0 : minSummerBodInfl * ((winMinusSum / winterBodAvg )); + const winMinusSum = winterBodAvg - roundMinSummerBod; + + const rdiValue = winMinusSum===0 ? 0 : roundMinSummerBodInfl * (winMinusSum / winterBodAvg ); rdiPercent = (rdiValue / minSummerBodInfl) * 100; @@ -1838,13 +1844,15 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType) } const rtnData = await calcWaterQltyData(operationalStatusList, searchYear, fcltyCd); - operationalStatusList = rtnData; // 총인설비가 없을 경우 제외 console.log('총인시설 여부 : ', data.yearData.TP_FCT_YN); + console.log('rtnData : ', rtnData); if(data.yearData.TP_FCT_YN !== 'Y') { - operationalStatusList = operationalStatusList.slice(0, 11); + operationalStatusList = rtnData.slice(0, 11); + }else{ + operationalStatusList = rtnData; } set((state: DashBoardType) => ({ ...state, diff --git a/apps/fo/app/store/rdi/index.tsx b/apps/fo/app/store/rdi/index.tsx index 601a925a0..4b344df12 100644 --- a/apps/fo/app/store/rdi/index.tsx +++ b/apps/fo/app/store/rdi/index.tsx @@ -336,11 +336,20 @@ export const rdiReducer:(set:SetStateFunction)=>RdiActions=(set: SetStateFunctio minSummerBod = minSummerBod === 99999999 ? 0 : minSummerBod; minSummerBodInfl = minSummerBodInfl === 99999999 ? 0 : minSummerBodInfl; - const winterBodAvg = winterBodSunny / winterCnt; + const roundMinSummerBodInfl = Number(roundNumber(minSummerBodInfl, 0).toString().replaceAll(',','')); + const roundMinSummerBod = Number(roundNumber(minSummerBod, 1).toString().replaceAll(',','')); + const roundWinterBodSunny = Number(roundNumber(winterBodSunny, 1).toString().replaceAll(',','')); + + console.log('bsccd : ', item.bscFctCd); + console.log('roundMinSummerBodInfl : ',roundMinSummerBodInfl); + console.log('roundMinSummerBod : ',roundMinSummerBod); + console.log('roundWinterBodSunny : ',roundWinterBodSunny); + + const winterBodAvg = Number(roundNumber((roundWinterBodSunny / winterCnt), 1).toString().replaceAll(',','')); // 하절기(6~8월) 중 최저 유입 BOD일때 유입유량 x ((동절기 청천시 유입BOD - 하절기(6~8월) 중 최저 유입BOD) / (동절기 청천시 유입BOD)) - const winMinusSum = winterBodAvg - minSummerBod; - console.log(item.bscFctCd+' '+minSummerBodInfl+' '+winMinusSum+' ('+winterBodSunny+' '+winterCnt+') '+' '+winterBodSunny) - const rdiValue = winMinusSum===0 ? 0 : minSummerBodInfl * ((winMinusSum / winterBodAvg )); + const winMinusSum = winterBodAvg - roundMinSummerBod; + + const rdiValue = winMinusSum===0 ? 0 : roundMinSummerBodInfl * (winMinusSum / winterBodAvg ); rtnWinterInflBod = winterBodAvg; rtnSummerBodInfl = minSummerBodInfl; From 6e109e970e6669223423a16cac1f47a8ce255bd7 Mon Sep 17 00:00:00 2001 From: swcho Date: Wed, 10 Sep 2025 15:24:24 +0900 Subject: [PATCH 06/46] =?UTF-8?q?refactor:=20-=20SearchModal=20=EA=BB=90?= =?UTF-8?q?=EB=8B=A4=20=ED=82=AC=20=EB=95=8C=20=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=EB=84=A4=EC=9D=B4=EC=85=98=20=EC=A0=95=EB=B3=B4=20=EC=9E=83?= =?UTF-8?q?=EC=96=B4=EB=B2=84=EB=A6=AC=EB=8A=94=20=EC=97=90=EB=9F=AC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20-=20useSearchModal.ts=20useEffect=20?= =?UTF-8?q?=EC=9D=98=EC=A1=B4=EC=84=B1=20=EB=B0=B0=EC=97=B4=EC=9D=84=20sea?= =?UTF-8?q?rchModal.tsx=20=EB=A1=9C=20=EC=9D=B4=EB=8F=99=20-=20import=20?= =?UTF-8?q?=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map/searchModal/operationTab.tsx | 6 +-- .../map/searchModal/reportFilesModal.tsx | 3 +- .../map/searchModal/searchModal.tsx | 37 +++++++++++++++---- .../(map-layout)/map/searchModal/stofcbr.tsx | 1 - .../(map-layout)/map/searchModal/swageMhl.tsx | 1 - .../map/searchModal/swagePmstn.tsx | 1 - .../(map-layout)/map/searchModal/swagePpl.tsx | 1 - .../map/searchModal/swagePrcsFclt.tsx | 1 - .../map/searchModal/useBasicTab.ts | 6 +-- .../map/searchModal/useOperationTab.ts | 10 ++--- .../map/searchModal/useSearchModal.ts | 32 ++-------------- apps/sn/app/store/useSearchModalStore.ts | 1 - 12 files changed, 43 insertions(+), 57 deletions(-) diff --git a/apps/sn/app/(map-layout)/map/searchModal/operationTab.tsx b/apps/sn/app/(map-layout)/map/searchModal/operationTab.tsx index c77cc58cc..9f1711cf6 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/operationTab.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/operationTab.tsx @@ -1,9 +1,9 @@ -import React, { use } from 'react'; +import React from 'react'; import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; import { SelectBox } from '@common/business_components/ui'; import { Button, Input, Label } from '@common/components'; -import useStore from '../../../store/useStore'; -import useSearchModalStore from '../../../store/useSearchModalStore'; +import useStore from '@/store/useStore'; +import useSearchModalStore from '@/store/useSearchModalStore'; import useSearchModal from './useSearchModal'; import useOperationTab from './useOperationTab'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/reportFilesModal.tsx b/apps/sn/app/(map-layout)/map/searchModal/reportFilesModal.tsx index 62c62b811..473c4abcb 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/reportFilesModal.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/reportFilesModal.tsx @@ -1,6 +1,5 @@ 'use client' -import React, { useEffect, useState } from 'react'; - +import React, { useEffect } from 'react'; import LoadingOverlay from '@/components/ui/LoadingBar'; import useReportTab from './useReportTab'; import { useReportTabStore } from '@/store/useReportTabStore'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx b/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx index da1f05169..4b91b869e 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx @@ -1,12 +1,10 @@ import LoadingOverlay from '@/components/ui/LoadingBar'; import { UiModal, UITab, UiTable } from '@common/business_components/ui'; import { Button } from '@common/components/ui'; -import React, { useMemo } from 'react'; +import React, { useEffect, useMemo } from 'react'; import { Toaster } from "react-hot-toast"; -import useSearchModalStore from '../../../store/useSearchModalStore'; -import { - ExclnSewagePumpCol2, MsSwageMhlCol2, MsSwagePplCol2, stofcbrCol2, SwtrmtFcltCol2, SwtrmtPrcsZoneCol2 -} from '../components/common/table'; +import useSearchModalStore from '@/store/useSearchModalStore'; +import { ExclnSewagePumpCol2, MsSwageMhlCol2, MsSwagePplCol2, stofcbrCol2, SwtrmtFcltCol2, SwtrmtPrcsZoneCol2 } from '../components/common/table'; import BasicTab, { BASIC_TYPES } from './basicTab'; import OperationTab from './operationTab'; import ReportTab from './reportTab'; @@ -16,18 +14,24 @@ import useOperationTab from './useOperationTab'; const SearchModal: React.FC = () => { const { + showTable, isSearchModalOpen, setIsSearchModalOpen, activeTab, basicType, workType, tableData, detailTableData, tableCount, detailTableCount, curPage, detailCurPage, + detailBizId, isLoading, isDetailLoading, isResetPage, isResetDetailPage, isResetSelection, isResetDetailSelection, setActiveTab, setCurPage, setDetailCurPage, + setIsResetPage, setIsResetDetailPage, + setDetailBizId, + setIsResetDetailSelection, + resetFilters } = useSearchModalStore(); - const { TABS, viewMultipleFeature } = useSearchModal(); + const { TABS, viewMultipleFeature, fetchFilteredData } = useSearchModal(); const { handleBasicCellClick, basicExcelDownload } = useBasicTab(); const { WORK_TYPES, @@ -39,7 +43,8 @@ const SearchModal: React.FC = () => { handleOperationCellClick, handleOperationResultCellClick, operationExcelDownload, - operationResultExcelDownload + operationResultExcelDownload, + handleOperationPageNation } = useOperationTab(); @@ -69,6 +74,24 @@ const SearchModal: React.FC = () => { return []; }, [activeTab, workType]); + useEffect(() => { + resetFilters(); + }, [activeTab, basicType, workType]); + + // 페이지 변경 시마다 데이터 fetch + useEffect(() => { + setIsResetPage(false); + setIsResetDetailPage(true); + setDetailBizId(0); + if (showTable) fetchFilteredData(); + }, [curPage]); + + // 페이지 변경 시마다 데이터 fetch + useEffect(() => { + setIsResetDetailSelection(false); + if (showTable) handleOperationPageNation(Number(detailBizId)); + }, [detailCurPage]); + const renderBody = () => ( <> diff --git a/apps/sn/app/(map-layout)/map/searchModal/stofcbr.tsx b/apps/sn/app/(map-layout)/map/searchModal/stofcbr.tsx index 11c4c8bfa..4aa510545 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/stofcbr.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/stofcbr.tsx @@ -1,5 +1,4 @@ // 우수토실 - import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; import { Button } from '@common/components'; import React from 'react'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx b/apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx index 04ffeb1fa..a16500a34 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx @@ -1,5 +1,4 @@ // 하수맨홀 - import React from 'react'; import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; import { Button, Input, Label } from '@common/components'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/swagePmstn.tsx b/apps/sn/app/(map-layout)/map/searchModal/swagePmstn.tsx index f3eef5d66..5e7e7d3d1 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/swagePmstn.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/swagePmstn.tsx @@ -1,5 +1,4 @@ // 하수펌프장 - import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; import { Button, Input, Label } from '@common/components'; import React from 'react'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/swagePpl.tsx b/apps/sn/app/(map-layout)/map/searchModal/swagePpl.tsx index 0a79d8f81..9d9df92cb 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/swagePpl.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/swagePpl.tsx @@ -1,5 +1,4 @@ // 하수관로 - import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; import { SelectBox } from '@common/business_components/ui'; import { Button, Input, Label } from '@common/components'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/swagePrcsFclt.tsx b/apps/sn/app/(map-layout)/map/searchModal/swagePrcsFclt.tsx index 97486e4a3..4b62edde2 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/swagePrcsFclt.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/swagePrcsFclt.tsx @@ -1,5 +1,4 @@ // 하수처리시설 - import React from 'react'; import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; import { Button, Input, Label } from '@common/components'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts b/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts index 1d49529da..e7e8af8e9 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts +++ b/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts @@ -186,15 +186,13 @@ export default function useBasicTab() { if (cqlFilters.length > 0) queryParams.append('cqlFiter', cqlFilters.join(' and ')); const res = await getData(`v1/fclts?${queryParams.toString()}`); - // const res = await axios.get(`${API_URL}/v1/fclts?${queryParams.toString()}`); - console.log('onDownload res', res); const mhlUsgCdMap = new Map(MS_SWAGE_MHL_USE_CODES.map(code => [code.val?.trim(), code.text])); const pplUsgCdMap = new Map(MS_SWAGE_PPL_USE_CODES.map(code => [code.val?.trim(), code.text])); const ctpvMap = new Map(ctpv.map(code => [code.val?.trim(), code.text])); const sggMap = new Map(sgg.map(code => [code.val?.trim(), code.text])); - const mappedContent = (res.data.data || []).map((item: any) => { + const mappedContent = (res.data || []).map((item: any) => { const formattedItem = formatDisplayData(item); let ctpvCd = item?.ctpvCd ?? formattedItem?.ctpvCd ?? ''; @@ -306,8 +304,6 @@ export default function useBasicTab() { const label = BASIC_TYPES.find((type) => type.val === basicType)?.text const fileName = `${label} 조회 결과_${todayYear}${todayMonth}${todayDate}`; - console.log(`excelData: ${excelData}, label: ${label}, fileName: ${fileName}`); - await downloadExcelWithKoreanHeaders({ data: excelData as JSON[], fileName: fileName, diff --git a/apps/sn/app/(map-layout)/map/searchModal/useOperationTab.ts b/apps/sn/app/(map-layout)/map/searchModal/useOperationTab.ts index dd7b8d3cc..d7709af85 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/useOperationTab.ts +++ b/apps/sn/app/(map-layout)/map/searchModal/useOperationTab.ts @@ -347,15 +347,13 @@ export default function useOperationTab() { try { const RequestDTO: Record = { - size: '10000', + size: '100', bizId: String(detailBizId), }; - - const apiStartTime = performance.now(); + const res = await getData(`v1/bizInfo/fclts?${new URLSearchParams(RequestDTO).toString()}`); - const apiEndTime = performance.now(); - - const mappingStartTime = performance.now(); + console.log('res', res); + // 헤더 매핑 정의 const headerMapping: { [key: string]: string } = { 'fcltMngNo': '관리번호', diff --git a/apps/sn/app/(map-layout)/map/searchModal/useSearchModal.ts b/apps/sn/app/(map-layout)/map/searchModal/useSearchModal.ts index ba376290d..76d1b88ce 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/useSearchModal.ts +++ b/apps/sn/app/(map-layout)/map/searchModal/useSearchModal.ts @@ -1,4 +1,3 @@ -import { useEffect } from 'react'; import { getData } from "@/components/lib/api"; import { formatDisplayData } from '@/components/lib/utils/formatDisplayValue'; import useStore from '../../../store/useStore'; @@ -9,11 +8,9 @@ import useOperationTab from './useOperationTab'; export default function useSearchModal() { const { - activeTab, basicType, workType, - showTable, + activeTab, workType, tableData, detailTableData, - curPage, detailCurPage, - detailBizId, + curPage, var1, var2, yearFilter, todayYear, todayMonth, todayDate, @@ -25,12 +22,10 @@ export default function useSearchModal() { setIsLoading, setIsResetPage, setIsResetDetailPage, setIsResetSelection, setIsResetDetailSelection, - setDetailBizId, - resetFilters, getDateString } = useSearchModalStore(); const { fetchBasicFilteredData } = useBasicTab(); - const { OPERATION_TABLE_SIZE, handleOperationPageNation } = useOperationTab(); + const { OPERATION_TABLE_SIZE } = useOperationTab(); const { BIZ_TY_CD } = useStore(); const TABS = [ @@ -39,25 +34,6 @@ export default function useSearchModal() { { val: "report", text: "하수도정비기본계획보고서" }, ]; - useEffect(() => { - resetFilters(); - }, [activeTab, basicType, workType]); - - // 페이지 변경 시마다 데이터 fetch - useEffect(() => { - setIsResetPage(false); - setIsResetDetailPage(true); - setDetailBizId(0); - console.log(`curPage: ${curPage}, showTable: ${showTable}`); - if (showTable && curPage > 1) fetchFilteredData(); - }, [curPage]); - - // 페이지 변경 시마다 데이터 fetch - useEffect(() => { - setIsResetDetailSelection(false); - if (showTable) handleOperationPageNation(Number(detailBizId)); - }, [detailCurPage]); - // 검색 API 호출 함수 const fetchFilteredData = async () => { setIsLoading(true); // 로딩 시작 @@ -167,5 +143,5 @@ export default function useSearchModal() { } } - return { TABS, getDateString, handleSearch, viewMultipleFeature }; + return { TABS, getDateString, handleSearch, viewMultipleFeature, fetchFilteredData }; }; diff --git a/apps/sn/app/store/useSearchModalStore.ts b/apps/sn/app/store/useSearchModalStore.ts index acb93969d..a4b99b420 100644 --- a/apps/sn/app/store/useSearchModalStore.ts +++ b/apps/sn/app/store/useSearchModalStore.ts @@ -1,5 +1,4 @@ import { create } from "zustand"; -import { type SelectDataType } from "@common/business_components"; // 날짜 조합 함수 From 32939d8b1a986f0e5203aa1ae3ab859a61de2a8c Mon Sep 17 00:00:00 2001 From: jsyang Date: Thu, 11 Sep 2025 11:15:58 +0900 Subject: [PATCH 07/46] =?UTF-8?q?=EB=8C=80=EC=8B=9C=EB=B3=B4=EB=93=9C=20?= =?UTF-8?q?=EC=B4=9D=EC=9D=B8=EC=84=A4=EB=B9=84=20=EA=B3=84=EC=82=B0=20?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/fo/app/store/dashboard/index.tsx | 66 ++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/apps/fo/app/store/dashboard/index.tsx b/apps/fo/app/store/dashboard/index.tsx index 460365ff3..0e0065067 100644 --- a/apps/fo/app/store/dashboard/index.tsx +++ b/apps/fo/app/store/dashboard/index.tsx @@ -753,31 +753,40 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl // (0) 전체변수 let summerDay = 0; + let noNullSummerDay = 0; let totalInflBodAvgSummer = 0; let totalInflTnAvgSummer = 0; let totalInflTpAvgSummer = 0; let totalEfflBodAvgSummer = 0; let totalEfflTnAvgSummer = 0; let totalEfflTpAvgSummer = 0; + let totalTpInflAvgSummer = 0; let winterDay = 0; + let noNullWinterDay = 0; let totalInflBodAvgWinter = 0; let totalInflTnAvgWinter = 0; let totalInflTpAvgWinter = 0; let totalEfflBodAvgWinter = 0; let totalEfflTnAvgWinter = 0; let totalEfflTpAvgWinter = 0; + let totalTpInflAvgWinter = 0; // 전체 대상 qltyData.forEach((item: any) => { const month = item.msrDt.substring(4, 6); // 월 추출 if(month === '01' || month === '02'){ + winterDay += 1; + if(item.tpInflWqltTp != null && item.tpInflWqltTp != 0){ + noNullWinterDay+=1; + } const inflbod = nullToZero(item.inflAssctBfrWqltBod); const infltn = nullToZero(item.inflAssctBfrWqltTn); const infltp = nullToZero(item.inflAssctBfrWqltTp); const effbod = nullToZero(item.efflWqltBod); const efftn = nullToZero(item.efflWqltTn); const efftp = nullToZero(item.efflWqltTp); + const tpInfl = nullToZero(item.tpInflWqltTp); totalInflBodAvgWinter += inflbod; totalInflTnAvgWinter += infltn; @@ -785,15 +794,19 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl totalEfflBodAvgWinter += effbod; totalEfflTnAvgWinter += efftn; totalEfflTpAvgWinter += efftp; - winterDay += 1; + totalTpInflAvgWinter += tpInfl; }else if(month === '06' || month === '07' || month === '08'){ summerDay += 1; + if(item.tpInflWqltTp != null && item.tpInflWqltTp != 0){ + noNullSummerDay+=1; + } const inflbod = nullToZero(item.inflAssctBfrWqltBod); const infltn = nullToZero(item.inflAssctBfrWqltTn); const infltp = nullToZero(item.inflAssctBfrWqltTp); const effbod = nullToZero(item.efflWqltBod); const efftn = nullToZero(item.efflWqltTn); const efftp = nullToZero(item.efflWqltTp); + const tpInfl = nullToZero(item.tpInflWqltTp); totalInflBodAvgSummer += inflbod; totalInflTnAvgSummer += infltn; @@ -801,6 +814,7 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl totalEfflBodAvgSummer += effbod; totalEfflTnAvgSummer += efftn; totalEfflTpAvgSummer += efftp; + totalTpInflAvgSummer += tpInfl; } }); @@ -811,6 +825,10 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl orgData[9].winterAll = qltyDataSetting(totalInflTpAvgWinter, winterDay, 3); orgData[10].winterAll = qltyDataSetting(totalEfflTpAvgWinter, winterDay, 3); + //총인설비 + orgData[11].winterAll = qltyDataSetting(totalTpInflAvgWinter, noNullWinterDay, 3); + orgData[12].winterAll = qltyDataSetting(totalEfflTpAvgWinter, winterDay, 3); + orgData[5].summerAll = qltyDataSetting(totalInflBodAvgSummer, summerDay, 1); orgData[6].summerAll = qltyDataSetting(totalEfflBodAvgSummer, summerDay, 1); orgData[7].summerAll = qltyDataSetting(totalInflTnAvgSummer, summerDay, 3); @@ -818,10 +836,16 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl orgData[9].summerAll = qltyDataSetting(totalInflTpAvgSummer, summerDay, 3); orgData[10].summerAll = qltyDataSetting(totalEfflTpAvgSummer, summerDay, 3); + //총인설비 + orgData[11].summerAll = qltyDataSetting(totalTpInflAvgSummer, noNullSummerDay, 3); + orgData[12].summerAll = qltyDataSetting(totalEfflTpAvgSummer, summerDay, 3); + // (1) 청천시 변수 // (1-1) 날짜 count let chungchunSummerDay = 0; let chungchunWinterDay = 0; + let noNullChungchunSummerDay = 0; + let noNullChungchunWinterDay = 0; // (1-2) 하절기 let chungchunInflBodAvgSummer = 0; @@ -830,17 +854,21 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl let chungchunEfflBodAvgSummer = 0; let chungchunEfflTnAvgSummer = 0; let chungchunEfflTpAvgSummer = 0; + let chungchunTpInflAvgSummer = 0; // (1-3) 동절기 (최대, 최소, 평균 다 필요) let chungchunInflBodAvg = 0; let chungchunInflTnAvg = 0; let chungchunInflTpAvg = 0; + let chungchunTpInflAvg = 0; let chungchunInflBodMax = 0; let chungchunInflTnMax= 0; let chungchunInflTpMax = 0; + let chungchunTpInflMax = 0; let chungchunInflBodMin = 99999999; let chungchunInflTnMin = 99999999; let chungchunInflTpMin = 99999999; + let chungchunTpInflMin = 99999999; let chungchunEfflBodAvg = 0; let chungchunEfflTnAvg = 0; @@ -857,6 +885,9 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl const month = item.msrDt.substring(4, 6); // 월 추출 if(month === '01' || month === '02'){ chungchunWinterDay += 1; + if(item.tpInflWqltTp != null && item.tpInflWqltTp != 0){ + noNullChungchunWinterDay+=1; + } const inflbod = nullToZero(item.inflAssctBfrWqltBod); const infltn = nullToZero(item.inflAssctBfrWqltTn); @@ -864,10 +895,12 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl const effbod = nullToZero(item.efflWqltBod); const efftn = nullToZero(item.efflWqltTn); const efftp = nullToZero(item.efflWqltTp); + const tpInfl = nullToZero(item.tpInflWqltTp); chungchunInflBodAvg += inflbod; chungchunInflTnAvg += infltn; chungchunInflTpAvg += infltp; + chungchunTpInflAvg += tpInfl; chungchunEfflBodAvg += effbod; chungchunEfflTnAvg += efftn; chungchunEfflTpAvg += efftp; @@ -875,6 +908,7 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl if(chungchunInflBodMax < inflbod) chungchunInflBodMax = inflbod; if(chungchunInflTnMax < infltn) chungchunInflTnMax = infltn; if(chungchunInflTpMax < infltp) chungchunInflTpMax = infltp; + if(chungchunTpInflMax < tpInfl) chungchunTpInflMax = tpInfl; if(chungchunEfflBodMax < effbod) chungchunEfflBodMax = effbod; if(chungchunEfflTnMax < efftn) chungchunEfflTnMax = efftn; if(chungchunEfflTpMax < efftp) chungchunEfflTpMax = efftp; @@ -882,11 +916,15 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl if(chungchunInflBodMin > inflbod) chungchunInflBodMin = inflbod; if(chungchunInflTnMin > infltn) chungchunInflTnMin = infltn; if(chungchunInflTpMin > infltp) chungchunInflTpMin = infltp; + if(chungchunTpInflMin > tpInfl) chungchunTpInflMin = tpInfl; if(chungchunEfflBodMin > effbod) chungchunEfflBodMin = effbod; if(chungchunEfflTnMin > efftn) chungchunEfflTnMin = efftn; if(chungchunEfflTpMin > efftp) chungchunEfflTpMin = efftp; }else if(month === '06' || month === '07' || month === '08'){ chungchunSummerDay += 1; + if(item.tpInflWqltTp != null && item.tpInflWqltTp != 0){ + noNullChungchunSummerDay+=1; + } const inflbod = nullToZero(item.inflAssctBfrWqltBod); const infltn = nullToZero(item.inflAssctBfrWqltTn); @@ -894,6 +932,7 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl const effbod = nullToZero(item.efflWqltBod); const efftn = nullToZero(item.efflWqltTn); const efftp = nullToZero(item.efflWqltTp); + const tpInfl = nullToZero(item.tpInflWqltTp); chungchunInflBodAvgSummer += inflbod; chungchunInflTnAvgSummer += infltn; @@ -901,6 +940,7 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl chungchunEfflBodAvgSummer += effbod; chungchunEfflTnAvgSummer += efftn; chungchunEfflTpAvgSummer += efftp; + chungchunTpInflAvgSummer += tpInfl; } }); @@ -913,6 +953,10 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl orgData[9].summerRain = qltyDataSetting(chungchunInflTpAvgSummer, chungchunSummerDay, 3); orgData[10].summerRain = qltyDataSetting(chungchunEfflTpAvgSummer, chungchunSummerDay, 3); + // 총인설비 + orgData[11].summerRain = qltyDataSetting(chungchunTpInflAvgSummer, noNullChungchunSummerDay, 3); + orgData[12].summerRain = qltyDataSetting(chungchunEfflTpAvgSummer, chungchunSummerDay, 3); + // 동절기 orgData[5].winterSunnyAvg = qltyDataSetting(chungchunInflBodAvg, chungchunWinterDay, 1); orgData[6].winterSunnyAvg = qltyDataSetting(chungchunEfflBodAvg, chungchunWinterDay, 1); @@ -921,12 +965,18 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl orgData[9].winterSunnyAvg = qltyDataSetting(chungchunInflTpAvg, chungchunWinterDay, 3); orgData[10].winterSunnyAvg = qltyDataSetting(chungchunEfflTpAvg, chungchunWinterDay, 3); + // 총인설비 + orgData[11].winterSunnyAvg = qltyDataSetting(chungchunTpInflAvg, noNullChungchunWinterDay, 3); + orgData[12].winterSunnyAvg = qltyDataSetting(chungchunInflTpAvg, chungchunWinterDay, 3); + orgData[5].winterSunnyMax = roundUp(chungchunInflBodMax, 1).toFixed(1); orgData[6].winterSunnyMax = roundUp(chungchunEfflBodMax, 1).toFixed(1); orgData[7].winterSunnyMax = roundUp(chungchunInflTnMax, 3).toFixed(3); orgData[8].winterSunnyMax = roundUp(chungchunEfflTnMax, 3).toFixed(3); orgData[9].winterSunnyMax = roundUp(chungchunInflTpMax, 3).toFixed(3); orgData[10].winterSunnyMax = roundUp(chungchunEfflTpMax, 3).toFixed(3); + orgData[11].winterSunnyMax = roundUp(chungchunTpInflMax, 3).toFixed(3); + orgData[12].winterSunnyMax = roundUp(chungchunInflTpMax, 3).toFixed(3); orgData[5].winterSunnyMin = chungchunInflBodMin === 99999999 ? '0.0' : roundUp(chungchunInflBodMin, 1).toFixed(1); orgData[6].winterSunnyMin = chungchunEfflBodMin === 99999999 ? '0.0' : roundUp(chungchunEfflBodMin, 1).toFixed(1); @@ -934,9 +984,12 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl orgData[8].winterSunnyMin = chungchunEfflTnMin === 99999999 ? '0.000' : roundUp(chungchunEfflTnMin, 3).toFixed(3); orgData[9].winterSunnyMin = chungchunInflTpMin === 99999999 ? '0.000' : roundUp(chungchunInflTpMin, 3).toFixed(3); orgData[10].winterSunnyMin = chungchunEfflTpMin === 99999999 ? '0.000' : roundUp(chungchunEfflTpMin, 3).toFixed(3); + orgData[11].winterSunnyMin = chungchunTpInflMin === 99999999 ? '0.000' : roundUp(chungchunTpInflMin, 3).toFixed(3); + orgData[12].winterSunnyMin = chungchunInflTpMin === 99999999 ? '0.000' : roundUp(chungchunInflTpMin, 3).toFixed(3); // 강우시 변수 let rainSummerDay = 0; + let noNullRainSummerDay = 0; let rainInflBodAvg = 0; let rainInflTnAvg = 0; @@ -944,12 +997,16 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl let rainEfflBodAvg = 0; let rainEfflTnAvg = 0; let rainEfflTpAvg = 0; + let rainTpInflAvg = 0; // 강우시 qltyRainData.forEach((item: any) => { const month = item.msrDt.substring(4, 6); // 월 추출 if(month === '06' || month === '07' || month === '08'){ rainSummerDay += 1; + if(item.tpInflWqltTp != null && item.tpInflWqltTp != 0){ + noNullRainSummerDay+=1; + } const inflbod = nullToZero(item.inflAssctBfrWqltBod); const infltn = nullToZero(item.inflAssctBfrWqltTn); @@ -957,6 +1014,7 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl const effbod = nullToZero(item.efflWqltBod); const efftn = nullToZero(item.efflWqltTn); const efftp = nullToZero(item.efflWqltTp); + const tpInfl = nullToZero(item.tpInflWqltTp); rainInflBodAvg += inflbod; rainInflTnAvg += infltn; @@ -964,6 +1022,7 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl rainEfflBodAvg += effbod; rainEfflTnAvg += efftn; rainEfflTpAvg += efftp; + rainTpInflAvg += tpInfl; } }); @@ -974,6 +1033,11 @@ const calcWaterQltyData = async (data: any[], searchYear : string|undefined, fcl orgData[8].summerThree = qltyDataSetting(rainEfflTnAvg, rainSummerDay, 3); orgData[9].summerThree = qltyDataSetting(rainInflTpAvg, rainSummerDay, 3); orgData[10].summerThree = qltyDataSetting(rainEfflTpAvg, rainSummerDay, 3); + + // 총인설비 + orgData[11].summerThree = qltyDataSetting(rainTpInflAvg, noNullRainSummerDay, 3); + orgData[12].summerThree = qltyDataSetting(rainInflTpAvg, rainSummerDay, 3); + return orgData; } else { return orgData; From b93efa5503b3d5de8418eabc7b7605f5f398d994 Mon Sep 17 00:00:00 2001 From: jsyang Date: Thu, 11 Sep 2025 11:17:37 +0900 Subject: [PATCH 08/46] =?UTF-8?q?=EB=9D=BC=EC=9D=B8=EB=B0=94,=20=EB=9D=BC?= =?UTF-8?q?=EC=9D=B8=EC=B0=A8=ED=8A=B8=20x=EC=B6=95=20=EB=9D=BC=EB=B2=A8?= =?UTF-8?q?=20=ED=81=AC=EA=B8=B0=20=ED=99=95=EB=8C=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business_components/src/ui/chart/LineBarChart.tsx | 4 ++-- .../common/business_components/src/ui/chart/LineChart.tsx | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/common/business_components/src/ui/chart/LineBarChart.tsx b/packages/common/business_components/src/ui/chart/LineBarChart.tsx index f26cb976c..271629e6a 100644 --- a/packages/common/business_components/src/ui/chart/LineBarChart.tsx +++ b/packages/common/business_components/src/ui/chart/LineBarChart.tsx @@ -210,8 +210,8 @@ export default function LineBarchart({ > {setXAxisYearTick? - value.slice(0,7)} fontSize="8px" fontWeight="bold"/> : - + value.slice(0,7)} className="text-[12px] font-bold" /> : + } {/* 왼쪽 Y축: lineVal */} {yFieldText && value.slice(0,7)} /> : } From 675a1a09fa689b71b6dd2848fb46100ac30bf322 Mon Sep 17 00:00:00 2001 From: ljpark Date: Thu, 11 Sep 2025 12:42:23 +0900 Subject: [PATCH 09/46] =?UTF-8?q?/api/proxy=20=EB=AF=B8=EB=93=A4=EC=9B=A8?= =?UTF-8?q?=EC=96=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/sn/middleware.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/sn/middleware.ts b/apps/sn/middleware.ts index 8a1a2e716..16b9c7d5a 100644 --- a/apps/sn/middleware.ts +++ b/apps/sn/middleware.ts @@ -50,6 +50,14 @@ export function middleware(req: NextRequest) { return rewriteWith(newUrl, req, true); } + if (pathname.startsWith("/api/proxy")) { + const decodedQuery = toDecodedQueryString(searchParams); + const newUrl = `${SERVER_API_URL}${pathname}${decodedQuery ? `?${decodedQuery}` : "" + }`; + console.log(`[Middleware] Rewriting from '/server' path to: ${newUrl}`); + return rewriteWith(newUrl, req, true); + } + if (pathname.startsWith("/geoserver")) { let queryParams = searchParams.toString(); const typename = searchParams.get("TYPENAME"); From c17da8266146ef1bbd77d969f4e44309531cde0f Mon Sep 17 00:00:00 2001 From: jsyang Date: Fri, 12 Sep 2025 13:54:20 +0900 Subject: [PATCH 10/46] =?UTF-8?q?=EB=AF=B8=EC=B2=98=EB=A6=AC=ED=95=98?= =?UTF-8?q?=EC=88=98=EB=9F=89=20=EC=A0=9C=EA=B1=B0(=EC=A3=BC=EC=84=9D?= =?UTF-8?q?=ED=8F=AC=ED=95=A8),=20=EA=B0=95=EC=9A=B0=EB=9F=89=20=EB=A9=94?= =?UTF-8?q?=EC=9D=B8,=EB=AA=A8=EB=8B=AC=20=EC=88=98=EC=B9=98=20=EB=8B=A4?= =?UTF-8?q?=EB=A5=B8=EA=B1=B0=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../facilityPrecipitation/modal/page.tsx | 2 ++ .../facilityWaterQlty/modal/page.tsx | 13 ++----- .../(with-layout)/flowRate/modal/page.tsx | 11 +----- apps/fo/app/store/dashboard/index.tsx | 1 + .../app/store/facilityPrecipitation/index.tsx | 36 ++++++++----------- apps/fo/app/store/facilityWaterQlty/index.tsx | 30 ++++++++-------- apps/fo/app/store/flowRate/index.tsx | 1 - 7 files changed, 35 insertions(+), 59 deletions(-) diff --git a/apps/fo/app/pages/(with-layout)/facilityPrecipitation/modal/page.tsx b/apps/fo/app/pages/(with-layout)/facilityPrecipitation/modal/page.tsx index bb430d0ba..1f50a9ffe 100644 --- a/apps/fo/app/pages/(with-layout)/facilityPrecipitation/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/facilityPrecipitation/modal/page.tsx @@ -105,6 +105,8 @@ export default function PrecipitationModal(props: PrecipitationModalProps) { const getTableData = () => { const totals = calculateTotals(); + totals.infoRnDay = roundNumber(totals.infoRnDay, 1); + return [ { bscFctCd: "", diff --git a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx index 33530a6fd..eedd52b37 100644 --- a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx @@ -10,18 +10,11 @@ import { HeadMakeColSpan } from "../HeadMakeColSpan"; import { roundNumber } from "@/app/components/common/DataForm"; import UnderComment from "@/app/components/common/UnderComment"; -const commentArrayDefault = [ - "미처리하수량 =[(강우시 일별유입유량*강우시 일별유입BOD)-(청천시 연평균유입유량*청천시 연평균유입BOD)]​ / (강우시 일별유입BOD)​", - "음수값 발생시 제외(null, 평균값 산정시 제외)" -]; - const commentArrayChungchun = [ - ...commentArrayDefault, "청천시 : 강우량이 3mm미만의 날" ]; const commentArrayRain = [ - ...commentArrayDefault, "강우량 3mm 이상만 날과 강우영향일(강우일+2일)의 날" ]; @@ -460,7 +453,6 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe
- @@ -488,7 +480,6 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe
- @@ -516,7 +507,7 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe
- + @@ -544,7 +535,7 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe
- + diff --git a/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx b/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx index f82f92835..d6166133f 100644 --- a/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx @@ -10,11 +10,6 @@ import { roundUp } from "@/app/store/common"; import { roundNumber } from "@/app/components/common/DataForm"; import UnderComment from "@/app/components/common/UnderComment"; -const commentDefault = [ - "미처리하수량 =[(강우시 일별유입유량*강우시 일별유입BOD)-(청천시 연평균유입유량*청천시 연평균유입BOD)]​ / (강우시 일별유입BOD)​" , - "음수값 발생시 제외(null, 평균값 산정시 제외)" -]; - const tabList = [ { value: 'tab_term_year', label: '연간' }, { value: 'tab_term_summer', label: '하절기' }, @@ -231,7 +226,6 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st boldArray={[0,1,2]} />
- @@ -256,7 +250,6 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st boldArray={[0,1,2]} /> - @@ -281,7 +274,6 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st boldArray={[0,1,2]} /> - @@ -306,7 +298,6 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st boldArray={[0,1,2]} /> - @@ -321,7 +312,7 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st
{}} className="h-[370px]" boldArray={[0,1,2]}/>
- +
diff --git a/apps/fo/app/store/dashboard/index.tsx b/apps/fo/app/store/dashboard/index.tsx index 0e0065067..75a8fe3ae 100644 --- a/apps/fo/app/store/dashboard/index.tsx +++ b/apps/fo/app/store/dashboard/index.tsx @@ -26,6 +26,7 @@ export type TableUpperProps = { row? : number; rowSpan?: number; colSpan?: number; + widthPercent? : number; } // ===TAB1 diff --git a/apps/fo/app/store/facilityPrecipitation/index.tsx b/apps/fo/app/store/facilityPrecipitation/index.tsx index 77a053fc5..cbd824ff8 100644 --- a/apps/fo/app/store/facilityPrecipitation/index.tsx +++ b/apps/fo/app/store/facilityPrecipitation/index.tsx @@ -1,6 +1,7 @@ -import DataForm from "@/app/components/common/DataForm"; -import type { TableUpperProps } from "../dashboard"; import { getFetch } from "@/app/components/api"; +import CalcRainEffect from "@/app/components/common/CalcRainEffect"; +import { roundNumber } from "@/app/components/common/DataForm"; +import type { TableUpperProps } from "../dashboard"; export type { TableUpperProps }; /**==================================== * Store - 타입 @@ -155,14 +156,15 @@ const fetchFacilityPrecipitationList = async (pageNo: number, pageSize: number, }) } } - + res.data.map((item: FacilityPrecipitationProps) => { const filteredList = tmpData.filter((gridItem) => { - return gridItem.bscFctCd === item.bscFctCd; + return gridItem.bscFctCd === item.bscFctCd; }); - item.rainEffectDay = filteredList.reduce((acc, curr) => acc + curr.rainEffectDay, 0); - item.totalYearRain = filteredList.reduce((acc, curr) => acc + curr.infoRnDay, 0); + const rtnData = CalcRainEffect(filteredList); + item.rainEffectDay = rtnData.reduce((acc, curr) => acc + curr.rainEffectDay, 0); + item.totalYearRain = rtnData.reduce((acc, curr) => acc + Number(curr.infoRnDay), 0); item.infoRnDay = filteredList.reduce((acc, curr) => acc + curr.rainDay, 0); }); @@ -178,11 +180,6 @@ export type FacilityPrecipitationActions = { searchFacilityPrecipitationList: (pageNo: number, pageSize: number, searchYear: string, part?: string, nameCd?: string, fcltCpct?: string, operationValue?: string, fcltyNm?: string) => void; } -const dataFormSetting=(item : FacilityPrecipitationProps)=> { - DataForm({ type: 'number', column: 'fctCpc', item: item as unknown as Record }); - DataForm({ type: 'float1', column: 'totalYearRain', item: item as unknown as Record}); -}; - export type FacilityPrecipitationType = { FacilityPrecipitationSearch: { isInit: boolean; @@ -246,13 +243,16 @@ export const facilityPrecipitationReducer:(set:(fn: (state: FacilityPrecipitatio const res = await fetchFacilityPrecipitationList(pageNo, pageSize, searchYear, part, nameCd, fcltCpct, operationValue, fcltyNm); const data = res.data; + + data.forEach(item => { + item.fctCpc = roundNumber(item.fctCpc, 0); + item.totalYearRain = roundNumber(item.totalYearRain, 1); + }); + const excelDownList: ExcelType[] = []; if(pageSize>5000){ data.forEach((item: FacilityPrecipitationProps) => { - dataFormSetting(item) - item.fctCpc = item.fctCpc ? parseFloat(item.fctCpc.toString().replace(/,/g, '')) : 0; - item.totalYearRain = item.totalYearRain ? parseFloat(item.totalYearRain.toString().replace(/,/g, '')) : 0; excelDownList.push({ 시설코드: item.bscFctCd, 권역: item.rvbsn, @@ -270,18 +270,12 @@ export const facilityPrecipitationReducer:(set:(fn: (state: FacilityPrecipitatio "연간총강수량(mm)": item.totalYearRain, }) }) - }else{ - data.forEach((item: FacilityPrecipitationProps) => { - dataFormSetting(item) - item.fctCpc = item.fctCpc ? parseFloat(item.fctCpc.toString().replace(/,/g, '')) : 0; - item.totalYearRain = item.totalYearRain ? parseFloat(item.totalYearRain.toString().replace(/,/g, '')) : 0; - }) } set((state:FacilityPrecipitationType) => ({ ...state, FacilityPrecipitation: pageSize<5000?{ ...state.FacilityPrecipitation, - facilityPrecipitation: res.data, + facilityPrecipitation: data, facilityPrecipitationCount: res.count, isLoading : false, }:{ diff --git a/apps/fo/app/store/facilityWaterQlty/index.tsx b/apps/fo/app/store/facilityWaterQlty/index.tsx index bcfb6326c..9c9ed29c6 100644 --- a/apps/fo/app/store/facilityWaterQlty/index.tsx +++ b/apps/fo/app/store/facilityWaterQlty/index.tsx @@ -129,23 +129,23 @@ const mainLabelArray: string[] = ['구분', '시도', '시군구', '용량별', // 시설수질리스트 헤더(행정별) const upHeadList1: TableUpperProps[] = [ { id: "C", title: "행정명", colSpan: 2, row: 0 }, - { id: "sidoNm", title: "시도", row: 1 }, - { id: "sggNm", title: "시군구", row: 1 }, - { id: "bscFctNm", title: "시설명", rowSpan: 2, row: 0 }, + { id: "sidoNm", title: "시도", row: 1, widthPercent:8 }, + { id: "sggNm", title: "시군구", row: 1, widthPercent:8 }, + { id: "bscFctNm", title: "시설명", rowSpan: 2, row: 0, widthPercent: 10 }, { id: "addr", title: "주소", rowSpan: 2, row: 0 }, - { id: "fctCpc", title: "시설용량(m³/일)", align: "right", rowSpan: 2, row: 0 }, + { id: "fctCpc", title: "시설용량(m³/일)", align: "right", rowSpan: 2, row: 0, widthPercent:10 }, { id: "A", title: "유입", colSpan: 5, row: 0 }, { id: "B", title: "방류", colSpan: 5, row: 0 }, - { id: "inflAssctBfrWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe3", upSequnce: 1, align: "right", row: 1 }, - { id: "inflAssctBfrWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row: 1 }, - { id: "inflAssctBfrWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1 }, - { id: "inflAssctBfrWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe3", upSequnce: 4, align: "right", row: 1 }, - { id: "inflAssctBfrWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1 }, - { id: "efflWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe4", upSequnce: 1, align: "right", row: 1 }, - { id: "efflWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row: 1 }, - { id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row: 1 }, - { id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe4", upSequnce: 4, align: "right", row: 1 }, - { id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row: 1 }, + { id: "inflAssctBfrWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe3", upSequnce: 1, align: "right", row: 1, widthPercent:5 }, + { id: "inflAssctBfrWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row: 1, widthPercent:5 }, + { id: "inflAssctBfrWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1, widthPercent:5 }, + { id: "inflAssctBfrWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe3", upSequnce: 4, align: "right", row: 1, widthPercent:5 }, + { id: "inflAssctBfrWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1, widthPercent:5 }, + { id: "efflWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe4", upSequnce: 1, align: "right", row: 1, widthPercent:5 }, + { id: "efflWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row: 1, widthPercent:5 }, + { id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row: 1, widthPercent:5 }, + { id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe4", upSequnce: 4, align: "right", row: 1, widthPercent:5 }, + { id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row: 1, widthPercent:5 }, ]; // 시설수질리스트 헤더(권역별) @@ -214,7 +214,6 @@ const upHeadListModalYear: TableUpperProps[] = [ { id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe2", upSequnce: 3, align: "right" }, { id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe2", upSequnce: 2, align: "right" }, { id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe2", upSequnce: 3, align: "right" }, - { id: "noProcessInflAmnt", title: "미처리하수량\n(m³/일)", align:"right"}, { id: "infoRnDay", title: "강우량\n(mm/일)", align: "right" } ]; @@ -231,7 +230,6 @@ const upHeadListModalYearCod: TableUpperProps[] = [ { id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe2", upSequnce: 3, align: "right" }, { id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe2", upSequnce: 2, align: "right" }, { id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe2", upSequnce: 3, align: "right" }, - { id: "noProcessInflAmnt", title: "미처리하수량\n(m³/일)", align:"right"}, { id: "infoRnDay", title: "강우량\n(mm/일)", align: "right" } ]; diff --git a/apps/fo/app/store/flowRate/index.tsx b/apps/fo/app/store/flowRate/index.tsx index f8125e59c..c61eb2d76 100644 --- a/apps/fo/app/store/flowRate/index.tsx +++ b/apps/fo/app/store/flowRate/index.tsx @@ -158,7 +158,6 @@ const upHeadListFlowRateModal:TableUpperProps[] = [ { id: "sumFlow", title: "연계처리량(m³/일)", align:"right"}, { id: "returnAmnt", title: "총인 반류수량(m³/일)", align:"right"}, { id: "efflAmnt", title: "방류량(m³/일)", align:"right"}, - { id: "noProcessInflAmnt", title: "미처리하수량(m³/일)", align:"right"}, { id: "infoRnDay", title: "강우량(mm/일)", align:"right"} ] From 92f12c2104990d455aad9fce0fd4a576d52b81d2 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Fri, 12 Sep 2025 17:29:34 +0900 Subject: [PATCH 11/46] =?UTF-8?q?=EA=B3=B5=ED=86=B5=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=9E=91=EC=97=85=20=EC=99=84=EB=A3=8C/=20=EC=A7=80=EB=8F=84?= =?UTF-8?q?=EC=A0=90=EA=B2=80=20=EB=93=B1=EB=A1=9D/=ED=98=84=ED=99=A9=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/layout.tsx | 4 + apps/wr/app/store/common/code/basicCode.tsx | 567 ++++++++++++------ apps/wr/app/store/common/code/index.ts | 57 +- apps/wr/app/store/common/code/type.ts | 31 + .../prfmncReg/chkgdnReg/rainChkgdn/excel.tsx | 53 +- .../chkgdnReg/rainChkgdn/headList.tsx | 11 +- .../prfmncReg/chkgdnReg/rswrtChkgdn/excel.tsx | 20 +- .../chkgdnReg/rswrtChkgdn/headList.tsx | 5 +- .../chkgdnSttn/rainChkgdnSttn/headList.tsx | 12 +- .../chkgdnSttn/rswtChkgdnSttn/headList.tsx | 2 +- apps/wr/app/store/store.tsx | 1 + apps/wr/components/lib/func/TableData.tsx | 7 +- apps/wr/components/lib/func/commom.tsx | 20 + .../ui/modal/chkgd/chkgdModal/chkgdModal.tsx | 72 ++- .../chkgdTable/rainChkgd/rainChkgdTable.tsx | 7 +- 15 files changed, 576 insertions(+), 293 deletions(-) create mode 100644 apps/wr/app/store/common/code/type.ts diff --git a/apps/wr/app/layout.tsx b/apps/wr/app/layout.tsx index 17945be51..719717344 100644 --- a/apps/wr/app/layout.tsx +++ b/apps/wr/app/layout.tsx @@ -6,6 +6,7 @@ import koBase from "../public/locales/ko/message.json"; import { StoreProvider } from "./store"; import { LoginApi } from "@/src/entities/auth"; import { useEffect } from "react"; +import { getCommonUpCd } from "./store/common/code/basicCode"; export default function RootLayout({ children, @@ -25,6 +26,9 @@ export default function RootLayout({ useEffect(() => { // 렌더 중이 아니라 클라이언트에서만 실행 + 에러 캐치 void LoginApi.login({ userId: "CLEANWATER", password: "gktneh12!@" }) + .finally(()=>{ + getCommonUpCd() + } ) .catch((e) => { console.error("Auto login failed:", e); }); diff --git a/apps/wr/app/store/common/code/basicCode.tsx b/apps/wr/app/store/common/code/basicCode.tsx index 5fc13c16d..5039dd234 100644 --- a/apps/wr/app/store/common/code/basicCode.tsx +++ b/apps/wr/app/store/common/code/basicCode.tsx @@ -1,8 +1,10 @@ +import { fetchType, getFetchWithCount } from "@/components/lib/api"; import type { SelectDataType } from "@common/business_components"; export const numSize = 12; export const txtSize = 20; +export const lwCds: Record = {}; export const yn: SelectDataType[] = [ { val: "Y", text: "Y" }, { val: "N", text: "N" }, @@ -14,29 +16,35 @@ export const bdstFilterYn: SelectDataType[] = [ { val: "F", text: "미가동" }, ]; // 최우수(그린1)/우수(그린2), 우량(그린3), 일반(그린4), 확인불가 체크 -export const bdstGrntchClass: SelectDataType[] = [ - { val: "최우수(그린1)", text: "최우수(그린1)" }, - { val: "우수(그린2)", text: "우수(그린2)" }, - { val: "우량(그린3)", text: "우량(그린3)" }, - { val: "일반(그린4)", text: "일반(그린4)" }, - { val: "확인불가", text: "확인불가" }, -]; +//export const bdstGrntchClass: SelectDataType[] = lwCds['bdstGrntchClass']??[] + +// [ +// { val: "최우수(그린1)", text: "최우수(그린1)" }, +// { val: "우수(그린2)", text: "우수(그린2)" }, +// { val: "우량(그린3)", text: "우량(그린3)" }, +// { val: "일반(그린4)", text: "일반(그린4)" }, +// { val: "확인불가", text: "확인불가" }, +// ]; export const bdstIncenYn: SelectDataType[] = [ { val: "Y", text: "Y" }, { val: "N", text: "N" }, { val: "D", text: "확인불가" }, ]; //처리장연계/자체+연계/자체처리 -export const erctUswtrPrcsMeth: SelectDataType[] = [ - { val: "처리장연계", text: "처리장연계" }, - { val: "자체+연계", text: "자체+연계" }, - { val: "자체처리", text: "자체처리" }, -]; +//export const erctUswtrPrcsMeth: SelectDataType[] = lwCds['erctUswtrPrcsMeth']??[] -export const rusePrcsMthdCd: SelectDataType[] = [ - { val: "물리학적처리", text: "물리학적처리" }, - { val: "생물학적처리", text: "생물학적처리" }, -]; +// [ +// { val: "처리장연계", text: "처리장연계" }, +// { val: "자체+연계", text: "자체+연계" }, +// { val: "자체처리", text: "자체처리" }, +// ]; + +// export const rusePrcsMthdCd: SelectDataType[] = lwCds['rusePrcsMthdCd']??[] + +// [ +// { val: "물리학적처리", text: "물리학적처리" }, +// { val: "생물학적처리", text: "생물학적처리" }, +// ]; export const ruseSeCd: SelectDataType[] = [ { val: "신규", text: "신규" }, @@ -46,101 +54,107 @@ export const ruseSeCd: SelectDataType[] = [ { val: "개량", text: "개량" }, ]; -export const ruseBizMthdCd: SelectDataType[] = [ - { val: "재정", text: "재정" }, - { val: "민간투자", text: "민간투자" }, - { val: "자체", text: "자체" }, -]; +// export const ruseBizMthdCd: SelectDataType[] = [ +// { val: "재정", text: "재정" }, +// { val: "민간투자", text: "민간투자" }, +// { val: "자체", text: "자체" }, +// ]; // 공통 건축물 용도 -export const bdstUsgCd: SelectDataType[] = [ - { val: "-1", text: "확인불가" }, - { val: "1", text: "운동장" }, - { val: "2", text: "체육관" }, - { val: "3", text: "공공업무시설" }, - { val: "4", text: "공공기관의청사" }, - { val: "5", text: "아파트" }, - { val: "6", text: "연립주택" }, - { val: "7", text: "다세대주택" }, - { val: "8", text: "기숙사" }, - { val: "9", text: "초등학교" }, - { val: "10", text: "중학교" }, - { val: "11", text: "고등학교" }, - { val: "12", text: "전문대학" }, - { val: "13", text: "대학및대학교" }, - { val: "14", text: "골프장" }, - { val: "15", text: "대규모점포" }, - { val: "16", text: "기타" }, - { val: "17", text: "숙박업" }, - { val: "18", text: "목욕장업" }, - { val: "19", text: "공장" }, - { val: "20", text: "발전시설" }, - { val: "21", text: "관광단지개발사업" }, - { val: "22", text: "도시개발사업" }, - { val: "23", text: "산업단지개발사업" }, - { val: "24", text: "택지개발사업" }, - { val: "25", text: "대규모점포(대형마트)" }, - { val: "26", text: "대규모점포(전문점)" }, - { val: "27", text: "대규모점포(백화점)" }, - { val: "28", text: "대규모점포(쇼핑센터)" }, - { val: "29", text: "대규모점포(복합쇼핑몰)" }, - { val: "30", text: "물류시설" }, - { val: "31", text: "운수시설(여객자동차터미널)" }, - { val: "32", text: "운수시설(철도시설)" }, - { val: "33", text: "운수시설(공항시설)" }, - { val: "34", text: "운수시설(항만시설)" }, - { val: "35", text: "업무시설(공공업무시설)" }, - { val: "36", text: "업무시설(금융업소)" }, - { val: "37", text: "업무시설(사무소)" }, - { val: "38", text: "업무시설(결혼상담소 등 소개업소)" }, - { val: "39", text: "업무시설(출판사)" }, - { val: "40", text: "업무시설(신문사)" }, - { val: "41", text: "업무시설(오피스텔)" }, - { val: "42", text: "교정시설" }, - { val: "43", text: "방송국" }, - { val: "44", text: "전신전화국" }, - { val: "45", text: "기타" }, -]; +export const bdstUsgCd: SelectDataType[] =lwCds?.bdstUsgCd?.concat(lwCds?.rswtBdstType??[])??[] -export const rswtBdstType: SelectDataType[] = [ - { val: "17", text: "숙박업" }, - { val: "18", text: "목욕장업" }, - { val: "19", text: "공장" }, - { val: "20", text: "발전시설" }, - { val: "21", text: "관광단지개발사업" }, - { val: "22", text: "도시개발사업" }, - { val: "23", text: "산업단지개발사업" }, - { val: "24", text: "택지개발사업" }, - { val: "25", text: "대규모점포(대형마트)" }, - { val: "26", text: "대규모점포(전문점)" }, - { val: "27", text: "대규모점포(백화점)" }, - { val: "28", text: "대규모점포(쇼핑센터)" }, - { val: "29", text: "대규모점포(복합쇼핑몰)" }, - { val: "30", text: "물류시설" }, - { val: "31", text: "운수시설(여객자동차터미널)" }, - { val: "32", text: "운수시설(철도시설)" }, - { val: "33", text: "운수시설(공항시설)" }, - { val: "34", text: "운수시설(항만시설)" }, - { val: "35", text: "업무시설(공공업무시설)" }, - { val: "36", text: "업무시설(금융업소)" }, - { val: "37", text: "업무시설(사무소)" }, - { val: "38", text: "업무시설(결혼상담소 등 소개업소)" }, - { val: "39", text: "업무시설(출판사)" }, - { val: "40", text: "업무시설(신문사)" }, - { val: "41", text: "업무시설(오피스텔)" }, - { val: "42", text: "교정시설" }, - { val: "43", text: "방송국" }, - { val: "44", text: "전신전화국" }, - { val: "45", text: "기타" }, -]; +// [ +// { val: "-1", text: "확인불가" }, +// { val: "1", text: "운동장" }, +// { val: "2", text: "체육관" }, +// { val: "3", text: "공공업무시설" }, +// { val: "4", text: "공공기관의청사" }, +// { val: "5", text: "아파트" }, +// { val: "6", text: "연립주택" }, +// { val: "7", text: "다세대주택" }, +// { val: "8", text: "기숙사" }, +// { val: "9", text: "초등학교" }, +// { val: "10", text: "중학교" }, +// { val: "11", text: "고등학교" }, +// { val: "12", text: "전문대학" }, +// { val: "13", text: "대학및대학교" }, +// { val: "14", text: "골프장" }, +// { val: "15", text: "대규모점포" }, +// { val: "16", text: "기타" }, +// { val: "17", text: "숙박업" }, +// { val: "18", text: "목욕장업" }, +// { val: "19", text: "공장" }, +// { val: "20", text: "발전시설" }, +// { val: "21", text: "관광단지개발사업" }, +// { val: "22", text: "도시개발사업" }, +// { val: "23", text: "산업단지개발사업" }, +// { val: "24", text: "택지개발사업" }, +// { val: "25", text: "대규모점포(대형마트)" }, +// { val: "26", text: "대규모점포(전문점)" }, +// { val: "27", text: "대규모점포(백화점)" }, +// { val: "28", text: "대규모점포(쇼핑센터)" }, +// { val: "29", text: "대규모점포(복합쇼핑몰)" }, +// { val: "30", text: "물류시설" }, +// { val: "31", text: "운수시설(여객자동차터미널)" }, +// { val: "32", text: "운수시설(철도시설)" }, +// { val: "33", text: "운수시설(공항시설)" }, +// { val: "34", text: "운수시설(항만시설)" }, +// { val: "35", text: "업무시설(공공업무시설)" }, +// { val: "36", text: "업무시설(금융업소)" }, +// { val: "37", text: "업무시설(사무소)" }, +// { val: "38", text: "업무시설(결혼상담소 등 소개업소)" }, +// { val: "39", text: "업무시설(출판사)" }, +// { val: "40", text: "업무시설(신문사)" }, +// { val: "41", text: "업무시설(오피스텔)" }, +// { val: "42", text: "교정시설" }, +// { val: "43", text: "방송국" }, +// { val: "44", text: "전신전화국" }, +// { val: "45", text: "기타" }, +// ]; -export const orgwtKndCd = [ - { text: "오수(변기 오수 제외)", val: "01" }, - { text: "오수", val: "02" }, - { text: "폐수", val: "03" }, - { text: "오수 및 폐수", val: "04" }, - { text: "기타", val: "05" }, -]; + export const rswtBdstType: SelectDataType[] = lwCds?.rswtBdstType??[] +//[ +// { val: "17", text: "숙박업" }, +// { val: "18", text: "목욕장업" }, +// { val: "19", text: "공장" }, +// { val: "20", text: "발전시설" }, +// { val: "21", text: "관광단지개발사업" }, +// { val: "22", text: "도시개발사업" }, +// { val: "23", text: "산업단지개발사업" }, +// { val: "24", text: "택지개발사업" }, +// { val: "25", text: "대규모점포(대형마트)" }, +// { val: "26", text: "대규모점포(전문점)" }, +// { val: "27", text: "대규모점포(백화점)" }, +// { val: "28", text: "대규모점포(쇼핑센터)" }, +// { val: "29", text: "대규모점포(복합쇼핑몰)" }, +// { val: "30", text: "물류시설" }, +// { val: "31", text: "운수시설(여객자동차터미널)" }, +// { val: "32", text: "운수시설(철도시설)" }, +// { val: "33", text: "운수시설(공항시설)" }, +// { val: "34", text: "운수시설(항만시설)" }, +// { val: "35", text: "업무시설(공공업무시설)" }, +// { val: "36", text: "업무시설(금융업소)" }, +// { val: "37", text: "업무시설(사무소)" }, +// { val: "38", text: "업무시설(결혼상담소 등 소개업소)" }, +// { val: "39", text: "업무시설(출판사)" }, +// { val: "40", text: "업무시설(신문사)" }, +// { val: "41", text: "업무시설(오피스텔)" }, +// { val: "42", text: "교정시설" }, +// { val: "43", text: "방송국" }, +// { val: "44", text: "전신전화국" }, +// { val: "45", text: "기타" }, +// ]; + +//export const orgwtKndCd =lwCds['orgwtKndCd']??[] + + +// [ +// { text: "오수(변기 오수 제외)", val: "01" }, +// { text: "오수", val: "02" }, +// { text: "폐수", val: "03" }, +// { text: "오수 및 폐수", val: "04" }, +// { text: "기타", val: "05" }, +// ]; export const chBuCd = [ { val: "증축", text: "증축" }, @@ -148,97 +162,104 @@ export const chBuCd = [ { val: "재축", text: "재축" }, ]; -export const dmdUszCd = [ - { val: "조경용수", text: "조경용수" }, - { val: "청소화장실용수", text: "청소화장실용수" }, - { val: "농업용수", text: "농업용수" }, - { val: "공업용수", text: "공업용수" }, - { val: "친수용수", text: "친수용수" }, - { val: "기타", text: "기타" }, -]; +// export const dmdUszCd = [ +// { val: "조경용수", text: "조경용수" }, +// { val: "청소화장실용수", text: "청소화장실용수" }, +// { val: "농업용수", text: "농업용수" }, +// { val: "공업용수", text: "공업용수" }, +// { val: "친수용수", text: "친수용수" }, +// { val: "기타", text: "기타" }, +// ]; -export const ruseMngMtd = [ - { val: "자체운영", text: "자체운영" }, - { val: "공기업", text: "공기업" }, - { val: "민간(대행)", text: "민간(대행)" }, -]; -export const pplQulity = [ - { val: "도복장강관", text: "도복장강관" }, - { val: "PE관", text: "PE관" }, - { val: "스테인레스관", text: "스테인레스관" }, - { val: "덕타일주철관", text: "덕타일주철관" }, - { val: "유리섬유복합관", text: "유리섬유복합관" }, - { val: "기타", text: "기타" }, -]; -export const pplLenght = [ - { val: "D100", text: "D100" }, - { val: "D200", text: "D200" }, - { val: "D250", text: "D250" }, - { val: "D300", text: "D300" }, - { val: "D350", text: "D350" }, - { val: "D400", text: "D400" }, - { val: "D450", text: "D450" }, - { val: "D500", text: "D500" }, - { val: "D700", text: "D700" }, - { val: "D900", text: "D900" }, - { val: "D1000​", text: "D1000​" }, -]; -export const rainFcltCd = [ - { val: "10", text: "확인불가" }, - { val: "01", text: "지붕" }, - { val: "02", text: "건물옥상" }, - { val: "03", text: "골프장 연못" }, - { val: "04", text: "운동장 바닥" }, - { val: "05", text: "운동장 지붕" }, - { val: "06", text: "주차장" }, - { val: "07", text: "태양광패널" }, - { val: "08", text: "연못" }, - { val: "09", text: "기타" }, -]; +// export const ruseMngMtd = lwCds['ruseMngMtd'] +// [ +// { val: "자체운영", text: "자체운영" }, +// { val: "공기업", text: "공기업" }, +// { val: "민간(대행)", text: "민간(대행)" }, +// ]; + +// export const pplQulity = +// [ +// { val: "도복장강관", text: "도복장강관" }, +// { val: "PE관", text: "PE관" }, +// { val: "스테인레스관", text: "스테인레스관" }, +// { val: "덕타일주철관", text: "덕타일주철관" }, +// { val: "유리섬유복합관", text: "유리섬유복합관" }, +// { val: "기타", text: "기타" }, +// ]; +// export const pplLenght = [ +// { val: "D100", text: "D100" }, +// { val: "D200", text: "D200" }, +// { val: "D250", text: "D250" }, +// { val: "D300", text: "D300" }, +// { val: "D350", text: "D350" }, +// { val: "D400", text: "D400" }, +// { val: "D450", text: "D450" }, +// { val: "D500", text: "D500" }, +// { val: "D700", text: "D700" }, +// { val: "D900", text: "D900" }, +// { val: "D1000​", text: "D1000​" }, +// ]; + +// export const rainFcltCd = lwCds?.rainFcltCd??[] + + +// [ +// { val: "10", text: "확인불가" }, +// { val: "01", text: "지붕" }, +// { val: "02", text: "건물옥상" }, +// { val: "03", text: "골프장 연못" }, +// { val: "04", text: "운동장 바닥" }, +// { val: "05", text: "운동장 지붕" }, +// { val: "06", text: "주차장" }, +// { val: "07", text: "태양광패널" }, +// { val: "08", text: "연못" }, +// { val: "09", text: "기타" }, +// ]; //물리화학적처리(스크린, 응집, 침전)/생물학적처리(활성슬러지법 등)/소독(염소, UV 등)/기타 -export const rswtPrscCdMthdCd = [ - { - val: "물리화학적처리(스크린,응집,침전)", - text: "물리화학적처리(스크린,응집,침전)", - }, - { - val: "생물학적처리(활성슬러지법 등)", - text: "생물학적처리(활성슬러지법 등)", - }, - { val: "소독(염소, UV 등)", text: "소독(염소, UV 등)" }, - { val: "기타", text: "기타" }, - { val: "확인불가", text: "확인불가" }, -]; +export const rswtPrscCdMthdCd = lwCds['rswtPrscCdMthdCd']??[] +// { +// val: "물리화학적처리(스크린,응집,침전)", +// text: "물리화학적처리(스크린,응집,침전)", +// }, +// { +// val: "생물학적처리(활성슬러지법 등)", +// text: "생물학적처리(활성슬러지법 등)", +// }, +// { val: "소독(염소, UV 등)", text: "소독(염소, UV 등)" }, +// { val: "기타", text: "기타" }, +// { val: "확인불가", text: "확인불가" }, +// ]; -export const htdPowerMthdCd= [ - { - val: "해당없음", - text: "해당없음", - }, - { - val: "석탄화력발전", - text: "석탄화력발전", - }, - { - val: "화력발전", - text: "화력발전", - }, - { - val: "수력발전", - text: "수력발전", - }, - { - val: "태양관발전", - text: "태양관발전", - }, -]; +// export const htdPowerMthdCd = [ +// { +// val: "해당없음", +// text: "해당없음", +// }, +// { +// val: "석탄화력발전", +// text: "석탄화력발전", +// }, +// { +// val: "화력발전", +// text: "화력발전", +// }, +// { +// val: "수력발전", +// text: "수력발전", +// }, +// { +// val: "태양관발전", +// text: "태양관발전", +// }, +// ]; //(공업용수/양식장/농업용수) -export const htdUtztnUsgCd= [ +export const htdUtztnUsgCd = [ { val: "공업용수", text: "공업용수", @@ -252,3 +273,171 @@ export const htdUtztnUsgCd= [ text: "농업용수", }, ]; + +export const ruseFcltSpot = [] +//(공업용수/양식장/농업용수) +export const rainRswtMng = [ + { + val: "위탁", + text: "01", + }, + { + val: "자체", + text: "02", + }, +]; + +export const rainFcltFlowRate = [ + { + val: "01", + text: "유량계", + }, + { + val: "02", + text: "수위계", + }, + { + val: "03", + text: "펌프적산전력계", + }, + { + val: "04", + text: "기타", + }, +]; +export const rainRswtUse = [ + { + val: "01", + text: "유량계", + }, + { + val: "02", + text: "수위계", + }, + { + val: "03", + text: "펌프적산전력계", + }, + { + val: "04", + text: "기타", + }, +]; + +export const sewageInFcltUse = [ + { + val: "01", + text: "세척수", + }, + { + val: "02", + text: "냉각수", + }, + { + val: "03", + text: "청소수", + }, + { + val: "04", + text: "삭수대", + }, + { + val: "05", + text: "희석용수", + }, + { + val: "06", + text: "중수도", + }, + { + val: "07", + text: "기타", + }, +]; + +export const sewageOutFclttUse = [ + { + val: "01", + text: "청소화장실용수", + }, + { + val: "02", + text: "세척살수용수", + }, + { + val: "03", + text: "조경용수", + }, + { + val: "04", + text: "친수용수", + }, + { + val: "05", + text: "지하수충전", + }, + { + val: "06", + text: "농업용수", + }, + { + val: "07", + text: "하천등유지용수", + }, + { + val: "08", + text: "공업용수", + }, +]; +const codeMApping = { + WR001: "bdstUsgCd", + WR002: "rswtBdstType", + WR003: "rainFcltCd", + WR004: "bdstGrntchClass", + WR005: "rswtPrscCdMthdCd", // 아직 디 못바꿈 + WR006: "orgwtKndCd", //작업 완ㅛ + WR007: "ruseMngMtd", // 작업완료 + WR008: "rusePrcsMthdCd", //w작업완료 + WR009: "erctUswtrPrcsMeth",//w작업완료 + WR010: "ruseFcltSpot",// inout은 yn 만 사용해야 함으로 해당 코드는 사용안함. + WR011: "pplQulity", + WR012: "pplLenght", + WR013: "bdstFilterYn", // 사용 불가 yn만 사용해야함으로 해당코드 사용 안함 + WR014: "rainRswtMng", // 지도점검 등록 시변경 + WR015: "rainFcltFlowRate", //지도점검 등록 시변경 + WR016: "dmdUszCd", // 지도점검 등록 시변경 + WR017: "sewageInFcltUse", //하수재이용 장내 + WR018: "sewageOutFclttUse", // 하수재이용 장외 + WR019: "htdPowerMthdCd", + WR020: "htdUtztnUsgCd", +}; +export const getCommonUpCd = async () => { + const upCd = await getFetchWithCount( + fetchType.LOCAL, + "/cms-service/api/v1/up-codes?keyword=&upCd=&cdSe=&useYn=Y&siteId=WR&page=0&size=100&sort=string" + ); + + const upWrCode: string[] = upCd.content + .filter((item: any) => item.upCd.slice(0, 2) === "WR") + .map((cd: any) => cd.upCd); + + await Promise.all( + upWrCode.map(async (cd) => { + const mapping = codeMApping[cd as keyof typeof codeMApping]; + if (!mapping) return; + + const lwCd = await getFetchWithCount( + fetchType.LOCAL, + `/cms-service/api/v1/lwpo-cds/up-cd/${cd}` + ); + + const list = Array.isArray(lwCd) ? lwCd : lwCd.content ?? []; + + lwCds[mapping] = list.map((it: any) => ({ + text: it.lwpoCdNm, + val: it.lwpoCd, + })); + }) + ); + +}; \ No newline at end of file diff --git a/apps/wr/app/store/common/code/index.ts b/apps/wr/app/store/common/code/index.ts index 72e910aad..822c95ddb 100644 --- a/apps/wr/app/store/common/code/index.ts +++ b/apps/wr/app/store/common/code/index.ts @@ -5,22 +5,10 @@ import type { } from "@common/business_components/ui"; import { bdstFilterYn, - bdstGrntchClass, bdstIncenYn, - bdstUsgCd, chBuCd, - dmdUszCd, - erctUswtrPrcsMeth, - htdPowerMthdCd, - htdUtztnUsgCd, - orgwtKndCd, - pplLenght, - pplQulity, - rainFcltCd, + lwCds, rswtPrscCdMthdCd, - ruseBizMthdCd, - ruseMngMtd, - rusePrcsMthdCd, ruseSeCd, yn, } from "./basicCode"; @@ -151,6 +139,9 @@ export const getEnvPartCd = async (set: any) => { } }; + + + export type comCodeState = { code: { isInit: boolean; @@ -184,6 +175,7 @@ export type comCodeState = { rswtPrscCdMthdCd: SelectDataType[]; htdPowerMthdCd: SelectDataType[]; htdUtztnUsgCd: SelectDataType[]; + rswtBdstType:SelectDataType[]; userSiSggCd: string; }; }; @@ -193,44 +185,45 @@ export type comCodeType = comCodeState & comCodeActions; export const comCodeStateExport: comCodeState = { code: { isInit: false, - rainFcltCd: rainFcltCd, - bdstUsgCd: bdstUsgCd, + rainFcltCd: lwCds['rainFcltCd']??[], + bdstUsgCd: lwCds['bdstUsgCd']??[] , chBuCd: chBuCd, - orgwtKndCd: orgwtKndCd, + orgwtKndCd: lwCds['orgwtKndCd']??[] , cityCd: [], sggCd: [], rvbsnCd: [], mdmbsnCd: [], lgbsnCd: [], lclgvrnmntCd: [], - pplQulity: pplQulity, - pplLenght: pplLenght, + pplQulity: lwCds['pplQulity']??[] , + pplLenght: lwCds['pplLenght']??[] , yn: yn, - dmdUszCd: dmdUszCd, + dmdUszCd: lwCds['dmdUszCd']??[] , buildingType: buildingType, - ruseMngMtd: ruseMngMtd, + ruseMngMtd: lwCds['ruseMngMtd']??[], ruseSeCd: ruseSeCd, - ruseBizMthdCd: ruseBizMthdCd, - rusePrcsMthdCd: rusePrcsMthdCd, - erctUswtrPrcsMeth: erctUswtrPrcsMeth, + ruseBizMthdCd: lwCds['ruseBizMthdCd']??[], + rusePrcsMthdCd: lwCds['rusePrcsMthdCd']??[], + erctUswtrPrcsMeth: lwCds['erctUswtrPrcsMeth']??[], bdstFilterYn: bdstFilterYn, bdstIncenYn: bdstIncenYn, - bdstGrntchClass: bdstGrntchClass, - rswtPrscCdMthdCd: rswtPrscCdMthdCd, - htdPowerMthdCd: htdPowerMthdCd, - htdUtztnUsgCd: htdUtztnUsgCd, + bdstGrntchClass: lwCds['bdstGrntchClass']??[], + rswtPrscCdMthdCd: rswtPrscCdMthdCd, // 공단연락오면 바꿔야함 + htdPowerMthdCd: lwCds['htdPowerMthdCd']??[], + htdUtztnUsgCd: lwCds['htdUtztnUsgCd']??[], userSiSggCd: laeSecd, + rswtBdstType:lwCds['rswtBdstType']??[] , }, }; export type comCodeActions = { returnCodeText: (val: string, codeName: string) => string; + returnTextCode: (text: string, codeName: string) => string; }; export const codeActionExport: (set: any) => comCodeActions = (set: any) => { return { returnCodeText: (val: string, codeName: string) => { - console.log('val', val, 'codeName', codeName); return set((state: comCodeState) => { const codeList = state.code[codeName] || []; const found = codeList.find((item) => item.val === val); @@ -238,5 +231,13 @@ export const codeActionExport: (set: any) => comCodeActions = (set: any) => { } ); }, + returnTextCode: (text: string, codeName: string) => { + return set((state: comCodeState) => { + const codeList = state.code[codeName] || []; + const found = codeList.find((item) => item.text === text); + return found ? found.val : text; + } + ); + }, }; }; diff --git a/apps/wr/app/store/common/code/type.ts b/apps/wr/app/store/common/code/type.ts new file mode 100644 index 000000000..55f684f55 --- /dev/null +++ b/apps/wr/app/store/common/code/type.ts @@ -0,0 +1,31 @@ + +export type LwCdType= { + lwpoCd: string, + upCd: string, + lwpoCdNm:string, + lwpoCdExpln:string, + unit: string, + prntLwpoCd: string, + useYn: string, + sortSeq: number, + regDt: Date, + rgtr: string, + mdfcnDt: Date, + mdfr: string +} + + +export type UPCdType= { + upCd: string, + upCdNm: string, + upCdExpln: string, + cdSe: string, + useYn: string, + delYn: string, + siteId: string, + regDt:Date, + rgtr: string + mdfcnDt: Date, + mdfr: string + +} diff --git a/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/excel.tsx b/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/excel.tsx index 38e2cab7f..84619f307 100644 --- a/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/excel.tsx +++ b/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/excel.tsx @@ -7,6 +7,7 @@ import { parseRawValue, } from "@/components/lib/func/excelFunc"; import toast from "react-hot-toast"; +import { codeToText, textToCode } from "@/components/lib/func/commom"; export const useTypes = [ "조경용수", "청소화장실용수", @@ -17,17 +18,13 @@ export const useTypes = [ "기타", ]; - -export const chkMngType =[ - '위탁', - '자체' -] -export const chkSpwtPositnType = [ - '유량계', - '수위계', - '펌프적산전력계', - '기타' -] +export const chkMngType = { "01": "위탁", "02": "자체" }; +export const rainFcltFlowRateType = { + "01": "유량계", + "02": "수위계", + "03": "펌프적산전력계", + "04": "기타", +}; export type Buildingtype = { bdstInfoSn: number; @@ -118,7 +115,7 @@ export const excelToRainChkData = (excelData: any, year: string) => { const ruseData = parseRawValue(item[`빗물_${month}월`]); if (month.length < 2) month = "0" + month; return { - utztnUsgCd: item["이용용도"], + utztnUsgCd: textToCode(item["이용용도"], "dmdUszCd") ?? undefined, ym: year + month, chckYmd: checkYmd, splyUswtrUtztnQnt: splyData, @@ -133,14 +130,14 @@ export const excelToRainChkData = (excelData: any, year: string) => { bdstRuseFcltSn: Number(item["NO"]), chckYmd: checkYmd, rgtr: TEST_UUID, - operMngCd: item["운영관리형태"] ?? "", + operMngCd: textToCode(item["운영관리형태"], "rainRswtMng") ??item["운영관리형태"], anlOperCst: parseRawValue(item["연간운영비(원/년)"]), - oilqMeasMthd: item["유량측정방법"] ?? "", + oilqMeasMthd: textToCode( item["유량측정방법"],"rainFcltFlowRate",)??item["유량측정방법"], guideDetails: makeGuidDetail, rainyDetails: [ { ph: item["PH"], - utztnUsgCd: item["이용용도"], + utztnUsgCd: textToCode(item["이용용도"], "dmdUszCd")??item["이용용도"], trbt: parseRawValue(item["탁도"]), grssClfg: parseRawValue(item["총대장균군수"]), etc: item["기타"] || "", // 필드 누락 방지 @@ -156,10 +153,10 @@ export const excelToRainChkData = (excelData: any, year: string) => { }) .filter((el: any) => el !== undefined); -console.log("rainChkgdData", rainChkgdData); + console.log('rainChkgdData ', rainChkgdData) if (rainChkgdData.length > 0) { rainChkgdData.forEach((rain: any) => { - const defaultMessage = `[시설명: ${rain.bdstNm}, 점검일: ${rain.chckYmd}, 이용용도: ${rain.guideDetails[0]?.utztnUsgCd}] 항목에서 `; + const defaultMessage = `[시설명: ${rain.bdstNm}, 점검일: ${rain.chckYmd}, 이용용도: ${codeToText(rain.guideDetails[0]?.utztnUsgCd, "dmdUszCd") ??rain.guideDetails[0]?.utztnUsgCd}] 항목에서 `; if (rain.chckYmd && isInvalidDate(rain.chckYmd)) { issues.push( @@ -173,15 +170,20 @@ console.log("rainChkgdData", rainChkgdData); ); } - if (rain.operMngCd.length > 1 && !chkMngType.includes(rain.operMngCd)) { + if (rain.operMngCd.length > 1 && !chkMngType[rain.operMngCd]) { issues.push( - defaultMessage + `운영관리 형태: 위탁 혹은 자체 만 허용) /입력값:${rain.oilqMeasMthd}` + defaultMessage + + `운영관리 형태: 위탁 혹은 자체 만 허용) /입력값:${rain.operMngCd}` ); } - if (rain.oilqMeasMthd.length > 1 && !chkSpwtPositnType.includes(rain.oilqMeasMthd)) { + if ( + rain.oilqMeasMthd.length > 1 && + !rainFcltFlowRateType[rain.oilqMeasMthd] + ) { issues.push( - defaultMessage + `유량측정방법: 유량계, 수위계, 펌프적산전력계, 기타) /입력값:${rain.oilqMeasMthd}` + defaultMessage + + `유량측정방법: 유량계, 수위계, 펌프적산전력계, 기타) /입력값:${rain.oilqMeasMthd}` ); } @@ -190,11 +192,14 @@ console.log("rainChkgdData", rainChkgdData); issues.push(defaultMessage + `PH: 숫자 형식 아님 /입력값:${key.ph}`); } if (key.trbt?.length > 1 && isInvalidNumber(key.trbt)) { - issues.push(defaultMessage + `탁도: 숫자 형식 아님 /입력값:${key.trbt}`); + issues.push( + defaultMessage + `탁도: 숫자 형식 아님 /입력값:${key.trbt}` + ); } if (key.grssClfg?.length > 1 && isInvalidNumber(key.grssClfg)) { issues.push( - defaultMessage + `총대장균군수: 숫자 형식 아님 /입력값:${key.grssClfg}` + defaultMessage + + `총대장균군수: 숫자 형식 아님 /입력값:${key.grssClfg}` ); } if (key.levyAmt?.length > 1 && isInvalidNumber(key.levyAmt)) { @@ -226,7 +231,7 @@ console.log("rainChkgdData", rainChkgdData); } }); }); - }else{ + } else { toast.error("데이터가 없습니다. 점검 데이터를 확인해주세요."); } diff --git a/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList.tsx b/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList.tsx index 2b03d86df..d2c0bf7d7 100644 --- a/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList.tsx +++ b/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList.tsx @@ -87,6 +87,7 @@ export type chHeadType = { export type splRuseWaterType = { utztnUsgCd: string; + utztnUsgCdText: string; splTotal: number; spl01: number; spl02: number; @@ -141,12 +142,12 @@ export const rainChkgdnHeadListExport: TableUpperProps[] = [ { id: "cityText", title: "시도", mergeCell: true }, { id: "sggText", title: "시군구", mergeCell: true }, { id: "bdstNm", title: "시설명", mergeCell: true }, - { id: "operMngCd", title: "운영관리형태", mergeCell: true }, - { id: "oilqMeasMthd", title: "유량측정방법", mergeCell: true }, + { id: "operMngCdText", title: "운영관리형태", mergeCell: true }, + { id: "oilqMeasMthdText", title: "유량측정방법", mergeCell: true }, { id: "anlOperCst", title: "연간운영비(원/년)", mergeCell: true }, { id: "dtfcltCpct", title: "빗물저류조용량(m³)", mergeCell: true }, { id: "chckYmd", title: "점검일", mergeCell: true }, - { id: "utztnUsgCd", title: "이용용도" }, + { id: "utztnUsgCdText", title: "이용용도" }, { id: "totalSplyUswtrUtztnQnt", title: "연간대체수이용량(m³)" }, { id: "totalRuseFcltUtztnQnt", title: "연간빗물이용량(m³)" }, { @@ -201,7 +202,7 @@ export const rainChkgdnHeadListExport: TableUpperProps[] = [ ]; export const ruseHeadListExport: TableUpperProps[] = [ - { id: "utztnUsgCd", title: "이용용도" }, + { id: "utztnUsgCdText", title: "이용용도" }, { id: "ruseTotal", title: "계", upName: "ruseWater", upSequnce: 1 }, { id: "ruse01", title: "1월", upName: "ruseWater", upSequnce: 2 , edit: true }, { id: "ruse02", title: "2월", upName: "ruseWater", upSequnce: 3 , edit: true }, @@ -218,7 +219,7 @@ export const ruseHeadListExport: TableUpperProps[] = [ ]; export const splHeadListExport: TableUpperProps[] = [ - { id: "utztnUsgCd", title: "이용용도" }, + { id: "utztnUsgCdText", title: "이용용도" }, { id: "splTotal", title: "계", upName: "splWater", upSequnce: 1}, { id: "spl01", title: "1월", upName: "splWater", upSequnce: 2, edit: true }, { id: "spl02", title: "2월", upName: "splWater", upSequnce: 3, edit: true }, diff --git a/apps/wr/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/excel.tsx b/apps/wr/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/excel.tsx index a3372639b..5edba24b5 100644 --- a/apps/wr/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/excel.tsx +++ b/apps/wr/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/excel.tsx @@ -11,6 +11,7 @@ import { useTypes, type Buildingtype } from "../rainChkgdn/excel"; +import { codeToText, textToCode } from "@/components/lib/func/commom"; export const rswtMakeExcelSample = ( buildings: Buildingtype[], @@ -158,12 +159,12 @@ export const excelToRswtGuideData = ( if (checkYmd.length > 7) { return { bdstRuseFcltSn: Number(item["NO"]), - operMngCd: item["운영관리형태"], + operMngCd: textToCode(item["운영관리형태"], "rainRswtMng") ??item["운영관리형태"], anlOperCst: parseCommaRawValue(item["연간운영비(원/년)"]), prcsCpct: parseRawValue(item[`처리용량(m³)`]), spwtPositn: item["채수지점"], chckYmd: checkYmd, - utztnUsgCd: item["이용용도"], + utztnUsgCd: textToCode(item["이용용도"], "dmdUszCd")??item["이용용도"], guideDetails: makeGuidDetail, rgtr: TEST_UUID, mdfr: TEST_UUID, @@ -226,7 +227,7 @@ export const excelToRswtPolution = (excelData: any) => { return { bdstRuseFcltSn: Number(item["NO"]), chckYmd: checkYmd, - utztnUsgCd: item["이용용도"], + utztnUsgCd: textToCode(item["이용용도"], "dmdUszCd")??item["이용용도"], operMngCd: item["운영관리형태"], anlOperCst: parseCommaRawValue(item["연간운영비(원/년)"]), prcsCpct: parseRawValue(item["처리용량(m³)"]), @@ -236,7 +237,7 @@ export const excelToRswtPolution = (excelData: any) => { mdfr: TEST_UUID, rswtrDetails: [ { - utztnUsgCd: item["이용용도"], + utztnUsgCd: textToCode(item["이용용도"], "dmdUszCd")??item["이용용도"], vltnDt: vltnDt, vltnMttr: item["위반사항"], levyAmt: Number(item["과태료 부과금액(천원)"]) ?? 0, @@ -248,13 +249,6 @@ export const excelToRswtPolution = (excelData: any) => { } }) .filter((el: any) => el !== undefined); - // if (rswtChkgdData.length > 0) { - // rswtExcelDataCheck(rswtChkgdData, issues); - // } - - // if (issues.length > 0) { - // return { data: [], issues }; - // } return rswtChkgdData }; @@ -265,7 +259,7 @@ export const rswtExcelDataCheck = ( ) => { rswtChkgdData.forEach((rswt: any) => { - const defaultMessage = `*중수도 수질 [NO: ${rswt.bdstRuseFcltSn}, 점검일: ${rswt.chckYmd}, 이용용도: ${rswt.utztnUsgCd}] 항목에서 `; + const defaultMessage = `*중수도 수질 [NO: ${rswt.bdstRuseFcltSn}, 점검일: ${rswt.chckYmd}, 이용용도: ${codeToText(rswt.utztnUsgCd ,"dmdUszCd")??rswt.utztnUsgCd}] 항목에서 `; if (rswt.chckYmd && isInvalidDate(rswt.chckYmd)) { issues.push(defaultMessage + `점검일: 날짜 형식 아님 (${rswt.chckYmd})`); @@ -284,7 +278,7 @@ export const rswtExcelDataCheck = ( } // if ( // rswt.spwtPositn.length > 1 && - // !chkSpwtPositnType.includes(rswt.spwtPositn) + // !rainFcltFlowRateType[rswt.spwtPositn] // ) { // issues.push( // defaultMessage + diff --git a/apps/wr/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/headList.tsx b/apps/wr/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/headList.tsx index 56ee59197..652e0fea7 100644 --- a/apps/wr/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/headList.tsx +++ b/apps/wr/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/headList.tsx @@ -53,6 +53,7 @@ const buildingZod = z.object({ }); export const rswtrPolutionsZode = z.object({ + utztnUsgCdText:z.string().nullish(), chkgdnDtlFk: z.string().nullish(), utztnUsgCd: z.string().nullish(), node: z.string().nullish(), @@ -143,7 +144,7 @@ export const rswtChkHeadListExport: TableUpperProps[] = [ { id: "prcsCpct", title: "처리용량(m³)" ,mergeCell: true}, { id: "spwtPositn", title: "채수지점" ,mergeCell: true}, { id: "chckYmd", title: "점검일" ,mergeCell: true}, - { id: "utztnUsgCd", title: "이용용도" }, + { id: "utztnUsgCdText", title: "이용용도" }, { id: "splyUswtrUtztnQnt", title: "연간대체수이용량(m³)" ,type: "number"}, { id: "ruseFcltUtztnQnt", title: "연간중수도이용량(m³)",type: "number"}, @@ -197,7 +198,7 @@ export const rswtChkHeadListExport: TableUpperProps[] = [ export const rswtDetailHeadListExport: TableUpperProps[] = [ - { id: "utztnUsgCd", title: "이용용도" }, + { id: "utztnUsgCdText", title: "이용용도" }, { id: "grssClfgUswtr", diff --git a/apps/wr/app/store/prfmncSttn/chkgdnSttn/rainChkgdnSttn/headList.tsx b/apps/wr/app/store/prfmncSttn/chkgdnSttn/rainChkgdnSttn/headList.tsx index bfd2838d0..0d995fbe3 100644 --- a/apps/wr/app/store/prfmncSttn/chkgdnSttn/rainChkgdnSttn/headList.tsx +++ b/apps/wr/app/store/prfmncSttn/chkgdnSttn/rainChkgdnSttn/headList.tsx @@ -5,12 +5,12 @@ export const rainChkgdnHeadSttnExport: TableUpperProps[] = [ { id: "cityText", title: "시도", mergeCell: true }, { id: "sggText", title: "시군구", mergeCell: true }, { id: "bdstNm", title: "시설명", mergeCell: true }, - { id: "operMngCd", title: "운영관리형태", mergeCell: true }, - { id: "oilqMeasMthd", title: "유량측정방법", mergeCell: true }, + { id: "operMngCdText", title: "운영관리형태", mergeCell: true }, + { id: "oilqMeasMthdText", title: "유량측정방법", mergeCell: true }, { id: "anlOperCst", title: "연간운영비(원/년)", mergeCell: true }, { id: "dtfcltCpct", title: "빗물저류조용량(m³)", mergeCell: true }, { id: "chckYmd", title: "점검일", mergeCell: true }, - { id: "utztnUsgCd", title: "이용용도" }, + { id: "utztnUsgCdText", title: "이용용도" }, { id: "totalSplyUswtrUtztnQnt", title: "연간대체수이용량(m³)" }, { id: "totalRuseFcltUtztnQnt", title: "연간빗물이용량(m³)" }, { @@ -59,7 +59,7 @@ export const rainChkgdnHeadSttnExport: TableUpperProps[] = [ ]; export const ruseSttnHeadListExport: TableUpperProps[] = [ - { id: "utztnUsgCd", title: "이용용도" }, + { id: "utztnUsgCdText", title: "이용용도" }, { id: "ruseTotal", title: "계", upName: "ruseWater", upSequnce: 1 }, { id: "ruse01", title: "1월", upName: "ruseWater", upSequnce: 2 }, { id: "ruse02", title: "2월", upName: "ruseWater", upSequnce: 3 }, @@ -76,7 +76,7 @@ export const ruseSttnHeadListExport: TableUpperProps[] = [ ]; export const splSttnHeadListExport: TableUpperProps[] = [ - { id: "utztnUsgCd", title: "이용용도" }, + { id: "utztnUsgCdText", title: "이용용도" }, { id: "splTotal", title: "계", upName: "splWater", upSequnce: 1 }, { id: "spl01", title: "1월", upName: "splWater", upSequnce: 2 }, { id: "spl02", title: "2월", upName: "splWater", upSequnce: 3 }, @@ -108,7 +108,7 @@ export const splSttnHeadListExport: TableUpperProps[] = [ ]; export const rswtDetailHeadListExport: TableUpperProps[] = [ - { id: "utztnUsgCd", title: "이용용도" }, + { id: "utztnUsgCdText", title: "이용용도" }, { id: "grssClfgUswtr", diff --git a/apps/wr/app/store/prfmncSttn/chkgdnSttn/rswtChkgdnSttn/headList.tsx b/apps/wr/app/store/prfmncSttn/chkgdnSttn/rswtChkgdnSttn/headList.tsx index 382396566..eb4d70781 100644 --- a/apps/wr/app/store/prfmncSttn/chkgdnSttn/rswtChkgdnSttn/headList.tsx +++ b/apps/wr/app/store/prfmncSttn/chkgdnSttn/rswtChkgdnSttn/headList.tsx @@ -10,7 +10,7 @@ export const rswtChkSttnHeadListExport: TableUpperProps[] = [ { id: "prcsCpct", title: "처리용량(m³)", mergeCell: true }, { id: "spwtPositn", title: "채수지점", mergeCell: true }, { id: "chckYmd", title: "점검일", mergeCell: true }, - { id: "utztnUsgCd", title: "이용용도" }, + { id: "utztnUsgCdText", title: "이용용도" }, { id: "splyUswtrUtztnQnt", title: "연간보급수이용량(m³)", type: "number" }, { id: "ruseFcltUtztnQnt", title: "연간중수도이용량(m³)", type: "number" }, diff --git a/apps/wr/app/store/store.tsx b/apps/wr/app/store/store.tsx index e19ec2216..6381b1b2a 100644 --- a/apps/wr/app/store/store.tsx +++ b/apps/wr/app/store/store.tsx @@ -341,6 +341,7 @@ export const StoreZus = ( getMiddleRegionCd(set); getUnitWaterShedCd(set); getEnvPartCd(set); + return { ...initState, ...comFcltSearchAction(set), diff --git a/apps/wr/components/lib/func/TableData.tsx b/apps/wr/components/lib/func/TableData.tsx index bee5e093d..1a66802f5 100644 --- a/apps/wr/components/lib/func/TableData.tsx +++ b/apps/wr/components/lib/func/TableData.tsx @@ -10,6 +10,7 @@ import { } from "@common/components/ui"; import moment from "moment"; import { + codeToText, formatCommaNumber, formatYyyymmdd, handleCommaNumberChange @@ -73,23 +74,23 @@ export const rswtChkTableData = (chkData: rswtChkZodType[]) => { let flatRswtChk = {}; const findGuide = root.guideDetails.find( (guide) => guide.utztnUsgCd === detail.utztnUsgCd - ); + ) const findPoluttion = root.rswtrPollutions.find( (polution) => polution.utztnUsgCd === detail.utztnUsgCd ); - const operMngCd = root?.reuseBuilding.operMngCd; flatRswtChk = { ...root, ...detail, ...findGuide, ...findPoluttion, ...flatRswtChk, - operMngCd: operMngCd, + utztnUsgCdText: codeToText(detail.utztnUsgCd, 'dmdUszCd'), }; makeRswtData.push(flatRswtChk); }); }); } + return makeRswtData; }; diff --git a/apps/wr/components/lib/func/commom.tsx b/apps/wr/components/lib/func/commom.tsx index 042e74aa6..144aace66 100644 --- a/apps/wr/components/lib/func/commom.tsx +++ b/apps/wr/components/lib/func/commom.tsx @@ -1,4 +1,5 @@ import type { comCodeState } from "@/app/store/common/code"; +import { lwCds } from "@/app/store/common/code/basicCode"; import { filePickedBlob, filePickedBlobArray, @@ -296,4 +297,23 @@ export const formatArchArea =(value: string, digits: number=0 ) => { // 다시 천 단위 콤마 찍어서 반환 return Number(rounded).toLocaleString(); +} + + +export const codeToText = ( val:string, codeName:string ) =>{ + + if(val===''|| val===undefined){ + return '' + } + + return lwCds[codeName]?.find((cd) => cd.val ===val)?.text +} + +export const textToCode = (text:string, codeName:string) =>{ + if(text===''|| text===undefined){ + return '' + } + + return lwCds[codeName]?.find((cd) => cd.text ===text)?.val + } \ No newline at end of file diff --git a/apps/wr/components/ui/modal/chkgd/chkgdModal/chkgdModal.tsx b/apps/wr/components/ui/modal/chkgd/chkgdModal/chkgdModal.tsx index c528f5add..196ac4b27 100644 --- a/apps/wr/components/ui/modal/chkgd/chkgdModal/chkgdModal.tsx +++ b/apps/wr/components/ui/modal/chkgd/chkgdModal/chkgdModal.tsx @@ -2,13 +2,24 @@ import { useWrStore } from "@/app/store"; import type { TableUpperProps } from "@/app/store/common/type/header"; import type { splRuseWaterType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList"; import type { rswtrPolutionsZode } from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/headList"; +import { codeToText } from "@/components/lib/func/commom"; import { GuideDetailsTable } from "@/components/ui/table/chkgdTable/guideDetailTable/guideDetailTable"; import { ScrollArea, Title } from "@common/business_components/ui"; import { Button } from "@common/components/ui"; import React, { useEffect, useState } from "react"; import type { z } from "zod"; -export default function ChkgdModal({ type, obj, setIsModal, readonly }: { type: string; obj: any, setIsModal: (open: boolean) => void, readonly: boolean }) { +export default function ChkgdModal({ + type, + obj, + setIsModal, + readonly, +}: { + type: string; + obj: any; + setIsModal: (open: boolean) => void; + readonly: boolean; +}) { const { rainChkgdn, rswtChkgdn, @@ -58,14 +69,14 @@ export default function ChkgdModal({ type, obj, setIsModal, readonly }: { type: setHeadList({ splHeadList: rainChkSttn.splHeadList, ruseHeadList: rainChkSttn.ruseHeadList, - rswtDetailHeadList: type === "RNB" ? [] : rswtChkSttn.rswtDetailSttnHeadList, + rswtDetailHeadList: + type === "RNB" ? [] : rswtChkSttn.rswtDetailSttnHeadList, }); } else { setHeadList({ splHeadList: rainChkgdn.splHeadList, ruseHeadList: rainChkgdn.ruseHeadList, - rswtDetailHeadList: - type === "RNB" ? [] : rswtChkgdn.rswtDetailHeadList, + rswtDetailHeadList: type === "RNB" ? [] : rswtChkgdn.rswtDetailHeadList, }); } }, [ @@ -73,12 +84,13 @@ export default function ChkgdModal({ type, obj, setIsModal, readonly }: { type: rainChkgdn.splHeadList, rainChkSttn.splHeadList, rswtChkgdn.rswtDetailHeadList, - rswtChkSttn.rswtDetailSttnHeadList + rswtChkSttn.rswtDetailSttnHeadList, ]); useEffect(() => { const result = obj.guideDetails?.reduce((acc: any, cur: any) => { const code = cur.utztnUsgCd; + const codeText = codeToText(cur.utztnUsgCd, "dmdUszCd"); const month = cur.ym?.slice(4); // "MM" const ruseMonthKey = `ruse${month}`; const splMonthKey = `spl${month}`; @@ -91,7 +103,12 @@ export default function ChkgdModal({ type, obj, setIsModal, readonly }: { type: (it: { utztnUsgCd: string }) => it?.utztnUsgCd === code ); if (!target) { - target = { utztnUsgCd: code, ruseTotal: 0, splTotal: 0 }; + target = { + utztnUsgCdText: codeText, + utztnUsgCd: code, + ruseTotal: 0, + splTotal: 0, + }; acc.push(target); } // 월별 값 누적 @@ -106,12 +123,11 @@ export default function ChkgdModal({ type, obj, setIsModal, readonly }: { type: if (result) { // '기타' 항목을 배열의 맨 뒤로 정렬합니다. result.sort((a: splRuseWaterType, b: splRuseWaterType) => { - if (a.utztnUsgCd === "기타") return 1; // a를 b 뒤로 보냅니다. - if (b.utztnUsgCd === "기타") return -1; // b를 a 뒤로 보냅니다. + if (a.utztnUsgCd === "07") return 1; // a를 b 뒤로 보냅니다. + if (b.utztnUsgCd === "07") return -1; // b를 a 뒤로 보냅니다. return 0; // 순서를 유지합니다. }); } - setGuidData(result as splRuseWaterType[]); if (obj.rswtrPollutions) { @@ -124,6 +140,10 @@ export default function ChkgdModal({ type, obj, setIsModal, readonly }: { type: obj.rswtrPollutions.forEach( (item: z.infer) => { const nodeKey = String(item.node); + item["utztnUsgCdText"] = codeToText( + item.utztnUsgCd ?? "", + "dmdUszCd" + ); resultPolution[nodeKey]?.push(item); } ); @@ -132,8 +152,8 @@ export default function ChkgdModal({ type, obj, setIsModal, readonly }: { type: Object.entries(resultPolution).forEach(([nodeKey, items]) => { const onlyData = items as z.infer[]; if (onlyData.length === 0) return; - const total = initStats(); + onlyData.forEach((item) => { total.grssClfgUswtr += item.grssClfgUswtr; total.combResdch += item.combResdch; @@ -148,7 +168,7 @@ export default function ChkgdModal({ type, obj, setIsModal, readonly }: { type: }); const average = { - utztnUsgCd: "평균", + utztnUsgCdText: "평균", edit: false, grssClfgUswtr: (total.grssClfgUswtr / onlyData.length).toFixed(1), combResdch: (total.combResdch / onlyData.length).toFixed(1), @@ -168,8 +188,8 @@ export default function ChkgdModal({ type, obj, setIsModal, readonly }: { type: // '기타' 항목을 배열의 맨 뒤로 정렬합니다. resultPolution[nodeKey].sort((a: any, b: any) => { - if (a.utztnUsgCd === "기타") return 1; // a를 b 뒤로 보냅니다. - if (b.utztnUsgCd === "기타") return -1; // b를 a 뒤로 보냅니다. + if (a.utztnUsgCd === "07") return 1; // a를 b 뒤로 보냅니다. + if (b.utztnUsgCd === "07") return -1; // b를 a 뒤로 보냅니다. return 0; // 순서를 유지합니다. }); @@ -213,16 +233,15 @@ export default function ChkgdModal({ type, obj, setIsModal, readonly }: { type: }); obj.guideDetails = realGuideDetail; if (type === "RNB") { - rainChkGuidUpdate(obj); - setIsModal(false) + setIsModal(false); } else { const polution = Object.values(upPolutionData) .flat() .filter((item) => item.utztnUsgCd !== "평균"); obj.rswtrPollutions = polution; rwstPolAndGuideUpdate([obj]); - setIsModal(false) + setIsModal(false); } }; @@ -247,7 +266,11 @@ export default function ChkgdModal({ type, obj, setIsModal, readonly }: { type: } > {!rainChkSttn.isSttn ? ( - ) : ( @@ -256,7 +279,8 @@ export default function ChkgdModal({ type, obj, setIsModal, readonly }: { type:

{type === "RNB" - ? `시설명 : (${obj.bdstNm})` : `시설명 : (${obj.building.bdstNm})`} + ? `시설명 : (${obj.bdstNm})` + : `시설명 : (${obj.building.bdstNm})`}

@@ -269,7 +293,11 @@ export default function ChkgdModal({ type, obj, setIsModal, readonly }: { type: { setChGuidData(data); @@ -284,7 +312,11 @@ export default function ChkgdModal({ type, obj, setIsModal, readonly }: { type: { setChGuidData(data); diff --git a/apps/wr/components/ui/table/chkgdTable/rainChkgd/rainChkgdTable.tsx b/apps/wr/components/ui/table/chkgdTable/rainChkgd/rainChkgdTable.tsx index 6fc2c0632..b29d8d935 100644 --- a/apps/wr/components/ui/table/chkgdTable/rainChkgd/rainChkgdTable.tsx +++ b/apps/wr/components/ui/table/chkgdTable/rainChkgd/rainChkgdTable.tsx @@ -4,7 +4,7 @@ import { useWrStore } from "@/app/store"; import type { TableUpperProps } from "@/app/store/common/type/header"; import { rainPageSize, type rainChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn"; import type { chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList"; -import { tableData } from "@/components/lib/func/commom"; +import { codeToText, tableData } from "@/components/lib/func/commom"; import { chRowspanTable, rainChkTableData @@ -89,15 +89,18 @@ export default function RainChkgdTable({ } ) }) + return { ...item, ...bud[0], + utztnUsgCdText: codeToText(item.guideDetails[0].utztnUsgCd, 'dmdUszCd'), + oilqMeasMthdText:codeToText(item.oilqMeasMthd, 'rainFcltFlowRate'), + operMngCdText:codeToText(item.operMngCd.trim(), 'rainRswtMng'), rainyDetails:rainyDetails, rowspan: item.rainyDetails?.length, }; }); - console.log('rainChg ', rainChg) setMakeTableData(rainChkTableData(rainChg)); } else { setMakeTableData([]); From ad6e4484b7a67f66d92c258d9f7a2d45491042a8 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Mon, 15 Sep 2025 15:36:56 +0900 Subject: [PATCH 12/46] =?UTF-8?q?=EB=AC=BC=EC=9E=AC=EC=9D=B4=EC=9A=A9=20?= =?UTF-8?q?=EA=B3=B5=ED=86=B5=EC=BD=94=EB=93=9C=20=EC=9E=91=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/sdmInfoInsertForm/component.tsx | 2 +- .../matMng/coMat/coMatRvw/page.tsx | 2 +- apps/wr/app/store/common/code/basicCode.tsx | 113 ++- apps/wr/app/store/common/code/index.ts | 92 ++- .../app/store/matDmd/ruseCaseMng/headList.tsx | 2 +- .../prfmncReg/chkgdnReg/rainChkgdn/excel.tsx | 2 +- .../chkgdnReg/rainChkgdn/headList.tsx | 2 +- .../chkgdnReg/rswrtChkgdn/headList.tsx | 4 +- .../chkgdnSttn/rainChkgdnSttn/headList.tsx | 4 +- .../chkgdnSttn/rswtChkgdnSttn/headList.tsx | 4 +- .../fcltSttn/pbnstSttn/headList.tsx | 2 +- .../ruseFcltMng/fcltSttn/rainSttn/excel.tsx | 4 +- .../fcltSttn/rainSttn/headList.tsx | 4 +- .../ruseFcltMng/fcltSttn/rswtSttn/excel.tsx | 12 +- .../ruseFcltMng/fcltSttn/rswtSttn/index.tsx | 29 +- apps/wr/components/lib/func/commom.tsx | 19 +- apps/wr/components/lib/func/mapUtil.ts | 2 +- .../buseWaterQulity/buseWaterQulity.tsx | 2 +- .../mngRegFormDetail/mngRegFormDetail.tsx | 1 - .../ui/form/fcltReg/rswtrReg/rswtrRegForm.tsx | 675 +++++++++--------- .../LayerPopUp/RainFacility/RainFacility.tsx | 6 +- .../LayerPopUp/RswtFacilty/RswtFacilty.tsx | 6 +- apps/wr/public/sample_rswtSttn.xlsx | Bin 10856 -> 9020 bytes 23 files changed, 537 insertions(+), 452 deletions(-) diff --git a/apps/dm/components/ui/sdmInfoInsertForm/component.tsx b/apps/dm/components/ui/sdmInfoInsertForm/component.tsx index 7c6c13b32..5cfa526b8 100644 --- a/apps/dm/components/ui/sdmInfoInsertForm/component.tsx +++ b/apps/dm/components/ui/sdmInfoInsertForm/component.tsx @@ -637,7 +637,7 @@ export function SdmInfoRegForm({ }} />
- +
( - +
= {}; +//export const lwCds: Record = {}; export const yn: SelectDataType[] = [ { val: "Y", text: "Y" }, { val: "N", text: "N" }, @@ -54,14 +53,14 @@ export const ruseSeCd: SelectDataType[] = [ { val: "개량", text: "개량" }, ]; -// export const ruseBizMthdCd: SelectDataType[] = [ -// { val: "재정", text: "재정" }, -// { val: "민간투자", text: "민간투자" }, -// { val: "자체", text: "자체" }, -// ]; +export const ruseBizMthdCd: SelectDataType[] = [ + { val: "재정", text: "재정" }, + { val: "민간투자", text: "민간투자" }, + { val: "자체", text: "자체" }, +]; // 공통 건축물 용도 -export const bdstUsgCd: SelectDataType[] =lwCds?.bdstUsgCd?.concat(lwCds?.rswtBdstType??[])??[] +//export const bdstUsgCd: SelectDataType[] =lwCds?.bdstUsgCd?.concat(lwCds?.rswtBdstType??[])??[] // [ // { val: "-1", text: "확인불가" }, @@ -112,7 +111,7 @@ export const bdstUsgCd: SelectDataType[] =lwCds?.bdstUsgCd?.concat(lwCds?.rswtBd // { val: "45", text: "기타" }, // ]; - export const rswtBdstType: SelectDataType[] = lwCds?.rswtBdstType??[] +// export const rswtBdstType: SelectDataType[] = lwCds?.rswtBdstType??[] //[ // { val: "17", text: "숙박업" }, // { val: "18", text: "목욕장업" }, @@ -221,7 +220,7 @@ export const chBuCd = [ // ]; //물리화학적처리(스크린, 응집, 침전)/생물학적처리(활성슬러지법 등)/소독(염소, UV 등)/기타 -export const rswtPrscCdMthdCd = lwCds['rswtPrscCdMthdCd']??[] +//export const rswtPrscCdMthdCd = lwCds['rswtPrscCdMthdCd']??[] // { // val: "물리화학적처리(스크린,응집,침전)", // text: "물리화학적처리(스크린,응집,침전)", @@ -389,55 +388,55 @@ export const sewageOutFclttUse = [ text: "공업용수", }, ]; -const codeMApping = { - WR001: "bdstUsgCd", - WR002: "rswtBdstType", - WR003: "rainFcltCd", - WR004: "bdstGrntchClass", - WR005: "rswtPrscCdMthdCd", // 아직 디 못바꿈 - WR006: "orgwtKndCd", //작업 완ㅛ - WR007: "ruseMngMtd", // 작업완료 - WR008: "rusePrcsMthdCd", //w작업완료 - WR009: "erctUswtrPrcsMeth",//w작업완료 - WR010: "ruseFcltSpot",// inout은 yn 만 사용해야 함으로 해당 코드는 사용안함. - WR011: "pplQulity", - WR012: "pplLenght", - WR013: "bdstFilterYn", // 사용 불가 yn만 사용해야함으로 해당코드 사용 안함 - WR014: "rainRswtMng", // 지도점검 등록 시변경 - WR015: "rainFcltFlowRate", //지도점검 등록 시변경 - WR016: "dmdUszCd", // 지도점검 등록 시변경 - WR017: "sewageInFcltUse", //하수재이용 장내 - WR018: "sewageOutFclttUse", // 하수재이용 장외 - WR019: "htdPowerMthdCd", - WR020: "htdUtztnUsgCd", -}; -export const getCommonUpCd = async () => { - const upCd = await getFetchWithCount( - fetchType.LOCAL, - "/cms-service/api/v1/up-codes?keyword=&upCd=&cdSe=&useYn=Y&siteId=WR&page=0&size=100&sort=string" - ); +// const codeMApping = { +// WR001: "bdstUsgCd", +// WR002: "rswtBdstType", +// WR003: "rainFcltCd", +// WR004: "bdstGrntchClass", +// WR005: "rswtPrscCdMthdCd", // 아직 디 못바꿈 +// WR006: "orgwtKndCd", //작업 완ㅛ +// WR007: "ruseMngMtd", // 작업완료 +// WR008: "rusePrcsMthdCd", //w작업완료 +// WR009: "erctUswtrPrcsMeth",//w작업완료 +// WR010: "ruseFcltSpot",// inout은 yn 만 사용해야 함으로 해당 코드는 사용안함. +// WR011: "pplQulity", +// WR012: "pplLenght", +// WR013: "bdstFilterYn", // 사용 불가 yn만 사용해야함으로 해당코드 사용 안함 +// WR014: "rainRswtMng", // 지도점검 등록 시변경 +// WR015: "rainFcltFlowRate", //지도점검 등록 시변경 +// WR016: "dmdUszCd", // 지도점검 등록 시변경 +// WR017: "sewageInFcltUse", //하수재이용 장내 +// WR018: "sewageOutFclttUse", // 하수재이용 장외 +// WR019: "htdPowerMthdCd", +// WR020: "htdUtztnUsgCd", +// }; +// export const getCommonUpCd = async () => { +// const upCd = await getFetchWithCount( +// fetchType.LOCAL, +// "/cms-service/api/v1/up-codes?keyword=&upCd=&cdSe=&useYn=Y&siteId=WR&page=0&size=100&sort=string" +// ); - const upWrCode: string[] = upCd.content - .filter((item: any) => item.upCd.slice(0, 2) === "WR") - .map((cd: any) => cd.upCd); +// const upWrCode: string[] = upCd.content +// .filter((item: any) => item.upCd.slice(0, 2) === "WR") +// .map((cd: any) => cd.upCd); - await Promise.all( - upWrCode.map(async (cd) => { - const mapping = codeMApping[cd as keyof typeof codeMApping]; - if (!mapping) return; +// await Promise.all( +// upWrCode.map(async (cd) => { +// const mapping = codeMApping[cd as keyof typeof codeMApping]; +// if (!mapping) return; - const lwCd = await getFetchWithCount( - fetchType.LOCAL, - `/cms-service/api/v1/lwpo-cds/up-cd/${cd}` - ); +// const lwCd = await getFetchWithCount( +// fetchType.LOCAL, +// `/cms-service/api/v1/lwpo-cds/up-cd/${cd}` +// ); - const list = Array.isArray(lwCd) ? lwCd : lwCd.content ?? []; +// const list = Array.isArray(lwCd) ? lwCd : lwCd.content ?? []; - lwCds[mapping] = list.map((it: any) => ({ - text: it.lwpoCdNm, - val: it.lwpoCd, - })); - }) - ); - -}; \ No newline at end of file +// lwCds[mapping] = list.map((it: any) => ({ +// text: it.lwpoCdNm, +// val: it.lwpoCd, +// })); +// }) +// ); +// console.log('lwCds ', lwCds) +// }; \ No newline at end of file diff --git a/apps/wr/app/store/common/code/index.ts b/apps/wr/app/store/common/code/index.ts index 822c95ddb..9905db719 100644 --- a/apps/wr/app/store/common/code/index.ts +++ b/apps/wr/app/store/common/code/index.ts @@ -1,4 +1,4 @@ -import { getFetch } from "@/components/lib/api"; +import { fetchType, getFetch, getFetchWithCount } from "@/components/lib/api"; import type { EnvPartSelectDataType, SelectDataType, @@ -7,14 +7,94 @@ import { bdstFilterYn, bdstIncenYn, chBuCd, - lwCds, - rswtPrscCdMthdCd, + ruseBizMthdCd, ruseSeCd, yn, } from "./basicCode"; export const btnClass = "p-4 m-2 text-white rounded-sm text-lg font-medium "; const laeSecd = "41"; +export const lwCds: Record = {}; + + + +const codeMApping = { + WR001: "bdstUsgCd", + WR002: "rswtBdstType", + WR003: "rainFcltCd", + WR004: "bdstGrntchClass", + WR005: "rswtPrscCdMthdCd", // 아직 디 못바꿈 + WR006: "orgwtKndCd", //작업 완ㅛ + WR007: "ruseMngMtd", // 작업완료 + WR008: "rusePrcsMthdCd", //w작업완료 + WR009: "erctUswtrPrcsMeth",//w작업완료 + WR010: "ruseFcltSpot",// inout은 yn 만 사용해야 함으로 해당 코드는 사용안함. + WR011: "pplQulity", + WR012: "pplLenght", + WR013: "bdstFilterYn", // 사용 불가 yn만 사용해야함으로 해당코드 사용 안함 + WR014: "rainRswtMng", // 지도점검 등록 시변경 + WR015: "rainFcltFlowRate", //지도점검 등록 시변경 + WR016: "dmdUszCd", // 지도점검 등록 시변경 + WR017: "sewageInFcltUse", //하수재이용 장내 + WR018: "sewageOutFclttUse", // 하수재이용 장외 + WR019: "htdPowerMthdCd", + WR020: "htdUtztnUsgCd", +}; +export const getCommonUpCd = async (set:any) => { + + try { + let lwCdCode :Record = {}; + const upCd = await getFetchWithCount( + fetchType.LOCAL, + "/cms-service/api/v1/up-codes?keyword=&upCd=&cdSe=&useYn=Y&siteId=WR&page=0&size=100&sort=string" + ); + + const upWrCode: string[] = upCd.content + .filter((item: any) => item.upCd.slice(0, 2) === "WR") + .map((cd: any) => cd.upCd); + + await Promise.all( + upWrCode.map(async (cd) => { + const mapping = codeMApping[cd as keyof typeof codeMApping]; + if (!mapping) return; + + const lwCd = await getFetchWithCount( + fetchType.LOCAL, + `/cms-service/api/v1/lwpo-cds/up-cd/${cd}` + ); + + const list = Array.isArray(lwCd) ? lwCd : lwCd.content ?? []; + + lwCds[mapping] = list.map((it: any) => ({ + text: it.lwpoCdNm, + val: it.lwpoCd, + })); + }) + ); + lwCdCode=lwCds + set((state: comCodeState) => ({ + code: { + ...state.code, + rainFcltCd: lwCdCode['rainFcltCd']??[], + bdstUsgCd: lwCdCode['bdstUsgCd']??[] , + orgwtKndCd: lwCdCode['orgwtKndCd']??[] , + pplQulity: lwCdCode['pplQulity']??[] , + pplLenght: lwCdCode['pplLenght']??[] , + dmdUszCd: lwCdCode['dmdUszCd']??[] , + ruseMngMtd: lwCdCode['ruseMngMtd']??[], + rusePrcsMthdCd: lwCdCode['rusePrcsMthdCd']??[], + erctUswtrPrcsMeth: lwCdCode['erctUswtrPrcsMeth']??[], + bdstGrntchClass: lwCdCode['bdstGrntchClass']??[], + htdPowerMthdCd: lwCdCode['htdPowerMthdCd']??[], + htdUtztnUsgCd: lwCdCode['htdUtztnUsgCd']??[], + rswtBdstType:lwCdCode['rswtBdstType']??[] , + }, + })); + }catch(e){ + console.log('com code error ', e) + } + +}; //물재이용 주소 코드: devU01TX0FVVEgyMDI1MDgyNTEwMzkwNDExNjEwNTM= export const buildingType = { RST: "RST", @@ -172,7 +252,7 @@ export type comCodeState = { bdstFilterYn: SelectDataType[]; bdstIncenYn: SelectDataType[]; bdstGrntchClass: SelectDataType[]; - rswtPrscCdMthdCd: SelectDataType[]; + // rswtPrscCdMthdCd: SelectDataType[]; htdPowerMthdCd: SelectDataType[]; htdUtztnUsgCd: SelectDataType[]; rswtBdstType:SelectDataType[]; @@ -202,13 +282,13 @@ export const comCodeStateExport: comCodeState = { buildingType: buildingType, ruseMngMtd: lwCds['ruseMngMtd']??[], ruseSeCd: ruseSeCd, - ruseBizMthdCd: lwCds['ruseBizMthdCd']??[], + ruseBizMthdCd: ruseBizMthdCd, rusePrcsMthdCd: lwCds['rusePrcsMthdCd']??[], erctUswtrPrcsMeth: lwCds['erctUswtrPrcsMeth']??[], bdstFilterYn: bdstFilterYn, bdstIncenYn: bdstIncenYn, bdstGrntchClass: lwCds['bdstGrntchClass']??[], - rswtPrscCdMthdCd: rswtPrscCdMthdCd, // 공단연락오면 바꿔야함 + // rswtPrscCdMthdCd: rswtPrscCdMthdCd, // 공단연락오면 바꿔야함 htdPowerMthdCd: lwCds['htdPowerMthdCd']??[], htdUtztnUsgCd: lwCds['htdUtztnUsgCd']??[], userSiSggCd: laeSecd, diff --git a/apps/wr/app/store/matDmd/ruseCaseMng/headList.tsx b/apps/wr/app/store/matDmd/ruseCaseMng/headList.tsx index 024f40fe7..33d5ee353 100644 --- a/apps/wr/app/store/matDmd/ruseCaseMng/headList.tsx +++ b/apps/wr/app/store/matDmd/ruseCaseMng/headList.tsx @@ -167,7 +167,7 @@ export const ruseCaseHeadListExport: TableUpperProps[] = [ }, { id: "grnteWqPh", - title: "수소이온농도(ph)​", + title: "수소이온농도(pH)​", visible: true, row: 1, }, diff --git a/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/excel.tsx b/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/excel.tsx index 84619f307..21636860a 100644 --- a/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/excel.tsx +++ b/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/excel.tsx @@ -189,7 +189,7 @@ export const excelToRainChkData = (excelData: any, year: string) => { rain.rainyDetails?.forEach((key) => { if (key.ph?.length > 1 && isInvalidNumber(key.ph)) { - issues.push(defaultMessage + `PH: 숫자 형식 아님 /입력값:${key.ph}`); + issues.push(defaultMessage + `pH: 숫자 형식 아님 /입력값:${key.ph}`); } if (key.trbt?.length > 1 && isInvalidNumber(key.trbt)) { issues.push( diff --git a/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList.tsx b/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList.tsx index d2c0bf7d7..b615b6532 100644 --- a/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList.tsx +++ b/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList.tsx @@ -152,7 +152,7 @@ export const rainChkgdnHeadListExport: TableUpperProps[] = [ { id: "totalRuseFcltUtztnQnt", title: "연간빗물이용량(m³)" }, { id: "ph", - title: "수소이온농도(ph)", + title: "수소이온농도(pH)", upName: "useQuilty", upSequnce: 1, type: "number", diff --git a/apps/wr/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/headList.tsx b/apps/wr/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/headList.tsx index 652e0fea7..6e94ec4e6 100644 --- a/apps/wr/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/headList.tsx +++ b/apps/wr/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/headList.tsx @@ -168,7 +168,7 @@ export const rswtChkHeadListExport: TableUpperProps[] = [ { id: "crmty", title: "색도(도)", upName: "useQuilty", upSequnce: 6 ,type: "number"}, { id: "tn", title: "총질소(T-N)(mg/L)", upName: "useQuilty", upSequnce: 7 ,type: "number"}, { id: "tph", title: "총인(T-P)(mg/L)", upName: "useQuilty", upSequnce: 8 ,type: "number"}, - { id: "ph", title: "수소이온농도(ph)", upName: "useQuilty", upSequnce: 9,type: "text" }, + { id: "ph", title: "수소이온농도(pH)", upName: "useQuilty", upSequnce: 9,type: "text" }, { id: "clIonQnt", title: "염화물(mg/L)", upName: "useQuilty", upSequnce: 10 ,type: "number"}, { @@ -238,7 +238,7 @@ export const rswtChkHeadListExport: TableUpperProps[] = [ }, { id: "tn", title: "T-N", upName: "detailQulity", upSequnce: 8, edit: true }, { id: "tph", title: "T-P", upName: "detailQulity", upSequnce: 9, edit: true }, - { id: "ph", title: "PH", upName: "detailQulity", upSequnce: 10, edit: true }, + { id: "ph", title: "pH", upName: "detailQulity", upSequnce: 10, edit: true }, { id: "clIonQnt", title: "염화물", diff --git a/apps/wr/app/store/prfmncSttn/chkgdnSttn/rainChkgdnSttn/headList.tsx b/apps/wr/app/store/prfmncSttn/chkgdnSttn/rainChkgdnSttn/headList.tsx index 0d995fbe3..51b9634d3 100644 --- a/apps/wr/app/store/prfmncSttn/chkgdnSttn/rainChkgdnSttn/headList.tsx +++ b/apps/wr/app/store/prfmncSttn/chkgdnSttn/rainChkgdnSttn/headList.tsx @@ -15,7 +15,7 @@ export const rainChkgdnHeadSttnExport: TableUpperProps[] = [ { id: "totalRuseFcltUtztnQnt", title: "연간빗물이용량(m³)" }, { id: "ph", - title: "수소이온농도(ph)", + title: "수소이온농도(pH)", upName: "useQuilty", upSequnce: 1, type: "number", @@ -153,7 +153,7 @@ export const rswtDetailHeadListExport: TableUpperProps[] = [ upName: "detailQulity", upSequnce: 9, }, - { id: "ph", title: "PH", upName: "detailQulity", upSequnce: 10 }, + { id: "ph", title: "pH", upName: "detailQulity", upSequnce: 10 }, { id: "clIonQnt", title: "염화물", diff --git a/apps/wr/app/store/prfmncSttn/chkgdnSttn/rswtChkgdnSttn/headList.tsx b/apps/wr/app/store/prfmncSttn/chkgdnSttn/rswtChkgdnSttn/headList.tsx index eb4d70781..831266e36 100644 --- a/apps/wr/app/store/prfmncSttn/chkgdnSttn/rswtChkgdnSttn/headList.tsx +++ b/apps/wr/app/store/prfmncSttn/chkgdnSttn/rswtChkgdnSttn/headList.tsx @@ -64,7 +64,7 @@ export const rswtChkSttnHeadListExport: TableUpperProps[] = [ upSequnce: 8, type: "number", }, - { id: "ph", title: "수소이온농도(ph)", upName: "useQuilty", upSequnce: 9, type: "text" }, + { id: "ph", title: "수소이온농도(pH)", upName: "useQuilty", upSequnce: 9, type: "text" }, { id: "clIonQnt", title: "염화물(mg/L)", @@ -132,7 +132,7 @@ export const rswtDetailSttnHeadListExport: TableUpperProps[] = [ }, { id: "tn", title: "T-N", upName: "detailQulity", upSequnce: 8}, { id: "tph", title: "T-P", upName: "detailQulity", upSequnce: 9 }, - { id: "ph", title: "PH", upName: "detailQulity", upSequnce: 10 }, + { id: "ph", title: "pH", upName: "detailQulity", upSequnce: 10 }, { id: "clIonQnt", title: "염화물", diff --git a/apps/wr/app/store/ruseFcltMng/fcltSttn/pbnstSttn/headList.tsx b/apps/wr/app/store/ruseFcltMng/fcltSttn/pbnstSttn/headList.tsx index 60b726e2b..a1d1193b2 100644 --- a/apps/wr/app/store/ruseFcltMng/fcltSttn/pbnstSttn/headList.tsx +++ b/apps/wr/app/store/ruseFcltMng/fcltSttn/pbnstSttn/headList.tsx @@ -461,7 +461,7 @@ export const ruseGuranteeHeadListExport: TableUpperProps[] = [ { id: "crmty", title: "색도(도)", visible: true }, { id: "tn", title: "총질소(mg/L)", visible: true }, { id: "tph", title: "총인(mg/L)", visible: true }, - { id: "ph", title: "수소이온농도(ph)", visible: true }, + { id: "ph", title: "수소이온농도(pH)", visible: true }, { id: "clIonQnt", title: "염화물(mg/L)", visible: true }, { id: "cdtnv", title: "전기전도도(μs/cm)​", visible: true }, ]; diff --git a/apps/wr/app/store/ruseFcltMng/fcltSttn/rainSttn/excel.tsx b/apps/wr/app/store/ruseFcltMng/fcltSttn/rainSttn/excel.tsx index 65f02e26b..e82ca7b3c 100644 --- a/apps/wr/app/store/ruseFcltMng/fcltSttn/rainSttn/excel.tsx +++ b/apps/wr/app/store/ruseFcltMng/fcltSttn/rainSttn/excel.tsx @@ -1,6 +1,6 @@ import type { SelectDataType } from "@common/business_components/ui"; import type { customRainBdst } from "../../fcltReg/rainReg"; -import { bdstUsgCd } from "@/app/store/common/code/basicCode"; +import { lwCds } from "@/app/store/common/code"; //TODO: 공통코드시 삭제되니 수정 해야됨 export const excelRainSttnParsing = ( excel: { data: customRainBdst[] }, @@ -16,7 +16,7 @@ export const excelRainSttnParsing = ( sggCode.find((sgg) => sgg.val === item.sggCd?.toString())?.text ?? "", item.bdstNm ?? "", item.daddr ?? "", - bdstUsgCd.find((cd) => cd.val === item.reuseBuilding?.[0]?.bdstUsgCd.toString())?.text ?? "", //건축물용도 + lwCds?.bdstUsgCd?.find((cd) => cd.val === item.reuseBuilding?.[0]?.bdstUsgCd.toString())?.text ?? "", //건축물용도 String(item.frstArchPrmsnDt ?? ""), String(item.archArea.split('.')[0] === '-1' ? '확인불가' : item.archArea.split('.')[0]), String(item.chgBuilding.length > 0 ? "Y" : "N"), diff --git a/apps/wr/app/store/ruseFcltMng/fcltSttn/rainSttn/headList.tsx b/apps/wr/app/store/ruseFcltMng/fcltSttn/rainSttn/headList.tsx index e78183cc5..89bcc0e29 100644 --- a/apps/wr/app/store/ruseFcltMng/fcltSttn/rainSttn/headList.tsx +++ b/apps/wr/app/store/ruseFcltMng/fcltSttn/rainSttn/headList.tsx @@ -445,7 +445,7 @@ export const rainSttnDetailNodeListExport:CommonTableProps[] = [ rowSpan: 1, colSpan: 4 }, - { id: "ph", title: "PH", + { id: "ph", title: "pH", visible: true, row: 2, rowSpan: 1, @@ -524,7 +524,7 @@ export const rainSttnDetailHeadListExport:CommonTableProps[] = [ colSpan: 1 }, - { id: "ph", title: "PH", + { id: "ph", title: "pH", visible: true, row: 1, rowSpan: 1, diff --git a/apps/wr/app/store/ruseFcltMng/fcltSttn/rswtSttn/excel.tsx b/apps/wr/app/store/ruseFcltMng/fcltSttn/rswtSttn/excel.tsx index b3d3835c2..847353b32 100644 --- a/apps/wr/app/store/ruseFcltMng/fcltSttn/rswtSttn/excel.tsx +++ b/apps/wr/app/store/ruseFcltMng/fcltSttn/rswtSttn/excel.tsx @@ -1,21 +1,19 @@ -import { bdstUsgCd } from "@/app/store/common/code/basicCode"; import type { SelectDataType } from "@common/business_components/ui"; import type { customRswtBdst } from "../../fcltReg/rswtReg"; + export const excelRSwtSttnParsing = ( excel: { data: customRswtBdst[] }, - sidoCode: SelectDataType[], - sggCode: SelectDataType[] + code: Record ): string[][] => { const excelExportData: string[][] = []; excel.data.forEach((item) => { - console.log("item", item) excelExportData.push([ - sidoCode.find((sido) => sido.val === item.ctpvCd.toString())?.text ?? "", - sggCode.find((sgg) => sgg.val === item.sggCd.toString())?.text ?? "", + code.sidoCode?.find((sido) => sido.val === item.ctpvCd.toString())?.text ?? "", + code.sggCode?.find((sgg) => sgg.val === item.sggCd.toString())?.text ?? "", item.bdstNm ?? "", item.daddr ?? "", - bdstUsgCd.find((cd)=> cd.val === item.reuseBuilding?.[0]?.bdstUsgCd.toString())?.text ?? "", //건축물용도 + code?.bdstUsgCd?.find((cd)=> cd.val === item.reuseBuilding?.[0]?.bdstUsgCd.toString())?.text ?? "", //건축물용도 String(item.frstArchPrmsnDt ?? ""), String(item.archArea.split('.')[0] === '-1' ? '확인불가' : item.archArea.split('.')[0]), // String(item.reuseBuilding?.[0]?.rswtrObj.wtrUsqty ?? "0"), //물사용량 diff --git a/apps/wr/app/store/ruseFcltMng/fcltSttn/rswtSttn/index.tsx b/apps/wr/app/store/ruseFcltMng/fcltSttn/rswtSttn/index.tsx index 1d4617442..1abcf2f4c 100644 --- a/apps/wr/app/store/ruseFcltMng/fcltSttn/rswtSttn/index.tsx +++ b/apps/wr/app/store/ruseFcltMng/fcltSttn/rswtSttn/index.tsx @@ -31,8 +31,7 @@ export type rswtSttnState = { type rswtSttnActions = { rswtSttnInit: (isExcel: boolean, page: number, total: number, con: string, txt: string, - sidoCode: SelectDataType[], - sggCode: SelectDataType[]) => void; + code: Record) => void; rswtSttnSearch: (isExcel: boolean, page: number, total: number, con: string, txt: string, sidoCode: SelectDataType[], sggCode: SelectDataType[]) => void; @@ -60,9 +59,7 @@ export const rswtSttnActionsExport: (set: any) => rswtSttnActions = ( set: any ) => { return { - rswtSttnInit: async (isExcel: boolean, page: number, total: number, con: string, txt: string, - sidoCode: SelectDataType[], - sggCode: SelectDataType[]) => { + rswtSttnInit: async (isExcel: boolean, page: number, total: number, con: string, txt: string, code: Record) => { try { const rswtSttnRes = await getFetchWithCount( fetchType.WR, @@ -73,17 +70,17 @@ export const rswtSttnActionsExport: (set: any) => rswtSttnActions = ( (txt ? `/${txt}` : "") ); if (isExcel) { - const rswtExcel = excelRSwtSttnParsing(rswtSttnRes, sidoCode, sggCode); - set((state: rswtSttnState) => { - return { - ...state, - rswtSttn: { - ...state.rswtSttn, - excelList: rswtExcel, - }, - }; - }); - } else + const rswtExcel = excelRSwtSttnParsing(rswtSttnRes, code); + set((state: rswtSttnState) => { + return { + ...state, + rswtSttn: { + ...state.rswtSttn, + excelList: rswtExcel, + }, + }; + }); + } set((state: rswtSttnState) => { return { diff --git a/apps/wr/components/lib/func/commom.tsx b/apps/wr/components/lib/func/commom.tsx index 144aace66..1e15fae1c 100644 --- a/apps/wr/components/lib/func/commom.tsx +++ b/apps/wr/components/lib/func/commom.tsx @@ -1,5 +1,4 @@ -import type { comCodeState } from "@/app/store/common/code"; -import { lwCds } from "@/app/store/common/code/basicCode"; +import { lwCds, type comCodeState } from "@/app/store/common/code"; import { filePickedBlob, filePickedBlobArray, @@ -34,12 +33,11 @@ export const getCity = (val: string, sggCd: SelectDataType[]) => { // cd text 넣기 export const tableData = (data: any, code: comCodeState) => { const chCode = code.code; - return data?.map( (item: { sggCd: string; ctpvCd: string; - reuseBuilding: { lawTrgtYn: any; bdstUsgCd: any }[]; + reuseBuilding: { lawTrgtYn: string; bdstUsgCd: string ,grntchBdstCertGrd:string}[]; }) => { let returnData = {}; const sggText = chCode.sggCd.find( @@ -49,16 +47,25 @@ export const tableData = (data: any, code: comCodeState) => { (cd) => cd.val === String(item.ctpvCd).trim() )?.text; if (item?.reuseBuilding?.length > 0) { - const bdsgUsgText = chCode.bdstUsgCd.find( - (cd) => Number(cd.val) === item?.reuseBuilding[0]?.bdstUsgCd + + const bdsgUsgText = chCode?.bdstTotalUsgType?.find( + (cd) => cd.val === item?.reuseBuilding[0]?.bdstUsgCd )?.text; + const lawTrgtYn = item?.reuseBuilding[0]?.lawTrgtYn; + + + const grntchBdstCertGrdText =chCode?.bdstGrntchClass?.find( + (cd) => cd.val === item?.reuseBuilding[0]?.grntchBdstCertGrd + )?.text; + returnData = { ...item, sggText: sggText ?? "없음", cityText: cityText ?? "없음", bdsgUsgText: bdsgUsgText, lawTrgtYn: lawTrgtYn, + grntchBdstCertGrdText:grntchBdstCertGrdText }; } else { returnData = { diff --git a/apps/wr/components/lib/func/mapUtil.ts b/apps/wr/components/lib/func/mapUtil.ts index 13ce5b82a..a39bf17d7 100644 --- a/apps/wr/components/lib/func/mapUtil.ts +++ b/apps/wr/components/lib/func/mapUtil.ts @@ -197,7 +197,7 @@ export const getOverLayObj = (fclType: string, data: any,code?:any) => { newObj = { 건물용도: code?.bdstUsgCd.find((item) => item.val===String(data?.reuseBuilding[0].bdstUsgCd) )?.text ?? '확인불가', 설치완료일: data?.reuseBuilding[0]?.instlCmptnDt ?? '확인불가', - "주요 처리공정": code?.rswtPrscCdMthdCd.find((item) => item.val===data?.reuseBuilding[0]?.rswtrObj.filtrTrtmfctProcs)?.text ?? '확인불가', + "주요 처리공정": data?.reuseBuilding[0]?.rswtrObj.filtrTrtmfctProcs ?? '확인불가', 원수종류: code?.orgwtKndCd.find((item) => item.val === data?.reuseBuilding[0]?.rswtrObj.orgwtKndCd)?.text ?? '확인불가', //이용용도: isCode.filtrTrtmfctUsgCd data?.reuseBuilding[0]?.rswtrObj.altUswtrKndCd ?? '확인불가', }; diff --git a/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/buseWaterQulity/buseWaterQulity.tsx b/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/buseWaterQulity/buseWaterQulity.tsx index fd9ed6126..dd43658d1 100644 --- a/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/buseWaterQulity/buseWaterQulity.tsx +++ b/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/buseWaterQulity/buseWaterQulity.tsx @@ -460,7 +460,7 @@ export function BuseWaterQulity({ />
- +
void; readonly?: boolean; isMap?: boolean; - }) { - const { code, rswtBdstUpdate, rswtBdstReg } = useWrStore( - (state) => state - ); + const { code, rswtBdstUpdate, rswtBdstReg } = useWrStore((state) => state); // const [divStyle, setDivStyle] = useState("h-[53vh]"); useEffect(() => { - if(isMap){ + if (isMap) { } }, [isMap]); // const defaultValues: z.infer = rswtZod.parse({}); @@ -64,29 +61,30 @@ export default function RswtrRegForm({ "reuseBuilding.0.rswtrObj.filtrTrtmfctProcs", ]); - const { t } = useTranslation('base'); + const { t } = useTranslation("base"); const onSubmit = (values: z.infer) => { if (isModal) { const handleConfirm = async () => { rswtBdstReg(values, "41"); if (setIsModal) setIsModal(false); }; - confirmToast(t('isInsertMsg'), handleConfirm); - + confirmToast(t("isInsertMsg"), handleConfirm); } else { const handleConfirm = async () => { rswtBdstUpdate(values, "41"); }; - confirmToast(t('isUpdateMsg'), handleConfirm); + confirmToast(t("isUpdateMsg"), handleConfirm); } }; - const filtrTrtmfctCpct = form.watch('reuseBuilding.0.rswtrObj.filtrTrtmfctCpct') + const filtrTrtmfctCpct = form.watch( + "reuseBuilding.0.rswtrObj.filtrTrtmfctCpct" + ); const cleanRswtData = (raw: any): z.infer => { const buildings = - raw?.reuseBuilding && raw.reuseBuilding.length > 0 - ? raw.reuseBuilding - : [{}]; + raw?.reuseBuilding && raw.reuseBuilding.length > 0 + ? raw.reuseBuilding + : [{}]; return { ...raw, frstArchPrmsnDt: raw?.frstArchPrmsnDt @@ -95,20 +93,21 @@ export default function RswtrRegForm({ archChgPrmsnDt: raw?.archChgPrmsnDt ? new Date(raw?.archChgPrmsnDt) : null, - reuseBuilding:buildings.map((item: any) => ({ + reuseBuilding: buildings.map((item: any) => ({ ...item, instlCmptnDt: item?.instlCmptnDt ? new Date(item.instlCmptnDt) : new Date(), // item?.instlCmptnDt가 유효하지 않으면 현재 날짜로 초기화 operMngCd: item?.operMngCd || "", // null → "" - instlCstSprtYn: item?.instlCstSprtYn || 'N', // null → "Y" - grntchBdstCertYn: item?.grntchBdstCertYn ||'N', + instlCstSprtYn: item?.instlCstSprtYn || "N", // null → "Y" + grntchBdstCertYn: item?.grntchBdstCertYn || "N", bdstUsgCd: item?.bdstUsgCd ?? Number("-1"), // null → "-1" rswtrObj: { ...item?.rswtrObj, filtrTrtmfctYn: item?.rainyObj?.filtrTrtmfctYn || code.yn[0]?.val, filtrTrtmfctCpct: item?.rswtrObj?.filtrTrtmfctCpct ?? null, - filtrTrtmfctProcs: item?.rswtrObj?.filtrTrtmfctProcs || code.rswtPrscCdMthdCd[0]?.val, + filtrTrtmfctProcs: + item?.rswtrObj?.filtrTrtmfctProcs||'', orgwtKndCd: item?.rswtrObj?.orgwtKndCd || code.orgwtKndCd[0]?.val, }, })), @@ -118,8 +117,8 @@ export default function RswtrRegForm({ // console.log(' formform ', form.watch()) // },[form.formState]) useEffect(() => { - console.log(' filtrTrtmfctCpct ', filtrTrtmfctCpct) - }, [filtrTrtmfctCpct]) + console.log(" filtrTrtmfctCpct ", filtrTrtmfctCpct); + }, [filtrTrtmfctCpct]); useEffect(() => { console.log("form errors:", form.formState.errors); @@ -133,7 +132,6 @@ export default function RswtrRegForm({ form.setValue("reuseBuilding.0.instlCstSprtAmt", 0); } - if (grntchBdstCertYn === "D") { form.setValue("reuseBuilding.0.grntchBdstCertYr", "0000"); form.setValue("reuseBuilding.0.grntchBdstCertNo", "확인불가"); @@ -141,7 +139,6 @@ export default function RswtrRegForm({ } else if (instlCstSprtYn === "D") { form.setValue("reuseBuilding.0.instlCstSprtAmt", -1); } - }, [grntchBdstCertYn, instlCstSprtYn, filtrTrtmfctProcs, form]); useEffect(() => { @@ -149,7 +146,11 @@ export default function RswtrRegForm({ }, [rswtForm, form]); + useEffect(() =>{ + console.log('code orgin ', code) + console.log('code ', code.orgwtKndCd) + },[code]) return (
@@ -176,335 +177,343 @@ export default function RswtrRegForm({
{/* */} - {isModal && rswtForm != undefined ? : <>} - {isModal ? ( -

- 중수도 시설 정보{" "} -

- ) : ( - <> - )} -

기본정보

-
-
- ( - - field.onChange(date), + {isModal && rswtForm != undefined ? : <>} + {isModal ? ( +

+ 중수도 시설 정보{" "} +

+ ) : ( + <> + )} +

기본정보

+
+
+ ( + + field.onChange(date), + }} + selectClass={"w-full"} + readOnly={readonly} + /> + + )} + /> +
+
+ { + const value = field.value; + const isUnknown = value === null || value === -1; // 또는 Number(value) === -1 + return ( + + { + // 입력 시 자동으로 확인불가 해제 + if (isUnknown && !readonly) { + field.onChange(""); // 초기화 + } + }} + onChange={(e) => { + if (readonly) return; + handleMinusNumberChange(e, field.onChange); }} - selectClass={"w-full"} readOnly={readonly} + maxLength={numSize} /> - )} - /> -
-
- { - const value = field.value; - const isUnknown = value === null || value === -1; // 또는 Number(value) === -1 - return ( - - +
+
+
+

중수도 시설 정보

+
+ +
+
+ { + const value = field.value; + const isUnknown = value === null || value === -1; // 또는 Number(value) === -1 + + return ( + + { + // 입력 시 자동으로 확인불가 해제 + if (isUnknown && !readonly) { + console.log("value"); + field.onChange(""); // 초기화 } - onFocus={() => { - // 입력 시 자동으로 확인불가 해제 - if (isUnknown && !readonly) { - field.onChange(""); // 초기화 - } - }} - onChange={(e) => { - if (readonly) return; - handleMinusNumberChange(e, field.onChange); - }} - readOnly={readonly} - maxLength={numSize} - /> - - ); - }} - /> -
+ }} + onChange={(e) => { + if (readonly) return; + handleMinusNumberChange(e, field.onChange); + }} + readOnly={readonly} + maxLength={numSize} + /> + + ); + }} + />
-
-

중수도 시설 정보

+
+ ( + + {} : field.onChange} + value={field.value ?? code.orgwtKndCd[0]?.val} + readOnly={readonly} + /> + + )} + />
+
+ ( + + { + if (readonly) return; -
-
- { - const value = field.value; - const isUnknown = value === null || value === -1; // 또는 Number(value) === -1 + field.onChange(e.target.value); + }} + maxLength={txtSize} + /> + + )} + /> +
+
- return ( - - +

인센티브 정보

+
+
+

설치비(원) 지원

+
+
+
+ ( + + {} : field.onChange} + value={field.value || code.bdstIncenYn[0]?.val} + readOnly={readonly} + /> + + )} + /> +
+
+ { + const value = field.value; + const isUnknown = value === null || value === -1; // 또는 Number(value) === -1 + return ( + + { + // 입력 시 자동으로 확인불가 해제 + if (isUnknown && !readonly) { + field.onChange(""); // 초기화 } - onFocus={() => { - // 입력 시 자동으로 확인불가 해제 - if (isUnknown && !readonly) { + }} + onChange={(e) => { + if (readonly) return; + handleMinusNumberChange(e, field.onChange); + }} + disabled={ + instlCstSprtYn === "N" || instlCstSprtYn === "D" + } + maxLength={numSize} + /> + + ); + }} + /> +
+
- console.log('value') - field.onChange(""); // 초기화 - } - }} - onChange={(e) => { - if (readonly) return; - handleMinusNumberChange(e, field.onChange); - }} - readOnly={readonly} - maxLength={numSize} - /> - - ); - }} - /> -
-
- ( - - { } : field.onChange} - value={field.value ?? code.orgwtKndCd[0]?.val} - readOnly={readonly} - /> - - )} - /> -
-
- ( - - { } : field.onChange} - value={field.value || code.rswtPrscCdMthdCd[0]?.val} - readOnly={readonly} - /> - - )} - /> -
+
+

녹색건축물 인증

+
+
+
+ ( + + {} : field.onChange} + value={field.value || code.yn[0]?.val} + readOnly={readonly} + /> + + )} + />
- -
-

인센티브 정보

-
-
-

설치비(원) 지원

-
-
-
- ( - - { } : field.onChange} - value={field.value || code.bdstIncenYn[0]?.val} - readOnly={readonly} - /> - - )} - /> -
-
- { - const value = field.value; - const isUnknown = value === null || value === -1; // 또는 Number(value) === -1 - return ( - - + { + const isUnknown = + field.value === null || field.value === "0000"; // 또는 Number(value) === -1 + return ( + + { + // 입력 시 자동으로 확인불가 해제 + if (isUnknown && !readonly) { + field.onChange(""); // 초기화 } - onFocus={() => { - // 입력 시 자동으로 확인불가 해제 - if (isUnknown && !readonly) { - field.onChange(""); // 초기화 - } - }} - onChange={(e) => { - if (readonly) return; - handleMinusNumberChange(e, field.onChange); - }} - disabled={instlCstSprtYn === "N" || instlCstSprtYn === "D"} - maxLength={numSize} - /> - - ); - }} - /> -
-
- -
-

녹색건축물 인증

-
-
-
- ( - - { } : field.onChange} - value={field.value || code.yn[0]?.val} - readOnly={readonly} + }} + value={isUnknown ? "확인불가" : (field.value ?? "")} + onChange={(e) => { + if (readonly) return; + if (e.target.value === "확인불가") { + field.onChange("0000"); + } else { + field.onChange(e.target.value); + } + }} + disabled={ + grntchBdstCertYn == "N" || grntchBdstCertYn == "D" + } + max={4} /> - )} - /> -
-
- { - const isUnknown = field.value === null || field.value === "0000"; // 또는 Number(value) === -1 - return ( - - { - // 입력 시 자동으로 확인불가 해제 - if (isUnknown && !readonly) { - field.onChange(""); // 초기화 - } - }} - value={ - isUnknown ? '확인불가' : field.value ?? ""} - onChange={(e) => { - if (readonly) return - if (e.target.value === '확인불가') { - field.onChange('0000'); - } else { - field.onChange(e.target.value); - } - }} - disabled={grntchBdstCertYn == "N" || grntchBdstCertYn == "D"} - max={4} - /> - - ) - }} - /> -
-
- { - const isUnknown = field.value === null || field.value === "0000"; // 또는 Number(value) === -1 - return ( - - { - // 입력 시 자동으로 확인불가 해제 - if (isUnknown && !readonly) { - field.onChange(""); // 초기화 - } - }} - value={ - isUnknown ? '확인불가' : field.value ?? ""} - onChange={(e) => { - if (readonly) return + ); + }} + /> +
+
+ { + const isUnknown = + field.value === null || field.value === "0000"; // 또는 Number(value) === -1 + return ( + + { + // 입력 시 자동으로 확인불가 해제 + if (isUnknown && !readonly) { + field.onChange(""); // 초기화 + } + }} + value={isUnknown ? "확인불가" : (field.value ?? "")} + onChange={(e) => { + if (readonly) return; - if (e.target.value === '확인불가') { - field.onChange(''); - } else { - field.onChange(e.target.value); - } - }} - disabled={grntchBdstCertYn == "N" || grntchBdstCertYn == "D"} - maxLength={txtSize} - /> - - ) - }} - /> -
-
- ( - - { } : field.onChange} - value={field.value || code.bdstGrntchClass[0]?.val} - readOnly={readonly} + if (e.target.value === "확인불가") { + field.onChange(""); + } else { + field.onChange(e.target.value); + } + }} + disabled={ + grntchBdstCertYn == "N" || grntchBdstCertYn == "D" + } + maxLength={txtSize} /> - )} - /> -
+ ); + }} + />
- +
+ ( + + {} : field.onChange} + value={field.value || code.bdstGrntchClass[0]?.val} + readOnly={readonly} + /> + + )} + /> +
+
+ {/* */} diff --git a/apps/wr/components/ui/map/LayerPopUp/RainFacility/RainFacility.tsx b/apps/wr/components/ui/map/LayerPopUp/RainFacility/RainFacility.tsx index 80bb8d7ec..96ecadcc9 100644 --- a/apps/wr/components/ui/map/LayerPopUp/RainFacility/RainFacility.tsx +++ b/apps/wr/components/ui/map/LayerPopUp/RainFacility/RainFacility.tsx @@ -191,8 +191,7 @@ export function RainFacility({ "1000000", String(con), seartchTxt ?? "", - code.cityCd, - code.sggCd + code as unknown as Record ); } }} @@ -249,8 +248,7 @@ export function RainFacility({ String(rainMapSize), String(con), seartchTxt ?? "", - code.cityCd, - code.sggCd + code as unknown as Record ); setIsReset(false); diff --git a/apps/wr/components/ui/map/LayerPopUp/RswtFacilty/RswtFacilty.tsx b/apps/wr/components/ui/map/LayerPopUp/RswtFacilty/RswtFacilty.tsx index becd76872..5c3c238d6 100644 --- a/apps/wr/components/ui/map/LayerPopUp/RswtFacilty/RswtFacilty.tsx +++ b/apps/wr/components/ui/map/LayerPopUp/RswtFacilty/RswtFacilty.tsx @@ -187,8 +187,7 @@ export function RswtFacility({ "1000000", String(con), seartchTxt ?? "", - code.cityCd, - code.sggCd + code as unknown as Record ); } }} @@ -236,8 +235,7 @@ export function RswtFacility({ String(rainMapSize), String(con), seartchTxt ?? "", - code.cityCd, - code.sggCd + code as unknown as Record ); setIsReset(false); diff --git a/apps/wr/public/sample_rswtSttn.xlsx b/apps/wr/public/sample_rswtSttn.xlsx index cec85971d65b2710e68f9de5473fd808795f6264..1085c6cfc57e6bf71bd0da36f2e4d1bdeb538f0f 100644 GIT binary patch literal 9020 zcmaKS1yoyWw{0j6#e-8^Tio5DxVr}k?pnOKyF-EETD-yC-HN8g+u~5X=;NI8zt?-X z_r8pgy|a_dIlj!b@~t)2+$!?0a6kY8014or&!TTBmp`-x004wv005{@XJZ$zohu9T zU&q*_9;H6kmtn^;?Gh=sdk!*4`NeGt$sQ6`g70O&a@*j%l|}e|h>ZVnmOyCb;r_Pa z`=NtN;k&{NMjx6*O(uA+iNPDCk@Pvx1-a+M;lyR8^te>AH*pfZqAjx*rfLUX|^0R|#sn~& z;M1`2*ZsYC4aFJ`13Q7*kqcvy z4~(&eeVcm|WSn96)1olkoU1{b-2R3x z{?~vTH2elpk9Eh2Ovzq=#>%8Le)bOb-{H+bN0a4$3NPVPs$>1v@R~Wgfd7iGePYK` z!UID+saGjZb9qI838}5vAC)x33veSQTpaYHm+I{18i^gd$GZoqPPEP`oMy4rzWloR zaQ2PtXW?hYU|fPXuel^;frS8I4N5+q1ZQ?!pFC$lDIMQph&IBJLU9i-4EKo`7v4tJdGD?s8K)(olc33|D)!tx80 zxO_O|QQZ%c$PZ`yth1zOjdD{Ap-?Mc8>VZegRi!4_{|I#RdYU@UH`_p<8A41)J6-f zk7GcO;J#w3#hxIvPTTU&#Q)#~JFXcv$(TWMMVe(YQk8w3JOvNbCce49?7a6ygOC|B z{mk35J~Wj)!U@bvJ>b4gC9U7j-X)mfR6+##VwEg&3R5{tBP^@W-D8SExx>5U0|5UP zI{UWpgUXZ8I!{7lJPG~Ij>Xf_#n#l((e^KyV^zhTWX5c#`h_^=nN>s&U%{V>N$wpe zmvVV9m_1lw_7(z7S!?h}nO)`mWNFFK#*sOp983AOR*7iBid&8W#*m2OB5vk*9{PyY46hhwSi<|q--k#q@stOD4sPe{B?-oQ2xRU7tNnr4eLhZ-$C z>k>u%mJCf@vpxi0os?+06Tj|b^N_6}lm6RiT^igfAJ~wlLqx~-GsUW3<=zSx0)C@t zs}wY!)rfmz#wcNCp;r@KP79M2iQ~B^qi$>-1Xv@hNf2R$>MUUMU-96Q^Vt{Sm6)CT z2bDj3zzSk!CuZ=S*x?NrKFhyCchUB_!_j>RQ8e=Q3c+1t&kD;98vw!dM$fZZ2~ubk zn4!#gNXs5DP2+VQYHao~OX8hVa%kM?iPCUIU{V%r6QvoX?(nA2r^TN!R-D64V*JGI z`nUL*-TOz|Poi%;iBI&8`2Xzb|1|`E@9&?Irfi<}_rc@f&fpn8=h;{`=^UfckBikl zfGv7wD^p_m{k*1{5fepvT!SDKriby5{FgwO&C4F}j9Avs~eqFXtqL{h&??s!f^s&wH3dVZy$h@xkw>BX? zOkGTf001o+0D$w4Hf~m6doau2N4CF`^H5hm8Y&I+XE_%^>JZqEriRLYFd6fhwctUn zOHLZ96NJzT%o13)6XU#~$)6Ty0M5>)i?5xk$ibp2h#=mJcxl)fo=LHyqw9~9 zoSRYyv%|cSjo_esHUXl|+pnDTQGA?@)YjK3SZBT&f9+8o1Yi6avd@ju`HwKX&p?{9>il+WTcLau(N2~={w+b=bK zytpqN%LuKYP=+xD#izN5LgQ*@r z{yxZlQpiUKA5;BX483-W;IOuA8ng(9Xdf1K=A@_aI&1%?36r03bGv{QpSR=p%L-Hm z_Kh1}o|tT4D2bwTL<_~r63igHQM0^^gVALqeqDxQvvWGZD@hbXUg|=FZj1Fw>i545 zfmq>~qrY7q<7PmO!vcoB8E?B!B^yngBothax`KX?z)R7F(SN)NIixtkM>DOB5H#$< zca8YSP%^#~>r8?Va+F*rW6G!&%VIV0$$KMy!qx(#5h66*nI8 z1(J2oiVi9cMw{F+c9{-%W+(%538X!dCPQa-ahB}M==tXv0a9avuOnjLWPD$kFcG6e z`dLo{>^3k&m3e2HsL$Yd8KAR@f)LOd`e{kU!Dg+#=rfgC^K?x$us-?xG5mXF^p6e2 zmv20MS^|taT-y4s=J)+B7=M~%8N z^}>$Ie;0pC4&?O;4w^#^$;2SjERoeWUmXc7!Ag2XfVGu}d4%E18SI+JTV3$Yy1kJj zHkL4YgO`55+H-G|nhh>|)T?%CP)@HrLLLWfJVNufpCh(D$EIJ6nR8udR1-r<$R1C8 zz;JcDyL-E-Tu_O2Thh@{T!o`6)`SUM8)+hBD~v0)o9Jq>#Av>RNjpyhWDP-5uq1*s zA=t&~m)OGqyK8SS2h6yxJ|d%xUX67pI=keG6$y5{q-=JUK}eVoWga&$beT> zf4L=zfrMCwBqD|R9mz(uGnO1vhkY1nP?%`TJSH;;m`AYVNc47sQHB%YMh+-!;4&_q z?_9-G@6qFnI>3RDG#v534JXJO2Q<0%&j^;yV za8j?wi^sVXrP#n^!UVOJuyd7V6b;u-SUj z%~86^0K}}Ml(DsUR4~WG0@#0GS!ZI5dO%$&A^NX*4va=Bbib?h zIV{TAL#s8tJ&L~`YLJQVZTPFy&5t>fIe6}x{(gA#-PW;N%%#V#$E*iE*|A-~#rG7g zS?$|7f*{bby+n*$S=g!K-s01;v)qJUn{j<>j&%7he~#Ls^Zqyg#m~eO4-#{{DWh6# zKlGGpR9#+I>(_s%|F~wAwx{)Z1+sT2J!KQk1_(|SlgSI>NP3LCrJk36eAf0=%s-Yx zkO2Ti8vp?9pX%!B=4A(V{j09d8_L@fYXevDZ^#hD(jz&&m$d3$+0Da#OA%M2PhqCE zwTqS`qKH+etE7!Zl_j?7c1SW!Z!9W8)@`mMu9ta8;JU#Ox|-Z4vF7wNm)G_*jo_ln zaqT?otVv9-IsBZpqSyen)j3R!@#jjP8NV#ibZl(WW;g!ETFnTq{^Wl*<1*Db&slSv zQSu2!s;wz$x$bbXblJ|)b;wTBNBdLUa+oKi%AwMx59}!b-FKU?=@^R8o3Im3*B^#d z#Clk`w{$?+^*ofJjULcTIaDUU+a4DQprT3?fh6f> zo^6mMwiuE}p3#M$%_;9eBu;@DhC#WvE+|?q_KM@2#9~+vCupU{T7*+B)zO0jGF?^S z?bEMgqCVzpwwhB@rzTT}Y*8|oe;B*5Z2w>#F4{v+5RFRtXrM*LvYJsFL?N3|2f5Z| zrqs9IR+Qxkek7i^TRBQ9Ou_fZevQc~CNwHL2hneN(Lql+Udm#b&#CSwxG33w@kN91 z_)R*C z=1e25kJ4Z#ICxezo%=?PELER?W_ET8q}O`*0$?JADwoURN8i+FKm9Wu;wZe{@p1`y zDMZUjm9)zh8>G>*ICjSidfC!kQYjmOL49R*!^wy<_4L}SgWkH*zTV&(`ks`0`nDcA zUv2!c@25%nUo5jP3Jc`PTLsBx;79bvWaOv1$!&}}r3%2ec#&y``kqd7G+v@#+I^!X z$1a($nV?PVVG>5GL1kXQ|Nfj>58{}cC^*q+-LhL`UqjZ=kFi^!F z=T?~?yz0CayL@?4L?kOOhb=BA7x=WKOand^nGQ|jM5FV$7pXhpQY+KSPn}7vbN5~U zo2#V^85>2cZKTBHtrBl4#01v35CvH&tKCwwz#uE!Kx)kJD z@M3VXcGQxTnkp+7MRen4!{a;u{NY*KDmqElO6>US4PtuA zHUmVfT!VYTAXr(uE=||*07A)mwpcR#TCu&vxwD^+R)v&?Mi!4%N2d3E4|SbKtVGmQ z1dRrIGPOE7S+PtR30{&+OY3KS+xjhfb3fFENEKxT&Wev2wBk~1s#Qribf%4heLADx z+s!QSQ}GEEj4&>3qI3doeq+%mRQlQjKUi~TFD`E!*E9vC&YBXow>K5HyoHF=G~j$C z5)eD=3JI25l~0fNscSW`=Y~L;8tfaWetMWCzxufvB0ndToAV7yw5cDG+-N$e_j%5G zRqrg*mG^Fef044?g05^DmmIyO^FR;MVtwX%av*xsuLDwMU{V1Q3NfifCooy}pp?SQ zzQCnnl&{+f=`bk_^sO_O@p4X(;WQ~PM)sD;xF$R_@yJSdT?PDVhSpfV1tqK7x)ms#3! zo6*};l=j%yxZ5kd)7U0;&hLLZII#x7|K@zFqtaOjnpo5;D~H82XBs}>)3Y_$nv`IV z4+hIr``t8i>qLy`?UJi*1;Zh|A_;c(v*Mqc zUIMGarJiaAFZbD=2gM8ZZ_JV(svYntS?3SM`*;86w_YYsjN%@OFYTVV$-XwJfQClQ z;U0-w<)0Sh^Ht6lF|JN{UR};WgdeLvk2GC;?qG6k$g5eO(WJRlnBRd2FAc2GOD$05 zBVI8WFVZ??%j;e()Zf`Q{+^Ny%f1rOYH}vNoHCQC2(!Vsirg60~~sxt=eeuoloBYo8>WeTF&# z5kpK25FsqL*Q21cHm~;Ecq1+vH=!c21%xD#e;h?Y<+_US$H)$=pb!e#cm>yG>h_yV z-y@vEC=Y*^ojb41yLTcgFr5zSm51C}Cr&T3+4@Ft$2nn5`-QWVS&u=bU{(AZR{I~{R_0#$`6w_ZEU9w`wJ8gQs|~T$Jc+4{<~WO59b&1Jv@=AaCGw1 z3#mhc&1h*huR7LAV@`C`0$!3$oSW!DkQgvr!dEKUKB1C+5Zv6fO zwgl@Ss^^i=an}mjfruNaAekVN9R^_pnhG|2UBhEA_dD+$5=4@vcVyWr!y6B`J%v=p zvHARTYC&`U$+ru1rTKIfNt0X2XFPQG#_^mgeU?3gGXz~_jePM_AJ!&sN{<_RHgJAk z+nt>FJr3mboI8gK8r`R>*mKxW_=c_8T|+3me$!0ndvd2BJs3I7aL(Iu}&m?6;*)WVt3jZcF88K9|R2G>qSJGQW(>;q2Gf#FnIB67b zFX216Al!Dq{Q=42rhXjR1+wN8s%C&sNQd+oA8T|v+J(uQ3VyPBMDrs}K zVbD*n1W8UK$sTT6=dx23tw9Wd7xFm_l9sipzIpVo2sH&{Y8zm= zTZuE-q7i04gHFN7) zGP4<5q+_nVs~y+KfprKXqNax@Ck(#w`LqSdiih0IRITesQVgb@RD+1|SpNq@$Pd!! z{8vj?h&PL1yx=x7&O6<^h#=|q_ixDXRjzh@0>N`yXcs-MV5O`8791ngFe(zjK_&4Mq6LbI_uJcnx24ED5gUrlIAepGum8G8<@9{Si z15()8FLXq44(OTO^K~8=7WTV?hmxj=YL4WnY!I&@Iydop4bp4kc%)x;n&}DX1_cGN ziRygr=ihwxouys<~V^G&q#Xcfh|5lh6u3z{+Y@|2-dMy6%qTCb{wjw(7qIj`PJD4_6!#isM$sS3wH zgqHDS5fqQgj@LwT`S)%_sw{ zIj#oBxMwPr3bI}^a*72AJ%_-fw)i{sTh2O;Cm>KvNQU`clScDZJByH$Pq|lWFiGe9GdB zc@&MiF(Tj3a;6Jgzx;>P%JH!5h-GDX)~I!lJoU!l>@vFOmMRX{LeCG!uY!~+k?w^+ zd0vOh$%4cUsR#9kki#qSwd9%GAbVZLWo-U+ADumcpJY3HaAnABr$O)83Up`@OWKDP zJJTQO3pS}jURGpW{4~4spUG)CNwdQ}Y&s1MK-Z~Xm5K0~C&yR3&S5{6V&7|odp!TB znV_93wRD|;{f@!cfhZL9y8qVT)bKNbIZ5H-t5)1e%ojfHI|&wVctu^DWm`nlY;+a_ zL8Vc}HtmRr3!WzN=yvPfVdw|4p!5Xa)U&c}v5nGJ@s4We5#;?i9DH8)zy@q;_bV^t zpmrtaNYbm8?GKBuj1AU%;X7Nqo3PvI7hj43Q`v_f8DPJ;firq}*==HvN$b?_rJ+9D zeOA-K6TEZ!OHG77`L|{)40d7yCz@voC9<7AapVHG>LJklnWDr3gLww&w}T!ZrmaT$ z#n`;r-Bn^r#(`4ui#wz322x{JYBe`4+Xl8Tn0vCl^Q9&5qa;q+tAyvZ@vpUlh8)%B zID8EP_;%wEiR;~dhYcQm6QJkuF8@YVoaQtYD8yUa3G3r#0*lD)W}=KTH^mofEx@L= zq}VZngUIb}!Vwy(m(cQJFDWJ9Qi}vSeeBqPEm_zWBsieIpLSBul+N(7(kBNVOfD zr$p=ec|4=eJ8^WJ^n2kwYOPKSCu0ZCR7i6>oUCCL8vUJ`)tmC6Vna-cvnb~Gf-yt! z)Qh9Rr-?Oey^LO=LCm2TtK8SEG!SwFg7(HxE^Q(;Gq|bpw;=Q4B`o7DRyVvQkUThnb4#pr74toheJ0-a(QrTLkc`Uq-VNL6B ziK-$G^W-=E@3$2^ZNY%20RHFkUv4sZ4t(yx|AqJm`10xW+>w8des1ypLGM2;@Bg9y zui^U~{@l3y1J`(Jd7jyr&%w`)w?E*Sr?h)!p;Ip=QQTTKxL76^a`AOZjY3V=9o*rW>-000XI0AK?Up$#QLE}qsd zo~By9uGSvLtUk_8s3c7n-k;bk$!z>MFuZ?3qGH44HiO$Ro%``bxtlF>e_4%5^dI3mkA8OdbPI38#4Kw(HUTY zalIXZfFzlieKk~tGbb4;R}>OPJqPfF+%^QBjcTQRw3QQiV9_VQY*!Y)J$K`6vzO_e zVAynWymo==T!VL;!}lbV(@c-kJ?`Psni!T*1M5ANOQZ)MeCvR75Oc{XUg+dDc^*gd zv2RxdqDK^l{R&{UeIN6T*rNt|8|nB=hZpY%@AegX;wL`7q?|=ShPOFh%3FbRRM=3| zJxO=F`HOhs>#8O6mE0n6vajjK=tK_?IeUDB0jT{&Oq;aXsm>t0rv!P50ufVFcWWmP zHrC&c{}a#uVwwEY(yLRIRR`EnqYmZnz{8hwE6ErVir(UK9TZwYA@a-5ni7hsiB@{( zh%vMX!(n8DyMpdUmsW%lc7`b~zHwK_VF3lHn!RhHGH%?w5EyCQ(`DSM*WY8lm^+`l z$dpy^rGL?t#8}l@QK&ewMkOnK;897Pbp-1BRU_&aVlzHSPHA>n!rz1t@(@t(a2qNgDM7ne~=owdzG zaXU<~dvQ8=Op%O2cxJ5ed&o_M=3Y%$V@nHp7K6>^W1HmC1$=&(FWK}d0g}8BnlE5_ z`x6DzRiE?);z{S7jk52AV_)$N>LziOB55U$a6ptNIe1u>ESMqHW3wo;L;G;uQ{r}% zp=arYdF<@a=KILd+#2Ld|D9z@Gz$=qAZ)M$0{}dOya8dEKQl|oOJUFwJ4Vzc^!+o~ zOTE-x{3tU9yA|AX4cG*1HUqmIE6g8Y1&y@(L;sR*pJOtB#=}$$!k5RZEQg5-sitPR z?Ck{$)TOZ8yiHTLVInTwtIYInc|Wt{iwg_rT+iMHJi74X`_B`2kRwjLEvUIP&ZACj zDR`az8lAhFdyw(RvE60NE_2;t6ToD|Dy!^NilgwS-0;33ewjTicrxk|xsi+lm--aH z+fjOJg8Rc-nC3^)n}aB#ISLE9lB06OQmNyBt}lZPx$hg37WOmaf8ZD(xg>BU-#MSBs3a=tdJ`k!9*z7{g5IB z|BJmi+rlTck;J~?s27)s{rDM2tk#SS?gv8Y*6D17=@Xxwh6?Z(8phHm+zeOKGc})| zK{FA;wTmj4PJ1SB%pP&zE&U^l z(lnp0{)#fJDiM+Ho8g8HY9ifHbJqzxaZa4~`KQvtXDQjeDjhD%wG!;1={?Xtgu+%2 z#_?xDdDnR!GHj3^zYAkM=-*;q-djQCOB#vs0(IwrGX>#S7(SHoQXR-mE1SM?1dr7w zqM`K&w_a|`CaZWKIp4P?o@p*WyX-yxT0x=GrRDTB<{bt?Bw%b&h6P=upP8YXxG0Yy zguFkMNhX>_F*DmR!FM;>|?})8?H#c1;H=k$U3cVq+K~G`+)D9i_-4f5P?#O?UrANG;Z)X{Z z#3GbzKFivj1*4*(5Hpmlhl5fdsZM>5KM?eOp*|7mO|r<31^F0X_L1v2qN(ai2j>%0 zghn=%rbFiMfx6)W!W#Mydx?Q$LN3KU6LKe$5%T=WW+Fv${KL}wCm|N%yWSUhj)CZ~ zWzHYRPA`!DNrJ?loe1Q@0{{txzeSh7t5;7uYiDb=-;cj9dr#jmj))f+#C9f%dU|m6 zd}9m?R5$dZdE5o7K}CVo+VFzDiXbzklL#A{rf^Dv0XQ?0A+dI%rT~M+eO4-JLs6)F zOXgQX;9t^|Gj6Rplgh))m8B}1Kf!$F=`kx}k`!I|*^p{Ok9#>HdLJ zY}`g*6krmjHHS+Z%EuLyC9)t_Qs)>9+4;~Ljx`AuUZ6#@HuDK4kSZu~+!b|=mN_Ol z# zgak%pK@oaISkt2r+6jsx7Cb`2cg0ZMEJk2T)~}LdEN?_xS_8YIn;R6goGPm3cB^`- zO?1oy)YP46XV)v$Cr`T!{H;x)D)ffVce)H}n;XgjcHCikWk#OaLFEfSZwPc?N|SJx zR{UBFo*!l1?+|V^vjxMOglgQb5_YdW>y7*Ex)XFP--YG#+hu?=nkidThsjDWlbW1- zKwT8;b(2Hg-aay?x#tiv=*FbSWF&rzemF||#Rx4eGj6s!i$sgw3_=L32DRK?^aoVc zDa08*u~(?r-}X}N5o35IIX2XcDqr1{GTvo~stPkC6|lrNE~etKuRBVoCJo3UWyYl6 za_D*S4A0W3CLRilbYJcs-`@^h22CvLl*RiA(&z1*=ZW6k)EA5@731(?;Zs!XYYpUFkEc@U8Cf6;>_X*?Pl z_&(==Dj^k5NDsS&J1dMy*gJ+I<=l$?+}MW-Dy<%hZ30AKbU9$f8eO`nXl@0##4jdE z*CTP2Z!Y!qVNWW*7<}25*by~VShElKAQR$$N-)e+pNT5rG}Wn~&O8Mi(&IZJ66~Fy z>Bx@24_curj&OU9IidW`6QjP}N-Ro-ax?9P9ITuEJfcJe+S=ZVt3dps-^vFtEmjm< z5$*|$5*n|Glt(CK_6SsL#lev=wFJ?~y)@^Hn=mW+jHXiNERp4ev)5bdDN~m13^DUP z^R?o*VJX@$;(4b7%0W-73=&w1SR0)QYILtX**ky+kY6{muJ7_Szr=UJ_fQ{*1_Hy) zsFur7`n)i7b2akFPsW7m-=9$0{O~cFLh4tr7Q020Pm&9$?9Nwv@wle`qC+M>v}_5j zCnl=}+k!+>kd8Y5`#`i}*_b=2)&ie-m+OoFdJx<4!J|nlZ^Gugj9sHb@y^qxc7rxq zBD@1^iJ#qiYMo`|mNv%|cCe zmZlgcl~mifEQvqgSL*FYA0sU}T(T!!%=4|(rjNOUvSJZrDcRVrtK8=uqk+a%TmE%v zzD-rRm0c&PA=S5x)Qy8mSlTEtHw_p?N0eBVwzmC6_U6;cKQampWZX893z}n*nRAHs zT$+s56epp~6eHKDDumlb`CX)aC9 zU)w(OWEddCIONi(WO|ueNK931CJ=n0-tZzw&&o~9`ZVDxUf^5Q+y|=S@85~}l6zga zI#Qj6{odX94VLLjz_vHGlMl-KVwCb;55`txnq?tsMBKoi{O*iI>{2dqP6>#r6G9X$ zmntJ5fAJ5`kV~W1n0&Nrwd}6;9SZkv=iDdRGTL)TjbH0Y;iui7eJ*{5pzfKn(p7QN zbem!4`}u{-`yxusOD1V)qm`alOwG3$p`E5~B+x}3Y>@-`r+3eidHIcNy))KD8NTj@eKJ=+qc=R)8Z;`*~u(v`C_J0 zzi)r|x?6kGX29t#Oe4h)=sQJJPRlws;#Do99=OhYjfu|kCYeA-?G-j}zI@nF8|fF_B0`ZNAK>k{8EVJcC2BC&1PTddXO z*|iNNIJ4wZ;q{2CdHBdU&YYp@Vle(y~+%7sSwtMpBU@=yF631B;)_96d zD_|kt0Xo}Vl?RNbWtp<2-fIMUE-ZJ{xMuepazIIu%akp(wwa(jo#wrk1^lC|1cU2= zc(Bs3ljIETWrKm`%C zA$J;I|2HkuzF-@oKyQYo>Fc<&wl6l3rt{X({(PbjKoD!iq{{M7xjo!RA>)$*n&$nU z$11jAq)&p=E#KdCKhoW6y=|UaaXj?wnCcTbBW@|$XiehD(sygSutrL_irRxjv zEIqllRFsz3sZ8NA-friiFGg_sZ5`jL^~Agx&>|e;!15%vHYUts|ImJyI*l|b$6+=# zq&=O9EWZYoj1HoiQlXwvmzRF&H*OeX%WGx+{wIN9iTC8W@tqg5tECF_#^I6+Alk&h z1&XAsX)%&{3v_#zZz%G3^fGzwVXZ0fzS&8aywNzcc@ug5K)hKndH-Q!sT+LV46+be zX4)5tTh7K)|Woc-@)YX@kBhKByDhw96yZM=P+2qBZrCCP*sH6nP zJ{0HmYVdBf)-x|TX05s;M1F|+gGZT*P6DPuPq5^mXI|)5dRKRGiv&S5V$E8d2}`a# zU^?~-zm-DoY^EY%Az5wI*2-8FpPgr?dHJ+MYTYy%I3uCXi=(qMzQg3J@tu~U-c6V% z%}XOV3ap;FF#>9y5sih^yYqHdiKc$XTz(7ASfc{ttyQ$e)v>8dLbusdqMGLi+yeVH z^U;!`txhdby5_{6Tfxtil244*YOzXigXT54sp3yYbJJ)O zy`uhumXu%9$U2!fU+sM=;5$+42;Bcbtz=Xaa-DBicQ1mv9Sv9hnpPstl@Jr^bTZLA z3&+9jh|Zm3{jmH@w)Y#5y4f5U3!>Q(a0@91N4Pa4n5~#T&>$f@pIeL!nfK}sUKGK( z=jBy&{YdA30`8N9KcY&}{ zu68_0LTO=d*pTX>^m=c8cjTPs5yPJl3Bq70?+UWI+M-e)io^P;q|Qc@wS6*2#NI0p$~M1a=Gm+O1i-K8Jr6Ys#&UR z^Y6A!T&z0;IrH&j0vi)HMsoz0&o|m9UN6RH3vBe++*NatI?I$#ytW@4&omF98uL&N z%`QHx1>Lkz9LgBv6Vc0<;GqGj>eh0ehaCQngg&%)Yq@k-;!}J;#_30CG<> zP4sI@ZXs3|To7EtaTR&^QRgJ&8uv~eeO6b>&F4xc1q1;~17{UAR|?R}(6ax-%HPdu zz-XK2oy;{=6;Dgx;+~{Zr5$Nd9U12KM?LCfX$T6TJ=PG>M?F4A0}ce$WcGQU!EP;O!IUX!?rN3^n z2@c{FmZ)Xx2V`{%D@HicmDYA^+C^YLw~~M8BZt#;FYxGpW}eEA=~>cn8$K4gi>@v# zSzD=AcbJZ3cN*J56@ad`y=B#dnDUz5#C-(^r~H$=yuvl(9bTBX5%?IxPigM(a`}~8 zpFBM|DY|)jK)dDviuHzyx8(!@Smffa$u1BSD0G_J2lr_X%KL4~X^GH2b-549aRdn7XyY;_H%>T>B zL$q^5s;S}tJMhCAT#w|4e|DpnrsPuSXdVz&5V$7c-hz|OO+D?hwt6<{U>%m!wza$_ ze3|OxmF#r{H>i^^s!ogv4EdH&@rhM7+nr>!pjV&_wu%UjUm#4n>e~tBM%Kw-?>l>L zeBDqqA$k2#uf&T9``G$T|KyJ{tA(Ad&hb_gqT}d}gQD~3t`fsoimpoRL#_y@=TcHs z8b?TPM3q-yV29MgVKOTZx5X(Jp8E z9=l-pXu+1g8^U0Jw}0De@!!QE$^A2Q0D$ff`{xQt-g;WQYg&7H{+7jMdvedgYGLoP zr#q>NEe?EGEW*4aP$i9_V~xZ`mK!K-G)r$>S!9U_N60t;K4xuy+fqDo0$=sxH4kM?w`dT=de<+QPVipePkXz(+o|e9;84XQamU!qQbr~zSR;w{7-&C7+duN~LYqW8*V1& zGk4W1`y*Z|%DdO!=BS69U#`C}*U0MtXqol^oonUVoTOPF#o1jd`<(j?qrvBUcm?`O zBV+Q}F+z{xQF~5OT7uGB<#VO|S!$FV=lf&+V6qXh)NnsR!t!|~zcZ@G3z{oc#&pM2 z3gx`F{*)tK4I|gCCAWbzn<~`a9u#rfG7i{;`KQxGV4BTc;$&T^xj01?>4EURJJ))Blit`PaxvRaV($2S#qGT0BeH`ousU!8n9?Oa)KQ z*u>5|p=`Onm=YLcV51aD(u=hUtq0r-&6auv#OLS`l^x1YV!6Qc$o_;;bj)fwAU=xa zy0|qs&iR60cwyO6UTV|bx+^@Mg`y#_?N~KFyq3Hm^mTG%903z%73P+D2D`4Cn4@fV zKe$c8VIcmth@CL8vpY9jvOBG;gBTZ)6&&!+fS_T*O>4tc*`t=I+lR+k2bTGRxVC;V z&J4?D+jO6-shNA{lo{M18{D+A*cyDeVkYt`=z|m!3fPJn#hME7fd`|!AZu!HG=g3_ zp_q{SCRxfuw%)n^yMeTwE2mDC*(=F@2P@;*&&{#;-7yR6-D~<99QY%>km|sdmIm;`_TqX`aaMk}_@jWGd8e9J&{Yvn3F~1`1rzn4Q zj(=eQ0M?`cz~5Zur{qr^oL>N6$$y{36ZhsH-JPePf7RE&AOQdy>OaltU)ozu5e~wG S001iFM+;$N=HDDG!2bbl`u?o| From e6be168d0de1f48abe4a9a7a54e689bc30bca289 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Mon, 15 Sep 2025 15:38:25 +0900 Subject: [PATCH 13/46] =?UTF-8?q?=EB=AC=BC=EC=9E=AC=EC=9D=B4=EC=9A=A9=20?= =?UTF-8?q?=EA=B3=B5=ED=86=B5=EC=BD=94=EB=93=9C=20=EC=9E=91=EC=97=85=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EC=82=AC=ED=95=AD=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruseFcltMng/fcltSttn/rainSttn/page.tsx | 11 +++---- .../ruseFcltMng/fcltSttn/rswtSttn/page.tsx | 15 ++++++---- apps/wr/app/layout.tsx | 29 ++++++++++--------- apps/wr/app/store/common/code/index.ts | 14 +++++---- apps/wr/app/store/map/rainMap/index.tsx | 9 ++---- apps/wr/app/store/map/rswtMap/index.tsx | 10 ++----- .../ruseFcltMng/fcltReg/rswtReg/index.tsx | 4 --- .../ruseFcltMng/fcltSttn/rainSttn/excel.tsx | 12 +++----- .../fcltSttn/rainSttn/headList.tsx | 4 +-- .../ruseFcltMng/fcltSttn/rainSttn/index.tsx | 20 ++++--------- .../ruseFcltMng/fcltSttn/rswtSttn/excel.tsx | 5 ++-- .../fcltSttn/rswtSttn/headList.tsx | 4 +-- .../ruseFcltMng/fcltSttn/rswtSttn/index.tsx | 13 +++------ apps/wr/app/store/store.tsx | 3 +- 14 files changed, 65 insertions(+), 88 deletions(-) diff --git a/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/rainSttn/page.tsx b/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/rainSttn/page.tsx index 8055a2917..f5ec6e8c8 100644 --- a/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/rainSttn/page.tsx +++ b/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/rainSttn/page.tsx @@ -92,7 +92,7 @@ export default function RainSttn() { useEffect(() => { if (!rainSttn.isInit) { - rainSttnInit(false, 1, rainSttnSize, "0", fcltNm, code.cityCd, code.sggCd); + rainSttnInit(false, 1, rainSttnSize, "0", fcltNm, code as unknown as Record); } }, [rainSttn.isInit, rainSttnInit]); @@ -146,8 +146,7 @@ export default function RainSttn() { rainSttnSize, String(getConValue()), fcltNm, - code.cityCd, - code.sggCd + code as unknown as Record ); isResetPage(false); }, [pageNation]); @@ -177,8 +176,7 @@ export default function RainSttn() { rainSttnResCount, String(getConValue()), fcltNm, - code.cityCd, - code.sggCd + code as unknown as Record ); }, [ rainSttnSearch, @@ -237,8 +235,7 @@ export default function RainSttn() { rainSttnSize, String(getConValue()), fcltNm, - code.cityCd, - code.sggCd + code as unknown as Record ); isResetPage(true); }} diff --git a/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/rswtSttn/page.tsx b/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/rswtSttn/page.tsx index b917a4105..7cb81d209 100644 --- a/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/rswtSttn/page.tsx +++ b/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/rswtSttn/page.tsx @@ -34,6 +34,7 @@ export default function RswtSttn() { const { code, rswtSttn, rswtSttnSearch, rswtSttnInit } = useWrStore( (state) => state ); + const [pageNation, setPageNation] = useState(1); const { rswtSttnRes, rswtSttnResCount } = rswtSttn; @@ -83,8 +84,8 @@ export default function RswtSttn() { }; useEffect(() => { - if (!rswtSttn.isInit) { - rswtSttnInit(false, 1, rswtSttnSize, "0", fcltNm, code.cityCd, code.sggCd); + if (!rswtSttn.isInit&&code) { + rswtSttnInit(false, 1, rswtSttnSize, code.userSiSggCd, fcltNm, code as unknown as Record); } }, [rswtSttn.isInit, rswtSttnInit]); @@ -93,6 +94,8 @@ export default function RswtSttn() { const chData = data .map((item: customRswtBdst) => { const isOrgwtKndCd = item.reuseBuilding[0]?.rswtrObj.orgwtKndCd + + return { ...item, ...item.reuseBuilding[0], @@ -101,7 +104,7 @@ export default function RswtSttn() { chBuildingYn: item?.chgBuilding[0]?.bdstChgNm !== null && item?.chgBuilding.length > 0 ? 'Y' : 'N', instlCst: item.reuseBuilding[0]?.instlCst === -1 ? "확인불가" : item.reuseBuilding[0]?.instlCst, instlCstSprtAmt: item.reuseBuilding[0]?.instlCstSprtAmt === -1 ? "확인불가" : item.reuseBuilding[0]?.instlCstSprtAmt, - archArea: item?.archArea.split('.')[0] !== '-1' ? item?.archArea.split('.')[0] : '확인불가' + archArea: item?.archArea.split('.')[0] !== '-1' ? item?.archArea.split('.')[0] : '확인불가', } }) .filter( @@ -131,11 +134,11 @@ export default function RswtSttn() { const excelClick = useCallback(() => { isDownloadTriggered.current = true; - rswtSttnSearch(true, 1, rswtSttnResCount, String(getConValue()), fcltNm, code.cityCd, code.sggCd); + rswtSttnSearch(true, 1, rswtSttnResCount, String(getConValue()), fcltNm, code as unknown as Record); }, [rswtSttnSearch, objSearch, code.cityCd, code.sggCd, fcltNm, rswtSttnResCount]); useEffect(() => { - rswtSttnSearch(false, pageNation, rswtSttnSize, String(getConValue()), fcltNm, code.cityCd, code.sggCd); + rswtSttnSearch(false, pageNation, rswtSttnSize, String(getConValue()), fcltNm, code as unknown as Record); isResetPage(false) }, [pageNation]); @@ -186,7 +189,7 @@ export default function RswtSttn() { - {}} boldArray={[0, 1, 2]}> + {}} boldArray={[0, 1, 2]} widthFixed={true} >
diff --git a/apps/fo/app/pages/(with-layout)/sewageOccur/page.tsx b/apps/fo/app/pages/(with-layout)/sewageOccur/page.tsx index 885af7567..23f764269 100644 --- a/apps/fo/app/pages/(with-layout)/sewageOccur/page.tsx +++ b/apps/fo/app/pages/(with-layout)/sewageOccur/page.tsx @@ -222,7 +222,7 @@ export default function PlanSewage() {
- index !== undefined && cellClick(index)} headName={"오수발생량 추정"} tableData={mainList} headlist={upheadList} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} /> + index !== undefined && cellClick(index)} headName={"오수발생량 추정"} tableData={mainList} headlist={upheadList} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} widthFixed={true} />
diff --git a/apps/fo/app/pages/(with-layout)/underWaterInput/modal/page.tsx b/apps/fo/app/pages/(with-layout)/underWaterInput/modal/page.tsx index 1d4ea2310..5da9622d0 100644 --- a/apps/fo/app/pages/(with-layout)/underWaterInput/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/underWaterInput/modal/page.tsx @@ -166,6 +166,7 @@ export default function UnderWaterInputModal({fcltyCd='', fcltyName='',searchYea onPageChange={() => {}} className="h-[200px]" boldArray={[0,1,2]} + widthFixed={true} />
@@ -233,6 +234,7 @@ export default function UnderWaterInputModal({fcltyCd='', fcltyName='',searchYea onPageChange={() => { } } className="h-[500px]" boldArray={[0,1,2]} + widthFixed={true} />
@@ -291,6 +293,7 @@ export default function UnderWaterInputModal({fcltyCd='', fcltyName='',searchYea onPageChange={() => {}} className="h-[500px]" boldArray={[0,1,2]} + widthFixed={true} />
diff --git a/apps/fo/app/pages/(with-layout)/underWaterInput/page.tsx b/apps/fo/app/pages/(with-layout)/underWaterInput/page.tsx index 2126a31a0..6d8172bce 100644 --- a/apps/fo/app/pages/(with-layout)/underWaterInput/page.tsx +++ b/apps/fo/app/pages/(with-layout)/underWaterInput/page.tsx @@ -220,7 +220,7 @@ export default function UnderWaterInput() {
- index !== undefined && cellClick(index)} headName={"지하수유입량 추정"} tableData={mainList} headlist={upheadList} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} /> + index !== undefined && cellClick(index)} headName={"지하수유입량 추정"} tableData={mainList} headlist={upheadList} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} widthFixed={true}/>
※적정여부 = 연간 지하수유입량/연평균 유입하수량*100

diff --git a/apps/fo/app/store/dashboard/index.tsx b/apps/fo/app/store/dashboard/index.tsx index 75a8fe3ae..61f805ed5 100644 --- a/apps/fo/app/store/dashboard/index.tsx +++ b/apps/fo/app/store/dashboard/index.tsx @@ -358,12 +358,12 @@ const upHeadListOperationStatus : TableUpperProps[] = [ ] const upHeadListRainManage : TableUpperProps[] = [ - { id: "rainItem", title: "강우량", row:0, rowSpan:2 }, - { id: "rainRate", title: "강우조건\n비율(%)", row:0, rowSpan:2, align: "right" }, - { id: "rainDay", title: "일수", row:0, rowSpan:2, align: "right" }, + { id: "rainItem", title: "강우량", row:0, rowSpan:2, widthPercent: 8 }, + { id: "rainRate", title: "강우조건\n비율(%)", row:0, rowSpan:2, align: "right", widthPercent: 5 }, + { id: "rainDay", title: "일수", row:0, rowSpan:2, align: "right", widthPercent: 5 }, { id: "A", title: "유입(㎥/일)", row:0, colSpan:2 }, - { id: "inflAmnt", title: "유입유량", row:1, align: "right" }, - { id: "fctCpc", title: "시설용량대비", row:1, align: "right" }, + { id: "inflAmnt", title: "유입유량", row:1, align: "right", widthPercent: 6 }, + { id: "fctCpc", title: "시설용량대비", row:1, align: "right", widthPercent: 6 }, { id: "B", title: "설계유입수질(㎎/L)", row:0, colSpan:5 }, { id: "dsInflWqltBod", title: "BOD", row:1, align: "right" }, { id: "dsInflWqltCod", title: "TOC\n(COD)", row:1, align: "right" }, @@ -2081,7 +2081,7 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType) } const fcltyCpcValue = res.data.wqltObjs[0].fctCpc; - const itemList = ['계', '3~10mm 미만', '10~20mm 미만', '20~30mm 미만', '30~40mm 미만', '40~50mm 미만', '50mm~60mm 미만', '60mm 이상']; + const itemList = ['계', '3~10mm 미만', '10~20mm 미만', '20~30mm 미만', '30~40mm 미만', '40~50mm 미만', '50~60mm 미만', '60mm 이상']; const rainRate = ['0', '0', '0', '0', '0', '0', '0', '0']; const rainDate = [0, 0, 0, 0, 0, 0, 0, 0]; const inflAmtCnt = [0, 0, 0, 0, 0, 0, 0, 0]; diff --git a/apps/fo/app/store/facilityPrecipitation/index.tsx b/apps/fo/app/store/facilityPrecipitation/index.tsx index cbd824ff8..984a40814 100644 --- a/apps/fo/app/store/facilityPrecipitation/index.tsx +++ b/apps/fo/app/store/facilityPrecipitation/index.tsx @@ -69,48 +69,48 @@ const LabelArray:string[] = ['구분', '시도', '시군구','용량별', '시 // 리스트 헤더 const upHeadList1:TableUpperProps[] = [ - { id: "A", title: "행정구역", row: 0, colSpan: 2 }, - { id: "sido", title: "시도", upName:"upChangeRe", upSequnce:1, row: 1 }, - { id: "gugun", title: "시군구", upName:"upChangeRe",upSequnce:2, row: 1 }, - { id: "bscFctNm", title: "시설명", row: 0, rowSpan: 2}, + { id: "A", title: "행정구역", row: 0, colSpan: 2, widthPercent: 20 }, + { id: "sido", title: "시도", upName:"upChangeRe", upSequnce:1, row: 1, widthPercent: 10 }, + { id: "gugun", title: "시군구", upName:"upChangeRe",upSequnce:2, row: 1, widthPercent: 10 }, + { id: "bscFctNm", title: "시설명", row: 0, rowSpan: 2, widthPercent: 10}, { id: "addr", title: "주소", row: 0, rowSpan: 2}, - { id: "fctCpc", title: "시설용량(m³/일)", row: 0, rowSpan: 2, align:"right"}, - { id: "stnKo", title: "관측소 정보", row: 0, rowSpan: 2}, - { id: "infoRnDay", title: "강우일\n(일)", row: 0, rowSpan: 2, align:"right"}, - { id: "rainEffectDay", title: "강우영향일\n(일)", row: 0, rowSpan: 2, align:"right"}, - { id: "totalYearRain", title: "연간 총 총강수량\n(mm)", row: 0, rowSpan: 2, align:"right"} + { id: "fctCpc", title: "시설용량(m³/일)", row: 0, rowSpan: 2, align:"right", widthPercent: 10 }, + { id: "stnKo", title: "관측소 정보", row: 0, rowSpan: 2, widthPercent: 10 }, + { id: "infoRnDay", title: "강우일\n(일)", row: 0, rowSpan: 2, align:"right", widthPercent: 7 }, + { id: "rainEffectDay", title: "강우영향일\n(일)", row: 0, rowSpan: 2, align:"right", widthPercent: 7 }, + { id: "totalYearRain", title: "연간 총 총강수량\n(mm)", row: 0, rowSpan: 2, align:"right", widthPercent: 7 } ]; const upHeadList2:TableUpperProps[] = [ - { id: "A", title: "유역", row: 0, colSpan: 3} , - { id: "rvbsn", title: "권역", upName:"upChangeRe", upSequnce:1, row: 1} , - { id: "lgbsn", title: "단위유역", upName:"upChangeRe", upSequnce:2, row: 1}, - { id: "mdmbsn", title: "중권역", upName:"upChangeRe", upSequnce:3, row: 1}, - { id: "bscFctNm", title: "시설명", row: 0, rowSpan: 2}, + { id: "A", title: "유역", row: 0, colSpan: 3, widthPercent: 21 } , + { id: "rvbsn", title: "권역", upName:"upChangeRe", upSequnce:1, row: 1, widthPercent: 7 } , + { id: "lgbsn", title: "단위유역", upName:"upChangeRe", upSequnce:2, row: 1, widthPercent: 7 }, + { id: "mdmbsn", title: "중권역", upName:"upChangeRe", upSequnce:3, row: 1, widthPercent: 7 }, + { id: "bscFctNm", title: "시설명", row: 0, rowSpan: 2, widthPercent: 10 }, { id: "addr", title: "주소", row: 0, rowSpan: 2}, - { id: "fctCpc", title: "시설용량(m³/일)", row: 0, rowSpan: 2, align:"right"}, - { id: "stnKo", title: "관측소 정보", row: 0, rowSpan: 2}, - { id: "infoRnDay", title: "강우일\n(일)", row: 0, rowSpan: 2, align:"right"}, - { id: "rainEffectDay", title: "강우영향일\n(일)", row: 0, rowSpan: 2, align:"right"}, - { id: "totalYearRain", title: "연간 총 총강수량\n(mm)", row: 0, rowSpan: 2, align:"right"} + { id: "fctCpc", title: "시설용량(m³/일)", row: 0, rowSpan: 2, align:"right", widthPercent: 10 }, + { id: "stnKo", title: "관측소 정보", row: 0, rowSpan: 2, widthPercent: 10 }, + { id: "infoRnDay", title: "강우일\n(일)", row: 0, rowSpan: 2, align:"right", widthPercent: 7 }, + { id: "rainEffectDay", title: "강우영향일\n(일)", row: 0, rowSpan: 2, align:"right", widthPercent: 7 }, + { id: "totalYearRain", title: "연간 총 총강수량\n(mm)", row: 0, rowSpan: 2, align:"right", widthPercent: 7 } ]; const upHeadList3:TableUpperProps[] = [ - { id: "A", title: "유역", row: 0, colSpan: 3} , - { id: "rvbsn", title: "권역", upName:"upChangeRe1", upSequnce:1, row: 1}, - { id: "lgbsn", title: "단위유역", upName:"upChangeRe1", upSequnce:2, row: 1}, - { id: "mdmbsn", title: "중권역", upName:"upChangeRe1", upSequnce:3, row: 1}, - { id: "rgnNm", title: "환경청", row: 0, rowSpan: 2}, - { id: "B", title: "행정구역", upName:"upChangeRe2", row: 0, colSpan: 2}, - { id: "sido", title: "시도", upName:"upChangeRe2", upSequnce:1, row: 1}, - { id: "gugun", title: "시군구", upName:"upChangeRe2",upSequnce:2, row: 1}, - { id: "bscFctNm", title: "시설명", row: 0, rowSpan: 2}, + { id: "A", title: "유역", row: 0, colSpan: 3, widthPercent: 15 } , + { id: "rvbsn", title: "권역", upName:"upChangeRe1", upSequnce:1, row: 1, widthPercent: 5 }, + { id: "lgbsn", title: "단위유역", upName:"upChangeRe1", upSequnce:2, row: 1, widthPercent: 5 }, + { id: "mdmbsn", title: "중권역", upName:"upChangeRe1", upSequnce:3, row: 1, widthPercent: 5 }, + { id: "rgnNm", title: "환경청", row: 0, rowSpan: 2, widthPercent: 7 }, + { id: "B", title: "행정구역", upName:"upChangeRe2", row: 0, colSpan: 2, widthPercent: 10 }, + { id: "sido", title: "시도", upName:"upChangeRe2", upSequnce:1, row: 1, widthPercent: 5 }, + { id: "gugun", title: "시군구", upName:"upChangeRe2",upSequnce:2, row: 1, widthPercent: 5 }, + { id: "bscFctNm", title: "시설명", row: 0, rowSpan: 2, widthPercent: 10 }, { id: "addr", title: "주소", row: 0, rowSpan: 2}, - { id: "fctCpc", title: "시설용량(m³/일)", row: 0, rowSpan: 2, align:"right"}, - { id: "stnKo", title: "관측소 정보", row: 0, rowSpan: 2}, - { id: "infoRnDay", title: "강우일\n(일)", row: 0, rowSpan: 2, align:"right"}, - { id: "rainEffectDay", title: "강우영향일\n(일)", row: 0, rowSpan: 2, align:"right"}, - { id: "totalYearRain", title: "연간 총 총강수량\n(mm)", row: 0, rowSpan: 2, align:"right"} + { id: "fctCpc", title: "시설용량(m³/일)", row: 0, rowSpan: 2, align:"right", widthPercent: 10 }, + { id: "stnKo", title: "관측소 정보", row: 0, rowSpan: 2, widthPercent: 10 }, + { id: "infoRnDay", title: "강우일\n(일)", row: 0, rowSpan: 2, align:"right", widthPercent: 7 }, + { id: "rainEffectDay", title: "강우영향일\n(일)", row: 0, rowSpan: 2, align:"right", widthPercent: 7 }, + { id: "totalYearRain", title: "연간 총 총강수량\n(mm)", row: 0, rowSpan: 2, align:"right", widthPercent: 7 } ]; const facilityPrecipitation:FacilityPrecipitationProps[] = [ diff --git a/apps/fo/app/store/facilityWaterQlty/index.tsx b/apps/fo/app/store/facilityWaterQlty/index.tsx index 9c9ed29c6..c60f72cd2 100644 --- a/apps/fo/app/store/facilityWaterQlty/index.tsx +++ b/apps/fo/app/store/facilityWaterQlty/index.tsx @@ -128,14 +128,14 @@ const mainLabelArray: string[] = ['구분', '시도', '시군구', '용량별', // 시설수질리스트 헤더(행정별) const upHeadList1: TableUpperProps[] = [ - { id: "C", title: "행정명", colSpan: 2, row: 0 }, - { id: "sidoNm", title: "시도", row: 1, widthPercent:8 }, - { id: "sggNm", title: "시군구", row: 1, widthPercent:8 }, + { id: "C", title: "행정명", colSpan: 2, row:0, widthPercent:10 }, + { id: "sidoNm", title: "시도", row: 1, widthPercent:5}, + { id: "sggNm", title: "시군구", row: 1, widthPercent:5 }, { id: "bscFctNm", title: "시설명", rowSpan: 2, row: 0, widthPercent: 10 }, { id: "addr", title: "주소", rowSpan: 2, row: 0 }, { id: "fctCpc", title: "시설용량(m³/일)", align: "right", rowSpan: 2, row: 0, widthPercent:10 }, - { id: "A", title: "유입", colSpan: 5, row: 0 }, - { id: "B", title: "방류", colSpan: 5, row: 0 }, + { id: "A", title: "유입", colSpan: 5, row: 0, widthPercent:25 }, + { id: "B", title: "방류", colSpan: 5, row: 0, widthPercent:25 }, { id: "inflAssctBfrWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe3", upSequnce: 1, align: "right", row: 1, widthPercent:5 }, { id: "inflAssctBfrWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row: 1, widthPercent:5 }, { id: "inflAssctBfrWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1, widthPercent:5 }, @@ -150,52 +150,52 @@ const upHeadList1: TableUpperProps[] = [ // 시설수질리스트 헤더(권역별) const upHeadList2: TableUpperProps[] = [ - { id: "C", title: "유역", colSpan: 3, row: 0 }, - { id: "rvbsn", title: "권역", upName: "upChangeRe1", upSequnce: 1, row:1 }, - { id: "lgbsn", title: "단위유역", upName: "upChangeRe1", upSequnce: 2, row:1 }, - { id: "mdmbsn", title: "중권역", upName: "upChangeRe1", upSequnce: 3, row:1 }, - { id: "bscFctNm", title: "시설명", row:0, rowSpan:2 }, + { id: "C", title: "유역", colSpan: 3, row: 0, widthPercent:15 }, + { id: "rvbsn", title: "권역", upName: "upChangeRe1", upSequnce: 1, row:1, widthPercent:5 }, + { id: "lgbsn", title: "단위유역", upName: "upChangeRe1", upSequnce: 2, row:1, widthPercent:5 }, + { id: "mdmbsn", title: "중권역", upName: "upChangeRe1", upSequnce: 3, row:1, widthPercent:5 }, + { id: "bscFctNm", title: "시설명", row:0, rowSpan:2, widthPercent:10 }, { id: "addr", title: "주소", row:0, rowSpan:2 }, - { id: "fctCpc", title: "시설용량(m³/L)", align: "right", row:0, rowSpan:2 }, - { id: "A", title: "유입", colSpan: 5, row: 0 }, - { id: "B", title: "방류", colSpan: 5, row: 0 }, - { id: "inflAssctBfrWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe3", upSequnce: 1, align: "right", row:1 }, - { id: "inflAssctBfrWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row:1 }, - { id: "inflAssctBfrWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row:1 }, - { id: "inflAssctBfrWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row:1 }, - { id: "inflAssctBfrWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row:1 }, - { id: "efflWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe4", upSequnce: 1, align: "right", row:1 }, - { id: "efflWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row:1 }, - { id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row:1 }, - { id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row:1 }, - { id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row:1 }, + { id: "fctCpc", title: "시설용량(m³/L)", align: "right", row:0, rowSpan:2, widthPercent:8 }, + { id: "A", title: "유입", colSpan: 5, row: 0, widthPercent:25 }, + { id: "B", title: "방류", colSpan: 5, row: 0, widthPercent:25 }, + { id: "inflAssctBfrWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe3", upSequnce: 1, align: "right", row:1, widthPercent:5 }, + { id: "inflAssctBfrWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row:1, widthPercent:5 }, + { id: "inflAssctBfrWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row:1, widthPercent:5 }, + { id: "inflAssctBfrWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row:1, widthPercent:5 }, + { id: "inflAssctBfrWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row:1, widthPercent:5 }, + { id: "efflWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe4", upSequnce: 1, align: "right", row:1, widthPercent:5 }, + { id: "efflWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row:1, widthPercent:5 }, + { id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row:1, widthPercent:5 }, + { id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row:1, widthPercent:5 }, + { id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row:1, widthPercent:5 }, ]; // 시설수질리스트 헤더(환경청별) const upHeadList3: TableUpperProps[] = [ - { id: "C", title: "유역", colSpan: 3, row: 0 }, - { id: "rvbsn", title: "권역", row:1 }, - { id: "lgbsn", title: "단위유역", row:1 }, - { id: "mdmbsn", title: "중권역", row:1 }, - { id: "rgnNm", title: "환경청", row:0, rowSpan:2 }, - { id: "D", title: "행정명", colSpan: 2, row: 0 }, - { id: "sidoNm", title: "시도", upName: "upChangeRe2", row:1 }, - { id: "sggNm", title: "시군구", upName: "upChangeRe2", row:1 }, - { id: "bscFctNm", title: "시설명", row:0, rowSpan:2 }, + { id: "C", title: "유역", colSpan: 3, row: 0, widthPercent: 15 }, + { id: "rvbsn", title: "권역", row:1, widthPercent: 5 }, + { id: "lgbsn", title: "단위유역", row:1, widthPercent: 5 }, + { id: "mdmbsn", title: "중권역", row:1, widthPercent: 5 }, + { id: "rgnNm", title: "환경청", row:0, rowSpan:2, widthPercent: 7 }, + { id: "D", title: "행정명", colSpan: 2, row: 0, widthPercent: 10 }, + { id: "sidoNm", title: "시도", upName: "upChangeRe2", row:1, widthPercent: 5 }, + { id: "sggNm", title: "시군구", upName: "upChangeRe2", row:1, widthPercent: 5 }, + { id: "bscFctNm", title: "시설명", row:0, rowSpan:2, widthPercent: 8 }, { id: "addr", title: "주소", row:0, rowSpan:2 }, - { id: "fctCpc", title: "시설용량(m³/L)", align: "right", row:0, rowSpan:2 }, - { id: "A", title: "유입", colSpan: 5, row: 0 }, - { id: "B", title: "방류", colSpan: 5, row: 0 }, - { id: "inflAssctBfrWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe3", upSequnce: 1, align: "right", row:1 }, - { id: "inflAssctBfrWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row:1 }, - { id: "inflAssctBfrWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row:1 }, - { id: "inflAssctBfrWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row:1 }, - { id: "inflAssctBfrWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row:1 }, - { id: "efflWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe4", upSequnce: 1, align: "right", row:1 }, - { id: "efflWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row:1 }, - { id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row:1 }, - { id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row:1 }, - { id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row:1 }, + { id: "fctCpc", title: "시설용량(m³/L)", align: "right", row:0, rowSpan:2, widthPercent: 5 }, + { id: "A", title: "유입", colSpan: 5, row: 0, widthPercent: 20 }, + { id: "B", title: "방류", colSpan: 5, row: 0, widthPercent: 20 }, + { id: "inflAssctBfrWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe3", upSequnce: 1, align: "right", row:1, widthPercent: 4 }, + { id: "inflAssctBfrWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row:1, widthPercent: 4 }, + { id: "inflAssctBfrWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row:1, widthPercent: 4 }, + { id: "inflAssctBfrWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row:1, widthPercent: 4 }, + { id: "inflAssctBfrWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row:1, widthPercent: 4 }, + { id: "efflWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe4", upSequnce: 1, align: "right", row:1, widthPercent: 4 }, + { id: "efflWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row:1, widthPercent: 4 }, + { id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row:1, widthPercent: 4 }, + { id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row:1, widthPercent: 4 }, + { id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row:1, widthPercent: 4 }, ]; /** diff --git a/apps/fo/app/store/flowRate/index.tsx b/apps/fo/app/store/flowRate/index.tsx index c61eb2d76..ab9100d09 100644 --- a/apps/fo/app/store/flowRate/index.tsx +++ b/apps/fo/app/store/flowRate/index.tsx @@ -95,53 +95,53 @@ export type FlowRateModalProps = { */ // 리스트 (행정별) const upHeadList1:TableUpperProps[] = [ - { id: "A", title: "행정명", row: 0 ,colSpan: 2 }, - { id: "sido", title: "시도", upName:"upChangeRe", row:1 }, - { id: "gugun", title: "시군구", upName:"upChangeRe", row:1 }, - { id: "bscFctNm", title: "시설명", row: 0, rowSpan: 2}, - { id: "daddr", title: "주소", row: 0, rowSpan: 2}, - { id: "fctCpc", title: "시설용량\n(m³/일)", align:"right", row: 0, rowSpan: 2}, - { id: "totInflAmnt", title: "총 유입량\n(m³/일)", align:"right", row: 0, rowSpan: 2}, - { id: "inflAmnt", title: "하수유입량\n(m³/일)", align:"right", row: 0, rowSpan: 2}, - { id: "sumFlow", title: '연계처리량\n(m³/일)', align:"right", row: 0, rowSpan: 2}, - { id: "returnAmnt", title: '총인 반류수량\n(m³/일)', align:"right", row: 0, rowSpan: 2}, - { id: "efflAmnt", title: '방류량\n(m³/일)', align:"right", row: 0, rowSpan: 2} + { id: "A", title: "행정명", row: 0, colSpan: 2, widthPercent: 16 }, + { id: "sido", title: "시도", upName:"upChangeRe", row:1, widthPercent: 8 }, + { id: "gugun", title: "시군구", upName:"upChangeRe", row:1, widthPercent: 8 }, + { id: "bscFctNm", title: "시설명", row: 0, rowSpan: 2, widthPercent: 10}, + { id: "daddr", title: "주소", row: 0, rowSpan: 2 }, + { id: "fctCpc", title: "시설용량\n(m³/일)", align:"right", row: 0, rowSpan: 2, widthPercent: 7 }, + { id: "totInflAmnt", title: "총 유입량\n(m³/일)", align:"right", row: 0, rowSpan: 2, widthPercent: 7 }, + { id: "inflAmnt", title: "하수유입량\n(m³/일)", align:"right", row: 0, rowSpan: 2, widthPercent: 7 }, + { id: "sumFlow", title: '연계처리량\n(m³/일)', align:"right", row: 0, rowSpan: 2, widthPercent: 7 }, + { id: "returnAmnt", title: '총인 반류수량\n(m³/일)', align:"right", row: 0, rowSpan: 2, widthPercent: 7 }, + { id: "efflAmnt", title: '방류량\n(m³/일)', align:"right", row: 0, rowSpan: 2, widthPercent: 7 } ]; // 리스트 (권역별) const upHeadList2:TableUpperProps[] = [ - { id: "A", title: "유역", row: 0, colSpan: 3}, - { id: "rvbsn", title: "권역", upName:"upChangeRe", row:1 }, - { id: "lgbsn", title: "단위유역", upName:"upChangeRe", row:1 }, - { id: "mdmbsn", title: "중권역", upName:"upChangeRe", row:1 }, - { id: "bscFctNm", title: "시설명", row: 0, rowSpan: 2}, - { id: "daddr", title: "주소", row: 0, rowSpan: 2}, - { id: "fctCpc", title: "시설용량\n(m³/일)", align:"right", row: 0, rowSpan: 2}, - { id: "totInflAmnt", title: "총 유입량\n(m³/일)", align:"right", row: 0, rowSpan: 2}, - { id: "inflAmnt", title: "하수유입량\n(m³/일)", align:"right", row: 0, rowSpan: 2}, - { id: "sumFlow", title: '연계처리량\n(m³/일)', align:"right", row: 0, rowSpan: 2}, - { id: "returnAmnt", title: '총인 반류수량\n(m³/일)', align:"right", row: 0, rowSpan: 2}, - { id: "efflAmnt", title: '방류량\n(m³/일)', align:"right", row: 0, rowSpan: 2} + { id: "A", title: "유역", row: 0, colSpan: 3, widthPercent: 24 }, + { id: "rvbsn", title: "권역", upName:"upChangeRe", row:1, widthPercent: 8 }, + { id: "lgbsn", title: "단위유역", upName:"upChangeRe", row:1, widthPercent: 8 }, + { id: "mdmbsn", title: "중권역", upName:"upChangeRe", row:1, widthPercent: 8 }, + { id: "bscFctNm", title: "시설명", row: 0, rowSpan: 2, widthPercent: 10 }, + { id: "daddr", title: "주소", row: 0, rowSpan: 2 }, + { id: "fctCpc", title: "시설용량\n(m³/일)", align:"right", row: 0, rowSpan: 2, widthPercent: 10 }, + { id: "totInflAmnt", title: "총 유입량\n(m³/일)", align:"right", row: 0, rowSpan: 2, widthPercent: 7 }, + { id: "inflAmnt", title: "하수유입량\n(m³/일)", align:"right", row: 0, rowSpan: 2, widthPercent: 7 }, + { id: "sumFlow", title: '연계처리량\n(m³/일)', align:"right", row: 0, rowSpan: 2, widthPercent: 7 }, + { id: "returnAmnt", title: '총인 반류수량\n(m³/일)', align:"right", row: 0, rowSpan: 2, widthPercent: 7 }, + { id: "efflAmnt", title: '방류량\n(m³/일)', align:"right", row: 0, rowSpan: 2, widthPercent: 7 } ]; // 리스트 (환경청별별) const upHeadList3:TableUpperProps[] = [ - { id: "A", title: "유역", row: 0, colSpan: 3 }, - { id: "rvbsn", title: "권역", upName:"upChangeRe1", row:1 }, - { id: "lgbsn", title: "단위유역", upName:"upChangeRe1", row:1 }, - { id: "mdmbsn", title: "중권역", upName:"upChangeRe1", row:1 }, - { id: "rgnNm", title: "환경청", row:0, rowSpan:2 }, - { id: "B", title: "행정명", row: 0 ,colSpan: 2 }, - { id: "sido", title: "시도", upName:"upChangeRe2", row:1 }, - { id: "gugun", title: "시군구", upName:"upChangeRe2", row:1 }, - { id: "bscFctNm", title: "시설명", row: 0, rowSpan: 2 }, + { id: "A", title: "유역", row: 0, colSpan: 3, widthPercent: 15 }, + { id: "rvbsn", title: "권역", upName:"upChangeRe1", row:1, widthPercent: 5 }, + { id: "lgbsn", title: "단위유역", upName:"upChangeRe1", row:1, widthPercent: 5 }, + { id: "mdmbsn", title: "중권역", upName:"upChangeRe1", row:1, widthPercent: 5 }, + { id: "rgnNm", title: "환경청", row:0, rowSpan:2, widthPercent: 7 }, + { id: "B", title: "행정명", row: 0 ,colSpan: 2, widthPercent: 10 }, + { id: "sido", title: "시도", upName:"upChangeRe2", row:1, widthPercent: 5 }, + { id: "gugun", title: "시군구", upName:"upChangeRe2", row:1, widthPercent: 5 }, + { id: "bscFctNm", title: "시설명", row: 0, rowSpan: 2, widthPercent: 7 }, { id: "daddr", title: "주소", row: 0, rowSpan: 2 }, - { id: "fctCpc", title: "시설용량\n(m³/일)", align:"right", row: 0, rowSpan: 2 }, - { id: "totInflAmnt", title: "총 유입량\n(m³/일)", align:"right", row: 0, rowSpan: 2 }, - { id: "inflAmnt", title: "하수유입량\n(m³/일)", align:"right", row: 0, rowSpan: 2 }, - { id: "sumFlow", title: '연계처리량\n(m³/일)', align:"right", row: 0, rowSpan: 2 }, - { id: "returnAmnt", title: '총인 반류수량\n(m³/일)', align:"right", row: 0, rowSpan: 2 }, - { id: "efflAmnt", title: '방류량\n(m³/일)', align:"right", row: 0, rowSpan: 2 } + { id: "fctCpc", title: "시설용량\n(m³/일)", align:"right", row: 0, rowSpan: 2, widthPercent: 7 }, + { id: "totInflAmnt", title: "총 유입량\n(m³/일)", align:"right", row: 0, rowSpan: 2, widthPercent: 7 }, + { id: "inflAmnt", title: "하수유입량\n(m³/일)", align:"right", row: 0, rowSpan: 2, widthPercent: 7 }, + { id: "sumFlow", title: '연계처리량\n(m³/일)', align:"right", row: 0, rowSpan: 2, widthPercent: 7 }, + { id: "returnAmnt", title: '총인 반류수량\n(m³/일)', align:"right", row: 0, rowSpan: 2, widthPercent: 7 }, + { id: "efflAmnt", title: '방류량\n(m³/일)', align:"right", row: 0, rowSpan: 2, widthPercent: 7 } ]; const flowRateList:flowRateListProps[] = [ @@ -158,6 +158,7 @@ const upHeadListFlowRateModal:TableUpperProps[] = [ { id: "sumFlow", title: "연계처리량(m³/일)", align:"right"}, { id: "returnAmnt", title: "총인 반류수량(m³/일)", align:"right"}, { id: "efflAmnt", title: "방류량(m³/일)", align:"right"}, + { id: "noProcessInflAmnt", title: "미처리하수량(m³/일)", align:"right"}, { id: "infoRnDay", title: "강우량(mm/일)", align:"right"} ] @@ -171,6 +172,7 @@ const fetchFlowRateList = async (pageNo: number, pageSize: number, searchYear: s try { const tailStr = partCd ? '/'+ partCd + '/' + nameCd + '/' + fcltCpct + '/' + operationValue + (fcltyNm && fcltyNm !== '' ? '/' + fcltyNm : '') : ''; const url = '/fclt/flow/' + pageNo + '/' + pageSize + '/' + searchYear + tailStr; + console.log(url); const res = await getFetch('fo', url); return { data: res.data, count: res.count } } catch (error) { diff --git a/apps/fo/app/store/planSewage/index.tsx b/apps/fo/app/store/planSewage/index.tsx index 21a711e8b..80a4d66e7 100644 --- a/apps/fo/app/store/planSewage/index.tsx +++ b/apps/fo/app/store/planSewage/index.tsx @@ -47,44 +47,44 @@ const LabelArray:string[] = ['구분', '시도', '시군구','용량별', '시 // 리스트 헤더 const upHeadList1:TableUpperProps[] = [ { id: "A", title: "행정구역", upSequnce:1, row:0, colSpan:2 }, - { id: "sido", title: "시도", upName:"upChangeRe", upSequnce:1, row:1 }, - { id: "gugun", title: "시군구", upName:"upChangeRe",upSequnce:2, row:1 }, - { id: "bscFctNm", title: "시설명", row:0, rowSpan:2 }, + { id: "sido", title: "시도", upName:"upChangeRe", upSequnce:1, row:1, widthPercent: 10 }, + { id: "gugun", title: "시군구", upName:"upChangeRe",upSequnce:2, row:1, widthPercent: 10 }, + { id: "bscFctNm", title: "시설명", row:0, rowSpan:2, widthPercent: 10 }, { id: "daddr", title: "주소", row:0, rowSpan:2 }, - { id: "fctCpc", title: "시설용량(m³/일)", row:0, rowSpan:2, align:'right' }, - { id: "spareCapacity", title: "여유용량(m³/일)", row:0, rowSpan:2, align:'right' }, - { id: "variableLoadPercent", title: "변동부하율(%)", row:0, rowSpan:2, align:'right' }, - { id: "classifiedSewerPercent", title: "분류식화율(%)", row:0, rowSpan:2, align:'right' }, + { id: "fctCpc", title: "시설용량(m³/일)", row:0, rowSpan:2, align:'right', widthPercent: 8 }, + { id: "spareCapacity", title: "여유용량(m³/일)", row:0, rowSpan:2, align:'right', widthPercent: 8 }, + { id: "variableLoadPercent", title: "변동부하율(%)", row:0, rowSpan:2, align:'right', widthPercent: 8 }, + { id: "classifiedSewerPercent", title: "분류식화율(%)", row:0, rowSpan:2, align:'right', widthPercent: 8 }, ]; const upHeadList2:TableUpperProps[] = [ { id: "A", title: "유역", upName:"upChangeRe", upSequnce:1, row:0, colSpan:3 }, - { id: "rvbsn", title: "권역", upName:"upChangeRe", upSequnce:1, row:1}, - { id: "lgbsn", title: "단위유역", upName:"upChangeRe", upSequnce:2, row:1}, - { id: "mdmbsn", title: "중권역", upName:"upChangeRe", upSequnce:3, row:1}, - { id: "bscFctNm", title: "시설명", row:0, rowSpan:2 }, + { id: "rvbsn", title: "권역", upName:"upChangeRe", upSequnce:1, row:1, widthPercent: 8 }, + { id: "lgbsn", title: "단위유역", upName:"upChangeRe", upSequnce:2, row:1, widthPercent: 8}, + { id: "mdmbsn", title: "중권역", upName:"upChangeRe", upSequnce:3, row:1, widthPercent: 8}, + { id: "bscFctNm", title: "시설명", row:0, rowSpan:2, widthPercent: 10 }, { id: "daddr", title: "주소", row:0, rowSpan:2 }, - { id: "fctCpc", title: "시설용량(m³/일)", row:0, rowSpan:2, align:'right' }, - { id: "spareCapacity", title: "여유용량(m³/일)", row:0, rowSpan:2, align:'right' }, - { id: "variableLoadPercent", title: "변동부하율(%)", row:0, rowSpan:2, align:'right' }, - { id: "classifiedSewerPercent", title: "분류식화율(%)", row:0, rowSpan:2, align:'right' }, + { id: "fctCpc", title: "시설용량(m³/일)", row:0, rowSpan:2, align:'right', widthPercent: 8 }, + { id: "spareCapacity", title: "여유용량(m³/일)", row:0, rowSpan:2, align:'right', widthPercent: 8 }, + { id: "variableLoadPercent", title: "변동부하율(%)", row:0, rowSpan:2, align:'right', widthPercent: 8 }, + { id: "classifiedSewerPercent", title: "분류식화율(%)", row:0, rowSpan:2, align:'right', widthPercent: 8 }, ]; const upHeadList3:TableUpperProps[] = [ { id: "A", title: "유역", upName:"upChangeRe", upSequnce:1, row:0, colSpan:3 }, - { id: "rvbsn", title: "권역", upName:"upChangeRe1", upSequnce:1, row:1}, - { id: "lgbsn", title: "단위유역", upName:"upChangeRe1", upSequnce:2, row:1}, - { id: "mdmbsn", title: "중권역", upName:"upChangeRe1", upSequnce:3, row:1}, - { id: "rgnNm", title: "환경청", row:0, rowSpan:2 }, + { id: "rvbsn", title: "권역", upName:"upChangeRe1", upSequnce:1, row:1, widthPercent: 5 }, + { id: "lgbsn", title: "단위유역", upName:"upChangeRe1", upSequnce:2, row:1, widthPercent: 5 }, + { id: "mdmbsn", title: "중권역", upName:"upChangeRe1", upSequnce:3, row:1, widthPercent: 5}, + { id: "rgnNm", title: "환경청", row:0, rowSpan:2, widthPercent: 8 }, { id: "B", title: "행정구역", upName:"upChangeRe", upSequnce:1, row:0, colSpan:2 }, - { id: "sido", title: "시도", upName:"upChangeRe2", upSequnce:1, row:1 }, - { id: "gugun", title: "시군구", upName:"upChangeRe2",upSequnce:2, row:1 }, - { id: "bscFctNm", title: "시설명", row:0, rowSpan:2 }, + { id: "sido", title: "시도", upName:"upChangeRe2", upSequnce:1, row:1, widthPercent: 5 }, + { id: "gugun", title: "시군구", upName:"upChangeRe2",upSequnce:2, row:1, widthPercent: 5 }, + { id: "bscFctNm", title: "시설명", row:0, rowSpan:2, widthPercent: 10 }, { id: "daddr", title: "주소", row:0, rowSpan:2 }, - { id: "fctCpc", title: "시설용량(m³/일)", row:0, rowSpan:2, align:'right' }, - { id: "spareCapacity", title: "여유용량(m³/일)", row:0, rowSpan:2, align:'right' }, - { id: "variableLoadPercent", title: "변동부하율(%)", row:0, rowSpan:2, align:'right' }, - { id: "classifiedSewerPercent", title: "분류식화율(%)", row:0, rowSpan:2, align:'right' }, + { id: "fctCpc", title: "시설용량(m³/일)", row:0, rowSpan:2, align:'right', widthPercent: 8 }, + { id: "spareCapacity", title: "여유용량(m³/일)", row:0, rowSpan:2, align:'right', widthPercent: 8 }, + { id: "variableLoadPercent", title: "변동부하율(%)", row:0, rowSpan:2, align:'right', widthPercent: 8 }, + { id: "classifiedSewerPercent", title: "분류식화율(%)", row:0, rowSpan:2, align:'right', widthPercent: 8 }, ]; const planSewageList:PlanSewageProps[] = [ @@ -96,6 +96,7 @@ const planSewageList:PlanSewageProps[] = [ const fetchPlanSewageList = async (pageNo: number, pageSize: number, searchYear: string, partCd?: string, nameCd?: string, fcltCpct?: string, operationValue?: string, fcltyNm?: string) => { const tailStr = partCd ? '/'+ partCd + '/' + (nameCd || '0') + '/' + (fcltCpct || '0') + '/' + (operationValue || '0') +'/0'+ (fcltyNm && fcltyNm !== '' ? '/' + fcltyNm : '') : ''; const url = '/prcsFclt/info/plan/' + pageNo + '/' + pageSize + '/' + searchYear + tailStr; + console.log(url); const res = await getFetch('fo', url); return { data: res.data, count: res.count } } diff --git a/apps/fo/app/store/processArea/index.tsx b/apps/fo/app/store/processArea/index.tsx index ccad3436e..37b4d52f0 100644 --- a/apps/fo/app/store/processArea/index.tsx +++ b/apps/fo/app/store/processArea/index.tsx @@ -128,35 +128,35 @@ const ProcessFacilityLabelArray:string[] = ['구분', '시도', '시군구','용 // 리스트 헤더(행정별) const upHeadList1:TableUpperProps[] = [ - { id: "A", title: "행정구역", colSpan:2, rowSpan:2, row:0}, - { id: "sido", title: "시도", upName:"upChangeRe", row:2 }, - { id: "sigungo", title: "시군구", upName:"upChangeRe", row:2 }, - { id: "swtrmtFcltNm", title: "시설명", rowSpan:3, row:0}, - { id: "location", title: "주소", rowSpan:3, row:0, }, - { id: "fctCpc", title: "시설용량(m³/일)", align:"right", rowSpan:3, row:0}, - { id: "B", title: "시설계획", colSpan:19, row:0}, - { id: "C", title: "증설계획(m³/일)", colSpan:6, row:1}, - { id: "planSwageQntSumDt4", title: "기승인\n4단계", row:2, align:"right"}, - { id: "planSwageQntSum", title: "현재", row:2, align:"right"}, - { id: "planSwageQntSumDc1", title: "1단계", row:2, align:"right"}, - { id: "planSwageQntSumDc2", title: "2단계", row:2, align:"right"}, - { id: "planSwageQntSumDc3", title: "3단계", row:2, align:"right"}, - { id: "planSwageQntSumDc4", title: "4단계", row:2, align:"right"}, - { id: "D", title: "처리인구(인)", colSpan:6, row:1}, - { id: "swtrmtPpltnCntDt4", title: "기승인\n4단계", row:2, align:"right"}, - { id: "swtrmtPpltnCnt", title: "현재", row:2, align:"right"}, - { id: "swtrmtPpltnCntDc1", title: "1단계", row:2, align:"right"}, - { id: "swtrmtPpltnCntDc2", title: "2단계", row:2, align:"right"}, - { id: "swtrmtPpltnCntDc3", title: "3단계", row:2, align:"right"}, - { id: "swtrmtPpltnCntDc4", title: "4단계", row:2, align:"right"}, - { id: "E", title: "처리구역(km²)", colSpan:7, row:1}, - { id: "swtrmtZoneAreaDt4", title: "기승인\n4단계", row:2, align:"right"}, - { id: "swtrmtZoneArea", title: "현재", row:2, align:"right"}, - { id: "swtrmtZoneAreaDc1", title: "1단계", row:2, align:"right"}, - { id: "swtrmtZoneAreaDc2", title: "2단계", row:2, align:"right"}, - { id: "swtrmtZoneAreaDc3", title: "3단계", row:2, align:"right"}, - { id: "swtrmtZoneAreaDc4", title: "4단계", row:2, align:"right"}, - { id: "trtDstr", title: "처리구역", row:2} + { id: "A", title: "행정구역", colSpan:2, rowSpan:2, row:0 }, + { id: "sido", title: "시도", upName:"upChangeRe", row:2, widthPercent:4 }, + { id: "sigungo", title: "시군구", upName:"upChangeRe", row:2, widthPercent:4 }, + { id: "swtrmtFcltNm", title: "시설명", rowSpan:3, row:0, widthPercent: 8 }, + { id: "location", title: "주소", rowSpan:3, row:0 }, + { id: "fctCpc", title: "시설용량(m³/일)", align:"right", rowSpan:3, row:0, widthPercent: 5 }, + { id: "B", title: "시설계획", colSpan:19, row: 0 }, + { id: "C", title: "증설계획(m³/일)", colSpan:6, row: 1 }, + { id: "planSwageQntSumDt4", title: "기승인\n4단계", row:2, align:"right", widthPercent: 2.5 }, + { id: "planSwageQntSum", title: "현재", row:2, align:"right", widthPercent: 2.5 }, + { id: "planSwageQntSumDc1", title: "1단계", row:2, align:"right", widthPercent: 2.5 }, + { id: "planSwageQntSumDc2", title: "2단계", row:2, align:"right", widthPercent: 2.5 }, + { id: "planSwageQntSumDc3", title: "3단계", row:2, align:"right", widthPercent: 2.5 }, + { id: "planSwageQntSumDc4", title: "4단계", row:2, align:"right", widthPercent: 2.5 }, + { id: "D", title: "처리인구(인)", colSpan:6, row:1 }, + { id: "swtrmtPpltnCntDt4", title: "기승인\n4단계", row:2, align:"right", widthPercent: 2.5 }, + { id: "swtrmtPpltnCnt", title: "현재", row:2, align:"right", widthPercent: 2.5 }, + { id: "swtrmtPpltnCntDc1", title: "1단계", row:2, align:"right", widthPercent: 2.5 }, + { id: "swtrmtPpltnCntDc2", title: "2단계", row:2, align:"right", widthPercent: 2.5 }, + { id: "swtrmtPpltnCntDc3", title: "3단계", row:2, align:"right", widthPercent: 2.5 }, + { id: "swtrmtPpltnCntDc4", title: "4단계", row:2, align:"right", widthPercent: 2.5 }, + { id: "E", title: "처리구역(km²)", colSpan:7, row:1 }, + { id: "swtrmtZoneAreaDt4", title: "기승인\n4단계", row:2, align:"right", widthPercent: 2.5 }, + { id: "swtrmtZoneArea", title: "현재", row:2, align:"right", widthPercent: 2.5 }, + { id: "swtrmtZoneAreaDc1", title: "1단계", row:2, align:"right", widthPercent: 2.5 }, + { id: "swtrmtZoneAreaDc2", title: "2단계", row:2, align:"right", widthPercent: 2.5 }, + { id: "swtrmtZoneAreaDc3", title: "3단계", row:2, align:"right", widthPercent: 2.5 }, + { id: "swtrmtZoneAreaDc4", title: "4단계", row:2, align:"right", widthPercent: 2.5 }, + { id: "trtDstr", title: "처리구역", row:2 } ]; const processAreaList:ProcessAreaProps[] = [ diff --git a/apps/fo/app/store/processFacility/index.tsx b/apps/fo/app/store/processFacility/index.tsx index ecb668063..43e7eab53 100644 --- a/apps/fo/app/store/processFacility/index.tsx +++ b/apps/fo/app/store/processFacility/index.tsx @@ -162,52 +162,56 @@ const ProcessFacilityLabelArray:string[] = ['구분', '시도', '시군구','용 // 리스트 헤더 const upHeadList1:TableUpperProps[] = [ - { id: "sido", title: "시도", upName:"upChangeRe", upSequnce:1 }, - { id: "gugun", title: "시군구", upName:"upChangeRe",upSequnce:2 }, - { id: "bscFctNm", title: "시설명"}, - { id: "daddr", title: "주소"}, - { id: "fctCpc", title: "시설용량\n(m³/일)", align: 'right'}, - { id: "plInflWqltBod", title: "계획유입수질\n(mg/L)", align:"right"}, - { id: "dsInflWqltBod", title: "설계유입수질\n(mg/L)", align:"right"}, - { id: "trtFrfNm", title: '공법'}, - { id: "rnDt", title: '가동개시일'}, - { id: "cmplDt", title: '준공일' }, - { id: "trstOprEtpNm", title: '관리대행업자'} + { id: "A", title: "행정명", colSpan: 2, row: 0, widthPercent: 10 }, + { id: "sido", title: "시도", upName:"upChangeRe", row: 1, upSequnce:1, widthPercent: 5 }, + { id: "gugun", title: "시군구", upName:"upChangeRe", row: 1, upSequnce:2, widthPercent: 5 }, + { id: "bscFctNm", title: "시설명", row: 0, rowSpan: 2, widthPercent: 8 }, + { id: "daddr", title: "주소", row: 0, rowSpan: 2 }, + { id: "fctCpc", title: "시설용량\n(m³/일)", row: 0, align: 'right', rowSpan: 2, widthPercent: 5 }, + { id: "plInflWqltBod", title: "계획유입수질\n(mg/L)", row: 0, align:"right", rowSpan: 2, widthPercent: 5 }, + { id: "dsInflWqltBod", title: "설계유입수질\n(mg/L)", row: 0, align:"right", rowSpan: 2, widthPercent: 5 }, + { id: "trtFrfNm", title: '공법', row: 0, rowSpan: 2 }, + { id: "rnDt", title: '가동개시일', row: 0, rowSpan: 2, widthPercent: 5 }, + { id: "cmplDt", title: '준공일', row: 0, rowSpan: 2, widthPercent: 5 }, + { id: "trstOprEtpNm", title: '관리대행업자', row: 0, rowSpan: 2 , widthPercent: 14} ]; // 처리시설 리스트 (유역) const upHeadList2:TableUpperProps[] = [ - { id: "rvbsn", title: "권역", upName:"upChangeRe", upSequnce:1}, - { id: "lgbsn", title: "단위유역", upName:"upChangeRe", upSequnce:2}, - { id: "mdmbsn", title: "중권역", upName:"upChangeRe", upSequnce:3}, - { id: "bscFctNm", title: "시설명"}, - { id: "daddr", title: "주소"}, - { id: "fctCpc", title: "시설용량\n(m³/일)", align: 'right'}, - { id: "plInflWqltBod", title: "계획유입수질\n(mg/L)", align:'right'}, - { id: "dsInflWqltBod", title: "설계유입수질\n(mg/L)", align:'right'}, - { id: "trtFrfNm", title: '공법'}, - { id: "rnDt", title: '가동개시일'}, - { id: "cmplDt", title: '준공일' }, - { id: "trstOprEtpNm", title: '관리대행업자'} + { id: "A", title: "유역", colSpan: 3, row: 0, widthPercent: 15 }, + { id: "rvbsn", title: "권역", row: 1, widthPercent: 5 }, + { id: "lgbsn", title: "단위유역", row: 1, widthPercent: 5 }, + { id: "mdmbsn", title: "중권역", row: 1, widthPercent: 5 }, + { id: "bscFctNm", title: "시설명", rowSpan: 2,row: 0, widthPercent: 8 }, + { id: "daddr", title: "주소", rowSpan: 2,row: 0 }, + { id: "fctCpc", title: "시설용량\n(m³/일)", rowSpan: 2,row: 0, widthPercent: 5, align: 'right'}, + { id: "plInflWqltBod", title: "계획유입수질\n(mg/L)", rowSpan: 2,row: 0, widthPercent: 6, align:'right'}, + { id: "dsInflWqltBod", title: "설계유입수질\n(mg/L)", rowSpan: 2,row: 0, widthPercent: 6, align:'right'}, + { id: "trtFrfNm", title: '공법', rowSpan: 2,row: 0 }, + { id: "rnDt", title: '가동개시일', rowSpan: 2,row: 0, widthPercent: 5 }, + { id: "cmplDt", title: '준공일', rowSpan: 2,row: 0, widthPercent: 5 }, + { id: "trstOprEtpNm", title: '관리대행업자', rowSpan: 2,row: 0, widthPercent: 14 } ]; // 처리시설 리스트 (환경청청) const upHeadList3:TableUpperProps[] = [ - { id: "rvbsn", title: "권역", upName:"upChangeRe1", upSequnce:1}, - { id: "lgbsn", title: "단위유역", upName:"upChangeRe1", upSequnce:2}, - { id: "mdmbsn", title: "중권역", upName:"upChangeRe1", upSequnce:3}, - { id: "rgnNm", title: "환경청"}, - { id: "sido", title: "시도", upName:"upChangeRe2", upSequnce:1 }, - { id: "gugun", title: "시군구", upName:"upChangeRe2",upSequnce:2 }, - { id: "bscFctNm", title: "시설명"}, - { id: "daddr", title: "주소"}, - { id: "fctCpc", title: "시설용량\n(m³/일)", align: 'right'}, - { id: "plInflWqltBod", title: "계획유입수질\n(mg/L)", align:'right'}, - { id: "dsInflWqltBod", title: "설계유입수질\n(mg/L)", align:'right'}, - { id: "trtFrfNm", title: '공법'}, - { id: "rnDt", title: '가동개시일'}, - { id: "cmplDt", title: '준공일' }, - { id: "trstOprEtpNm", title: '관리대행업자'} + { id: "A", title: "유역", colSpan: 3, row: 0, widthPercent: 12 }, + { id: "rvbsn", title: "권역", row: 1, widthPercent: 4 }, + { id: "lgbsn", title: "단위유역", row: 1, widthPercent: 4}, + { id: "mdmbsn", title: "중권역", row: 1, widthPercent: 4 }, + { id: "rgnNm", title: "환경청", row: 0, rowSpan: 2, widthPercent: 6 }, + { id: "B", title: "행정명", colSpan: 2, row: 0, widthPercent: 8 }, + { id: "sido", title: "시도", row: 1, widthPercent: 4 }, + { id: "gugun", title: "시군구", row: 1, widthPercent: 4 }, + { id: "bscFctNm", title: "시설명", row: 0, rowSpan: 2, widthPercent: 8 }, + { id: "daddr", title: "주소", row: 0, rowSpan: 2 }, + { id: "fctCpc", title: "시설용량\n(m³/일)", row: 0, rowSpan: 2, align: 'right', widthPercent: 5 }, + { id: "plInflWqltBod", title: "계획유입수질\n(mg/L)", row: 0, rowSpan: 2, align:'right', widthPercent: 5 }, + { id: "dsInflWqltBod", title: "설계유입수질\n(mg/L)", row: 0, rowSpan: 2, align:'right', widthPercent: 5 }, + { id: "trtFrfNm", title: '공법', row: 0, rowSpan: 2 }, + { id: "rnDt", title: '가동개시일', row: 0, rowSpan: 2, widthPercent: 5 }, + { id: "cmplDt", title: '준공일', row: 0, rowSpan: 2, widthPercent: 5 }, + { id: "trstOprEtpNm", title: '관리대행업자', row: 0, rowSpan: 2, widthPercent: 14 } ]; const processFacilityList:facilityListProps[] = [ diff --git a/apps/fo/app/store/rdi/index.tsx b/apps/fo/app/store/rdi/index.tsx index 4b344df12..c22859043 100644 --- a/apps/fo/app/store/rdi/index.tsx +++ b/apps/fo/app/store/rdi/index.tsx @@ -101,65 +101,65 @@ export interface ExcelType { // 리스트 헤더 const upHeadList1:TableUpperProps[] = [ { id: "A", title: "행정구역", row:0, colSpan:2 }, - { id: "sido", title: "시도", upName:"upChangeRe", upSequnce:1, row:1 }, - { id: "sigungo", title: "시군구", upName:"upChangeRe",upSequnce:2, row:1 }, - { id: "bscFctNm", title: "시설명", row:0, rowSpan:2 }, + { id: "sido", title: "시도", row:1, widthPercent: 6 }, + { id: "sigungo", title: "시군구", row:1, widthPercent: 6 }, + { id: "bscFctNm", title: "시설명", row:0, rowSpan:2, widthPercent: 7 }, { id: "daddr", title: "주소", row:0, rowSpan:2 }, - { id: "fctCpc", title: "시설용량\n(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "chungchunFlow", title: "청천시 유입하수량\n(m³/일)", align:"right", row:0, rowSpan:2 }, + { id: "fctCpc", title: "시설용량\n(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 7 }, + { id: "chungchunFlow", title: "청천시 유입하수량\n(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 7 }, { id: "B", title: "하절기 운영현황(6~8월)", row:0, colSpan:2 }, - { id: "summerMinBodValue", title: "3mm 이상 강우일 중 최저 유입BOD\n(mg/L)", align:"right", row:1 }, - { id: "inflAmnt", title: "하절기최저유입BOD유입유량\n(m³/일)", row:1, align:"right" }, + { id: "summerMinBodValue", title: "3mm 이상 강우일 중\n최저 유입BOD\n(mg/L)", align:"right", row:1, widthPercent: 7 }, + { id: "inflAmnt", title: "하절기최저유입\nBOD유입유량\n(m³/일)", row:1, align:"right", widthPercent: 7 }, { id: "C", title: "동절기 운영현황(1~2월)", row:0 }, - { id: "winterAvgBodLowRainfall", title: "청천시 유입BOD\n(mg/L)", row:1, align:"right" }, - { id: "rdiiValue", title: "RDII추정", row:0, rowSpan:2, align:"right" }, - { id: "infoRnDay", title: "RDII추정시일강수량\n(mm)", row:0, rowSpan:2, align:"right" }, - { id: "rainCalInflAmnt", title: "강우시 총 추정유입량\n(m³/일)", row:0, rowSpan:2, align:"right" }, - { id: "properYn", title: "적정여부", row:0, rowSpan:2 }, + { id: "winterAvgBodLowRainfall", title: "청천시 유입BOD\n(mg/L)", row:1, align:"right", widthPercent: 8 }, + { id: "rdiiValue", title: "RDII추정", row:0, rowSpan:2, align:"right", widthPercent: 8 }, + { id: "infoRnDay", title: "RDII추정시\n일강수량\n(mm)", row:0, rowSpan:2, align:"right", widthPercent: 7 }, + { id: "rainCalInflAmnt", title: "강우시\n총 추정유입량\n(m³/일)", row:0, rowSpan:2, align:"right", widthPercent: 6 }, + { id: "properYn", title: "적정여부", row:0, rowSpan:2, widthPercent: 6 }, ]; const upHeadList2:TableUpperProps[] = [ { id: "A", title: "유역", row:0, colSpan:3 }, - { id: "rvbsn", title: "권역", upName:"upChangeRe", upSequnce:1, row:1 }, - { id: "lgbsn", title: "단위유역", upName:"upChangeRe", upSequnce:2, row:1 }, - { id: "mdmbsn", title: "중권역", upName:"upChangeRe", upSequnce:3, row:1 }, - { id: "bscFctNm", title: "시설명", row:0, rowSpan:2 }, + { id: "rvbsn", title: "권역", row:1, widthPercent: 5 }, + { id: "lgbsn", title: "단위유역", row:1, widthPercent: 5 }, + { id: "mdmbsn", title: "중권역", row:1, widthPercent: 5 }, + { id: "bscFctNm", title: "시설명", row:0, rowSpan:2, widthPercent: 7 }, { id: "daddr", title: "주소", row:0, rowSpan:2 }, - { id: "fctCpc", title: "시설용량(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "chungchunFlow", title: "청천시 유입하수량\n(m³/일)", align:"right", row:0, rowSpan:2 }, + { id: "fctCpc", title: "시설용량\n(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 7 }, + { id: "chungchunFlow", title: "청천시 유입하수량\n(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 7 }, { id: "B", title: "하절기 운영현황(6~8월)", row:0, colSpan:2 }, - { id: "summerMinBodValue", title: "3mm 이상 강우일 중 최저 유입BOD\n(mg/L)", align:"right", row:1 }, - { id: "inflAmnt", title: "하절기최저유입BOD유입유량", row:1, align:"right" }, + { id: "summerMinBodValue", title: "3mm 이상 강우일 중\n최저 유입BOD\n(mg/L)", align:"right", row:1, widthPercent: 7 }, + { id: "inflAmnt", title: "하절기최저유입\nBOD유입유량\n(m³/일)", row:1, align:"right", widthPercent: 7 }, { id: "D", title: "동절기 운영현황(1~2월)", row:0 }, - { id: "winterAvgBodLowRainfall", title: "동절기청천시유입BOD", row:1, align:"right" }, - { id: "rdiiValue", title: "RDII추정", row:0, rowSpan:2, align:"right" }, - { id: "infoRnDay", title: "RDII추정시일강수량", row:0, rowSpan:2, align:"right" }, - { id: "rainCalInflAmnt", title: "강우시 총 추정유입량\n(m³/일)", row:0, rowSpan:2, align:"right" }, - { id: "properYn", title: "적정여부", row:0, rowSpan:2 }, + { id: "winterAvgBodLowRainfall", title: "청천시 유입BOD\n(mg/L)", row:1, align:"right", widthPercent: 8 }, + { id: "rdiiValue", title: "RDII추정", row:0, rowSpan:2, align:"right", widthPercent: 7 }, + { id: "infoRnDay", title: "RDII추정시\n일강수량\n(mm)", row:0, rowSpan:2, align:"right", widthPercent: 7 }, + { id: "rainCalInflAmnt", title: "강우시\n총 추정유입량\n(m³/일)", row:0, rowSpan:2, align:"right", widthPercent: 6 }, + { id: "properYn", title: "적정여부", row:0, rowSpan:2, widthPercent: 6 }, ]; const upHeadList3:TableUpperProps[] = [ { id: "A", title: "유역", row:0, colSpan:3 }, - { id: "rvbsn", title: "권역", upName:"upChangeRe1", upSequnce:1, row:1 }, - { id: "lgbsn", title: "단위유역", upName:"upChangeRe1", upSequnce:2, row:1 }, - { id: "mdmbsn", title: "중권역", upName:"upChangeRe1", upSequnce:3, row:1 }, - { id: "rgnNm", title: "환경청", row:0, rowSpan:2 }, + { id: "rvbsn", title: "권역", row:1, widthPercent: 4 }, + { id: "lgbsn", title: "단위유역", row:1, widthPercent: 4 }, + { id: "mdmbsn", title: "중권역", row:1, widthPercent: 4 }, + { id: "rgnNm", title: "환경청", row:0, rowSpan:2, widthPercent: 6 }, { id: "B", title: "행정구역", row:0, colSpan:2 }, - { id: "sido", title: "시도", upName:"upChangeRe2", upSequnce:1, row:1 }, - { id: "sigungo", title: "시군구", upName:"upChangeRe2",upSequnce:2, row:1 }, - { id: "bscFctNm", title: "시설명", row:0, rowSpan:2 }, + { id: "sido", title: "시도", upName:"upChangeRe2", upSequnce:1, row:1, widthPercent: 4 }, + { id: "sigungo", title: "시군구", upName:"upChangeRe2",upSequnce:2, row:1, widthPercent: 4 }, + { id: "bscFctNm", title: "시설명", row:0, rowSpan:2, widthPercent: 6 }, { id: "daddr", title: "주소", row:0, rowSpan:2 }, - { id: "fctCpc", title: "시설용량(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "chungchunFlow", title: "청천시 유입하수량\n(m³/일)", align:"right", row:0, rowSpan:2 }, + { id: "fctCpc", title: "시설용량\n(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 5 }, + { id: "chungchunFlow", title: "청천시 유입하수량\n(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 6 }, { id: "C", title: "하절기 운영현황(6~8월)", row:0, colSpan:2 }, - { id: "summerMinBodValue", title: "3mm 이상 강우일 중 최저 유입BOD\n(mg/L)", align:"right", row:1 }, - { id: "inflAmnt", title: "하절기최저유입BOD유입유량", row:1, align:"right" }, + { id: "summerMinBodValue", title: "3mm 이상 강우일 중\n최저 유입BOD\n(mg/L)", align:"right", row:1, widthPercent: 6 }, + { id: "inflAmnt", title: "하절기최저유입\nBOD유입유량\n(m³/일)", row:1, align:"right", widthPercent: 6 }, { id: "D", title: "동절기 운영현황(1~2월)", row:0 }, - { id: "winterAvgBodLowRainfall", title: "동절기청천시유입BOD", row:1, align:"right" }, - { id: "rdiiValue", title: "RDII추정", row:0, rowSpan:2, align:"right" }, - { id: "infoRnDay", title: "RDII추정시일강수량", row:0, rowSpan:2, align:"right" }, - { id: "rainCalInflAmnt", title: "강우시 총 추정유입량\n(m³/일)", row:0, rowSpan:2, align:"right" }, - { id: "properYn", title: "적정여부", row:0, rowSpan:2 }, + { id: "winterAvgBodLowRainfall", title: "청천시 유입BOD\n(mg/L)", row:1, align:"right", widthPercent: 8 }, + { id: "rdiiValue", title: "RDII추정", row:0, rowSpan:2, align:"right", widthPercent: 6 }, + { id: "infoRnDay", title: "RDII추정시\n일강수량\n(mm)", row:0, rowSpan:2, align:"right", widthPercent: 6 }, + { id: "rainCalInflAmnt", title: "강우시\n총 추정유입량\n(m³/일)", row:0, rowSpan:2, align:"right", widthPercent: 6 }, + { id: "properYn", title: "적정여부", row:0, rowSpan:2, widthPercent: 6 }, ]; const rdiList:RdiProps[] = [ diff --git a/apps/fo/app/store/sewageOccur/index.tsx b/apps/fo/app/store/sewageOccur/index.tsx index efc51a5af..e9ae8985b 100644 --- a/apps/fo/app/store/sewageOccur/index.tsx +++ b/apps/fo/app/store/sewageOccur/index.tsx @@ -63,50 +63,50 @@ export interface ExcelType { // 리스트 헤더 const upHeadList1:TableUpperProps[] = [ { id: "A", title: "행정구역", row:0, colSpan:2 }, - { id: "sidoNm", title: "시도", upName:"upChangeRe", upSequnce:1, row:1 }, - { id: "sggNm", title: "시군구", upName:"upChangeRe",upSequnce:2, row:1 }, - { id: "bscFctNm", title: "시설명", row:0, rowSpan:2 }, + { id: "sidoNm", title: "시도", row:1, widthPercent: 8 }, + { id: "sggNm", title: "시군구", row:1, widthPercent: 8 }, + { id: "bscFctNm", title: "시설명", row:0, rowSpan:2, widthPercent: 8 }, { id: "daddr", title: "주소", row:0, rowSpan:2 }, - { id: "fctCpc", title: "시설용량(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "waterUsage", title: "물사용량(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "swageChangePercent", title: "오수전환율\n(%)", align:"right", row:0, rowSpan:2 }, - { id: "estimationSewage", title: "오수발생량 추정\n(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "sewageInputYear", title: "연간 하수유입량\n(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "sewageInputChungchun", title: "청천시 하수유입량\n(m³/일)", align:"right", row:0, rowSpan:2 }, + { id: "fctCpc", title: "시설용량(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 8 }, + { id: "waterUsage", title: "물사용량(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 8 }, + { id: "swageChangePercent", title: "오수전환율\n(%)", align:"right", row:0, rowSpan:2, widthPercent: 8 }, + { id: "estimationSewage", title: "오수발생량 추정\n(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 8 }, + { id: "sewageInputYear", title: "연간 하수유입량\n(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 8 }, + { id: "sewageInputChungchun", title: "청천시 하수유입량\n(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 8 }, ]; const upHeadList2:TableUpperProps[] = [ { id: "A", title: "유역", row:0, colSpan:3 }, - { id: "rvbsn", title: "권역", upName:"upChangeRe", upSequnce:1, row:1 }, - { id: "lgbsn", title: "단위유역", upName:"upChangeRe", upSequnce:2, row:1 }, - { id: "mdmbsn", title: "중권역", upName:"upChangeRe", upSequnce:3, row:1 }, - { id: "bscFctNm", title: "시설명", row:0, rowSpan:2 }, + { id: "rvbsn", title: "권역", row:1, widthPercent: 6 }, + { id: "lgbsn", title: "단위유역", row:1, widthPercent: 6 }, + { id: "mdmbsn", title: "중권역", row:1, widthPercent: 6 }, + { id: "bscFctNm", title: "시설명", row:0, rowSpan:2, widthPercent: 8 }, { id: "daddr", title: "주소", row:0, rowSpan:2 }, - { id: "fctCpc", title: "시설용량(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "waterUsage", title: "물사용량(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "swageChangePercent", title: "오수전환율", align:"right", row:0, rowSpan:2 }, - { id: "estimationSewage", title: "오수발생량 추정\n(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "sewageInputYear", title: "연간 하수유입량\n(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "sewageInputChungchun", title: "청천시 하수유입량\n(m³/일)", align:"right", row:0, rowSpan:2 }, + { id: "fctCpc", title: "시설용량(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 8 }, + { id: "waterUsage", title: "물사용량(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 8 }, + { id: "swageChangePercent", title: "오수전환율", align:"right", row:0, rowSpan:2, widthPercent: 8 }, + { id: "estimationSewage", title: "오수발생량 추정\n(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 8 }, + { id: "sewageInputYear", title: "연간 하수유입량\n(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 8 }, + { id: "sewageInputChungchun", title: "청천시 하수유입량\n(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 8 }, ]; const upHeadList3:TableUpperProps[] = [ { id: "A", title: "유역", row:0, colSpan:3 }, - { id: "rvbsn", title: "권역", upName:"upChangeRe1", upSequnce:1, row:1 }, - { id: "lgbsn", title: "단위유역", upName:"upChangeRe1", upSequnce:2, row:1 }, - { id: "mdmbsn", title: "중권역", upName:"upChangeRe1", upSequnce:3, row:1 }, - { id: "rgnNm", title: "환경청", row:0, rowSpan:2 }, + { id: "rvbsn", title: "권역", row:1, widthPercent: 5 }, + { id: "lgbsn", title: "단위유역", row:1, widthPercent: 5 }, + { id: "mdmbsn", title: "중권역", row:1, widthPercent: 5 }, + { id: "rgnNm", title: "환경청", row:0, rowSpan:2, widthPercent: 8 }, { id: "B", title: "행정구역", row:0, colSpan:2 }, - { id: "sidoNm", title: "시도", upName:"upChangeRe2", upSequnce:1, row:1 }, - { id: "sggNm", title: "시군구", upName:"upChangeRe2",upSequnce:2, row:1 }, - { id: "bscFctNm", title: "시설명", row:0, rowSpan:2 }, + { id: "sidoNm", title: "시도", row:1, widthPercent: 6 }, + { id: "sggNm", title: "시군구", row:1, widthPercent: 6 }, + { id: "bscFctNm", title: "시설명", row:0, rowSpan:2, widthPercent: 8 }, { id: "daddr", title: "주소", row:0, rowSpan:2 }, - { id: "fctCpc", title: "시설용량(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "waterUsage", title: "물사용량(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "swageChangePercent", title: "오수전환율", align:"right", row:0, rowSpan:2 }, - { id: "estimationSewage", title: "오수발생량 추정\n(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "sewageInputYear", title: "연간 하수유입량\n(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "sewageInputChungchun", title: "청천시 하수유입량\n(m³/일)", align:"right", row:0, rowSpan:2 }, + { id: "fctCpc", title: "시설용량(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 6 }, + { id: "waterUsage", title: "물사용량(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 6 }, + { id: "swageChangePercent", title: "오수전환율", align:"right", row:0, rowSpan:2, widthPercent: 6 }, + { id: "estimationSewage", title: "오수발생량 추정\n(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 6 }, + { id: "sewageInputYear", title: "연간 하수유입량\n(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 6 }, + { id: "sewageInputChungchun", title: "청천시 하수유입량\n(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 6 }, ]; const upHeadListSewageOccurDetail:TableUpperProps[] = [ diff --git a/apps/fo/app/store/underWaterInput/index.tsx b/apps/fo/app/store/underWaterInput/index.tsx index dc29412ad..f6b466492 100644 --- a/apps/fo/app/store/underWaterInput/index.tsx +++ b/apps/fo/app/store/underWaterInput/index.tsx @@ -35,53 +35,53 @@ const LabelArray:string[] = ['구분', '시도', '시군구','용량별', '시 // 리스트 헤더 const upHeadList1:TableUpperProps[] = [ { id: "A", title: "행정구역", row:0, colSpan:2 }, - { id: "sidoNm", title: "시도", upName:"upChangeRe", upSequnce:1, row:1 }, - { id: "sggNm", title: "시군구", upName:"upChangeRe",upSequnce:2, row:1 }, - { id: "bscFctNm", title: "시설명", row:0, rowSpan:2 }, + { id: "sidoNm", title: "시도", row:1, widthPercent: 8 }, + { id: "sggNm", title: "시군구", row:1, widthPercent: 8 }, + { id: "bscFctNm", title: "시설명", row:0, rowSpan:2, widthPercent: 8 }, { id: "daddr", title: "주소", row:0, rowSpan:2 }, - { id: "fctCpc", title: "시설용량(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "inflAmnt", title: "연평균유입하수량(m³/일)", align:"right", row:0, rowSpan:2 }, + { id: "fctCpc", title: "시설용량(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 8 }, + { id: "inflAmnt", title: "연평균유입하수량(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 10 }, { id: "C", title: "지하수 유입량 추정", align:"right", row:0, colSpan:3 }, - { id: "underWaterInputYear", title: "연간\n(m³/일)", align:"right", row:1 }, - { id: "underWaterInputSummer", title: "하절기\n(m³/일)", align:"right", row:1 }, - { id: "underWaterInputWinter", title: "동절기\n(m³/일)", align:"right", row:1 }, - { id: "properYn", title: "적정여부", row:0, rowSpan:2 }, + { id: "underWaterInputYear", title: "연간\n(m³/일)", align:"right", row:1, widthPercent: 8 }, + { id: "underWaterInputSummer", title: "하절기\n(m³/일)", align:"right", row:1, widthPercent: 8 }, + { id: "underWaterInputWinter", title: "동절기\n(m³/일)", align:"right", row:1, widthPercent: 8 }, + { id: "properYn", title: "적정여부", row:0, rowSpan:2, widthPercent: 8 }, ]; const upHeadList2:TableUpperProps[] = [ { id: "A", title: "유역", row:0, colSpan:3 }, - { id: "rvbsn", title: "권역", upName:"upChangeRe", upSequnce:1, row:1 }, - { id: "lgbsn", title: "단위유역", upName:"upChangeRe", upSequnce:2, row:1 }, - { id: "mdmbsn", title: "중권역", upName:"upChangeRe", upSequnce:3, row:1 }, - { id: "bscFctNm", title: "시설명", row:0, rowSpan:2 }, + { id: "rvbsn", title: "권역", row:1, widthPercent: 5 }, + { id: "lgbsn", title: "단위유역", row:1, widthPercent: 5 }, + { id: "mdmbsn", title: "중권역", row:1, widthPercent: 5 }, + { id: "bscFctNm", title: "시설명", row:0, rowSpan:2, widthPercent: 8 }, { id: "daddr", title: "주소", row:0, rowSpan:2 }, - { id: "fctCpc", title: "시설용량(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "inflAmnt", title: "연평균유입하수량(m³/일)", align:"right", row:0, rowSpan:2 }, + { id: "fctCpc", title: "시설용량(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 8 }, + { id: "inflAmnt", title: "연평균유입하수량(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 10 }, { id: "C", title: "지하수 유입량 추정", align:"right", row:0, colSpan:3 }, - { id: "underWaterInputYear", title: "연간\n(m³/일)", align:"right", row:1 }, - { id: "underWaterInputSummer", title: "하절기\n(m³/일)", align:"right", row:1 }, - { id: "underWaterInputWinter", title: "동절기\n(m³/일)", align:"right", row:1 }, - { id: "properYn", title: "적정여부", row:0, rowSpan:2 }, + { id: "underWaterInputYear", title: "연간\n(m³/일)", align:"right", row:1, widthPercent: 8 }, + { id: "underWaterInputSummer", title: "하절기\n(m³/일)", align:"right", row:1, widthPercent: 8 }, + { id: "underWaterInputWinter", title: "동절기\n(m³/일)", align:"right", row:1, widthPercent: 8 }, + { id: "properYn", title: "적정여부", row:0, rowSpan:2, widthPercent: 8 }, ]; const upHeadList3:TableUpperProps[] = [ { id: "A", title: "유역", row:0, colSpan:3 }, - { id: "rvbsn", title: "권역", upName:"upChangeRe1", upSequnce:1, row:1 }, - { id: "lgbsn", title: "단위유역", upName:"upChangeRe1", upSequnce:2, row:1 }, - { id: "mdmbsn", title: "중권역", upName:"upChangeRe1", upSequnce:3, row:1 }, - { id: "rgnNm", title: "환경청", row:0, rowSpan:2 }, + { id: "rvbsn", title: "권역", upName:"upChangeRe1", upSequnce:1, row:1, widthPercent: 5 }, + { id: "lgbsn", title: "단위유역", upName:"upChangeRe1", upSequnce:2, row:1, widthPercent: 5 }, + { id: "mdmbsn", title: "중권역", upName:"upChangeRe1", upSequnce:3, row:1, widthPercent: 5 }, + { id: "rgnNm", title: "환경청", row:0, rowSpan:2, widthPercent: 8 }, { id: "B", title: "행정구역", row:0, colSpan:2 }, - { id: "sidoNm", title: "시도", upName:"upChangeRe2", upSequnce:1, row:1 }, - { id: "sggNm", title: "시군구", upName:"upChangeRe2",upSequnce:2, row:1 }, - { id: "bscFctNm", title: "시설명", row:0, rowSpan:2 }, + { id: "sidoNm", title: "시도", row:1, widthPercent: 6 }, + { id: "sggNm", title: "시군구", row:1, widthPercent: 6 }, + { id: "bscFctNm", title: "시설명", row:0, rowSpan:2, widthPercent: 8 }, { id: "daddr", title: "주소", row:0, rowSpan:2 }, - { id: "fctCpc", title: "시설용량(m³/일)", align:"right", row:0, rowSpan:2 }, - { id: "inflAmnt", title: "연평균유입하수량(m³/일)", align:"right", row:0, rowSpan:2 }, + { id: "fctCpc", title: "시설용량(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 6 }, + { id: "inflAmnt", title: "연평균유입하수량(m³/일)", align:"right", row:0, rowSpan:2, widthPercent: 10 }, { id: "C", title: "지하수 유입량 추정", align:"right", row:0, colSpan:3 }, - { id: "underWaterInputYear", title: "연간\n(m³/일)", align:"right", row:1 }, - { id: "underWaterInputSummer", title: "하절기\n(m³/일)", align:"right", row:1 }, - { id: "underWaterInputWinter", title: "동절기\n(m³/일)", align:"right", row:1 }, - { id: "properYn", title: "적정여부", row:0, rowSpan:2 }, + { id: "underWaterInputYear", title: "연간\n(m³/일)", align:"right", row:1, widthPercent: 6}, + { id: "underWaterInputSummer", title: "하절기\n(m³/일)", align:"right", row:1, widthPercent: 6 }, + { id: "underWaterInputWinter", title: "동절기\n(m³/일)", align:"right", row:1, widthPercent: 6 }, + { id: "properYn", title: "적정여부", row:0, rowSpan:2, widthPercent: 6 }, ]; // 모달 From d92d4d394986f5215d901e5394dc7ae562a7aebb Mon Sep 17 00:00:00 2001 From: jsyang Date: Wed, 17 Sep 2025 16:15:11 +0900 Subject: [PATCH 20/46] =?UTF-8?q?-=20=ED=85=8C=EC=9D=B4=EB=B8=94=20?= =?UTF-8?q?=EB=B9=84=EC=9C=A8=20=EA=B3=A0=EC=A0=95=20=EB=B3=80=EC=88=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80(wideFixed)=20-=20store=20headerlist=20?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EB=B9=84=EC=9C=A8=20=EB=B3=80=EC=88=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80(widePercent)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ui/table/HeadMakeColSpan.tsx | 5 +++-- .../src/ui/table/index.tsx | 22 ++++++++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/packages/common/business_components/src/ui/table/HeadMakeColSpan.tsx b/packages/common/business_components/src/ui/table/HeadMakeColSpan.tsx index c0ec33233..b3d3fdc40 100644 --- a/packages/common/business_components/src/ui/table/HeadMakeColSpan.tsx +++ b/packages/common/business_components/src/ui/table/HeadMakeColSpan.tsx @@ -8,7 +8,8 @@ interface TableUpperProps { row? : number; rowSpan?: number; colSpan?: number; - visible?:boolean; + visible?:boolean; + widthPercent?: number; } const HeadMakeColSpan = ({ upHeadList }: { upHeadList: TableUpperProps[] }) => { @@ -52,7 +53,7 @@ const HeadMakeColSpan = ({ upHeadList }: { upHeadList: TableUpperProps[] }) => { colSpan={head.colSpan || 1} rowSpan={head.rowSpan || 1} style={{ whiteSpace: 'pre-line' }} - className="bg-gray-50" + className="bg-gray-50" > {head.title} diff --git a/packages/common/business_components/src/ui/table/index.tsx b/packages/common/business_components/src/ui/table/index.tsx index 6d5b24c70..dc763d00b 100644 --- a/packages/common/business_components/src/ui/table/index.tsx +++ b/packages/common/business_components/src/ui/table/index.tsx @@ -32,6 +32,7 @@ type UiTableProps = { index?: number; curPage?: number; headButton?: React.ReactNode | undefined; + widthFixed?: boolean; }; type UiHeadProps = { @@ -39,6 +40,9 @@ type UiHeadProps = { title: string; align?: string; visible?: boolean; + row?: number; + widthPercent?: number; + rowSpan?: number; }; export function UiTable({ @@ -57,6 +61,7 @@ export function UiTable({ index = -1, curPage = 1, headButton = undefined, + widthFixed = false }: UiTableProps) { const [cur, setCur] = useState(curPage); const [idx, setIdx] = useState(index); @@ -104,6 +109,15 @@ export function UiTable({ } }; + const getLeafCols = (list: UiHeadProps[]) => { + const maxRow = list?.reduce((max, head) => Math.max(max, head.row || 0), 0); + return list + .filter(h => h.visible !== false) + .filter(h => ((h.row ?? 0) + (h.rowSpan ?? 1) - 1) >= maxRow) + ; + }; + + const leafCols = getLeafCols(headlist); return ( <> @@ -122,7 +136,13 @@ export function UiTable({ <> )}
- +
+ {widthFixed? + + {leafCols.map(col => ( + + ))} + :""} {children ? children : } From adacc5fe330ab227ca16f2ee8ea1438282774505 Mon Sep 17 00:00:00 2001 From: jsyang Date: Wed, 17 Sep 2025 16:18:48 +0900 Subject: [PATCH 21/46] =?UTF-8?q?=EB=B9=8C=EB=93=9C=EC=97=90=EB=9F=AC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/fo/app/pages/(with-layout)/processFacility/page.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/fo/app/pages/(with-layout)/processFacility/page.tsx b/apps/fo/app/pages/(with-layout)/processFacility/page.tsx index 2537a4cbd..7ed2802a2 100644 --- a/apps/fo/app/pages/(with-layout)/processFacility/page.tsx +++ b/apps/fo/app/pages/(with-layout)/processFacility/page.tsx @@ -1,12 +1,11 @@ "use client" -import { HeadMakeColSpan } from "@/app/components/common/HeadMakeColSpan"; +import UnderComment from "@/app/components/common/UnderComment"; import { useFoStore } from "@/app/store"; import { ContentsDiv, downloadExcel, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiModal, UiTable, type ReturnType } from "@common/business_components"; import ListDiv from "@common/business_components/ui/list_div"; +import LoadingOverlay from "@common/business_components/ui/loadingBar"; import { useCallback, useEffect, useRef, useState } from "react"; import ProcessFacilityInfoModal from "./modal/page"; -import LoadingOverlay from "@common/business_components/ui/loadingBar"; -import UnderComment from "@/app/components/common/UnderComment"; export default function ProcessFacilitySearch() { const {Common From 3c5d37cc6c5c35d0ac502483e8d43dca5ca4c9e4 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Wed, 17 Sep 2025 17:00:02 +0900 Subject: [PATCH 22/46] =?UTF-8?q?=EC=98=A8=EB=B0=B0=EC=88=98=20=EC=8B=9C?= =?UTF-8?q?=EC=84=A4=20=EC=88=98=EC=A0=95=20,=20=EC=A3=BC=EC=84=9D=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruseFcltMng/fcltReg/htdflReg/page.tsx | 19 ++- apps/wr/app/store/common/code/index.ts | 130 ++++++++---------- apps/wr/app/store/store.tsx | 2 +- .../ui/form/fcltReg/bdstReg/bdstReg.tsx | 72 ++++++---- .../ui/form/fcltReg/htdflReg/htdflRegForm.tsx | 99 +++++-------- .../ui/form/fcltReg/rswtrReg/rswtrRegForm.tsx | 16 --- 6 files changed, 151 insertions(+), 187 deletions(-) diff --git a/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/htdflReg/page.tsx b/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/htdflReg/page.tsx index c434f922d..24529c1b3 100644 --- a/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/htdflReg/page.tsx +++ b/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/htdflReg/page.tsx @@ -74,15 +74,12 @@ export default function Home() { } }, [code, htdflRes]); - const cellClick: (val: number | undefined, headId: string) => void = ( - val - ) => { - if ((bdstTable ?? []).length > 0 && val !== undefined) { - { - setHtdflForm(htdflRes[val]); - } - } - }; +const cellClick: (val: number, headId: string) => void = (val) => { + if (!htdflRes || !Array.isArray(htdflRes)) return; + const idx = Number(val); + console.log('htdflRes[idx]', htdflRes[idx]); + setHtdflForm(htdflRes[idx]); +}; useEffect(() => { getHtdflBdstData(pageNation, "0"); @@ -142,7 +139,9 @@ export default function Home() { total={htdflResCount} headName={"시설물 목록"} cellClick={(val, headId) => { - cellClick(val || undefined, headId); + if (val !== null && val !== undefined) { + cellClick(val, headId); + } }} onPageChange={setPageNation} > diff --git a/apps/wr/app/store/common/code/index.ts b/apps/wr/app/store/common/code/index.ts index 1b17db52a..0601c5e41 100644 --- a/apps/wr/app/store/common/code/index.ts +++ b/apps/wr/app/store/common/code/index.ts @@ -16,8 +16,6 @@ export const btnClass = "p-4 m-2 text-white rounded-sm text-lg font-medium "; const laeSecd = "41"; export const lwCds: Record = {}; - - const codeMApping = { WR001: "bdstUsgCd", WR002: "rswtBdstType", @@ -27,73 +25,72 @@ const codeMApping = { WR006: "orgwtKndCd", //작업 완ㅛ WR007: "ruseMngMtd", // 작업완료 WR008: "rusePrcsMthdCd", //w작업완료 - WR009: "erctUswtrPrcsMeth",//w작업완료 - WR010: "ruseFcltSpot",// inout은 yn 만 사용해야 함으로 해당 코드는 사용안함. + WR009: "erctUswtrPrcsMeth", //w작업완료 + WR010: "ruseFcltSpot", // inout은 yn 만 사용해야 함으로 해당 코드는 사용안함. WR011: "pplQulity", WR012: "pplLenght", WR013: "bdstFilterYn", // 사용 불가 yn만 사용해야함으로 해당코드 사용 안함 - WR014: "rainRswtMng", // 지도점검 등록 시변경 - WR015: "rainFcltFlowRate", //지도점검 등록 시변경 - WR016: "dmdUszCd", // 지도점검 등록 시변경 + WR014: "rainRswtMng", // 지도점검 등록 시변경 + WR015: "rainFcltFlowRate", //지도점검 등록 시변경 + WR016: "dmdUszCd", // 지도점검 등록 시변경 WR017: "sewageInFcltUse", //하수재이용 장내 WR018: "sewageOutFclttUse", // 하수재이용 장외 WR019: "htdPowerMthdCd", WR020: "htdUtztnUsgCd", }; -export const getCommonUpCd = async (set:any) => { - +export const getCommonUpCd = async (set: any) => { try { - let lwCdCode :Record = {}; + let lwCdCode: Record = {}; const upCd = await getFetchWithCount( fetchType.LOCAL, "/cms-service/api/v1/up-codes?keyword=&upCd=&cdSe=&useYn=Y&siteId=WR&page=0&size=100&sort=string" ); - + const upWrCode: string[] = upCd.content .filter((item: any) => item.upCd.slice(0, 2) === "WR") .map((cd: any) => cd.upCd); - + await Promise.all( upWrCode.map(async (cd) => { const mapping = codeMApping[cd as keyof typeof codeMApping]; if (!mapping) return; - + const lwCd = await getFetchWithCount( fetchType.LOCAL, `/cms-service/api/v1/lwpo-cds/up-cd/${cd}` ); - - const list = Array.isArray(lwCd) ? lwCd : lwCd.content ?? []; - lwCds[mapping] = list.map((it: any) => ({ - text: it.lwpoCdNm, - val: it.lwpoCd, - })); + + const list = Array.isArray(lwCd) ? lwCd : (lwCd.content ?? []); + lwCds[mapping] = list.map((it: any) => ({ + text: it.lwpoCdNm, + val: it.lwpoCd, + })); }) ); - lwCdCode=lwCds + lwCdCode = lwCds; set((state: comCodeState) => ({ code: { ...state.code, - rainFcltCd: lwCdCode['rainFcltCd']??[], - bdstUsgCd: lwCdCode['bdstUsgCd']??[], - orgwtKndCd: lwCdCode['orgwtKndCd']??[] , - pplQulity: lwCdCode['pplQulity']??[] , - pplLenght: lwCdCode['pplLenght']??[] , - dmdUszCd: lwCdCode['dmdUszCd']??[] , - ruseMngMtd: lwCdCode['ruseMngMtd']??[], - rusePrcsMthdCd: lwCdCode['rusePrcsMthdCd']??[], - erctUswtrPrcsMeth: lwCdCode['erctUswtrPrcsMeth']??[], - bdstGrntchClass: lwCdCode['bdstGrntchClass']??[], - htdPowerMthdCd: lwCdCode['htdPowerMthdCd']??[], - htdUtztnUsgCd: lwCdCode['htdUtztnUsgCd']??[], - rswtBdstType:lwCdCode['rswtBdstType']??[] , - bdstTotalUsgType:lwCdCode['bdstUsgCd']?.concat(lwCdCode['rswtBdstType'] || [])??[] + rainFcltCd: lwCdCode["rainFcltCd"] ?? [], + bdstUsgCd: lwCdCode["bdstUsgCd"] ?? [], + orgwtKndCd: lwCdCode["orgwtKndCd"] ?? [], + pplQulity: lwCdCode["pplQulity"] ?? [], + pplLenght: lwCdCode["pplLenght"] ?? [], + dmdUszCd: lwCdCode["dmdUszCd"] ?? [], + ruseMngMtd: lwCdCode["ruseMngMtd"] ?? [], + rusePrcsMthdCd: lwCdCode["rusePrcsMthdCd"] ?? [], + erctUswtrPrcsMeth: lwCdCode["erctUswtrPrcsMeth"] ?? [], + bdstGrntchClass: lwCdCode["bdstGrntchClass"] ?? [], + htdPowerMthdCd: lwCdCode["htdPowerMthdCd"] ?? [], + htdUtztnUsgCd: lwCdCode["htdUtztnUsgCd"] ?? [], + rswtBdstType: lwCdCode["rswtBdstType"] ?? [], + bdstTotalUsgType: + lwCdCode["bdstUsgCd"]?.concat(lwCdCode["rswtBdstType"] || []) ?? [], }, })); - }catch(e){ - console.log('com code error ', e) + } catch (e) { + console.log("com code error ", e); } - }; //물재이용 주소 코드: devU01TX0FVVEgyMDI1MDgyNTEwMzkwNDExNjEwNTM= export const buildingType = { @@ -219,9 +216,6 @@ export const getEnvPartCd = async (set: any) => { } }; - - - export type comCodeState = { code: { isInit: boolean; @@ -252,11 +246,11 @@ export type comCodeState = { bdstFilterYn: SelectDataType[]; bdstIncenYn: SelectDataType[]; bdstGrntchClass: SelectDataType[]; - // rswtPrscCdMthdCd: SelectDataType[]; + // rswtPrscCdMthdCd: SelectDataType[]; htdPowerMthdCd: SelectDataType[]; htdUtztnUsgCd: SelectDataType[]; - rswtBdstType:SelectDataType[]; - bdstTotalUsgType:SelectDataType[] + rswtBdstType: SelectDataType[]; + bdstTotalUsgType: SelectDataType[]; userSiSggCd: string; }; }; @@ -266,60 +260,56 @@ export type comCodeType = comCodeState & comCodeActions; export const comCodeStateExport: comCodeState = { code: { isInit: false, - rainFcltCd: lwCds['rainFcltCd']??[], - bdstUsgCd: lwCds['bdstUsgCd']??[] , + rainFcltCd: lwCds["rainFcltCd"] ?? [], + bdstUsgCd: lwCds["bdstUsgCd"] ?? [], chBuCd: chBuCd, - orgwtKndCd: lwCds['orgwtKndCd']??[] , + orgwtKndCd: lwCds["orgwtKndCd"] ?? [], cityCd: [], sggCd: [], rvbsnCd: [], mdmbsnCd: [], lgbsnCd: [], lclgvrnmntCd: [], - pplQulity: lwCds['pplQulity']??[] , - pplLenght: lwCds['pplLenght']??[] , + pplQulity: lwCds["pplQulity"] ?? [], + pplLenght: lwCds["pplLenght"] ?? [], yn: yn, - dmdUszCd: lwCds['dmdUszCd']??[] , + dmdUszCd: lwCds["dmdUszCd"] ?? [], buildingType: buildingType, - ruseMngMtd: lwCds['ruseMngMtd']??[], + ruseMngMtd: lwCds["ruseMngMtd"] ?? [], ruseSeCd: ruseSeCd, ruseBizMthdCd: ruseBizMthdCd, - rusePrcsMthdCd: lwCds['rusePrcsMthdCd']??[], - erctUswtrPrcsMeth: lwCds['erctUswtrPrcsMeth']??[], + rusePrcsMthdCd: lwCds["rusePrcsMthdCd"] ?? [], + erctUswtrPrcsMeth: lwCds["erctUswtrPrcsMeth"] ?? [], bdstFilterYn: bdstFilterYn, bdstIncenYn: bdstIncenYn, - bdstGrntchClass: lwCds['bdstGrntchClass']??[], - // rswtPrscCdMthdCd: rswtPrscCdMthdCd, // 공단연락오면 바꿔야함 - htdPowerMthdCd: lwCds['htdPowerMthdCd']??[], - htdUtztnUsgCd: lwCds['htdUtztnUsgCd']??[], + bdstGrntchClass: lwCds["bdstGrntchClass"] ?? [], + // rswtPrscCdMthdCd: rswtPrscCdMthdCd, // 공단연락오면 바꿔야함 + htdPowerMthdCd: lwCds["htdPowerMthdCd"] ?? [], + htdUtztnUsgCd: lwCds["htdUtztnUsgCd"] ?? [], userSiSggCd: laeSecd, - rswtBdstType:lwCds['rswtBdstType']??[] , - bdstTotalUsgType:lwCds['bdstTotalUsgType']??[] + rswtBdstType: lwCds["rswtBdstType"] ?? [], + bdstTotalUsgType: lwCds["bdstTotalUsgType"] ?? [], }, }; export type comCodeActions = { returnCodeText: (val: string, codeName: string) => string; - returnTextCode: (text: string, codeName: string) => string; + returnTextCode: (text: string, codeName: string) => string; }; -export const codeActionExport: (set: any) => comCodeActions = (set: any) => { +export const codeActionExport: (set: any, get:any) => comCodeActions = (set: any, get:any) => { return { returnCodeText: (val: string, codeName: string) => { - return set((state: comCodeState) => { - const codeList = state.code[codeName] || []; - const found = codeList.find((item) => item.val === val); - return found ? found.text : val; - } - ); + + const codeList = get().code[codeName] || []; + const found = codeList.find((item) => item.val === val); + + return found ? found.text : val; }, returnTextCode: (text: string, codeName: string) => { - return set((state: comCodeState) => { - const codeList = state.code[codeName] || []; + const codeList = get().code[codeName] || []; const found = codeList.find((item) => item.text === text); return found ? found.val : text; - } - ); }, }; }; diff --git a/apps/wr/app/store/store.tsx b/apps/wr/app/store/store.tsx index 01d0b50b4..fbb3434d9 100644 --- a/apps/wr/app/store/store.tsx +++ b/apps/wr/app/store/store.tsx @@ -351,7 +351,7 @@ export const StoreZus = ( ...rswtFacActionsExport(set), ...matDmdActionsExport(set), ...htdflFacActionsExport(set), - ...codeActionExport(set), + ...codeActionExport(set,get), ...bdstActionsExport(set), ...rainChkgdnActionsExport(set), ...rswtChkgdnActionsExport(set), diff --git a/apps/wr/components/ui/form/fcltReg/bdstReg/bdstReg.tsx b/apps/wr/components/ui/form/fcltReg/bdstReg/bdstReg.tsx index 0b7be34fa..91a2c5379 100644 --- a/apps/wr/components/ui/form/fcltReg/bdstReg/bdstReg.tsx +++ b/apps/wr/components/ui/form/fcltReg/bdstReg/bdstReg.tsx @@ -9,19 +9,16 @@ import { SelectBox, type SelectDataType, } from "@common/business_components"; -import SearchInputAddress from "@common/business_components/ui/search_input_address"; -import type { addressType } from "@common/business_components/ui/search_input_address/findAddress"; import { Input } from "@common/components"; import { useEffect, useState } from "react"; export default function BdstReg({ form, type }: { form: any; type?: string }) { - const { code } = useWrStore((state) => { + const { code, returnCodeText } = useWrStore((state) => { return state; }); const { userSiSggCd } = code; const [useCityCd, setUserCityCd] = useState([]); const [useSggCd, setUserSggCd] = useState([]); - const [initDaddr, setInitDaddr] = useState(); useEffect(() => { if (userSiSggCd.length === 2 && code.cityCd.length > 0) { @@ -56,10 +53,8 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) { form.setValue("ctpvCd", Number(city[0]?.val)); form.setValue("sggCd", Number(sgg[0]?.val)); } - }, [form, userSiSggCd, code.cityCd, code.sggCd]); - useEffect(() => { const subscription = form.form?.watch((value: any) => { console.log("vale", value); @@ -72,12 +67,40 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) { // console.log("form ", form.watch()); // }, [form.formState]); + useEffect(() => { + const bdstInfoSn = form.getValues("bdstInfoSn"); + if (bdstInfoSn && bdstInfoSn > 0) form.setValue("daddr", bdstInfoSn); + }, [form.getValues("bdstInfoSn")]); + + const userCtpvCd = form.watch("ctpvCd"); + const userSggCd = form.watch("sggCd"); useEffect(() => { - const bdstInfoSn = form.getValues("bdstInfoSn"); - if(bdstInfoSn&&bdstInfoSn>0) - setInitDaddr(form.getValues("daddr")); - }, [form.getValues("bdstInfoSn")]); + const strCtpvCd = String(userCtpvCd); + + if (strCtpvCd && strCtpvCd !== "0") { + const city = returnCodeText(strCtpvCd, "cityCd"); + form?.setValue("daddr", city); + } else if (strCtpvCd === "0") { + form?.setValue("daddr", ""); + } + }, [userCtpvCd]); + + useEffect(() => { + const strSggCd = String(userSggCd); + if (strSggCd && strSggCd !== "0") { + const city = returnCodeText(strSggCd.slice(0, 2), "cityCd"); + const sgg = returnCodeText(strSggCd, "sggCd"); + + form?.setValue("daddr", city + " " + sgg); + } else if (strSggCd === "0") { + const ctpvCdText = returnCodeText( + String(form.getValues("ctpvCd")), + "cityCd" + ); + form?.setValue("daddr", ctpvCdText); + } + }, [userSggCd]); return ( <> @@ -162,24 +185,17 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) { name="daddr" render={({ field }) => ( - {/* { - field.onChange(e.target.value) - }} - value={field.value || ''} - maxLength={50} - /> */}
- { - console.log("rtnData", rtnData); - field.onChange(rtnData.roadAddrPart1); + { + field.onChange(e.target.value); }} - > + value={field.value || ""} + maxLength={50} + />
)} @@ -222,9 +238,9 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) { className={""} selectClass={selectClass} label={""} - selectArray={code.bdstUsgCd} + selectArray={ type ==='RNB'?code.bdstUsgCd:code.rswtBdstType} onSelectValue={(val) => { - field.onChange(Number(val)); + field.onChange(val); }} value={field.value ?? code.bdstUsgCd[0]?.val} /> diff --git a/apps/wr/components/ui/form/fcltReg/htdflReg/htdflRegForm.tsx b/apps/wr/components/ui/form/fcltReg/htdflReg/htdflRegForm.tsx index b8bc62093..192a65397 100644 --- a/apps/wr/components/ui/form/fcltReg/htdflReg/htdflRegForm.tsx +++ b/apps/wr/components/ui/form/fcltReg/htdflReg/htdflRegForm.tsx @@ -34,7 +34,7 @@ export default function HtdflRegForm({ isModal, readonly = false, setIsModal, - isMap + isMap, }: { htdflForm: customHtdflBdst; isModal: boolean; @@ -79,9 +79,29 @@ export default function HtdflRegForm({ const cleanHtdflData = (raw: any): z.infer => { const buildings = - raw?.reuseBuilding && raw.reuseBuilding.length > 0 - ? raw.reuseBuilding - : [{}]; + raw?.reuseBuilding && raw.reuseBuilding.length > 0 + ? raw.reuseBuilding + : [{}]; + + if (htdflForm.reuseBuilding && htdflForm.reuseBuilding[0]?.htdflObj.ph) { + const htdflPH = htdflForm.reuseBuilding[0]?.htdflObj.ph; + if (htdflPH && String(htdflPH).includes("~")) { + const [frontPH, backPH] = htdflPH.split("~"); + if (frontPH) { + setFrontPHdata(frontPH); + } + if (backPH) { + setBackPHdata(backPH); + } + } else { + setFrontPHdata(""); + setBackPHdata(""); + } + } else { + setFrontPHdata(""); + setBackPHdata(""); + } + return { ...raw, frstArchPrmsnDt: new Date(raw?.frstArchPrmsnDt || null), @@ -96,7 +116,7 @@ export default function HtdflRegForm({ : new Date(item?.archChgPrmsnDt), bdstChgNm: item?.bdstChgNm ?? "", // null → "" })), - reuseBuilding:buildings.map((item: any) => ({ + reuseBuilding: buildings.map((item: any) => ({ ...item, instlCmptnDt: new Date(item?.instlCmptnDt), htdflObj: { @@ -146,16 +166,16 @@ export default function HtdflRegForm({ const [divStyle, setDivStyle] = useState("h-[53vh]"); useEffect(() => { - if(isMap){ - setDivStyle("h-[100vh]") - }else if (isModal === true) { - setDivStyle("h-[53vh] max-h-[37vh]") + if (isMap) { + setDivStyle("h-[100vh]"); + } else if (isModal === true) { + setDivStyle("h-[53vh] max-h-[37vh]"); } else if (readonly === true) { - setDivStyle("h-[62vh]") + setDivStyle("h-[62vh]"); } else { - setDivStyle("h-[57vh]") + setDivStyle("h-[57vh]"); } - }, [isModal, readonly ,isMap]); + }, [isModal, readonly, isMap]); useEffect(() => { console.log("form errors:", form.formState.errors); @@ -164,25 +184,9 @@ export default function HtdflRegForm({ // form.reset은 비동기로 동작할 수 있어, useEffect 하나로 관리하여 의도치 않은 초기화를 방지합니다. useEffect(() => { // Case 1: 수정 또는 '복사하여 등록' 등 데이터가 주입되는 경우 - if (htdflForm && Object.keys(htdflForm).length > 0) { - - const htdflPH = htdflForm.reuseBuilding[0]?.htdflObj.ph - if(htdflPH && String(htdflPH).includes("~")){ - const [frontPH, backPH] = htdflPH.split("~"); - if (frontPH) { - setFrontPHdata(frontPH); - } - if (backPH) { - setBackPHdata(backPH); - } - } else { - setFrontPHdata(""); - setBackPHdata(""); - } - - + if (htdflForm) { form.reset(cleanHtdflData(htdflForm)); - }else{ + } else { form.reset(); } // Case 2: 데이터가 없는 순수 신규 등록 모드인 경우 @@ -227,37 +231,12 @@ export default function HtdflRegForm({ if (!isPowerPlant) { form.setValue( "reuseBuilding.0.htdflObj.etgtType", - "해당없음", // 빈 문자열로 초기화 + "01", // 빈 문자열로 초기화 { shouldDirty: true } // dirty 상태로 남길지 여부는 취사선택 ); } }, [isPowerPlant, form]); - -// useEffect(() => { -// const watchPH = form.getValues(`items.${indexMng}.fcBizs.${indexBiz}.ph`); -// const checkPkAndCycle = -// form.getValues(`items.${indexMng}.pbnstRuseFcltId`) + -// String(form.getValues(`items.${indexMng}.fcBizs.${indexBiz}.cycl`)); - -// console.log("checkPkAndCycle ", checkPkAndCycle); -// if (chekcPk !== checkPkAndCycle) { -// if (watchPH && watchPH !== undefined) { -// const [frontPH, backPH] = watchPH.split("~"); -// if (frontPH) { -// setFrontPHdata(frontPH); -// } -// if (backPH) { -// setBackPHdata(backPH); -// } -// } else { -// setFrontPHdata("0"); -// setBackPHdata("0"); -// } -// setCheakPk(checkPkAndCycle); -// } -// }, [form.getValues(`items.${indexMng}.fcBizs.${indexBiz}.ph`), chekcPk]); - return (
@@ -310,12 +289,8 @@ export default function HtdflRegForm({ selectArray={code.htdPowerMthdCd} onSelectValue={readonly ? () => {} : field.onChange} // value={field.value ?? ""} - value={ - field.value || - (code?.htdPowerMthdCd[0] && - code?.htdPowerMthdCd[0].val) - } - readOnly={readonly || !isPowerPlant} + value={field.value} + readOnly={readonly} /> )} diff --git a/apps/wr/components/ui/form/fcltReg/rswtrReg/rswtrRegForm.tsx b/apps/wr/components/ui/form/fcltReg/rswtrReg/rswtrRegForm.tsx index 08a946a9f..522c9b4fe 100644 --- a/apps/wr/components/ui/form/fcltReg/rswtrReg/rswtrRegForm.tsx +++ b/apps/wr/components/ui/form/fcltReg/rswtrReg/rswtrRegForm.tsx @@ -77,9 +77,6 @@ export default function RswtrRegForm({ } }; - const filtrTrtmfctCpct = form.watch( - "reuseBuilding.0.rswtrObj.filtrTrtmfctCpct" - ); const cleanRswtData = (raw: any): z.infer => { const buildings = raw?.reuseBuilding && raw.reuseBuilding.length > 0 @@ -113,12 +110,6 @@ export default function RswtrRegForm({ })), }; }; - // useEffect(() =>{ - // console.log(' formform ', form.watch()) - // },[form.formState]) - useEffect(() => { - console.log(" filtrTrtmfctCpct ", filtrTrtmfctCpct); - }, [filtrTrtmfctCpct]); useEffect(() => { console.log("form errors:", form.formState.errors); @@ -146,12 +137,6 @@ export default function RswtrRegForm({ }, [rswtForm, form]); - useEffect(() =>{ - console.log('code orgin ', code) - - console.log('code ', code.orgwtKndCd) - },[code]) - return (
@@ -269,7 +254,6 @@ export default function RswtrRegForm({ onFocus={() => { // 입력 시 자동으로 확인불가 해제 if (isUnknown && !readonly) { - console.log("value"); field.onChange(""); // 초기화 } }} From 311ce14fc97c833c99b69cd6ba928150ecda80c6 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Wed, 17 Sep 2025 17:32:03 +0900 Subject: [PATCH 23/46] =?UTF-8?q?=EB=AC=BC=EC=9E=AC=EC=9D=B4=EC=9A=A9=20?= =?UTF-8?q?=EC=97=85=EB=AC=B4=20=20=EB=8C=80=EB=AF=BC=20=EC=A3=BC=EC=86=8C?= =?UTF-8?q?=EA=B2=80=EC=83=89=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=20x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/(with-layout)/matMng/coMng/coSttn/page.tsx | 1 + .../components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm.tsx | 1 + .../ui/map/detailPopup/coSttnDetailPopup/coSttnDetailPopup.tsx | 1 + 3 files changed, 3 insertions(+) diff --git a/apps/wr/app/(with-layout)/matMng/coMng/coSttn/page.tsx b/apps/wr/app/(with-layout)/matMng/coMng/coSttn/page.tsx index e2f600b85..da5b9b560 100644 --- a/apps/wr/app/(with-layout)/matMng/coMng/coSttn/page.tsx +++ b/apps/wr/app/(with-layout)/matMng/coMng/coSttn/page.tsx @@ -336,6 +336,7 @@ export default function CoSttn() { }} bodyClassNm={"w-full mx-auto bg-white rounded-lg shadow-md p-6"} updateList={upadateData} + openNetwork={false} > } > diff --git a/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm.tsx b/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm.tsx index 11de40792..33dd417af 100644 --- a/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm.tsx +++ b/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm.tsx @@ -772,6 +772,7 @@ export function PbnstBuseForm({ }); }} bodyClassNm={"w-full mx-auto bg-white rounded-lg shadow-md p-6"} + openNetwork={false} > } > diff --git a/apps/wr/components/ui/map/detailPopup/coSttnDetailPopup/coSttnDetailPopup.tsx b/apps/wr/components/ui/map/detailPopup/coSttnDetailPopup/coSttnDetailPopup.tsx index 26c586561..9f8db7409 100644 --- a/apps/wr/components/ui/map/detailPopup/coSttnDetailPopup/coSttnDetailPopup.tsx +++ b/apps/wr/components/ui/map/detailPopup/coSttnDetailPopup/coSttnDetailPopup.tsx @@ -23,6 +23,7 @@ export default function CoSttnDetailPopup({isDetail} :{isDetail:DemandCompType}) bodyClassNm={"w-full mx-auto bg-white rounded-lg shadow-md p-6"} updateList={isDetail} readOnly={true} + openNetwork={false} >
From 6844db4c295b7ceab1ffe49255630ad90082edb7 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Wed, 17 Sep 2025 17:52:52 +0900 Subject: [PATCH 24/46] =?UTF-8?q?=EB=8C=80=EB=AF=BC=20=EC=88=98=EC=9A=94?= =?UTF-8?q?=EC=B2=98=20=EB=93=B1=EB=A1=9D=20=ED=8C=8C=EB=9D=BC=EB=AF=B8?= =?UTF-8?q?=ED=84=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/dm/app/(base-layout)/pages/sdmMng/sdmInsert/page.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/dm/app/(base-layout)/pages/sdmMng/sdmInsert/page.tsx b/apps/dm/app/(base-layout)/pages/sdmMng/sdmInsert/page.tsx index 9a68510e3..79eb07830 100644 --- a/apps/dm/app/(base-layout)/pages/sdmMng/sdmInsert/page.tsx +++ b/apps/dm/app/(base-layout)/pages/sdmMng/sdmInsert/page.tsx @@ -58,6 +58,7 @@ export default function MyForm() { dataList={demandCompList} rtnValue={callback} rtnInputData={handleInsertSdmData} + openNetwork={true} />
From 41b90bd7b5416c4d76dcc14d288dae81caab6bf7 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Wed, 17 Sep 2025 18:03:20 +0900 Subject: [PATCH 25/46] =?UTF-8?q?=EC=88=98=EC=9A=94=EC=B2=98=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=ED=8C=8C?= =?UTF-8?q?=EB=9D=BC=EB=AF=B8=ED=84=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ui/sdmInsertForm/form.tsx | 36 ++++++++++--------- .../src/ui/sdmInsertForm/index.tsx | 8 +++-- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/packages/common/business_components/src/ui/sdmInsertForm/form.tsx b/packages/common/business_components/src/ui/sdmInsertForm/form.tsx index d4e4b7a2e..21e1a27bb 100644 --- a/packages/common/business_components/src/ui/sdmInsertForm/form.tsx +++ b/packages/common/business_components/src/ui/sdmInsertForm/form.tsx @@ -68,6 +68,7 @@ interface SdmRegFormProps { setIsDuplicate: (value: boolean) => void; updateList?: DemandCompType; readOnly?: boolean; + openNetwork?: boolean; } type FieldComponent = ( @@ -84,6 +85,7 @@ export function SdmRegForm({ setIsDuplicate, updateList, readOnly, + openNetwork, }: SdmRegFormProps) { const [sidoValue, setSidoValue] = useState(""); const [sigunValue, setSigunValue] = useState(""); @@ -403,22 +405,24 @@ export function SdmRegForm({ { name: "daddr", label: "사업자주소", - component: (field) => ( - // - { - field.onChange(rtnData.roadAddrPart1); - }} - /> - ), + component: (field) => + openNetwork ? ( + { + field.onChange(rtnData.roadAddrPart1); + }} + /> + ) : ( + + ), }, { name: "telno", diff --git a/packages/common/business_components/src/ui/sdmInsertForm/index.tsx b/packages/common/business_components/src/ui/sdmInsertForm/index.tsx index 051bdbdce..6dbefef4f 100644 --- a/packages/common/business_components/src/ui/sdmInsertForm/index.tsx +++ b/packages/common/business_components/src/ui/sdmInsertForm/index.tsx @@ -16,8 +16,9 @@ type thisProps = { rtnValue: (searchText: string, pageCnt: number) => void; rtnInputData: (data: DemandCompType) => void; bodyClassNm?: string; - updateList?:DemandCompType - readOnly?:boolean + updateList?:DemandCompType; + readOnly?:boolean; + openNetwork:boolean } const createFormSchema = (isBznmTotNoDisabled: boolean, isDuplicate: boolean ,updateList?:DemandCompType) => z.object({ @@ -88,7 +89,7 @@ const defaultValues: FormSchema = { * @returns */ -export default function SdmInsertForm({selectSidoData, selectSigunData, dataList, rtnValue, rtnInputData,bodyClassNm, updateList,readOnly}: thisProps) { +export default function SdmInsertForm({selectSidoData, selectSigunData, dataList, rtnValue, rtnInputData,bodyClassNm, updateList,readOnly,openNetwork}: thisProps) { const [isBznmTotNoDisabled, setIsBznmTotNoDisabled] = useState(false); const [isDuplicate, setIsDuplicate] = useState(false); @@ -165,6 +166,7 @@ export default function SdmInsertForm({selectSidoData, selectSigunData, dataList setIsDuplicate={setIsDuplicate} updateList={updateList} readOnly={readOnly} + openNetwork={openNetwork} />
{readOnly==true?<> From 6c5cd9d1e0504dcc18753ff547882ef5fe63580e Mon Sep 17 00:00:00 2001 From: jsyang Date: Thu, 18 Sep 2025 14:02:00 +0900 Subject: [PATCH 26/46] =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=A3=BC?= =?UTF-8?q?=EC=84=9D=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dashboard/drainageEquipment/page.tsx | 8 ++++++- .../dashboard/facilityInfo/modal/page.tsx | 9 ++++++- .../dashboard/facilityInfo/page.tsx | 24 +++++++++++++++++-- .../dashboard/maingraph/page.tsx | 8 ++++++- .../pages/(with-layout)/dashboard/page.tsx | 8 ++++++- .../dashboard/rainManage/page.tsx | 9 ++++++- .../(with-layout)/dashboardMain/page.tsx | 8 ++++++- .../facilityPrecipitation/modal/page.tsx | 8 ++++++- .../facilityPrecipitation/page.tsx | 8 ++++++- .../facilityWaterQlty/HeadMakeColSpan.tsx | 6 +++++ .../facilityWaterQlty/modal/page.tsx | 8 ++++++- .../(with-layout)/facilityWaterQlty/page.tsx | 8 ++++++- .../(with-layout)/flowRate/modal/page.tsx | 8 ++++++- .../app/pages/(with-layout)/flowRate/page.tsx | 8 ++++++- .../pages/(with-layout)/planSewage/page.tsx | 8 ++++++- .../(with-layout)/processArea/modal/page.tsx | 8 ++++++- .../pages/(with-layout)/processArea/page.tsx | 8 ++++++- .../processFacility/modal/page.tsx | 8 ++++++- .../(with-layout)/processFacility/page.tsx | 8 ++++++- apps/fo/app/pages/(with-layout)/rdi/page.tsx | 8 ++++++- .../(with-layout)/sewageOccur/modal/page.tsx | 8 ++++++- .../pages/(with-layout)/sewageOccur/page.tsx | 9 ++++++- .../underWaterInput/modal/page.tsx | 9 ++++++- .../(with-layout)/underWaterInput/page.tsx | 10 +++++++- 24 files changed, 188 insertions(+), 24 deletions(-) diff --git a/apps/fo/app/pages/(with-layout)/dashboard/drainageEquipment/page.tsx b/apps/fo/app/pages/(with-layout)/dashboard/drainageEquipment/page.tsx index 1b7249efd..fb59cfc13 100644 --- a/apps/fo/app/pages/(with-layout)/dashboard/drainageEquipment/page.tsx +++ b/apps/fo/app/pages/(with-layout)/dashboard/drainageEquipment/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 대시보드 - 표로보기 - 배수설비 정비현황 + * + * - 배수설비 현황을 조회하는 화면. 2차사업 때 예정인 화면으로 현재 사용되지 않음. + */ + +"use client" import { useFoStore } from '@/app/store'; import type { DrainageEquipmentListProps, TableUpperProps } from '@/app/store/dashboard'; diff --git a/apps/fo/app/pages/(with-layout)/dashboard/facilityInfo/modal/page.tsx b/apps/fo/app/pages/(with-layout)/dashboard/facilityInfo/modal/page.tsx index c482e8b7c..850d52528 100644 --- a/apps/fo/app/pages/(with-layout)/dashboard/facilityInfo/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/dashboard/facilityInfo/modal/page.tsx @@ -1,4 +1,11 @@ -"use client" +/** + * 대시보드 - 표로보기 - 시설정보 및 운영현황(모달) + * + * - 유량, 수질, 총인시설의 연간, 하절기, 동절기 단위로 값을 차트로 시각화하여 보여주는 모달화면 + * - 막대그래프로 모달을 그려준다. + */ + +"use client" import type { OperationalStatusListProps } from "@/app/store/dashboard"; import { CHART_FORM, MainChart, type ChartConfig } from "@common/business_components"; import { Button } from "@common/business_components/ui/table/lib/button"; diff --git a/apps/fo/app/pages/(with-layout)/dashboard/facilityInfo/page.tsx b/apps/fo/app/pages/(with-layout)/dashboard/facilityInfo/page.tsx index fa2a97d9e..dd689f2fa 100644 --- a/apps/fo/app/pages/(with-layout)/dashboard/facilityInfo/page.tsx +++ b/apps/fo/app/pages/(with-layout)/dashboard/facilityInfo/page.tsx @@ -1,4 +1,13 @@ -"use client" +/** + * 대시보드 - 표로보기 - 시설정보 및 운영현황 + * + * - 시설정보 및 운영현황 탭의 메인 페이지 + * - 중앙상단에는 시설에 대한 요약정보가, 좌측 상단은 시설계획에 대한 정보, 좌측하단에는 물사용량에 대한 정보, + * 우측에는 조회년도 및 시설에 해당하는 유량 및 수질정보를 연간,하절기,동절기별 추출하여 데이터를 보여준다. + * - 우측 운영실태는 연간, 하절기, 동절기별로 색이 칠해져있는데 어떤항목들끼리 차트로 그려지는지 확인하기 위해서다. + */ + +"use client" import { roundNumber } from "@/app/components/common/DataForm"; import { useFoStore } from "@/app/store"; import type { TableUpperProps } from "@/app/store/processFacility"; @@ -13,7 +22,12 @@ export type facilityInfoProps = { fcltyList?: { bscFctCd: string, bscFctNm: string, fcltyCpc: number | '', trtFrfNm: string, efflWqltStndrdNm: string }[]; }; -// 시설계획 table header 변경 +/** + * 시설계획 table header 변경 + * @param upHeadList + * @param planYearList + * @returns + */ const headMakeColSpanPlanFclty = (upHeadList: TableUpperProps[], planYearList: string[]) => { return ( <> { @@ -29,6 +43,12 @@ const headMakeColSpanPlanFclty = (upHeadList: TableUpperProps[], planYearList: s } // 시설계획 table header 변경 +/** + * + * @param upHeadList + * @param searchYear + * @returns + */ const headMakeColSpanOperationStatus = (upHeadList: TableUpperProps[], searchYear: string) => { return ( <> diff --git a/apps/fo/app/pages/(with-layout)/dashboard/maingraph/page.tsx b/apps/fo/app/pages/(with-layout)/dashboard/maingraph/page.tsx index b0759e336..82eeb4d7c 100644 --- a/apps/fo/app/pages/(with-layout)/dashboard/maingraph/page.tsx +++ b/apps/fo/app/pages/(with-layout)/dashboard/maingraph/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 대시보드 - 표로보기 - 주요그래프 + * + * - 시설의 조회년도에 해당하는 수질정보, 강우량, 유입량 등을 특정 항목별로 묶어서 차트로 시각화해주는 화면 + */ + +"use client" import { useFoStore } from "@/app/store"; import type { lineChartDataProps } from "@/app/store/dashboard"; import { CHART_FORM, type ChartConfig, ContentsDiv, MainChart } from "@common/business_components"; diff --git a/apps/fo/app/pages/(with-layout)/dashboard/page.tsx b/apps/fo/app/pages/(with-layout)/dashboard/page.tsx index 7a2c3d8a0..a09431598 100644 --- a/apps/fo/app/pages/(with-layout)/dashboard/page.tsx +++ b/apps/fo/app/pages/(with-layout)/dashboard/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 대시보드 - 표로보기(메인) + * + * - 대시보드 - 표로보기 메인페이지로 상단영역의 제어 및 탭 전환 시 보여주는 페이지를 지정해준다. + */ + +"use client" import { useFoStore } from "@/app/store"; import { ContentsDiv, downloadExcel, downloadMultipleExcel, filePickedBlobArray, MainDiv, SelectBox, UITab, type SelectDataType } from "@common/business_components"; import { Button, TabsContent } from "@common/components/ui"; diff --git a/apps/fo/app/pages/(with-layout)/dashboard/rainManage/page.tsx b/apps/fo/app/pages/(with-layout)/dashboard/rainManage/page.tsx index a24230de7..e084bf04d 100644 --- a/apps/fo/app/pages/(with-layout)/dashboard/rainManage/page.tsx +++ b/apps/fo/app/pages/(with-layout)/dashboard/rainManage/page.tsx @@ -1,4 +1,11 @@ -"use client" +/** + * 대시보드 - 표로보기 - 강우일 운영현황 + * + * - 시설의 강우량 구간별(3~10mm미만..10~20mm미만 등) 강우일수 및 수질정보를 표로 보여주는 화면 + * - 강우영향일 계산후 바뀌는 tobe강우일을 계산해야 한다. + */ + +"use client" import { useFoStore } from "@/app/store"; import { UiTable } from "@common/business_components/ui/table"; import { useEffect, useState } from "react"; diff --git a/apps/fo/app/pages/(with-layout)/dashboardMain/page.tsx b/apps/fo/app/pages/(with-layout)/dashboardMain/page.tsx index 12bf0763c..67e704570 100644 --- a/apps/fo/app/pages/(with-layout)/dashboardMain/page.tsx +++ b/apps/fo/app/pages/(with-layout)/dashboardMain/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 대시보드 - 표로보기 상단구역 페에지 + * + * - 대시보드 - 표로보기의 3개의 탭 상단에 조회년도, 행정정보, 시설명의 구역을 컴포넌트 + */ + +"use client" import { useFoStore } from "@/app/store"; import { useEffect, useState } from "react"; import SearchInput from "../../../components/common/SearchInput"; diff --git a/apps/fo/app/pages/(with-layout)/facilityPrecipitation/modal/page.tsx b/apps/fo/app/pages/(with-layout)/facilityPrecipitation/modal/page.tsx index 524cdc99c..e90def9b6 100644 --- a/apps/fo/app/pages/(with-layout)/facilityPrecipitation/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/facilityPrecipitation/modal/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 처리시설 연간 운영현황 - 강수현황(모달) + * + * - 선택한 시설을 조회한 년도의 하루단위로 강우량 및 강우영향일 정보를 보여주는 화면. + */ + +"use client" import CalcRainEffect from "@/app/components/common/CalcRainEffect"; import { roundNumber } from "@/app/components/common/DataForm"; import { useFoStore } from "@/app/store"; diff --git a/apps/fo/app/pages/(with-layout)/facilityPrecipitation/page.tsx b/apps/fo/app/pages/(with-layout)/facilityPrecipitation/page.tsx index aaba872d7..6c5181549 100644 --- a/apps/fo/app/pages/(with-layout)/facilityPrecipitation/page.tsx +++ b/apps/fo/app/pages/(with-layout)/facilityPrecipitation/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 처리시설 연간 운영현황 - 강수현황(메인) + * + * - 시설별 강수 현황을 조회조건대로 추출하여 표로 보여주는 화면. + */ + +"use client" import { useFoStore } from "@/app/store"; import type { TableUpperProps } from "@/app/store/common"; import { ContentsDiv, downloadExcel, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiModal, UiTable, type ReturnType } from "@common/business_components"; diff --git a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/HeadMakeColSpan.tsx b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/HeadMakeColSpan.tsx index 61076c105..aa1e36abd 100644 --- a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/HeadMakeColSpan.tsx +++ b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/HeadMakeColSpan.tsx @@ -1,3 +1,9 @@ +/** + * 처리시설 연간 운영현황 - 수질현황 + * + * - 수질현황의 헤더를 만들어주는 컴포넌트 + */ + import { TableHead, TableRow } from "@common/components/ui"; interface TableUpperProps { diff --git a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx index eedd52b37..948d05b1d 100644 --- a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 처리시설 연간 운영현황 - 수질현황 + * + * - 메인화면에서 선택한 시설의 수질정보를 하루단위로 보여주는 모달. + */ + +"use client" import { useFoStore } from "@/app/store"; import type { FacilityWaterQltyProps, modalExcelType } from "@/app/store/facilityWaterQlty"; import { downloadExcel, UITab, UiTable } from "@common/business_components/ui"; diff --git a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/page.tsx b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/page.tsx index 5367a1c22..a188f60b9 100644 --- a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/page.tsx +++ b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 처리시설 연간 운영현황 - 수질현황 + * + * - 시설별 수질 현황을 조회조건대로 추출하여 표로 보여주는 화면. + */ + +"use client" import { useFoStore } from "@/app/store"; import type { TableUpperProps } from "@/app/store/common"; diff --git a/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx b/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx index d6166133f..9f026430a 100644 --- a/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 처리시설 연간 운영현황 - 유량현황(모달)) + * + * - 선택한 시설의 유량 정보를 하루 단위로 표로 출력해주는 모달 + */ + +"use client" import FacilityTermModalHeader from "@/app/components/common/FacilityTermModalHeader"; import { useFoStore } from "@/app/store"; import type { FlowRateModalInterface, modalExcelType } from "@/app/store/flowRate"; diff --git a/apps/fo/app/pages/(with-layout)/flowRate/page.tsx b/apps/fo/app/pages/(with-layout)/flowRate/page.tsx index 85fcaef88..750395cbd 100644 --- a/apps/fo/app/pages/(with-layout)/flowRate/page.tsx +++ b/apps/fo/app/pages/(with-layout)/flowRate/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 처리시설 연간 운영현황 - 유량현황 + * + * - 시설별 유량 현황을 조회조건대로 추출하여 표로 보여주는 화면. + */ + +"use client" import { useFoStore } from "@/app/store"; import type { TableUpperProps } from "@/app/store/common"; import { ContentsDiv, downloadExcel, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiModal, UiTable, type ReturnType } from "@common/business_components"; diff --git a/apps/fo/app/pages/(with-layout)/planSewage/page.tsx b/apps/fo/app/pages/(with-layout)/planSewage/page.tsx index 37fcb5b01..1f1768af5 100644 --- a/apps/fo/app/pages/(with-layout)/planSewage/page.tsx +++ b/apps/fo/app/pages/(with-layout)/planSewage/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 처리시설 연간 운영현황 - 계획하수량 산정지표 현황 + * + * - 시설별 여유용량, 변동부하율, 분류식화율을 조회조건대로 추출하여 표로 보여주는 화면. + */ + +"use client" import { useFoStore } from "@/app/store"; import type { TableUpperProps } from "@/app/store/common"; import { downloadExcel, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiTable, type ReturnType } from "@common/business_components"; diff --git a/apps/fo/app/pages/(with-layout)/processArea/modal/page.tsx b/apps/fo/app/pages/(with-layout)/processArea/modal/page.tsx index 06e26bac6..bc7c2651b 100644 --- a/apps/fo/app/pages/(with-layout)/processArea/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/processArea/modal/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 처리시설 현황 - 처리구역정보(모달) + * + * - 선택한 시설의 계획정보를 가져와 표로 출력해주는 모달 + */ + +"use client" import { useFoStore } from "@/app/store"; import { UiTable } from "@common/business_components/ui"; import ListDiv from "@common/business_components/ui/list_div"; diff --git a/apps/fo/app/pages/(with-layout)/processArea/page.tsx b/apps/fo/app/pages/(with-layout)/processArea/page.tsx index 746f9a111..fc571c665 100644 --- a/apps/fo/app/pages/(with-layout)/processArea/page.tsx +++ b/apps/fo/app/pages/(with-layout)/processArea/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 처리시설 현황 - 처리구역정보(메인) + * + * - 시설계획 정보를 조회조건대로 추출하여 표로 보여주는 화면. + */ + +"use client" import { useFoStore } from "@/app/store"; import { ContentsDiv, downloadExcel, MainDiv, SearchBaseForm, SelectBox, Title, UiModal, UiTable, type ReturnType } from "@common/business_components"; import ListDiv from "@common/business_components/ui/list_div"; diff --git a/apps/fo/app/pages/(with-layout)/processFacility/modal/page.tsx b/apps/fo/app/pages/(with-layout)/processFacility/modal/page.tsx index b27984df7..8362a46d9 100644 --- a/apps/fo/app/pages/(with-layout)/processFacility/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/processFacility/modal/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 처리시설 현황 - 처리시설 시설정보(모달)) + * + * - 선택한 시설의 정보와 시설이력정보를 보여주는 모달. + */ + +"use client" import { roundNumber } from "@/app/components/common/DataForm"; import { useFoStore } from "@/app/store"; import type { TableUpperProps } from "@/app/store/dashboard"; diff --git a/apps/fo/app/pages/(with-layout)/processFacility/page.tsx b/apps/fo/app/pages/(with-layout)/processFacility/page.tsx index 7ed2802a2..0e9085cb4 100644 --- a/apps/fo/app/pages/(with-layout)/processFacility/page.tsx +++ b/apps/fo/app/pages/(with-layout)/processFacility/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 처리시설 현황 - 처리시설 시설정보(메인) + * + * - 시설별 정보를 조회조건대로 추출하여 표로 보여주는 화면. + */ + +"use client" import UnderComment from "@/app/components/common/UnderComment"; import { useFoStore } from "@/app/store"; import { ContentsDiv, downloadExcel, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiModal, UiTable, type ReturnType } from "@common/business_components"; diff --git a/apps/fo/app/pages/(with-layout)/rdi/page.tsx b/apps/fo/app/pages/(with-layout)/rdi/page.tsx index 11b1f849a..69fb49b14 100644 --- a/apps/fo/app/pages/(with-layout)/rdi/page.tsx +++ b/apps/fo/app/pages/(with-layout)/rdi/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 운영실태 - RDII 추정 + * + * - 시설별 유입량과 하절기 최저 유입 BOD 정보를 통해 RDII를 추정치를 보여주는 화면 + */ + +"use client" import { useFoStore } from "@/app/store"; import type { TableUpperProps } from "@/app/store/common"; import { ContentsDiv, downloadExcel, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiTable, type ReturnType } from "@common/business_components"; diff --git a/apps/fo/app/pages/(with-layout)/sewageOccur/modal/page.tsx b/apps/fo/app/pages/(with-layout)/sewageOccur/modal/page.tsx index f09d2f149..a2ffb386a 100644 --- a/apps/fo/app/pages/(with-layout)/sewageOccur/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/sewageOccur/modal/page.tsx @@ -1,4 +1,10 @@ -"use client" +/** + * 운영실태 - 오수발생량 추정(모달) + * + * - 선택한 시설의 물사용량과 오수전환율을 가지고 오수발생량 추정 데이터를 월별로 보여주는 모달. + */ + +"use client" import { roundNumber } from "@/app/components/common/DataForm"; import { useFoStore } from "@/app/store"; import type { modalTableType } from "@/app/store/sewageOccur"; diff --git a/apps/fo/app/pages/(with-layout)/sewageOccur/page.tsx b/apps/fo/app/pages/(with-layout)/sewageOccur/page.tsx index 23f764269..6fb01efb3 100644 --- a/apps/fo/app/pages/(with-layout)/sewageOccur/page.tsx +++ b/apps/fo/app/pages/(with-layout)/sewageOccur/page.tsx @@ -1,4 +1,11 @@ -"use client" +/** + * 운영실태 - 오수발생량 추정(메인) + * + * - 조회조건대로 시설별 물 사용량과 오수전환율을 기반으로 오수발생량 추정치를 표로 보여주는 화면 + * - 현재 물사용량의 경우 연계받는 데이터가 아닌 연 하수유입량의 65%로 가정하고 계산함 + */ + +"use client" import { useFoStore } from "@/app/store"; import type { TableUpperProps } from "@/app/store/common"; import { ContentsDiv, downloadExcel, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiModal, UiTable, type ReturnType } from "@common/business_components"; diff --git a/apps/fo/app/pages/(with-layout)/underWaterInput/modal/page.tsx b/apps/fo/app/pages/(with-layout)/underWaterInput/modal/page.tsx index 5da9622d0..2e0f5f27e 100644 --- a/apps/fo/app/pages/(with-layout)/underWaterInput/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/underWaterInput/modal/page.tsx @@ -1,4 +1,11 @@ -"use client" +/** + * 운영실태 - 지하수 유입량 추정(모달) + * + * - 선택한 시설의 월별 청천시 실제 하수유입량, 오수발생량으로 지하수 유입량을 보여주는 모달 + * - 청천시 실제 하수유입량 - 오수발생량으로 지하수유입량을 추정한다. + */ + +"use client" import { roundNumber } from "@/app/components/common/DataForm"; import { useFoStore } from "@/app/store"; import type { UnderWaterInputModalProps } from "@/app/store/underWaterInput/types"; diff --git a/apps/fo/app/pages/(with-layout)/underWaterInput/page.tsx b/apps/fo/app/pages/(with-layout)/underWaterInput/page.tsx index 6d8172bce..a621611b7 100644 --- a/apps/fo/app/pages/(with-layout)/underWaterInput/page.tsx +++ b/apps/fo/app/pages/(with-layout)/underWaterInput/page.tsx @@ -1,4 +1,12 @@ -"use client" +/** + * 운영실태 - 지하수 유입량 추정(메인) + * + * - 조회조건대로 시설별 연간, 하절기, 동절기 단위로 지하수 유입량 추정을 표로 보여주는 화면 + * - 청천시 실제 하수유입량 - 오수발생량으로 지하수유입량을 추정한다. + * - 연간 지하수 유입량이 하수유입량보다 20% 클 경우 초과유입으로 아닌 경우 적정으로 적정여부를 표시한다. + */ + +"use client" import { useFoStore } from "@/app/store"; import type { TableUpperProps } from "@/app/store/common"; import { ContentsDiv, downloadExcel, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiModal, UiTable, type ReturnType } from "@common/business_components"; From 8e8c18c1fce44113158bd1837fe00d1df87988f8 Mon Sep 17 00:00:00 2001 From: swcho Date: Thu, 18 Sep 2025 14:06:41 +0900 Subject: [PATCH 27/46] =?UTF-8?q?docs:=20=ED=95=98=EC=88=98=EA=B4=80?= =?UTF-8?q?=EB=A1=9C=20=ED=8C=8C=EC=9D=BC=20=EC=A3=BC=EC=84=9D=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/sn/app/(map-layout)/layout.tsx | 13 +++++++++++++ apps/sn/app/(map-layout)/map/page.tsx | 19 +++++++++++++++++-- .../(map-layout)/map/searchModal/basicTab.tsx | 10 ++++++++++ .../map/searchModal/operationTab.tsx | 16 ++++++++++++++++ .../map/searchModal/reportFilesModal.tsx | 16 ++++++++++++++++ .../map/searchModal/reportTab.tsx | 16 ++++++++++++++++ .../map/searchModal/searchModal.tsx | 18 ++++++++++++++++++ .../(map-layout)/map/searchModal/stofcbr.tsx | 16 +++++++++++++++- .../(map-layout)/map/searchModal/swageMhl.tsx | 17 ++++++++++++++++- .../map/searchModal/swagePmstn.tsx | 17 ++++++++++++++++- .../(map-layout)/map/searchModal/swagePpl.tsx | 17 ++++++++++++++++- .../map/searchModal/swagePrcsFclt.tsx | 17 ++++++++++++++++- .../map/searchModal/swagePrcsZone.tsx | 17 +++++++++++++++-- .../map/searchModal/useBasicTab.ts | 14 ++++++++++++++ .../map/searchModal/useOperationTab.ts | 16 ++++++++++++++++ .../map/searchModal/useReportTab.ts | 15 +++++++++++++++ .../map/searchModal/useSearchModal.ts | 14 ++++++++++++++ .../map/waterDepth/waterDepth.tsx | 12 ++++++++++++ .../app/(with-base-layout)/fileValidation.tsx | 8 ++++++++ .../app/(with-base-layout)/ii/BaseLayout.tsx | 13 +++++++++++++ .../(with-base-layout)/ii/fileupload/page.tsx | 17 +++++++++++++++++ .../(with-base-layout)/ii/irsetting/page.tsx | 16 ++++++++++++++++ .../app/(with-base-layout)/ii/rdii/page.tsx | 17 +++++++++++++++++ .../(with-base-layout)/ii/rdiiResult/page.tsx | 19 +++++++++++++++++++ .../app/(with-base-layout)/ii/result/page.tsx | 19 +++++++++++++++++++ apps/sn/app/(with-base-layout)/layout.tsx | 13 +++++++++++++ .../oper/floodPre/headMakeFloodPre.tsx | 10 ++++++++++ .../oper/floodPre/inputTableBody.tsx | 11 +++++++++++ .../(with-base-layout)/oper/floodPre/page.tsx | 18 ++++++++++++++++++ .../oper/floodPre/tableModal.tsx | 14 ++++++++++++++ apps/sn/app/(with-base-layout)/oper/index.ts | 11 +++++++++++ .../(with-base-layout)/oper/oldPp/headList.ts | 11 +++++++++++ .../(with-base-layout)/oper/oldPp/page.tsx | 18 ++++++++++++++++++ .../oper/oldPp/tableModal.tsx | 14 ++++++++++++++ .../selectionValidation.tsx | 9 ++++++++- apps/sn/app/api/proxy/[...url]/route.ts | 11 +++++++++++ .../api/attachment/attachment-interface.tsx | 11 +++++++++++ .../lib/api/attachment/attachment-service.tsx | 15 +++++++++++++++ apps/sn/app/components/lib/api/index.ts | 11 +++++++++++ .../app/components/lib/common/apiHelpers.ts | 14 ++++++++++++++ apps/sn/app/components/lib/utils/date.ts | 11 +++++++++++ .../app/components/lib/utils/excelToJson.ts | 11 +++++++++++ .../components/lib/utils/fileDeleteUtil.tsx | 14 ++++++++++++++ .../app/components/lib/utils/fileDownload.ts | 11 +++++++++++ .../components/lib/utils/fileUploadUtil.tsx | 11 +++++++++++ .../lib/utils/formatDisplayValue.tsx | 12 ++++++++++++ .../app/components/ui/EditableFormTable.tsx | 11 +++++++++++ .../sn/app/components/ui/LoadingBar/index.tsx | 10 ++++++++++ .../app/components/ui/YearRangeSelectBox.tsx | 11 +++++++++++ apps/sn/app/components/ui/contentLayout.tsx | 11 +++++++++++ .../ui/ctpvSggPrcsFcltSelectBox.tsx | 14 ++++++++++++++ apps/sn/app/components/ui/fileUploadForm.tsx | 11 +++++++++++ apps/sn/app/components/ui/formSection.tsx | 11 +++++++++++ apps/sn/app/components/ui/modal.tsx | 11 +++++++++++ .../app/components/ui/operFileUploadForm.tsx | 11 +++++++++++ apps/sn/app/components/ui/toast.tsx | 11 +++++++++++ apps/sn/app/components/ui/verticalTable.tsx | 11 +++++++++++ apps/sn/app/layout.tsx | 13 +++++++++++++ apps/sn/app/page.tsx | 16 ++++++++++++++++ apps/sn/app/store/index.ts | 17 +++++++++++++++++ apps/sn/app/store/useReportTabStore.ts | 14 ++++++++++++++ apps/sn/app/store/useSearchModalStore.ts | 12 ++++++++++++ apps/sn/app/store/useStore.ts | 11 +++++++++++ 63 files changed, 846 insertions(+), 10 deletions(-) diff --git a/apps/sn/app/(map-layout)/layout.tsx b/apps/sn/app/(map-layout)/layout.tsx index 2ea6758b3..f58e67489 100644 --- a/apps/sn/app/(map-layout)/layout.tsx +++ b/apps/sn/app/(map-layout)/layout.tsx @@ -1,3 +1,16 @@ +/** + * ➡️ 경로 : 하수관망도 모든 페이지 + * + * 📄 Map Layout + * Next.js App Router (app/) 기반 맵 레이아웃 컴포넌트 + * + * - 메뉴 클릭 이벤트 처리 및 라우팅 + * - 현재 메뉴 정보 Zustand를 통한 상태 관리 + * - 시도/시군구/사업 구분/사업 유형 데이터 초기 로드 + * - NoFooterLayout을 통한 공통 레이아웃 적용 + * - QueryClient를 통한 데이터 캐싱 및 관리 + * - 경로 변경 시 메뉴 정보 동기화 + */ "use client"; import React, { useEffect } from 'react'; diff --git a/apps/sn/app/(map-layout)/map/page.tsx b/apps/sn/app/(map-layout)/map/page.tsx index 7ca34053b..b9fb0e352 100644 --- a/apps/sn/app/(map-layout)/map/page.tsx +++ b/apps/sn/app/(map-layout)/map/page.tsx @@ -1,3 +1,20 @@ +/** + * ➡️ 경로 : 하수관망도 메인 페이지 + * + * 📄 Map Page + * 지도 페이지 컴포넌트 + * + * - OpenLayers 기반 GIS 지도 렌더링 및 상호작용 + * - 레이어 트리 데이터 관리 및 동적 레이어 표시/숨김 + * - 피처 검색 및 선택 기능 (SearchModal, ProcSearchBar) + * - 피처 클릭 이벤트 처리 및 상세 정보 팝업 표시 + * - 수심(WaterDepth) 레이어 애니메이션 재생 기능 + * - Zustand를 통한 검색 모달 상태 관리 + * + * 🔗 사용 API + * - 레이어 설정 조회: GET /v1/map/lyrStngs/SN_NETWORK (sewerage-service) + */ + "use client"; import Gis from "@common/business_components/ui/map/Gis"; @@ -10,7 +27,6 @@ import { WaterDepth, WATER_DEPTH_LAYER_TYPES } from "./waterDepth/waterDepth"; import { ProcSearchBar } from "@common/business_components/ui/map/searchBar"; import useSearchModalStore from "@/store/useSearchModalStore"; - const Map = () => { const { isSearchModalOpen, setIsSearchModalOpen } = useSearchModalStore(); @@ -73,7 +89,6 @@ const Map = () => { }); } - // 3. 피처 선택 if (foundFeature) { let geometry = foundFeature.getGeometry(); diff --git a/apps/sn/app/(map-layout)/map/searchModal/basicTab.tsx b/apps/sn/app/(map-layout)/map/searchModal/basicTab.tsx index 62fed6a28..6d1507f06 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/basicTab.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/basicTab.tsx @@ -1,3 +1,13 @@ +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (오른쪽 돋보기 모양 클릭) - 검색 모달 창 내 기본정보 탭 + * + * 📄 BasicTab Component + * Next.js App Router (app/) 기반 검색 모달의 기본정보 탭 컴포넌트 + * + * - 기본정보 검색을 위한 구분 선택 및 조건 입력 UI 제공 + * - 하수관로, 하수처리시설, 하수처리구역, 하수맨홀, 하수펌프장, 우수토실 등 다양한 유형별 컴포넌트 렌더링 + * - useSearchModalStore를 통해 상태 관리 및 사용자 상호작용 처리 + */ import React from 'react'; import { SelectBox } from '@common/business_components/ui'; import { Label } from '@common/components'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/operationTab.tsx b/apps/sn/app/(map-layout)/map/searchModal/operationTab.tsx index 9f1711cf6..853d05c38 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/operationTab.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/operationTab.tsx @@ -1,3 +1,19 @@ +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (오른쪽 돋보기 모양 클릭) - 검색 모달 창 내 운영정보 탭 + * + * 📄 Operation Tab + * Next.js App Router (app/) 기반 검색 모달 운영정보 탭 컴포넌트 + * + * - 업무구분 선택 (보수 및 갱신, 점검 및 진단, 청소 및 준설) + * - 사업명 입력 및 수행기간 범위 선택 + * - 사업 유형 필터링 기능 + * - 조회 버튼을 통한 데이터 검색 트리거 + * - Zustand를 통한 상태 관리 및 필터 값 저장 + * - Enter 키 입력 시 자동 조회 지원 + * + * 🔗 사용 API + * - 운영 사업 현황 조회: GET /v1/operation/business/status (sewerage-service) + */ import React from 'react'; import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; import { SelectBox } from '@common/business_components/ui'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/reportFilesModal.tsx b/apps/sn/app/(map-layout)/map/searchModal/reportFilesModal.tsx index 473c4abcb..ced0ba14b 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/reportFilesModal.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/reportFilesModal.tsx @@ -1,3 +1,19 @@ +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (오른쪽 돋보기 모양 클릭) - 검색 모달 창 내 하수도정비기본계획보고서 탭 (셀 클릭) + * + * 📄 Report Files Modal + * Next.js App Router (app/) 기반 보고서 파일 모달 컴포넌트 + * + * - 하수도정비 기본계획 보고서 파일 목록 표시 + * - 파일명 및 등록일자 정보 테이블 출력 + * - 페이지네이션 및 로딩 오버레이 지원 + * - 파일 클릭 이벤트 처리 및 상세 조회 + * - Zustand를 통한 모달 상태 및 데이터 관리 + * - 모달 열림/닫힘 시 데이터 초기화 기능 + * + * 🔗 사용 API + * - 보고서 파일 조회: GET /v1/report/sewerage-plan (sewerage-service) + */ 'use client' import React, { useEffect } from 'react'; import LoadingOverlay from '@/components/ui/LoadingBar'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/reportTab.tsx b/apps/sn/app/(map-layout)/map/searchModal/reportTab.tsx index 1885cd8e9..e57a1a222 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/reportTab.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/reportTab.tsx @@ -1,3 +1,19 @@ +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (오른쪽 돋보기 모양 클릭) - 검색 모달 창 내 하수도정비기본계획보고서 탭 + * + * 📄 Report Tab + * Next.js App Router (app/) 기반 검색 모달 보고서 탭 컴포넌트 + * + * - 하수도정비 기본계획 보고서 목록 표시 및 필터링 + * - 시도/시군구/보고서 구분/승인년도 기반 검색 기능 + * - 테이블 데이터 표시 및 페이지네이션 지원 + * - 보고서 클릭 시 파일 목록 모달 열기 + * - Zustand를 통한 모달 상태 및 데이터 관리 + * - 로딩 오버레이 및 선택 초기화 기능 + * + * 🔗 사용 API + * - 보고서 데이터 조회: GET /v1/report/sewerage-plan (sewerage-service) + */ 'use client'; import React, { useEffect, useState } from 'react'; import { Button, Label } from '@common/components'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx b/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx index 4b91b869e..400217a4b 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx @@ -1,3 +1,21 @@ +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (오른쪽 돋보기 모양 클릭) - 검색 모달 창 + * + * 📄 Search Modal + * Next.js App Router (app/) 기반 검색 모달 컴포넌트 + * + * - 탭 기반 검색 인터페이스 (기본정보, 운영정보, 보고서) + * - 테이블 데이터 표시 및 페이지네이션 기능 + * - 시설물 조회 결과 및 운영 사업 현황 표시 + * - 엑셀 다운로드 및 지도에서 보기 기능 + * - Zustand를 통한 검색 모달 상태 관리 + * - 로딩 오버레이 및 선택 초기화 지원 + * + * 🔗 사용 API + * - 시설물 조회: GET /v1/map/facility/search (sewerage-service) + * - 운영 사업 현황 조회: GET /v1/operation/business/status (sewerage-service) + * - 보고서 데이터 조회: GET /v1/report/sewerage-plan (sewerage-service) + */ import LoadingOverlay from '@/components/ui/LoadingBar'; import { UiModal, UITab, UiTable } from '@common/business_components/ui'; import { Button } from '@common/components/ui'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/stofcbr.tsx b/apps/sn/app/(map-layout)/map/searchModal/stofcbr.tsx index 4aa510545..522063a29 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/stofcbr.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/stofcbr.tsx @@ -1,4 +1,18 @@ -// 우수토실 +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (오른쪽 돋보기 모양 클릭) - 검색 모달 창 내 기본정보 탭 (구분: 우수토실) + * + * 📄 Stofcbr Tab + * Next.js App Router (app/) 기반 검색 모달 우수토실 탭 컴포넌트 + * + * - 시도/시군구 선택 및 설치년도 범위 필터링 + * - CQL 필터 생성을 통한 쿼리 조건 설정 + * - 조회 버튼을 통한 데이터 검색 트리거 + * - Zustand를 통한 상태 관리 및 필터 값 저장 + * - Enter 키 입력 시 자동 조회 지원 + * + * 🔗 사용 API + * - 시설물 조회: GET /v1/map/facility/search (sewerage-service) + */ import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; import { Button } from '@common/components'; import React from 'react'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx b/apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx index a16500a34..f13341b9c 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx @@ -1,4 +1,19 @@ -// 하수맨홀 +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (오른쪽 돋보기 모양 클릭) - 검색 모달 창 내 기본정보 탭 (구분: 하수맨홀) + * + * 📄 SwageMhl Tab + * Next.js App Router (app/) 기반 검색 모달 하수맨홀 탭 컴포넌트 + * + * - 시도/시군구 선택 및 설치년도 범위 필터링 + * - 용도 및 구경 범위 기반 검색 기능 + * - CQL 필터 생성을 통한 쿼리 조건 설정 + * - 조회 버튼을 통한 데이터 검색 트리거 + * - Zustand를 통한 상태 관리 및 필터 값 저장 + * - Enter 키 입력 시 자동 조회 지원 + * + * 🔗 사용 API + * - 시설물 조회: GET /v1/map/facility/search (sewerage-service) + */ import React from 'react'; import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; import { Button, Input, Label } from '@common/components'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/swagePmstn.tsx b/apps/sn/app/(map-layout)/map/searchModal/swagePmstn.tsx index 5e7e7d3d1..4e09a2b3e 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/swagePmstn.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/swagePmstn.tsx @@ -1,4 +1,19 @@ -// 하수펌프장 +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (오른쪽 돋보기 모양 클릭) - 검색 모달 창 내 기본정보 탭 (구분: 하수펌프장) + * + * 📄 SwagePmstn Tab + * Next.js App Router (app/) 기반 검색 모달 하수펌프장 탭 컴포넌트 + * + * - 시도/시군구 선택 및 설치년도 범위 필터링 + * - 일일처리용량 및 양수능력 범위 기반 검색 기능 + * - CQL 필터 생성을 통한 쿼리 조건 설정 + * - 조회 버튼을 통한 데이터 검색 트리거 + * - Zustand를 통한 상태 관리 및 필터 값 저장 + * - Enter 키 입력 시 자동 조회 지원 + * + * 🔗 사용 API + * - 시설물 조회: GET /v1/map/facility/search (sewerage-service) + */ import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; import { Button, Input, Label } from '@common/components'; import React from 'react'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/swagePpl.tsx b/apps/sn/app/(map-layout)/map/searchModal/swagePpl.tsx index 9d9df92cb..a92395da7 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/swagePpl.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/swagePpl.tsx @@ -1,4 +1,19 @@ -// 하수관로 +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (오른쪽 돋보기 모양 클릭) - 검색 모달 창 내 기본정보 탭 (구분: 하수관로) + * + * 📄 SwagePpl Tab + * Next.js App Router (app/) 기반 검색 모달 하수관로 탭 컴포넌트 + * + * - 시도/시군구 선택 및 설치년도 범위 필터링 + * - 용도 및 관경 범위 기반 검색 기능 + * - CQL 필터 생성을 통한 쿼리 조건 설정 + * - 조회 버튼을 통한 데이터 검색 트리거 + * - Zustand를 통한 상태 관리 및 필터 값 저장 + * - Enter 키 입력 시 자동 조회 지원 + * + * 🔗 사용 API + * - 시설물 조회: GET /v1/map/facility/search (sewerage-service) + */ import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; import { SelectBox } from '@common/business_components/ui'; import { Button, Input, Label } from '@common/components'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/swagePrcsFclt.tsx b/apps/sn/app/(map-layout)/map/searchModal/swagePrcsFclt.tsx index 4b62edde2..7791dc435 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/swagePrcsFclt.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/swagePrcsFclt.tsx @@ -1,4 +1,19 @@ -// 하수처리시설 +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (오른쪽 돋보기 모양 클릭) - 검색 모달 창 내 기본정보 탭 (구분: 하수처리시설) + * + * 📄 SwagePrcsFclt Tab + * Next.js App Router (app/) 기반 검색 모달 하수처리시설 탭 컴포넌트 + * + * - 시도/시군구 선택 및 가동개시일자 범위 필터링 + * - 시설용량 범위 기반 검색 기능 + * - CQL 필터 생성을 통한 쿼리 조건 설정 + * - 조회 버튼을 통한 데이터 검색 트리거 + * - Zustand를 통한 상태 관리 및 필터 값 저장 + * - Enter 키 입력 시 자동 조회 지원 + * + * 🔗 사용 API + * - 시설물 조회: GET /v1/map/facility/search (sewerage-service) + */ import React from 'react'; import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; import { Button, Input, Label } from '@common/components'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/swagePrcsZone.tsx b/apps/sn/app/(map-layout)/map/searchModal/swagePrcsZone.tsx index dcda670f2..b072e00c4 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/swagePrcsZone.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/swagePrcsZone.tsx @@ -1,5 +1,18 @@ -// 하수처리구역 - +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (오른쪽 돋보기 모양 클릭) - 검색 모달 창 내 기본정보 탭 (구분: 하수처리구역) + * + * 📄 SwagePrcsZone Tab + * Next.js App Router (app/) 기반 검색 모달 하수처리구역 탭 컴포넌트 + * + * - 시도/시군구 선택 및 하수처리시설명/구역명 기반 검색 기능 + * - CQL 필터 생성을 통한 쿼리 조건 설정 + * - 조회 버튼을 통한 데이터 검색 트리거 + * - Zustand를 통한 상태 관리 및 필터 값 저장 + * - Enter 키 입력 시 자동 조회 지원 + * + * 🔗 사용 API + * - 시설물 조회: GET /v1/map/facility/search (sewerage-service) + */ import React from 'react'; import { CtpvSggPrcsFcltSelectBox } from '@/components/ui/ctpvSggPrcsFcltSelectBox'; import { Button, Input, Label } from '@common/components'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts b/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts index e7e8af8e9..6dd239c59 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts +++ b/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts @@ -1,3 +1,17 @@ +/** + * 📄 useBasicTab Hook + * 검색 모달 기본정보 탭 훅 + * + * - 필터링된 시설물 데이터 조회 및 포맷팅 + * - 테이블 셀 클릭 시 지도 피처 선택 및 줌 기능 + * - 엑셀 다운로드 기능 (한글 헤더 지원) + * - CQL 필터 생성을 통한 쿼리 조건 설정 + * - Zustand를 통한 상태 관리 및 로딩 처리 + * - 데이터 매핑 및 코드 변환 (시도/시군구, 용도 등) + * + * 🔗 사용 API + * - 시설물 조회: GET /v1/fclts (sewerage-service) + */ import { useEffect, useState } from 'react'; import { downloadExcelWithKoreanHeaders } from '@common/business_components/ui'; import axios from 'axios'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/useOperationTab.ts b/apps/sn/app/(map-layout)/map/searchModal/useOperationTab.ts index d7709af85..ef1464c49 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/useOperationTab.ts +++ b/apps/sn/app/(map-layout)/map/searchModal/useOperationTab.ts @@ -1,3 +1,19 @@ +/** + * 📄 useOperationTab Hook + * 검색 모달 운영정보 탭 훅 + * + * - 필터링된 사업 현황 데이터 조회 및 포맷팅 + * - 사업 현황 테이블 셀 클릭 시 상세 결과표 조회 + * - 결과표 셀 클릭 시 지도 피처 선택 및 줌 기능 + * - 엑셀 다운로드 기능 (사업 현황 및 결과표) + * - CQL 필터 생성을 통한 쿼리 조건 설정 + * - Zustand를 통한 상태 관리 및 로딩 처리 + * - 데이터 매핑 및 코드 변환 (사업 유형, 용도, 재질 등) + * + * 🔗 사용 API + * - 사업 현황 조회: GET /v1/bizInfo (sewerage-service) + * - 사업 결과표 조회: GET /v1/bizInfo/fclts (sewerage-service) + */ import { downloadExcelWithKoreanHeaders } from '@common/business_components/ui'; import { MS_SWAGE_PPL_CODES, MS_SWAGE_PPL_USE_CODES } from '../components/common/table'; import { getData } from "@/components/lib/api"; diff --git a/apps/sn/app/(map-layout)/map/searchModal/useReportTab.ts b/apps/sn/app/(map-layout)/map/searchModal/useReportTab.ts index 52fabc9f0..0ebb6fd13 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/useReportTab.ts +++ b/apps/sn/app/(map-layout)/map/searchModal/useReportTab.ts @@ -1,3 +1,18 @@ +/** + * 📄 useReportTab Hook + * 검색 모달 보고서 탭 훅 + * + * - 계층적 폴더 구조 평탄화 및 데이터 변환 + * - 파일 목록 조회 및 페이징 처리 + * - 파일 다운로드 기능 + * - 셀 클릭 이벤트 처리 + * - Zustand를 통한 상태 관리 및 로딩 처리 + * - 데이터 매핑 및 코드 변환 (시도/시군구, 보고서 유형 등) + * + * 🔗 사용 API + * - 보고서 파일 조회: GET /api/v1/dc/file (sewerage-service) + * - 파일 다운로드: GET /api/v1/dc/file/download (sewerage-service) + */ import { getDcData } from '@/components/lib/api'; import { fileDownload } from '@/utils'; import { useReportTabStore } from '@/store/useReportTabStore'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/useSearchModal.ts b/apps/sn/app/(map-layout)/map/searchModal/useSearchModal.ts index 76d1b88ce..89363a247 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/useSearchModal.ts +++ b/apps/sn/app/(map-layout)/map/searchModal/useSearchModal.ts @@ -1,3 +1,17 @@ +/** + * 📄 useSearchModal Hook + * 검색 모달 훅 + * + * - 탭 기반 검색 인터페이스 관리 (기본정보, 운영정보, 보고서) + * - 필터링된 데이터 조회 및 포맷팅 + * - 조회 버튼을 통한 데이터 검색 트리거 + * - 여러 시설 보기 기능 + * - Zustand를 통한 상태 관리 및 로딩 처리 + * - 데이터 매핑 및 코드 변환 (사업 유형 등) + * + * 🔗 사용 API + * - 사업 현황 조회: GET /v1/bizInfo (sewerage-service) + */ import { getData } from "@/components/lib/api"; import { formatDisplayData } from '@/components/lib/utils/formatDisplayValue'; import useStore from '../../../store/useStore'; diff --git a/apps/sn/app/(map-layout)/map/waterDepth/waterDepth.tsx b/apps/sn/app/(map-layout)/map/waterDepth/waterDepth.tsx index be78c069c..6a5c3f893 100644 --- a/apps/sn/app/(map-layout)/map/waterDepth/waterDepth.tsx +++ b/apps/sn/app/(map-layout)/map/waterDepth/waterDepth.tsx @@ -1,3 +1,15 @@ +/** + * ➡️ 경로 : 하수관망도 메인페이지 내 침수심 범례 + * + * 📄 WaterDepth Component + * 침수심 범례 컴포넌트 + * + * - 침수심 레이어의 범례 표시 및 애니메이션 재생 제어 + * - 진행률 바를 통한 애니메이션 상태 시각화 + * - 플레이/일시정지 버튼을 통한 사용자 상호작용 + * - 범례 항목별 색상과 레이블 표시 + */ + "use client"; import { Label } from "@common/components/ui/label"; diff --git a/apps/sn/app/(with-base-layout)/fileValidation.tsx b/apps/sn/app/(with-base-layout)/fileValidation.tsx index c0711a7d2..987883251 100644 --- a/apps/sn/app/(with-base-layout)/fileValidation.tsx +++ b/apps/sn/app/(with-base-layout)/fileValidation.tsx @@ -1,5 +1,13 @@ /** + * 📄 File Validation Utility * 파일 확장자 검증 유틸리티 + * + * - 파일 확장자 검증 함수 (단일 및 다중 파일 지원) + * - 검증 결과 타입 정의 및 에러 메시지 생성 + * - 자주 사용되는 파일 확장자 상수 제공 + * - 파일 업로드 전 검증 로직 구현 + * - 사용자 친화적인 에러 메시지 출력 + * - 다양한 파일 타입(INP, EXCEL, OFFICE 등) 지원 */ // 파일 확장자 검증 함수 diff --git a/apps/sn/app/(with-base-layout)/ii/BaseLayout.tsx b/apps/sn/app/(with-base-layout)/ii/BaseLayout.tsx index af178ac59..43648114c 100644 --- a/apps/sn/app/(with-base-layout)/ii/BaseLayout.tsx +++ b/apps/sn/app/(with-base-layout)/ii/BaseLayout.tsx @@ -1,3 +1,16 @@ +/** + * ➡️ 경로 : I/I 분석 모든 페이지 + * + * 📄 Base Layout + * 분석 페이지 기본 레이아웃 컴포넌트 + * + * - 검색 및 필터링 UI 제공 (시도/시군구/하수처리시설 선택) + * - 날짜 범위 선택 기능 + * - 파일 다운로드 및 삭제 버튼 지원 + * - 분석 실행 버튼 및 확인 토스트 처리 + * - 양식 파일 다운로드 링크 제공 + * - 폼 제출 및 이벤트 핸들링 + */ 'use client' import { DateMonthPicker, Form, SelectBox } from '@common/business_components/ui' import ListDiv from '@common/business_components/ui/list_div' diff --git a/apps/sn/app/(with-base-layout)/ii/fileupload/page.tsx b/apps/sn/app/(with-base-layout)/ii/fileupload/page.tsx index 13402d09b..705de23cc 100644 --- a/apps/sn/app/(with-base-layout)/ii/fileupload/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/fileupload/page.tsx @@ -1,3 +1,20 @@ +/** + * ➡️ 경로 : /ii/fileupload + * + * 📄 File Upload Page + * 파일 업로드 테스트 페이지 컴포넌트 + * + * - 파일 선택 및 텍스트 입력 기능 + * - JSON 데이터와 파일을 함께 서버에 업로드 + * - 쿠키 기반 인증 토큰을 통한 사용자 조회 + * - 두 가지 방식의 사용자 조회 API 호출 지원 + * - Axios를 통한 파일 업로드 처리 + * - 폼 제출 및 에러 핸들링 + * + * 🔗 사용 API + * - 사용자 조회: POST /v1/inftwtAnls/users (sewerage-service) + * - 파일 업로드: POST /v1/rdiiAnls/savewithfile (sewerage-service) + */ 'use client' // FileUpload.js diff --git a/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx b/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx index 97864aa20..88a7282e9 100644 --- a/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx @@ -1,3 +1,19 @@ +/** + * ➡️ 경로 : I/I 분석 - 침입수 분석 + * + * 📄 IrSetting Page + * 침입수 분석 설정 페이지 컴포넌트 + * + * - 오수관망도, 수용가-맨홀 매칭결과, 오수량 시간패턴 등 파일 업로드 기능 + * - 오수전환율 및 분석 정보 입력 기능 + * - 엑셀 파일 데이터 파싱 및 JSON 변환 처리 + * - 분석 데이터 서버 제출 및 폼 초기화 기능 + * - 파일 확장자 및 입력 값 검증 기능 + * - 로딩 오버레이 및 에러 핸들링 지원 + * + * 🔗 사용 API + * - 침입수 분석 데이터 저장: POST /v1/inftwtAnls/savewithfile (sewerage-service) + */ 'use client' import { postMutiPart } from '@/components/lib/api' import FileUploadForm from '@/components/ui/fileUploadForm' diff --git a/apps/sn/app/(with-base-layout)/ii/rdii/page.tsx b/apps/sn/app/(with-base-layout)/ii/rdii/page.tsx index 8a27abb81..30bf0a92e 100644 --- a/apps/sn/app/(with-base-layout)/ii/rdii/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/rdii/page.tsx @@ -1,3 +1,20 @@ +/** + * ➡️ 경로 : I/I 분석 - RDII 분석 + * + * 📄 RDII Page + * RDII 분석 페이지 컴포넌트 + * + * - 오수관망도, 수용가-맨홀 매칭결과, 강우자료 등 파일 업로드 기능 + * - RTK계수 출처 및 RDII 기여면적 입력 기능 + * - 단위도 계수 및 초기 차단 깊이 테이블 편집 기능 + * - 엑셀 파일 데이터 파싱 및 JSON 변환 처리 + * - 분석 데이터 서버 제출 및 폼 초기화 기능 + * - 파일 확장자 및 입력 값 검증 기능 + * - 로딩 오버레이 및 에러 핸들링 지원 + * + * 🔗 사용 API + * - RDII 분석 데이터 저장: POST /v1/rdiiAnls/savewithfile (sewerage-service) + */ "use client" import { postMutiPart } from '@/components/lib/api' diff --git a/apps/sn/app/(with-base-layout)/ii/rdiiResult/page.tsx b/apps/sn/app/(with-base-layout)/ii/rdiiResult/page.tsx index 354467d9d..6696cab4f 100644 --- a/apps/sn/app/(with-base-layout)/ii/rdiiResult/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/rdiiResult/page.tsx @@ -1,3 +1,22 @@ +/** + * ➡️ 경로 : I/I 분석 - RDII 분석결과 + * + * 📄 RDII Result Page + * RDII 분석 결과 페이지 컴포넌트 + * + * - RDII 분석 결과 조회 및 테이블 표시 + * - 페이징 및 검색 기능 (시도/시군구/하수처리시설/기간 기반) + * - 분석 결과 선택 및 엑셀 다운로드 기능 + * - 분석 결과 파일 삭제 기능 + * - 로딩 오버레이 및 에러 핸들링 지원 + * - Zustand를 통한 상태 관리 및 데이터 포맷팅 + * + * 🔗 사용 API + * - RDII 분석 결과 조회: GET /v1/rdiiAnls (sewerage-service) + * - RDII 분석 결과 상세 조회: GET /v1/rdiiAnlsRslt/ppl (sewerage-service) + * - RDII 분석 결과 삭제: DELETE /v1/rdiiAnlsRslt (sewerage-service) + * - RDII 분석 삭제: DELETE /v1/rdiiAnls (sewerage-service) + */ 'use client' import { deleteData, getData, useCookieAuth } from '@/components/lib/api' import { UiTable, downloadExcelWithKoreanHeaders } from '@common/business_components/ui' diff --git a/apps/sn/app/(with-base-layout)/ii/result/page.tsx b/apps/sn/app/(with-base-layout)/ii/result/page.tsx index 8df0a60a8..ca0be0221 100644 --- a/apps/sn/app/(with-base-layout)/ii/result/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/result/page.tsx @@ -1,3 +1,22 @@ +/** + * ➡️ 경로 : I/I 분석 - 침입수 분석결과 + * + * 📄 Result Page + * 침입수 분석 결과 페이지 컴포넌트 + * + * - 침입수 분석 결과 조회 및 테이블 표시 + * - 페이징 및 검색 기능 (시도/시군구/하수처리시설/기간 기반) + * - 분석 결과 선택 및 엑셀 다운로드 기능 + * - 분석 결과 파일 삭제 기능 + * - 로딩 오버레이 및 에러 핸들링 지원 + * - Zustand를 통한 상태 관리 및 데이터 포맷팅 + * + * 🔗 사용 API + * - 침입수 분석 결과 조회: GET /v1/inftwtAnls (sewerage-service) + * - 침입수 분석 결과 상세 조회: GET /v1/inftwtAnlsRslt/ppl (sewerage-service) + * - 침입수 분석 결과 삭제: DELETE /v1/inftwtAnlsRslt (sewerage-service) + * - 침입수 분석 삭제: DELETE /v1/inftwtAnls (sewerage-service) + */ 'use client' import { deleteData, getData, useCookieAuth } from '@/components/lib/api' import { UiTable, downloadExcelWithKoreanHeaders } from '@common/business_components/ui' diff --git a/apps/sn/app/(with-base-layout)/layout.tsx b/apps/sn/app/(with-base-layout)/layout.tsx index 229415e53..228db9a79 100644 --- a/apps/sn/app/(with-base-layout)/layout.tsx +++ b/apps/sn/app/(with-base-layout)/layout.tsx @@ -1,3 +1,16 @@ +/** + * ➡️ 경로 : I/I분석, 운영정보 모든 페이지 + * + * 📄 With Base Layout + * Next.js App Router (app/) 기반 분석 페이지 기본 레이아웃 컴포넌트 + * + * - 메뉴 클릭 이벤트 처리 및 라우팅 + * - 현재 메뉴 정보 Zustand를 통한 상태 관리 + * - 시도/시군구/사업 구분/사업 유형 데이터 초기 로드 + * - BaseLayout을 통한 공통 레이아웃 적용 + * - QueryClient를 통한 데이터 캐싱 및 관리 + * - 경로 변경 시 메뉴 정보 동기화 + */ "use client"; import React, { useEffect} from 'react'; diff --git a/apps/sn/app/(with-base-layout)/oper/floodPre/headMakeFloodPre.tsx b/apps/sn/app/(with-base-layout)/oper/floodPre/headMakeFloodPre.tsx index f16178003..b6cc5d249 100644 --- a/apps/sn/app/(with-base-layout)/oper/floodPre/headMakeFloodPre.tsx +++ b/apps/sn/app/(with-base-layout)/oper/floodPre/headMakeFloodPre.tsx @@ -1,3 +1,13 @@ +/** + * 📄 HeadMakeFloodPre Component + * 침수예방 테이블 헤더 생성 컴포넌트 + * + * - 테이블 상단 헤더 생성 및 렌더링 + * - 하위 헤더 목록 기반 동적 헤더 구성 + * - rowspan 및 colspan을 통한 테이블 구조 조정 + * - 가시성 필터링 및 조건부 렌더링 지원 + * - 상위 헤더와 하위 헤더의 계층적 표시 + */ import { TableHead, TableRow } from "@common/components/ui"; diff --git a/apps/sn/app/(with-base-layout)/oper/floodPre/inputTableBody.tsx b/apps/sn/app/(with-base-layout)/oper/floodPre/inputTableBody.tsx index 0058b47d1..550fcbd15 100644 --- a/apps/sn/app/(with-base-layout)/oper/floodPre/inputTableBody.tsx +++ b/apps/sn/app/(with-base-layout)/oper/floodPre/inputTableBody.tsx @@ -1,3 +1,14 @@ +/** + * 📄 InputTableBody Component + * 침수예방 입력 테이블 바디 컴포넌트 + * + * - 숫자 입력 및 콤마 포맷팅 기능 + * - mergeCell을 통한 셀 병합 처리 + * - 편집 가능/불가능 상태 관리 + * - 소계/총합계 행 스타일링 및 표시 + * - 입력 값 검증 및 변경 핸들링 + * - 빈 데이터 상태 처리 + */ import type { TableUpperProps } from "./headMakeFloodPre"; import { Input, TableCell, TableRow } from "@common/components/ui"; diff --git a/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx b/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx index 08ac017be..8cd1aed7a 100644 --- a/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx +++ b/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx @@ -1,3 +1,21 @@ +/** + * ➡️ 경로 : 운영정보 - 도시침수예방사업 + * + * 📄 FloodPre Page + * 침수예방 사업 정보 등록 및 조회 페이지 컴포넌트 + * + * - 사업 정보 등록 현황 조회 및 테이블 표시 + * - 페이징 및 검색 기능 (등록기간/등록자/파일명 기반) + * - 파일 업로드 및 등록 기능 + * - 파일 다운로드 및 삭제 기능 + * - 엑셀 데이터 테이블 모달 표시 + * - 로딩 오버레이 및 에러 핸들링 지원 + * + * 🔗 사용 API + * - 사업 정보 조회: GET /v1/sbmrgPrevnt (sewerage-service) + * - 파일 삭제: DELETE /attach-service/api/v1/atfl/attachments (attach-service) + * - 사업 정보 등록: POST /v1/sbmrgPrevnt (sewerage-service) + */ 'use client' import { deleteData, postData, useCookieAuth } from '@/components/lib/api' import { searchData } from '@/components/lib/common/apiHelpers' diff --git a/apps/sn/app/(with-base-layout)/oper/floodPre/tableModal.tsx b/apps/sn/app/(with-base-layout)/oper/floodPre/tableModal.tsx index a4c7939c8..3ef37d9ba 100644 --- a/apps/sn/app/(with-base-layout)/oper/floodPre/tableModal.tsx +++ b/apps/sn/app/(with-base-layout)/oper/floodPre/tableModal.tsx @@ -1,3 +1,17 @@ +/** + * 📄 Table Modal + * 침수예방 엑셀 데이터 테이블 모달 컴포넌트 + * + * - 엑셀 파일 다운로드 및 특정 시트 파싱 기능 + * - 탭 기반 테이블 표시 (관리SHEET, 운영관리현황 점검결과) + * - 데이터 필터링 및 빈 행 제거 처리 + * - 로딩 오버레이 및 에러 핸들링 지원 + * - XLSX 라이브러리를 통한 엑셀 데이터 변환 + * - 테이블 헤더 및 데이터 동적 생성 + * + * 🔗 사용 API + * - 파일 다운로드: GET /attach-service/api/v1/download/{atflId} (attach-service) + */ 'use client' import { useState, useEffect } from 'react' import LoadingOverlay from '@/components/ui/LoadingBar' diff --git a/apps/sn/app/(with-base-layout)/oper/index.ts b/apps/sn/app/(with-base-layout)/oper/index.ts index b94e5a600..b04f724bc 100644 --- a/apps/sn/app/(with-base-layout)/oper/index.ts +++ b/apps/sn/app/(with-base-layout)/oper/index.ts @@ -1,3 +1,14 @@ +/** + * 📄 Oper Index Configuration + * 운영 관련 테이블 헤더 설정 파일 + * + * - 침수예방 및 노후 하수관로 테이블 헤더 정의 + * - 일련번호, 파일명, 년도, 분기, 등록 일자, 등록자 필드 포함 + * - 테이블 컴포넌트에서 재사용 가능한 헤더 구조 제공 + * - 데이터 표시 및 정렬을 위한 표준화된 헤더 포맷 + * - 운영 관리 페이지에서 공통으로 사용되는 헤더 리스트 + * - 동적 테이블 렌더링을 위한 ID와 타이틀 매핑 + */ export const tableHeadlist = [ { id: 'rowNumber', title: '일련번호' }, { id: 'sbmrgPrevntBizNm', title: '파일명' }, diff --git a/apps/sn/app/(with-base-layout)/oper/oldPp/headList.ts b/apps/sn/app/(with-base-layout)/oper/oldPp/headList.ts index 516302720..4efaf4fe9 100644 --- a/apps/sn/app/(with-base-layout)/oper/oldPp/headList.ts +++ b/apps/sn/app/(with-base-layout)/oper/oldPp/headList.ts @@ -1,3 +1,14 @@ +/** + * 📄 HeadList Configuration + * 오래된 하수관로 테이블 헤더 및 노드 설정 파일 + * + * - 테이블 헤더 및 노드 구조 정의 (oldPpTable2, oldPpTable6) + * - Zod 스키마를 통한 타입 검증 및 안전성 보장 + * - rowspan 및 colspan을 통한 복잡한 테이블 구조 지원 + * - 가시성 및 계층적 헤더 구성 (상위/하위 헤더) + * - 연도별 사업비 및 물량 데이터 헤더 관리 + * - 검토자 및 사업 정보 필드 포함 + */ import { z } from "zod"; export const oldPpHeadListType = z.array( diff --git a/apps/sn/app/(with-base-layout)/oper/oldPp/page.tsx b/apps/sn/app/(with-base-layout)/oper/oldPp/page.tsx index 8fc09b5f4..0a1ec566f 100644 --- a/apps/sn/app/(with-base-layout)/oper/oldPp/page.tsx +++ b/apps/sn/app/(with-base-layout)/oper/oldPp/page.tsx @@ -1,3 +1,21 @@ +/** + * ➡️ 경로 : 운영정보 - 노후 하수관로 정비사업 + * + * 📄 OldPp Page + * 노후 하수관로 정비사업 추진현황 페이지 컴포넌트 + * + * - 사업 정보 등록 현황 조회 및 테이블 표시 + * - 페이징 및 검색 기능 (등록기간/등록자/파일명 기반) + * - 파일 업로드 및 등록 기능 + * - 파일 다운로드 및 삭제 기능 + * - 엑셀 데이터 테이블 모달 표시 + * - 로딩 오버레이 및 에러 핸들링 지원 + * + * 🔗 사용 API + * - 사업 정보 조회: GET /v1/dcrpPpl (sewerage-service) + * - 파일 삭제: DELETE /attach-service/api/v1/atfl/attachments (attach-service) + * - 사업 정보 등록: POST /v1/dcrpPpl (sewerage-service) + */ 'use client' import { deleteData, postData, useCookieAuth } from '@/components/lib/api' import { searchData } from '@/components/lib/common/apiHelpers' diff --git a/apps/sn/app/(with-base-layout)/oper/oldPp/tableModal.tsx b/apps/sn/app/(with-base-layout)/oper/oldPp/tableModal.tsx index 169ae0895..3b94c20f0 100644 --- a/apps/sn/app/(with-base-layout)/oper/oldPp/tableModal.tsx +++ b/apps/sn/app/(with-base-layout)/oper/oldPp/tableModal.tsx @@ -1,3 +1,17 @@ +/** + * 📄 Table Modal + * 노후 하수관로 엑셀 데이터 테이블 모달 컴포넌트 + * + * - 엑셀 파일 다운로드 및 특정 시트 파싱 기능 + * - 탭 기반 테이블 표시 (row data, 정밀조사, 정비사업 등) + * - 데이터 필터링 및 빈 행 제거 처리 + * - 로딩 오버레이 및 에러 핸들링 지원 + * - XLSX 라이브러리를 통한 엑셀 데이터 변환 + * - 테이블 헤더 및 데이터 동적 생성 + * + * 🔗 사용 API + * - 파일 다운로드: GET /attach-service/api/v1/download/{atflId} (attach-service) + */ 'use client' import { useState, useEffect } from 'react' import LoadingOverlay from '@/components/ui/LoadingBar' diff --git a/apps/sn/app/(with-base-layout)/selectionValidation.tsx b/apps/sn/app/(with-base-layout)/selectionValidation.tsx index e5cdb77ad..ce80bdd67 100644 --- a/apps/sn/app/(with-base-layout)/selectionValidation.tsx +++ b/apps/sn/app/(with-base-layout)/selectionValidation.tsx @@ -1,7 +1,14 @@ /** + * 📄 Selection Validation Utility * 선택 항목 검증 유틸리티 + * + * - 선택 항목 검증 함수 (단일 및 다중 선택 지원) + * - 검증 결과 타입 정의 및 에러 메시지 생성 + * - 자주 사용되는 선택 항목 상수 제공 + * - 선택 항목 검증 전 로직 구현 + * - 사용자 친화적인 에러 메시지 출력 + * - 다양한 선택 타입 지원 (환경청, 시도, 시군구 등) */ - export interface ApiSelectOption { text: string; val: string; diff --git a/apps/sn/app/api/proxy/[...url]/route.ts b/apps/sn/app/api/proxy/[...url]/route.ts index 791562e27..cf6447b1a 100644 --- a/apps/sn/app/api/proxy/[...url]/route.ts +++ b/apps/sn/app/api/proxy/[...url]/route.ts @@ -1,3 +1,14 @@ +/** + * 📄 Proxy Route + * API 프록시 라우트 + * + * - 서버 API로의 요청 프록시 처리 + * - 쿠키 기반 인증 토큰 및 리프레시 토큰 관리 + * - POST 및 PUT 요청 핸들링 + * - 사용자 인증 정보 검증 및 응답 처리 + * - 에러 핸들링 및 상태 코드 반환 + * - 사이트 ID 및 헤더 설정 + */ import { cookies } from "next/headers"; import { NextResponse } from "next/server"; diff --git a/apps/sn/app/components/lib/api/attachment/attachment-interface.tsx b/apps/sn/app/components/lib/api/attachment/attachment-interface.tsx index 351e76fcb..abcc751d6 100644 --- a/apps/sn/app/components/lib/api/attachment/attachment-interface.tsx +++ b/apps/sn/app/components/lib/api/attachment/attachment-interface.tsx @@ -1,3 +1,14 @@ +/** + * 📄 Attachment Interface + * 첨부 파일 관련 인터페이스 정의 파일 + * + * - 첨부 파일 목록 및 상세 정보 타입 정의 + * - 페이지네이션 및 정렬 설정 인터페이스 제공 + * - 첨부 파일 검색 및 필터링 파라미터 타입 지정 + * - 첨부 파일 서비스 메소드 인터페이스 정의 + * - Axios 응답 타입을 활용한 타입 안전성 보장 + * - 첨부 파일 CRUD 작업을 위한 표준화된 타입 구조 + */ import type { AxiosResponse } from "axios"; interface SortConfig { diff --git a/apps/sn/app/components/lib/api/attachment/attachment-service.tsx b/apps/sn/app/components/lib/api/attachment/attachment-service.tsx index ee3fb6cd9..40e3ea639 100644 --- a/apps/sn/app/components/lib/api/attachment/attachment-service.tsx +++ b/apps/sn/app/components/lib/api/attachment/attachment-service.tsx @@ -1,3 +1,18 @@ +/** + * 📄 Attachment Service + * 첨부 파일 서비스 클래스 + * + * - 첨부 파일 목록 조회 및 페이지네이션 지원 + * - 첨부 파일 상세 정보 조회 기능 + * - 첨부 파일 삭제 기능 + * - Axios 기반 HTTP 요청 처리 + * - 타입 안전성 보장을 위한 인터페이스 활용 + * - 첨부 파일 CRUD 작업을 위한 표준화된 서비스 메소드 + * + * 🔗 사용 API + * - 첨부 파일 조회: GET /attach-service/api/v1/atfl/attachments (attach-service) + * - 첨부 파일 삭제: DELETE /attach-service/api/v1/atfl/attachments/atflCd (attach-service) + */ import type { AxiosResponse } from "axios"; import type { Attachment, diff --git a/apps/sn/app/components/lib/api/index.ts b/apps/sn/app/components/lib/api/index.ts index 0f19e8e94..f1b35a57a 100644 --- a/apps/sn/app/components/lib/api/index.ts +++ b/apps/sn/app/components/lib/api/index.ts @@ -1,3 +1,14 @@ +/** + * 📄 API Utility + * API 호출 유틸리티 파일 + * + * - 다양한 HTTP 메소드의 API 호출 함수 (GET, POST, PUT, DELETE) + * - 쿠키 기반 인증 토큰 관리 및 사용자 조회 + * - 특정 서비스 (DC, CMS, GeoServer) 호출 지원 + * - Axios 및 Fetch 기반 HTTP 요청 처리 + * - 타입 안전성 보장을 위한 인터페이스 활용 + * - 에러 핸들링 및 응답 처리 표준화 + */ import { useEffect, useState } from "react"; import axios from 'axios'; diff --git a/apps/sn/app/components/lib/common/apiHelpers.ts b/apps/sn/app/components/lib/common/apiHelpers.ts index 4963516f7..9fecf9cf8 100644 --- a/apps/sn/app/components/lib/common/apiHelpers.ts +++ b/apps/sn/app/components/lib/common/apiHelpers.ts @@ -1,3 +1,17 @@ +/** + * 📄 API Helpers + * API 호출 헬퍼 유틸리티 + * + * - 검색 데이터 조회 및 파라미터 처리 + * - 상위 코드로 하위 코드 조회 기능 + * - URL 파라미터 생성 및 필터링 + * - 데이터 페이징 및 총 개수 반환 + * - Axios 기반 HTTP 요청 처리 + * - 타입 안전성 보장을 위한 제네릭 활용 + * + * 🔗 사용 API + * - 상위 코드 조회: GET /cms-service/api/v1/code/cache/{upCd} (cms-service) + */ import { getData } from "../api"; export const searchData = async>(url: string, paramObj: T) => { diff --git a/apps/sn/app/components/lib/utils/date.ts b/apps/sn/app/components/lib/utils/date.ts index 30bea45a0..f6e7e55cd 100644 --- a/apps/sn/app/components/lib/utils/date.ts +++ b/apps/sn/app/components/lib/utils/date.ts @@ -1,3 +1,14 @@ +/** + * 📄 Date Utility + * 날짜 관련 유틸리티 파일 + * + * - 날짜 포맷팅 및 유효성 검사 함수 + * - 년도 및 분기 옵션 생성 기능 + * - 날짜 문자열 변환 및 포맷팅 + * - SelectBox 옵션으로의 날짜 변환 + * - 8자리 또는 6자리 날짜 형식 지원 + * - Date 객체 기반 날짜 조작 및 검증 + */ export const formatDate = (date: Date): string => { if (!date) return ''; const year = date.getFullYear(); diff --git a/apps/sn/app/components/lib/utils/excelToJson.ts b/apps/sn/app/components/lib/utils/excelToJson.ts index b760dae13..597d1e1d0 100644 --- a/apps/sn/app/components/lib/utils/excelToJson.ts +++ b/apps/sn/app/components/lib/utils/excelToJson.ts @@ -1,3 +1,14 @@ +/** + * 📄 Excel to JSON Utility + * 엑셀 데이터 JSON 변환 유틸리티 + * + * - 엑셀 파일 데이터 파싱 및 JSON 변환 기능 + * - 날짜 및 시간 포맷팅 및 유효성 검사 + * - Zod 스키마를 통한 데이터 타입 검증 및 안전성 보장 + * - 수용가-맨홀 매칭결과, 시간패턴, 유량자료 등 데이터 변환 + * - 강우자료 및 수용가 물사용량 데이터 처리 + * - 다양한 날짜 형식(M/D/YYYY, YYYY-MM-DD 등) 지원 + */ export const TEST_UUID = '2d4b151d-1828-41e0-91d9-4cd28ea1cc7e' import { z } from "zod"; diff --git a/apps/sn/app/components/lib/utils/fileDeleteUtil.tsx b/apps/sn/app/components/lib/utils/fileDeleteUtil.tsx index 4cadd12e8..ccc257f1f 100644 --- a/apps/sn/app/components/lib/utils/fileDeleteUtil.tsx +++ b/apps/sn/app/components/lib/utils/fileDeleteUtil.tsx @@ -1,3 +1,17 @@ +/** + * 📄 File Delete Utility + * 파일 삭제 유틸리티 + * + * - 첨부 파일 삭제 기능 (단일 파일 지원) + * - 쿠키 기반 인증 토큰 관리 및 사용자 조회 + * - Axios 기반 HTTP 요청 처리 + * - 타입 안전성 보장을 위한 인터페이스 활용 + * - 에러 핸들링 및 응답 처리 표준화 + * - 파일 삭제 진행 상태 콜백 지원 + * + * 🔗 사용 API + * - 첨부 파일 삭제: DELETE /attach-service/api/v1/atfl/attachments/atflCd (attach-service) + */ import { getCookie } from "@/shared/lib"; import { ENDPOINT } from "../api/attachment/attachment-service"; diff --git a/apps/sn/app/components/lib/utils/fileDownload.ts b/apps/sn/app/components/lib/utils/fileDownload.ts index 6f293cc36..97ff4b68b 100644 --- a/apps/sn/app/components/lib/utils/fileDownload.ts +++ b/apps/sn/app/components/lib/utils/fileDownload.ts @@ -1,3 +1,14 @@ +/** + * 📄 File Download Utility + * 파일 다운로드 유틸리티 + * + * - API를 통한 파일 다운로드 처리 + * - Blob 데이터를 임시 링크로 연결하여 다운로드 + * - 파일명 지정 및 메모리 해제 기능 + * - 에러 핸들링 및 사용자 친화적인 오류 메시지 + * - 다양한 파일 타입 지원 (엑셀, PDF 등) + * - Fetch 기반 HTTP 요청 처리 + */ const BASE_URL = process.env.NEXT_PUBLIC_SERVER_API_URL || ''; export const handleDownload = async (api: string, fileNm: string) => { diff --git a/apps/sn/app/components/lib/utils/fileUploadUtil.tsx b/apps/sn/app/components/lib/utils/fileUploadUtil.tsx index 3bfb35f00..fdbab1560 100644 --- a/apps/sn/app/components/lib/utils/fileUploadUtil.tsx +++ b/apps/sn/app/components/lib/utils/fileUploadUtil.tsx @@ -1,3 +1,14 @@ +/** + * 📄 File Upload Utility + * 파일 업로드 유틸리티 + * + * - TUS 프로토콜을 통한 파일 업로드 처리 + * - 쿠키 기반 인증 토큰 관리 및 사용자 조회 + * - Axios 기반 HTTP 요청 처리 + * - 업로드 진행률 및 성공/실패 콜백 지원 + * - 파일 메타데이터 설정 및 헤더 추가 + * - 대용량 파일 청크 업로드 지원 + */ import { Upload, type HttpResponse } from "tus-js-client"; import { getCookie, setCookie } from "@/shared/lib"; import { ENDPOINT } from "../api/attachment/attachment-service"; diff --git a/apps/sn/app/components/lib/utils/formatDisplayValue.tsx b/apps/sn/app/components/lib/utils/formatDisplayValue.tsx index 55cdc278f..d6a564467 100644 --- a/apps/sn/app/components/lib/utils/formatDisplayValue.tsx +++ b/apps/sn/app/components/lib/utils/formatDisplayValue.tsx @@ -1,3 +1,15 @@ +/** + * 📄 Format Display Value Utility + * 데이터 표시 포맷팅 유틸리티 + * + * - 날짜 포맷팅 (yyyymmdd -> yyyy년 m월 d일) + * - 연월 포맷팅 (yyyymm -> yyyy년 m월) + * - 날짜시간 포맷팅 (yyyy-mm-dd hh:mm:ss -> yyyy년 m월 d일 hh:mm) + * - 숫자 포맷팅 (천 단위 구분자 및 소수점 처리) + * - 데이터 객체 전체 포맷팅 및 단일 값 포맷팅 지원 + * - null/undefined 값 처리 및 기본값 설정 + * - 다양한 필드 타입별 조건부 포맷팅 로직 + */ import { dateFields, numberFields, yearMonthFields, dateTimeFields } from "../../../(map-layout)/map/components/common/table"; import { formatDateString } from "./date"; diff --git a/apps/sn/app/components/ui/EditableFormTable.tsx b/apps/sn/app/components/ui/EditableFormTable.tsx index 89fd8f005..315c4e978 100644 --- a/apps/sn/app/components/ui/EditableFormTable.tsx +++ b/apps/sn/app/components/ui/EditableFormTable.tsx @@ -1,3 +1,14 @@ +/** + * 📄 EditableFormTable Component + * 편집 가능한 폼 테이블 컴포넌트 + * + * - react-hook-form과 통합된 편집 가능한 테이블 렌더링 + * - 필드 배열 기반 동적 행 생성 및 관리 + * - 숫자 입력 검증 (소수점 및 유효 문자 제한) + * - 테이블 헤더 및 셀 스타일링 및 정렬 지원 + * - Controller를 통한 폼 상태 관리 및 유효성 검사 + * - 커스텀 입력 필드 클래스 및 속성 지원 + */ import { Input, Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@common/components/ui"; import type { UseFormReturn, FieldArrayWithId, Path, FieldValues } from "react-hook-form"; import { Controller } from "react-hook-form"; diff --git a/apps/sn/app/components/ui/LoadingBar/index.tsx b/apps/sn/app/components/ui/LoadingBar/index.tsx index 37991d1d2..12251365b 100644 --- a/apps/sn/app/components/ui/LoadingBar/index.tsx +++ b/apps/sn/app/components/ui/LoadingBar/index.tsx @@ -1,3 +1,13 @@ +/** + * 📄 Loading Overlay Component + * 로딩 오버레이 컴포넌트 + * + * - 로딩 상태에 따른 오버레이 표시 및 숨김 + * - 반투명 배경을 통한 사용자 인터랙션 차단 + * - 애니메이션 로딩 아이콘 표시 + * - 고정 위치 및 z-index를 통한 최상위 레이어 배치 + * - 조건부 렌더링을 통한 성능 최적화 + */ import React from 'react'; import { LoadingWithAnimation } from '@common/components/ui/loading'; diff --git a/apps/sn/app/components/ui/YearRangeSelectBox.tsx b/apps/sn/app/components/ui/YearRangeSelectBox.tsx index 8450a2b60..35f1dd6a9 100644 --- a/apps/sn/app/components/ui/YearRangeSelectBox.tsx +++ b/apps/sn/app/components/ui/YearRangeSelectBox.tsx @@ -1,3 +1,14 @@ +/** + * 📄 YearRangeSelectBox Component + * 년도 범위 선택 컴포넌트 + * + * - 시작년도와 종료년도 선택 기능 + * - 년도 범위 유효성 검증 (시작년도 <= 종료년도) + * - 동적 옵션 생성 및 필터링 + * - 전체 선택 옵션 제공 + * - 커스텀 라벨 및 스타일링 지원 + * - 콜백 함수를 통한 선택 값 전달 + */ import React from "react"; import { SelectBox } from '@common/business_components/ui' diff --git a/apps/sn/app/components/ui/contentLayout.tsx b/apps/sn/app/components/ui/contentLayout.tsx index de4406efd..bd13fc2c3 100644 --- a/apps/sn/app/components/ui/contentLayout.tsx +++ b/apps/sn/app/components/ui/contentLayout.tsx @@ -1,3 +1,14 @@ +/** + * 📄 Content Layout Component + * 콘텐츠 레이아웃 컴포넌트 + * + * - 제목 표시 및 콘텐츠 영역 제공 + * - 로딩 오버레이를 통한 사용자 피드백 + * - 공통 레이아웃 구조 적용 (MainDiv, Title, ContentsDiv) + * - 조건부 로딩 상태 렌더링 + * - 클래스명 기반 스타일링 지원 + * - 재사용 가능한 레이아웃 컴포넌트 + */ import { ContentsDiv, MainDiv, Title } from '@common/business_components/ui' import React, { type ReactNode } from 'react' import LoadingOverlay from './LoadingBar' diff --git a/apps/sn/app/components/ui/ctpvSggPrcsFcltSelectBox.tsx b/apps/sn/app/components/ui/ctpvSggPrcsFcltSelectBox.tsx index 1a800fb35..249dd00bf 100644 --- a/apps/sn/app/components/ui/ctpvSggPrcsFcltSelectBox.tsx +++ b/apps/sn/app/components/ui/ctpvSggPrcsFcltSelectBox.tsx @@ -1,3 +1,17 @@ +/** + * 📄 CtpvSggPrcsFcltSelectBox Component + * 시도/시군구/하수처리시설 선택 컴포넌트 + * + * - 시도 선택 및 시군구 필터링 기능 + * - 시군구 선택 시 하수처리시설 목록 조회 + * - 선택 값 변경 시 콜백 함수 호출 + * - 로딩 상태 관리 및 에러 핸들링 + * - Zustand를 통한 시도/시군구 데이터 관리 + * - CQL 필터를 통한 시설물 검색 조건 설정 + * + * 🔗 사용 API + * - 시설물 조회: GET /v1/fclts (sewerage-service) + */ import React, { useState, useEffect } from "react"; import { SelectBox } from '@common/business_components/ui' import { Label } from '@common/components'; diff --git a/apps/sn/app/components/ui/fileUploadForm.tsx b/apps/sn/app/components/ui/fileUploadForm.tsx index 1272488a1..e0489b2c7 100644 --- a/apps/sn/app/components/ui/fileUploadForm.tsx +++ b/apps/sn/app/components/ui/fileUploadForm.tsx @@ -1,3 +1,14 @@ +/** + * 📄 File Upload Form Component + * 파일 업로드 폼 컴포넌트 + * + * - 파일 선택 및 업로드 기능 + * - 년도 및 분기 선택 옵션 제공 + * - 파일 등록 및 콜백 처리 + * - 업로드 진행률 및 성공/실패 핸들링 + * - 파일 형식 검증 및 미리보기 지원 + * - TUS 프로토콜을 통한 대용량 파일 업로드 + */ "use client" import { FileUploader } from "@common/components"; import { Button } from '@common/components/ui'; diff --git a/apps/sn/app/components/ui/formSection.tsx b/apps/sn/app/components/ui/formSection.tsx index 4f33fbbe5..f1b7542a0 100644 --- a/apps/sn/app/components/ui/formSection.tsx +++ b/apps/sn/app/components/ui/formSection.tsx @@ -1,3 +1,14 @@ +/** + * 📄 Form Section Component + * 폼 섹션 컴포넌트 + * + * - 폼 필드 렌더링 및 제목 표시 + * - 필수 입력 필드 표시 (별표 표시) + * - FormField를 통한 폼 상태 관리 + * - 그리드 레이아웃을 통한 정렬 및 배치 + * - 재사용 가능한 폼 섹션 구조 제공 + * - react-hook-form 통합 지원 + */ import { FormField } from '@common/business_components/ui' import React, { type ReactElement } from 'react' diff --git a/apps/sn/app/components/ui/modal.tsx b/apps/sn/app/components/ui/modal.tsx index afc2b5c9a..dce0ee2b5 100644 --- a/apps/sn/app/components/ui/modal.tsx +++ b/apps/sn/app/components/ui/modal.tsx @@ -1,3 +1,14 @@ +/** + * 📄 Modal Component + * 모달 컴포넌트 + * + * - 모달 열기/닫기 상태 관리 + * - 제목 및 내용 표시 + * - 저장 및 닫기 버튼 지원 + * - 반응형 크기 조정 (최대/최소 너비 및 높이) + * - 오버레이 및 z-index를 통한 최상위 레이어 배치 + * - 접근성 지원 (aria-describedby) + */ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter, DialogOverlay } from '@common/components/ui' import React from 'react' diff --git a/apps/sn/app/components/ui/operFileUploadForm.tsx b/apps/sn/app/components/ui/operFileUploadForm.tsx index 3c37673d2..78a390aec 100644 --- a/apps/sn/app/components/ui/operFileUploadForm.tsx +++ b/apps/sn/app/components/ui/operFileUploadForm.tsx @@ -1,3 +1,14 @@ +/** + * 📄 Oper File Upload Form Component + * 운영 파일 업로드 폼 컴포넌트 + * + * - 년도 및 분기 선택 기능 + * - 파일 업로드 및 등록 처리 + * - 년도 변경 시 분기 옵션 동적 업데이트 + * - 파일 형식 검증 및 미리보기 지원 + * - 콜백 함수를 통한 업로드 결과 전달 + * - TUS 프로토콜을 통한 대용량 파일 업로드 + */ "use client" import { SelectBox } from '@common/business_components/ui'; import React, { useState, useEffect } from 'react' diff --git a/apps/sn/app/components/ui/toast.tsx b/apps/sn/app/components/ui/toast.tsx index b1e021651..06054a4aa 100644 --- a/apps/sn/app/components/ui/toast.tsx +++ b/apps/sn/app/components/ui/toast.tsx @@ -1,3 +1,14 @@ +/** + * 📄 Toast Component + * 토스트 알림 컴포넌트 + * + * - 확인/취소 버튼이 있는 토스트 표시 기능 + * - 메시지 표시 토스트 기능 + * - react-hot-toast 라이브러리 기반 구현 + * - 중복 토스트 방지 및 수동 닫기 지원 + * - 커스텀 스타일링 및 애니메이션 적용 + * - 사용자 상호작용을 위한 버튼 이벤트 핸들링 + */ import { Button } from "@common/components/ui"; import toast from "react-hot-toast"; diff --git a/apps/sn/app/components/ui/verticalTable.tsx b/apps/sn/app/components/ui/verticalTable.tsx index 14c61bec8..1ed617243 100644 --- a/apps/sn/app/components/ui/verticalTable.tsx +++ b/apps/sn/app/components/ui/verticalTable.tsx @@ -1,3 +1,14 @@ +/** + * 📄 VerticalTable Component + * 세로 방향 테이블 컴포넌트 + * + * - 세로 방향 테이블 렌더링 및 데이터 표시 + * - 편집 가능 필드 지원 (select, input 타입) + * - 입력 값 검증 및 에러 메시지 표시 + * - 페이지네이션 및 데이터 페이징 처리 + * - 두 개의 테이블 동시 표시 지원 + * - 폼 데이터 변경 콜백 및 저장 기능 + */ import UiPageNations from "@common/business_components/ui/table/uiPageNations"; import { Table, TableBody, TableCell, TableRow, Button } from "@common/components"; import { useEffect, useState } from "react"; diff --git a/apps/sn/app/layout.tsx b/apps/sn/app/layout.tsx index 066d9646b..9363fe185 100644 --- a/apps/sn/app/layout.tsx +++ b/apps/sn/app/layout.tsx @@ -1,3 +1,16 @@ +/** + * ➡️ 경로 : 모든 페이지 + * + * 📄 Root Layout + * 루트 레이아웃 컴포넌트 + * + * - 메타데이터 설정 (title, description, keywords, OpenGraph) + * - App 컴포넌트 렌더링 및 전체 앱 구조 정의 + * - SEO 및 소셜 미디어 공유를 위한 메타 태그 관리 + * - 디지털 하수관로 시스템의 기본 레이아웃 제공 + * - Next.js Metadata API를 통한 동적 메타데이터 설정 + * - 앱 전체의 공통 스타일 및 스크립트 적용 + */ import type { Metadata } from "next"; import { App } from "@/app"; diff --git a/apps/sn/app/page.tsx b/apps/sn/app/page.tsx index 27dd1de1c..c8ad51fdf 100644 --- a/apps/sn/app/page.tsx +++ b/apps/sn/app/page.tsx @@ -1,3 +1,19 @@ +/** + * ➡️ 경로 : 루트 (/) + * + * 📄 Home Page + * 홈 페이지 컴포넌트 + * + * - 쿠키 기반 인증 토큰 검증 및 자동 로그인 처리 + * - 로그인 성공 시 지도 페이지로 리다이렉트 + * - 기존 토큰 존재 시 바로 지도 페이지 이동 + * - 로그인 실패 시 에러 로깅 및 처리 + * - 사용자 세션 관리 및 초기 라우팅 제어 + * - Next.js useRouter를 통한 클라이언트 사이드 라우팅 + * + * 🔗 사용 API + * - 로그인: POST /v1/auth/login (auth-service) + */ "use client"; import { LoginApi } from "@/entities/auth"; import { useEffect } from "react"; diff --git a/apps/sn/app/store/index.ts b/apps/sn/app/store/index.ts index 28afbd570..6b42b7a81 100644 --- a/apps/sn/app/store/index.ts +++ b/apps/sn/app/store/index.ts @@ -1,3 +1,20 @@ +/** + * 📄 Store Index + * Zustand 스토어 인덱스 파일 + * + * - 시도 데이터 조회 및 커스텀 정렬 기능 + * - 시군구 데이터 조회 및 알파벳 정렬 기능 + * - 사업 구분 코드 조회 및 상태 관리 + * - 사업 유형 코드 조회 및 필터링 기능 + * - GeoServer WFS를 통한 지리 데이터 가져오기 + * - CMS 서비스를 통한 코드 데이터 가져오기 + * + * 🔗 사용 API + * - 시도 데이터 조회: GET /geoserver/hasudo/ows (GeoServer) + * - 시군구 데이터 조회: GET /geoserver/hasudo/ows (GeoServer) + * - 사업 구분 코드 조회: GET /api/v1/code/cache/BIZSECD (cms-service) + * - 사업 유형 코드 조회: GET /api/v1/code/cache/BIZTYCD (cms-service) + */ import { getCmsData } from "@/components/lib/api"; diff --git a/apps/sn/app/store/useReportTabStore.ts b/apps/sn/app/store/useReportTabStore.ts index 05f43ebc5..f0ac88002 100644 --- a/apps/sn/app/store/useReportTabStore.ts +++ b/apps/sn/app/store/useReportTabStore.ts @@ -1,3 +1,17 @@ +/** + * 📄 useReportTabStore + * 보고서 탭 Zustand 스토어 + * + * - 보고서 탭 모달 열기/닫기 상태 관리 + * - 보고서 파일 목록 및 트리 구조 상태 관리 + * - DC 트리 데이터 조회 및 캐싱 기능 + * - DC 파일 목록 조회 및 상태 업데이트 + * - Zustand를 통한 중앙 집중식 상태 관리 + * - 데이터 변경 감지 및 불필요한 재렌더링 방지 + * + * 🔗 사용 API + * - 보고서 분류 조회: GET /api/v1/dc/clsf (sewerage-service) + */ import useReportTab, { type Folder, type ReportDataFile } from '../(map-layout)/map/searchModal/useReportTab'; import { create } from 'zustand'; import { getDcData } from '@/components/lib/api'; diff --git a/apps/sn/app/store/useSearchModalStore.ts b/apps/sn/app/store/useSearchModalStore.ts index a4b99b420..4d8702a08 100644 --- a/apps/sn/app/store/useSearchModalStore.ts +++ b/apps/sn/app/store/useSearchModalStore.ts @@ -1,3 +1,15 @@ +/** + * 📄 useSearchModalStore + * 검색 모달 Zustand 스토어 + * + * - 검색 모달 열기/닫기 및 탭 전환 상태 관리 + * - 기본정보 및 운영정보 탭 데이터 필터링 및 조회 + * - 테이블 데이터 및 페이지네이션 상태 관리 + * - 지역(시도/시군구) 및 날짜 범위 필터링 기능 + * - 로딩 상태 및 리셋 플래그 관리 + * - Zustand를 통한 중앙 집중식 상태 관리 + * - 데이터 변경 감지 및 불필요한 재렌더링 방지 + */ import { create } from "zustand"; diff --git a/apps/sn/app/store/useStore.ts b/apps/sn/app/store/useStore.ts index 678090ed7..2e8932005 100644 --- a/apps/sn/app/store/useStore.ts +++ b/apps/sn/app/store/useStore.ts @@ -1,3 +1,14 @@ +/** + * 📄 useStore + * SN 앱 Zustand 스토어 + * + * - 시도 데이터 상태 관리 및 조회 기능 + * - 시군구 데이터 상태 관리 및 조회 기능 + * - 사업 구분 코드 상태 관리 및 조회 기능 + * - 사업 유형 코드 상태 관리 및 조회 기능 + * - Zustand를 통한 중앙 집중식 상태 관리 + * - 데이터 변경 감지 및 불필요한 재렌더링 방지 + */ import { create } from "zustand"; import { fetchCtpv, fetchSgg, fetchBIZ_SE_CD, fetchBIZ_TY_CD } from "./index"; import { type SelectDataType } from "@common/business_components"; From 77b4ba01b458e05cf4b3f025d78b17f4d94e0853 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Thu, 18 Sep 2025 14:09:55 +0900 Subject: [PATCH 28/46] =?UTF-8?q?=EB=AC=BC=EC=9E=AC=EC=9D=B4=EC=9A=A9=20?= =?UTF-8?q?=EC=A3=BC=EC=84=9D=20=EC=B6=94=EA=B0=80=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../matMng/coMat/coMatRvw/page.tsx | 13 +- .../ruseFcltMng/fcltReg/pbnstReg/page.tsx | 11 + .../ruseFcltMng/fcltReg/rainReg/page.tsx | 11 + .../ruseFcltMng/fcltReg/rswtReg/page.tsx | 9 + .../ruseFcltMng/fcltSttn/pbnstSttn/page.tsx | 19 +- .../ruseFcltMng/fcltReg/pbnstReg/index.tsx | 15 ++ .../ruseFcltMng/fcltReg/rainReg/index.tsx | 122 ++++++----- .../ruseFcltMng/fcltReg/rswtReg/index.tsx | 12 ++ .../ruseFcltMng/fcltSttn/pbnstSttn/index.tsx | 197 +++++++++++------- .../ui/form/coMat/conCostForm/conCostForm.tsx | 7 + .../ui/form/fcltReg/bdstReg/bdstReg.tsx | 29 ++- .../fcltReg/pbnstReg/buseReg/bugRegForm.tsx | 15 ++ .../fcltReg/pbnstReg/mngReg/mngRegForm.tsx | 12 ++ .../fcltReg/bdstRegModal/bdstRegModal.tsx | 83 ++++---- .../ruseMngTableForm/ruseMngTableForm.tsx | 15 ++ 15 files changed, 368 insertions(+), 202 deletions(-) diff --git a/apps/wr/app/(with-layout)/matMng/coMat/coMatRvw/page.tsx b/apps/wr/app/(with-layout)/matMng/coMat/coMatRvw/page.tsx index 8b3f5dfdb..472b8222f 100644 --- a/apps/wr/app/(with-layout)/matMng/coMat/coMatRvw/page.tsx +++ b/apps/wr/app/(with-layout)/matMng/coMat/coMatRvw/page.tsx @@ -40,6 +40,14 @@ import { useForm, useWatch } from "react-hook-form"; import toast, { Toaster } from "react-hot-toast"; import { z } from "zod"; + +/** + * 📄 CoMatRvw 수요매칭 검토 + * Next.js App Router (app/) 기반 페이지 컴포넌트 예시 + * + * - 대민에서 신청하는 수요처의 수요등록 정보를 운영담당자가 수요 매칭 검토를 진행한다. + * - 전체적으로 form을 만들어서 form안에 데이터를 넣고 api를 호출하여 저장한다. + */ export default function CoMatRvw() { const { auth, code, coRvw, coMatRvwInit, coMatRvwSearch, coMatRvwInqua } = useWrStore((state) => state); @@ -70,6 +78,9 @@ export default function CoMatRvw() { ); const [selectionVersion, setSelectionVersion] = useState(0); + + + //수요 매칭 검색 const getSearch = ( startYear: number, endYear: number, @@ -117,7 +128,7 @@ export default function CoMatRvw() { if (coMatRvwRes && coMatRvwRes.length > 0) { const data = coMatRvwRes?.map((item) => { let flag = ""; - + // 수요처의 매칭된 정보를 확인할수 있도록 한다. flag = getdmdMatFlag(item?.demandMatching?.splyFcltFlg || undefined); return { diff --git a/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/pbnstReg/page.tsx b/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/pbnstReg/page.tsx index b5b3f37f9..d5d0e9b33 100644 --- a/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/pbnstReg/page.tsx +++ b/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/pbnstReg/page.tsx @@ -35,6 +35,17 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { z } from "zod"; import { createDefaultPbnstItem } from "./utilsZod"; import { useTranslation } from "react-i18next"; +/** + * 재이용시설 등록 - 하수재이용 시설등록 + * + * - layout.tsx에 의해 공통 레이아웃이 적용됨 + * - with-layout 적용 + * - 하수처리시설에 하수재이용 시설을 등록 한다. + * - form으로 시설정보 및 차수별 정보의 컴포넌트 데이터를 관리한다 + * indexMng: 시설정보 + * indexBiz: 차수별 정보 + * 로 하수재이용 시설에 등록된 시설 및 차수별 정보를 관리한다. + * */ export default function PublicReuseFaciltyInsert() { const { diff --git a/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/rainReg/page.tsx b/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/rainReg/page.tsx index 629263c31..f3567210d 100644 --- a/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/rainReg/page.tsx +++ b/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/rainReg/page.tsx @@ -22,6 +22,17 @@ import { Button } from "@common/components"; import { useEffect, useRef, useState } from "react"; import { Toaster } from "react-hot-toast"; + + +/** + * 밧물이용시설 등록 + * 재이용시설 등록 - 빗물시설 등록 + * - layout.tsx에 의해 공통 레이아웃이 적용됨 + * - with-layout 적용 + * 왼쪽 테이블에는 건축물 리스트 / 오른쪽 폼에는 건축물에 해당하는 빗물이용시설 데이터가 보인다. + * 신규 등록 버튼을 눌러 건축물 정보부터 입력한다. + * + * */ export default function Home() { const { auth, diff --git a/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/rswtReg/page.tsx b/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/rswtReg/page.tsx index 619a3d0d7..27fe7456f 100644 --- a/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/rswtReg/page.tsx +++ b/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/rswtReg/page.tsx @@ -22,6 +22,15 @@ import { Button } from "@common/components"; import { useEffect, useRef, useState } from "react"; import { Toaster } from "react-hot-toast"; + +/** + * 중수도 시설 등록 + * 재이용시설 등록 - 중수도시설 등록 + * - layout.tsx에 의해 공통 레이아웃이 적용됨 + * - with-layout 적용 + * 왼쪽 테이블에는 건축물 리스트 / 오른쪽 폼에는 건축물에 해당하는 중수도시설 데이터가 보인다. + * 신규 등록 버튼을 눌러 건축물 정보부터 입력한다. + * */ export default function Home() { const { auth, diff --git a/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/pbnstSttn/page.tsx b/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/pbnstSttn/page.tsx index bbab4d9ce..ca0b04f31 100644 --- a/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/pbnstSttn/page.tsx +++ b/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/pbnstSttn/page.tsx @@ -24,6 +24,15 @@ import { useCallback, useEffect, useRef, useState } from "react"; import toast, { Toaster } from "react-hot-toast"; import { useTranslation } from "react-i18next"; +/** + * 하수재이용 시설 현황 + * 재이용시설 현황 - 하수재이용시설 현황 + * - layout.tsx에 의해 공통 레이아웃이 적용됨 + * - with-layout 적용 + * 하수처리시설. 하수재이용시설 , 하수재이용시설 실적에 대한 정보를 확인한다. + * 모달 : 테이블의 헤더를 원하는대로 조절해서 볼수 있다. + * 클릭시 해당 재이용ㅇ + * */ export default function PbnstSttn() { const { code, @@ -32,7 +41,7 @@ export default function PbnstSttn() { pbnSttnInit, getPbnStnDetail, getFlcts, - resetPbnstDetail + resetPbnstDetail, } = useWrStore((state) => state); const { pbnstSttnRes, fclts, pbnstSttnResCount } = pbnstSttn; @@ -50,7 +59,7 @@ export default function PbnstSttn() { }>({ isModal: false, data: {} as customPbnst }); const isDownloadTriggered = useRef(false); const [pbnRuseNm, setPbnRuseNm] = useState(""); - const { t } = useTranslation('base'); + const { t } = useTranslation("base"); const excelClick = useCallback(() => { isDownloadTriggered.current = true; pbnstSttnSearch( @@ -79,7 +88,6 @@ export default function PbnstSttn() { } }, [pbnstSttn.isInit]); useEffect(() => { - pbnSttnInit("1", "15", ref.current, searchYear, fclts); }, [fclts]); @@ -91,7 +99,6 @@ export default function PbnstSttn() { } }, [pbnstSttnRes]); - useEffect(() => { if (!isDownloadTriggered.current) { return; @@ -105,12 +112,11 @@ export default function PbnstSttn() { 3 ); } else { - toast.error(t('excelDownErrMsg')); + toast.error(t("excelDownErrMsg")); } isDownloadTriggered.current = false; }, [pbnstSttn.excelList]); - useEffect(() => { if (pbnstSttn.pbnstDetail.pbnstRuseFcltId) setPbnDetaileData({ @@ -211,7 +217,6 @@ export default function PbnstSttn() { ); setIsReset(false); }} - resetPageNo={isReset} > diff --git a/apps/wr/app/store/ruseFcltMng/fcltReg/pbnstReg/index.tsx b/apps/wr/app/store/ruseFcltMng/fcltReg/pbnstReg/index.tsx index e5a1f7da2..b1e0daf82 100644 --- a/apps/wr/app/store/ruseFcltMng/fcltReg/pbnstReg/index.tsx +++ b/apps/wr/app/store/ruseFcltMng/fcltReg/pbnstReg/index.tsx @@ -26,6 +26,12 @@ import { import type { TableUpperProps } from "@/app/store/common/type/header"; import toast from "react-hot-toast"; +/** + * 하수재이용시설 등록 (스토어) + * 재이용시설 등록 - 하수재이용시설 등록 + * 하수재이용시설 사용하는 api 및 타입 등을 관리한다. + * */ + const selectLabel: SelectDataType[] = [{ text: "test", val: "1" }]; const pubFacHeadList = pubFacHeadListExport; const pbnstMngUpHeadList = pbnstMngUpHeadListExport; @@ -167,6 +173,7 @@ export const writeRgtrAndMdfr = (data: customPbnst[]) => { }; export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => { return { + // 하수처리시설을 조회한다(운영실태) pubHasuInit: async (page: string, sggOrCity: string) => { try { const pbnstHasuRes = await hasuListFetch(page, sggOrCity); @@ -182,6 +189,7 @@ export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => { console.log(errorHasu); } }, + // 하수처리시설을 조회한다(운영실태) (처리시설명 포함) pubHasuSearch: async ( page: string, sggOrCity: string, @@ -201,6 +209,7 @@ export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => { console.log(errorHasu); } }, + // 하수재이용시설을 조회한다 pbnstRegClick: async (pubHasuRes: pubHasuType) => { try { const pbnstRes = await initFetch(pubHasuRes.bscFctCd); @@ -215,6 +224,7 @@ export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => { console.log(errorHasu); } }, + // 하수재이용시설을 등록한다. pbnstInsert: async (pbnstRes: customPbnst) => { try { const response = await postFectch(`/reuseFc/pubFc`, pbnstRes); @@ -238,6 +248,7 @@ export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => { console.error("Error updating pbnst:", error); } }, + // 하수재이용시설을 업데이트한다.(사업제외) 다르게하는 이유는 객체가 너무커서 분활 처리하려고 pbnstRuseFcltUpdate: async (ruseRes: customPbnst[]) => { try { await putFectch(`/reuseFc/pubFc`, ruseRes); @@ -245,6 +256,7 @@ export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => { console.error("Error pbnstRuseFcltUpdate:", error); } }, + // 하수재이용시설을 업데이트한다.(사업포함) 다르게하는 이유는 객체가 너무커서 분활 처리하려고 pbnstRuseBizUpdate: async (ruseRes: fcBizType[]) => { try { await putFectch(`/reuseFc/pubFcBiz`, ruseRes); @@ -252,6 +264,7 @@ export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => { console.error("Error pbnstRuseFcltUpdate:", error); } }, + // 파일삭제 (attach-service) fileDelete: async (atflCd: string) => { try { const response = await deleteFectch( @@ -271,6 +284,7 @@ export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => { console.error("Error deleting file:", error); } }, + // 파일다운로드 (attach-service) fileDownLoad: async (atflCd: string) => { try { await getFetch( @@ -282,6 +296,7 @@ export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => { throw new Error(`Error downloading file: ${error}`); } }, + //원수취수 팝업의 하수처리 시설 리스트 조회 getFcOrgwts: async (fcltPkList: string[], size: number) => { const fcOrgwtsNmList = await postFectch( `/prcsFclt/ruseInfo/1/${size}/A/0/0/1/SW`, diff --git a/apps/wr/app/store/ruseFcltMng/fcltReg/rainReg/index.tsx b/apps/wr/app/store/ruseFcltMng/fcltReg/rainReg/index.tsx index ff263783a..565909a57 100644 --- a/apps/wr/app/store/ruseFcltMng/fcltReg/rainReg/index.tsx +++ b/apps/wr/app/store/ruseFcltMng/fcltReg/rainReg/index.tsx @@ -1,15 +1,31 @@ import type { TableUpperProps } from "@/app/store/common/type/header"; -import { fetchType, getFetchWithCount, postFectch, putFectch } from "@/components/lib/api"; +import { + fetchType, + getFetchWithCount, + postFectch, + putFectch, +} from "@/components/lib/api"; import toast from "react-hot-toast"; import { z } from "zod"; import { makeMdfr, makeRstr } from "../bdstReg"; -import { baseReuseBuildingSchema, chgBuildingSchema, validationMessages } from "./type"; +import { + baseReuseBuildingSchema, + chgBuildingSchema, + validationMessages, +} from "./type"; +export const TEST_UUID = "2d4b151d-1828-41e0-91d9-4cd28ea1cc7e"; +export const rainRegSize = 15; -export const TEST_UUID = '2d4b151d-1828-41e0-91d9-4cd28ea1cc7e' -export const rainRegSize =15 +/** + * 밧물이용시설 등록 (스토어) + * 재이용시설 등록 - 빗물시설 등록 + * 빗물이용시설에서 사용하는 api 및 타입 등을 관리한다. + * */ const rainyObjSchema = z.object({ bdstReuseFcltFk: z.number().nullish(), - pntfColKnd: z.string().min(1, { message: validationMessages.requiredSelect("종류") }), + pntfColKnd: z + .string() + .min(1, { message: validationMessages.requiredSelect("종류") }), pntfColArea: z.number().nullish(), dtfcltCpct: z.number().default(0), filtrTrtmfctYn: z.string().default("Y"), @@ -21,10 +37,9 @@ const rainyObjSchema = z.object({ mdfr: z.string().nullish(), }); - const rainBuildingSchema = baseReuseBuildingSchema.extend({ rainyObj: rainyObjSchema, -}) +}); export const rainZod = z.object({ bdstInfoSn: z.number().optional(), @@ -34,23 +49,23 @@ export const rainZod = z.object({ bdstNm: z.string().default(""), frstArchPrmsnDt: z.date().default(() => new Date()), archChgPrmsnDt: z.coerce.date().nullish().default(null), - archArea: z.string().default(''), + archArea: z.string().default(""), archChgArea: z.number().default(0), rgtr: z.string().nullish(), mdfr: z.string().nullish(), reuseBuilding: z.array(rainBuildingSchema).default([]), - chgBuilding: z.array(chgBuildingSchema).default([]) -}) + chgBuilding: z.array(chgBuildingSchema).default([]), +}); export type chgBuilding = { - bdstInfoSn?: number | null, - archChgPrmsnDt?: Date, - archChgArea?: string, - bdstChgNm?: string + bdstInfoSn?: number | null; + archChgPrmsnDt?: Date; + archChgArea?: string; + bdstChgNm?: string; rgtr?: string | null; mdfr?: string | null; -} -export type customRainBdst = z.infer +}; +export type customRainBdst = z.infer; export const upHeadList: TableUpperProps[] = [ { id: "cityText", title: "시도" }, @@ -66,7 +81,6 @@ export const upHeadList: TableUpperProps[] = [ const rainRes: customRainBdst[] = []; - export const selectClass = "w-full h-full !text-xl"; export type rainFacState = { @@ -79,10 +93,9 @@ export type rainFacState = { type rainFacSActions = { initRain: (code: string | number) => void; getRainData: (pageNation: number, code: string | number) => void; - rainSearch: (txt: string, pageNation: number, code: string ) => void; + rainSearch: (txt: string, pageNation: number, code: string) => void; rainBdstReg: (data: customRainBdst, code: string | number) => void; rainBdstUpdate: (data: customRainBdst, code: string | number) => void; - }; export type rainFacType = rainFacState & rainFacSActions; @@ -96,16 +109,23 @@ export const rainFacStateExport: rainFacState = { }; const initFetch = async (code: string | number) => { - const rainRes = await getFetchWithCount(fetchType.WR, `/reuseFc/rainyInfoList/1/${rainRegSize}/${code}`); + const rainRes = await getFetchWithCount( + fetchType.WR, + `/reuseFc/rainyInfoList/1/${rainRegSize}/${code}` + ); return rainRes; }; export const rainFacActionsExport: (set: any) => rainFacSActions = ( set: any ) => { return { + // 빗물 이용시설 조회한다. getRainData: async (pageNation: number, code: string | number) => { try { - const rainRes = await getFetchWithCount(fetchType.WR, `/reuseFc/rainyInfoList/${pageNation}/${rainRegSize}/${code}`); + const rainRes = await getFetchWithCount( + fetchType.WR, + `/reuseFc/rainyInfoList/${pageNation}/${rainRegSize}/${code}` + ); // 여기서 상태 업데이트 return set((state: rainFacState) => ({ @@ -116,13 +136,11 @@ export const rainFacActionsExport: (set: any) => rainFacSActions = ( rainResCount: rainRes.count, }, })); - } catch (e) { - console.log(e) - + console.log(e); } }, - + // 빗물 이용시설 조회한다. initRain: async (code: string | number) => { try { // 파라이터 수정 통합관리자 =0, 시관리자=시코드, 시군구 관리자= 시군구 코드 를 세번째 파라미터로 지정 / 건축물 서치가 있을경우 4번째 파라미터로 던지기 즉 1/20/42(서울시)/영현빌딩 이런식으로) @@ -140,12 +158,16 @@ export const rainFacActionsExport: (set: any) => rainFacSActions = ( console.log("error", error); } }, - rainSearch: async (txt: string, pageNation: number ,code:string) => { + // 빗물 이용시설 조회한다. (건축물 이름을 포함하여) + rainSearch: async (txt: string, pageNation: number, code: string) => { try { - // const rainRes = await getFetch('wr' , `/reuseFc/rainyInfoList/${pageNation}/20/41` +(txt? `/${txt}`:'')) - const rainRes = await getFetchWithCount(fetchType.WR, `/reuseFc/rainyInfoList/${pageNation}/${rainRegSize}/${code}` + (txt ? `/${txt}` : '')) - console.log("rainRes", rainRes) + const rainRes = await getFetchWithCount( + fetchType.WR, + `/reuseFc/rainyInfoList/${pageNation}/${rainRegSize}/${code}` + + (txt ? `/${txt}` : "") + ); + console.log("rainRes", rainRes); set((state: rainFacState) => { return { rain: { @@ -154,27 +176,23 @@ export const rainFacActionsExport: (set: any) => rainFacSActions = ( rainResCount: rainRes.count, }, }; - }) - } - catch (erTxt) { - console.log("error", erTxt) + }); + } catch (erTxt) { + console.log("error", erTxt); } }, + // 빗물 이용시설을 등록한다. rainBdstReg: async (data: customRainBdst, code: string | number) => { try { - const test = await makeRstr(data); const res = await postFectch("/reuseFc/rainyInfo", test); if (res.status === 200) { if (data.chgBuilding.length > 0) { - - const chPK = res?.data?.bdstInfoSn - const makeCh = res.data.chgBuilding.map((item: chgBuilding) => - ({ + const chPK = res?.data?.bdstInfoSn; + const makeCh = res.data.chgBuilding.map((item: chgBuilding) => ({ ...item, bdstInfoSn: chPK, - }) - ); + })); const chch = await postFectch("/reuseFc/chgBuilding", makeCh); if (chch.status === 200) { @@ -203,25 +221,20 @@ export const rainFacActionsExport: (set: any) => rainFacSActions = ( } finally { } }, + // 빗물이용시설 시설에 대한 사항을 업데이트한다 rainBdstUpdate: async (data: customRainBdst, code: string | number) => { try { const chData = await makeMdfr(data); const res = await putFectch("/reuseFc/rainyInfo", chData); - console.log("res", res) - console.log("data", data) if (res.status === 200) { if (data.chgBuilding.length > 0) { const chPK = data?.bdstInfoSn; - console.log("chPK", chPK) - const makeCh = data.chgBuilding.map((item: chgBuilding) => - ({ + console.log("chPK", chPK); + const makeCh = data.chgBuilding.map((item: chgBuilding) => ({ ...item, bdstInfoSn: chPK, - }) - ); - console.log("makeCh", makeCh) + })); const chch = await postFectch("/reuseFc/chgBuilding", makeCh); - console.log("chch", chch) if (chch.status === 200) { toast.success("건축물 수정이 완료되었습니다."); @@ -235,10 +248,6 @@ export const rainFacActionsExport: (set: any) => rainFacSActions = ( toast.error("건축물 수정이 완료되었습니다."); } - // } - // toast.success("수정이 완료되었습니다."); - - // } const rainRes = await initFetch(code); set((state: rainFacState) => ({ ...state, @@ -253,7 +262,6 @@ export const rainFacActionsExport: (set: any) => rainFacSActions = ( toast.error("수정시 오류가 발생하였습니다."); } finally { } - } - } -} - + }, + }; +}; diff --git a/apps/wr/app/store/ruseFcltMng/fcltReg/rswtReg/index.tsx b/apps/wr/app/store/ruseFcltMng/fcltReg/rswtReg/index.tsx index d324f3332..7fa3595fc 100644 --- a/apps/wr/app/store/ruseFcltMng/fcltReg/rswtReg/index.tsx +++ b/apps/wr/app/store/ruseFcltMng/fcltReg/rswtReg/index.tsx @@ -8,6 +8,13 @@ import { makeMdfr, makeRstr } from "../bdstReg"; import { baseReuseBuildingSchema, chgBuildingSchema, validationMessages } from "../rainReg/type"; + + +/** + * 중수도시설 등록 (스토어) + * 재이용시설 등록 - 중수도시설 등록 + * 중수도시설에서 사용하는 api 및 타입 등을 관리한다. + * */ export const rswtRegSize =15; const rswtrObjSchema = z.object({ bdstRuseFcltSn: z.number().nullish(), @@ -87,6 +94,7 @@ export const rswtFacActionsExport: (set: any) => rswtFacSActions = ( set: any ) => { return { + // 중수도 시설을 조회한다 (시설이름 포함) rswtBdstSearch: async ( txt: string, pageNation: number, @@ -112,6 +120,7 @@ export const rswtFacActionsExport: (set: any) => rswtFacSActions = ( console.log("error", erTxt); } }, + // 중수도 시설을 조회한다 getRswtBdstData: async (pageNation: number, code: string | number) => { try { const rswtRes = await getFetchWithCount( @@ -132,6 +141,7 @@ export const rswtFacActionsExport: (set: any) => rswtFacSActions = ( console.log(e); } }, + // 중수도 시설을 조회한다 initRswt: async (code: string | number) => { try { const rswtRes = await initFetch(code); @@ -147,6 +157,7 @@ export const rswtFacActionsExport: (set: any) => rswtFacSActions = ( console.log(error); } }, + // 중수도 시설에 대한 사항을 업데이트한다 rswtBdstUpdate: async (data: customRswtBdst, code: string | number) => { try { const chData = await makeMdfr(data); @@ -189,6 +200,7 @@ export const rswtFacActionsExport: (set: any) => rswtFacSActions = ( } finally { } }, + // 중수도 시설을 등록한다. rswtBdstReg: async (data: customRswtBdst, code: string | number) => { try { const chData = await makeRstr(data); diff --git a/apps/wr/app/store/ruseFcltMng/fcltSttn/pbnstSttn/index.tsx b/apps/wr/app/store/ruseFcltMng/fcltSttn/pbnstSttn/index.tsx index f14101626..28743ab26 100644 --- a/apps/wr/app/store/ruseFcltMng/fcltSttn/pbnstSttn/index.tsx +++ b/apps/wr/app/store/ruseFcltMng/fcltSttn/pbnstSttn/index.tsx @@ -1,4 +1,7 @@ -import type { CommonTableProps, TableUpperProps } from "@/app/store/common/type/header"; +import type { + CommonTableProps, + TableUpperProps, +} from "@/app/store/common/type/header"; import type { FcPrfType } from "@/app/store/prfmncReg/pbnstPrfmncReg/type"; import { fetchType, getFetch, postFectch } from "@/components/lib/api"; import type { ReturnType } from "@common/business_components/ui"; @@ -8,9 +11,23 @@ import type { customPbnst, pubHasuType } from "../../fcltReg/pbnstReg/type"; import { controlHeadView } from "../rainSttn"; import type { sttnHeadListType } from "../rainSttn/headList"; import { excelPbnstSttnParsing } from "./excel"; -import { pbnSttHeadListExport, pbnstSttNodeListExport, ruseDmdHeadListExport, ruseFcltHeadListExport, ruseFcltNodeListExport, ruseGuranteeHeadListExport, rusePplHeadListExport, ruseSplyHeadListExport } from "./headList"; +import { + pbnSttHeadListExport, + pbnstSttNodeListExport, + ruseDmdHeadListExport, + ruseFcltHeadListExport, + ruseFcltNodeListExport, + ruseGuranteeHeadListExport, + rusePplHeadListExport, + ruseSplyHeadListExport, +} from "./headList"; import type { WaterReuseFacility } from "./type"; +/** + * 하수재이용시설 현황 (스토어) + * 하수재이용시설 등록 - 하수재이용시설 현황 + * 빗물이용시설에서 사용하는 api 및 타입 등을 관리한다. + * */ const pbnstSttHeadList = pbnSttHeadListExport; const pbnstSttNodeList = pbnstSttNodeListExport; @@ -21,15 +38,15 @@ export type pbnstSttnState = { pbnstSttHeadList: CommonTableProps[]; pbnstSttNodeList: CommonTableProps[]; pbnstDetail: customPbnst; - ruseFcltNodeList: TableUpperProps[] - ruseSplyHeadList: TableUpperProps[] - rusePplHeadList: TableUpperProps[] - ruseGuranteeHeadList: TableUpperProps[] - ruseDmdHeadList: TableUpperProps[] - ruseFcltHeadList: TableUpperProps[] + ruseFcltNodeList: TableUpperProps[]; + ruseSplyHeadList: TableUpperProps[]; + rusePplHeadList: TableUpperProps[]; + ruseGuranteeHeadList: TableUpperProps[]; + ruseDmdHeadList: TableUpperProps[]; + ruseFcltHeadList: TableUpperProps[]; pbnstSttnResCount: number; excelList: []; - fclts: string[] + fclts: string[]; isInit: boolean; }; }; @@ -97,49 +114,65 @@ export const hasuListFetch = async ( ) => { let url = ``; let filteredFclt = flcts; - const filterData = reurnValue.sigunValue !== '0' ? reurnValue.sigunValue : reurnValue.sidoValue + const filterData = + reurnValue.sigunValue !== "0" + ? reurnValue.sigunValue + : reurnValue.sidoValue; - - if(filterData !== '0') - filteredFclt= flcts.filter((fclt: string) => { - return filterData.length==2 ?fclt.slice(0, 2) === filterData:fclt.slice(0, 5) === filterData - }) + if (filterData !== "0") + filteredFclt = flcts.filter((fclt: string) => { + return filterData.length == 2 + ? fclt.slice(0, 2) === filterData + : fclt.slice(0, 5) === filterData; + }); if (reurnValue.partValue === "A") { url += `${reurnValue.partValue}/${ // reurnValue.sidoValue ? reurnValue.sidoValue : reurnValue.sigunValue - reurnValue.sigunValue !== '0' ? reurnValue.sigunValue : reurnValue.sidoValue - }/0/1/SW` - - if(filterData !== '0') - filteredFclt= flcts.filter((fclt: string) => { - return filterData.length==2 ?fclt.slice(0, 2) === filterData:fclt.slice(0, 5) === filterData - }) + reurnValue.sigunValue !== "0" + ? reurnValue.sigunValue + : reurnValue.sidoValue + }/0/1/SW`; + + if (filterData !== "0") + filteredFclt = flcts.filter((fclt: string) => { + return filterData.length == 2 + ? fclt.slice(0, 2) === filterData + : fclt.slice(0, 5) === filterData; + }); } else if (reurnValue.partValue === "R") { - url += `${reurnValue.partValue}/${reurnValue.regionValue - ? reurnValue.regionValue - : reurnValue.unitWaterShedValue - ? reurnValue.unitWaterShedValue - : reurnValue.middleRegionValue - }/0/1/SW` - } else if (reurnValue.partValue === 'G') { - url += `${reurnValue.envPartValue}/${reurnValue.sigunValue !== '0' ? reurnValue.sigunValue : reurnValue.sidoValue}/0/1/SW` - if(filterData !== '0') - filteredFclt= flcts.filter((fclt: string) => { - return filterData.length==2 ?fclt.slice(0, 2) === filterData:fclt.slice(0, 5) === filterData - }) - + url += `${reurnValue.partValue}/${ + reurnValue.regionValue + ? reurnValue.regionValue + : reurnValue.unitWaterShedValue + ? reurnValue.unitWaterShedValue + : reurnValue.middleRegionValue + }/0/1/SW`; + } else if (reurnValue.partValue === "G") { + url += `${reurnValue.envPartValue}/${reurnValue.sigunValue !== "0" ? reurnValue.sigunValue : reurnValue.sidoValue}/0/1/SW`; + if (filterData !== "0") + filteredFclt = flcts.filter((fclt: string) => { + return filterData.length == 2 + ? fclt.slice(0, 2) === filterData + : fclt.slice(0, 5) === filterData; + }); } else { - url += `A/0/0/1/SW` + url += `A/0/0/1/SW`; } if (searchNm && searchNm?.length > 0) { - url += "/" + searchNm + url += "/" + searchNm; } - const pbnList = await postFectch( `/prcsFclt/ruseInfo/1/${filteredFclt.length}/`+url, filteredFclt, fetchType.COMMON); + const pbnList = await postFectch( + `/prcsFclt/ruseInfo/1/${filteredFclt.length}/` + url, + filteredFclt, + fetchType.COMMON + ); - - const checkRuseFcltList = searchNm && searchNm?.length > 0?pbnList.data.map((item)=> item.bscFctCd ):filteredFclt + const checkRuseFcltList = + searchNm && searchNm?.length > 0 + ? pbnList.data.map((item) => item.bscFctCd) + : filteredFclt; const getRuseList = await postFectch( `/reuseFc/pubDetailList/${year}/${filterData}/${page}/${total}`, checkRuseFcltList, @@ -147,9 +180,8 @@ export const hasuListFetch = async ( ); const checkWrRegListRes = getRuseList.data; - - const data: WaterReuseFacility[] = checkWrRegListRes.map( - (item: FcPrfType) => { + const data: WaterReuseFacility[] = checkWrRegListRes + .map((item: FcPrfType) => { const findData = pbnList.data.find( (fclt: pubHasuType) => fclt.bscFctCd === item.pbnstRuseFcltId.substring(0, 11) @@ -182,57 +214,54 @@ export const hasuListFetch = async ( { total: 0, inUsage: 0, outUsage: 0 } ); return { - rvbsn: findData?.rvbsn || '-', - lgbsn: findData?.lgbsn || '-', - mdmbsn: findData?.mdmbsn || '-', - rgnNm: findData?.rgnNm || '-', - sido: findData?.sido || '-', - gugun: findData?.gugun || '-', - bscFctNm: findData?.bscFctNm || '-', - efflWqltStndrdNm: findData?.efflWqltStndrdNm || '-', + rvbsn: findData?.rvbsn || "-", + lgbsn: findData?.lgbsn || "-", + mdmbsn: findData?.mdmbsn || "-", + rgnNm: findData?.rgnNm || "-", + sido: findData?.sido || "-", + gugun: findData?.gugun || "-", + bscFctNm: findData?.bscFctNm || "-", + efflWqltStndrdNm: findData?.efflWqltStndrdNm || "-", fctCpc: Number(findData?.fctCpc) || 0, tel: findData?.tel ?? "-", - ruseUtztnFcltNm: item?.ruseUtztnFcltNm || '-', - fcltCpct: item?.fcltCpct || '-', - splyExtraCpct: item?.splyExtraCpct || '-', - ruseCpct: item?.ruseCpct || '-', - pbnstRuseFcltId: item.pbnstRuseFcltId || '-', + ruseUtztnFcltNm: item?.ruseUtztnFcltNm || "-", + fcltCpct: item?.fcltCpct || "-", + splyExtraCpct: item?.splyExtraCpct || "-", + ruseCpct: item?.ruseCpct || "-", + pbnstRuseFcltId: item.pbnstRuseFcltId || "-", usageTotal: usage?.total, inUsage: usage?.inUsage, outUsage: usage?.outUsage, - operMthd: item.operList[0]?.operMthd || '-', + operMthd: item.operList[0]?.operMthd || "-", rprtvBzenty: item.operList[0]?.rprtvBzenty, bgngDt: moment(item.operList[0]?.bgngDt).format("YYYY-MM-DD") ?? "", endDt: moment(item.operList[0]?.endDt).format("YYYY-MM-DD") ?? "", - searchNm: findData?.bscFctNm || '-', - searchPk: findData?.bscFctCd || '-', - prfList: item?.prfList ?? [] + searchNm: findData?.bscFctNm || "-", + searchPk: findData?.bscFctCd || "-", + prfList: item?.prfList ?? [], }; } + }) + .filter(Boolean); - } - ).filter(Boolean); - - - - - return {data:data, count:getRuseList.count}; + return { data: data, count: getRuseList.count }; }; export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = ( set: any ) => { return { + //등록된 하수재이용시설을 조회한다. getFlcts: async () => { - const fclts = await getFetch(fetchType.WR, '/reuseFc/pubFc') - + const fclts = await getFetch(fetchType.WR, "/reuseFc/pubFc"); return set((state: pbnstSttnState) => ({ pbnstSttn: { ...state.pbnstSttn, - fclts: fclts + fclts: fclts, }, })); }, + //테이블 헤드를 조정한다. pbnstChSttnHead: async ( headList: z.infer ): Promise => { @@ -246,6 +275,7 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = ( }, })); }, + //하수처리시설을 조회하여 하수재이용시설을 확인한다. pbnstSttnSearch: async ( isExcel: boolean, page: string, @@ -256,14 +286,13 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = ( fclts: string[] ) => { try { - const pbnstSttnRes = await hasuListFetch( page, total, reurnValue, searchNm, year, - fclts, + fclts ); // if (Number(total) > 9000) { @@ -279,14 +308,13 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = ( }; }); } else { - set((state: pbnstSttnState) => { return { ...state, pbnstSttn: { ...state.pbnstSttn, pbnstSttnRes: pbnstSttnRes.data, - pbnstSttnResCount: pbnstSttnRes.count + pbnstSttnResCount: pbnstSttnRes.count, // isInit: false, }, }; @@ -296,6 +324,7 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = ( console.log("error", erTxt); } }, + //하수처리시설을 조회하여 하수재이용시설을 조회한다. pbnSttnInit: async ( page: string, total: string, @@ -313,7 +342,6 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = ( fclts ); - set((state: pbnstSttnState) => { return { ...state, @@ -322,7 +350,7 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = ( pbnstSttnRes: pbnstSttnRes.data, pbnstSttnResCount: pbnstSttnRes.count, isInit: false, - pbnstDetail: {} as customPbnst + pbnstDetail: {} as customPbnst, }, }; }); @@ -330,22 +358,29 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = ( console.log("error", erTxt); } }, + // 팝업에 있는 데이터를 초기화한다. resetPbnstDetail: async () => { set((state: pbnstSttnState) => { return { ...state, pbnstSttn: { ...state.pbnstSttn, - pbnstDetail: {} as customPbnst + pbnstDetail: {} as customPbnst, }, }; - }) + }); }, + //하수처리시설을 조회하여 하수재이용시설을 조회한다. getPbnStnDetail: async (pbnstRuseFcltId: string) => { try { - let pbnstDetail = await getFetch("wr", `/reuseFc/pubFc/${pbnstRuseFcltId}`); + let pbnstDetail = await getFetch( + "wr", + `/reuseFc/pubFc/${pbnstRuseFcltId}` + ); if (pbnstDetail.length >= 0) { - pbnstDetail = pbnstDetail.find((item: customPbnst) => item.pbnstRuseFcltId === pbnstRuseFcltId) + pbnstDetail = pbnstDetail.find( + (item: customPbnst) => item.pbnstRuseFcltId === pbnstRuseFcltId + ); } set((state: pbnstSttnState) => { return { @@ -360,6 +395,7 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = ( console.log(errorHasu); } }, + //하수재이용시설 실적 현황 에서 사용하는 조회 pbnNmSearch: async ( page: string, total: string, @@ -369,7 +405,6 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = ( flcts: string[] ) => { try { - const pbnstSttnRes = await hasuListFetch( page, total, diff --git a/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx b/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx index 1ad310465..dcb0f0b65 100644 --- a/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx +++ b/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx @@ -26,6 +26,13 @@ import { Button, Checkbox, Input, Label } from "@common/components/ui"; import { useCallback, useEffect, useRef, useState } from "react"; import { type UseFormReturn } from "react-hook-form"; import toast from "react-hot-toast"; +/** + * ConCostForm + * 호출: (with-layout)/matMng/coMat/coMatRvw 에서 호출 + * + * 공사비를 산정하고 + * + * */ export default function ConCostForm({ form, diff --git a/apps/wr/components/ui/form/fcltReg/bdstReg/bdstReg.tsx b/apps/wr/components/ui/form/fcltReg/bdstReg/bdstReg.tsx index 91a2c5379..3e9f444f6 100644 --- a/apps/wr/components/ui/form/fcltReg/bdstReg/bdstReg.tsx +++ b/apps/wr/components/ui/form/fcltReg/bdstReg/bdstReg.tsx @@ -13,19 +13,18 @@ import { Input } from "@common/components"; import { useEffect, useState } from "react"; export default function BdstReg({ form, type }: { form: any; type?: string }) { - const { code, returnCodeText } = useWrStore((state) => { + const { code, auth, returnCodeText } = useWrStore((state) => { return state; }); - const { userSiSggCd } = code; + const { laeSeCd } = auth; + const [useCityCd, setUserCityCd] = useState([]); const [useSggCd, setUserSggCd] = useState([]); useEffect(() => { - if (userSiSggCd.length === 2 && code.cityCd.length > 0) { - const city = code.cityCd.filter((item) => item.val === userSiSggCd); - const sgg = code.sggCd.filter( - (item) => item.val.slice(0, 2) === userSiSggCd - ); + if (laeSeCd.length === 2 && code.cityCd.length > 0) { + const city = code.cityCd.filter((item) => item.val === laeSeCd); + const sgg = code.sggCd.filter((item) => item.val.slice(0, 2) === laeSeCd); sgg.unshift({ text: "전체", val: "0" }); setUserCityCd(city); // Fix: Ensure city is of type SelectDataType[] setUserSggCd(sgg); @@ -40,20 +39,20 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) { }); } } else if ( - userSiSggCd.length === 5 && + laeSeCd.length === 5 && code.cityCd.length > 0 && code.sggCd.length > 0 ) { const city = code.cityCd.filter( - (item) => item.val === userSiSggCd.slice(0, 2) + (item) => item.val === laeSeCd.slice(0, 2) ); - const sgg = code.sggCd.filter((item) => item.val === userSiSggCd); + const sgg = code.sggCd.filter((item) => item.val === laeSeCd); setUserSggCd(sgg); setUserCityCd(city); form.setValue("ctpvCd", Number(city[0]?.val)); form.setValue("sggCd", Number(sgg[0]?.val)); } - }, [form, userSiSggCd, code.cityCd, code.sggCd]); + }, [form, laeSeCd, code.cityCd, code.sggCd]); useEffect(() => { const subscription = form.form?.watch((value: any) => { @@ -63,10 +62,6 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) { return () => subscription?.unsubscribe(); }, [form.form]); - // useEffect(() => { - // console.log("form ", form.watch()); - // }, [form.formState]); - useEffect(() => { const bdstInfoSn = form.getValues("bdstInfoSn"); if (bdstInfoSn && bdstInfoSn > 0) form.setValue("daddr", bdstInfoSn); @@ -238,7 +233,9 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) { className={""} selectClass={selectClass} label={""} - selectArray={ type ==='RNB'?code.bdstUsgCd:code.rswtBdstType} + selectArray={ + type === "RNB" ? code.bdstUsgCd : code.rswtBdstType + } onSelectValue={(val) => { field.onChange(val); }} diff --git a/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm.tsx b/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm.tsx index 33dd417af..e669a85f7 100644 --- a/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm.tsx +++ b/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm.tsx @@ -43,6 +43,21 @@ import toast from "react-hot-toast"; import { useTranslation } from "react-i18next"; //import { useTranslation } from "react-i18next"; + + +/** + * 재이용시설 등록 - 하수재이용 시설등록 + * 재이용시설 등록 - 하수재이용 시설현황 + * - layout.tsx에 의해 공통 레이아웃이 적용됨 + * - with-layout 적용 + * - 하수처리시설에 하수재이용 시설 차수별 정보를 등록한다. + * - form으로 시설정보 및 차수별 정보의 컴포넌트 데이터를 관리한다 + * indexMng: 시설정보 + * indexBiz: 차수별 정보 + * 로 하수재이용 시설에 등록된 시설 및 차수별 정보를 관리한다. + * + * MngRegFormDetail 사업현황, 사업비, 재처리시설, 농축수관리, 폐수시설 정보 에 대한 데이터를 기입하도록 한다 + * */ export function PbnstBuseForm({ indexMng = 0, indexBiz = 0, diff --git a/apps/wr/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm.tsx b/apps/wr/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm.tsx index 5b4d93d94..334f9567d 100644 --- a/apps/wr/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm.tsx +++ b/apps/wr/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm.tsx @@ -35,6 +35,18 @@ export type FilesType = { file: File; }; + +/** + * 재이용시설 등록 - 하수재이용 시설등록 + * 재이용시설 등록 - 하수재이용 시설현황 + * - layout.tsx에 의해 공통 레이아웃이 적용됨 + * - with-layout 적용 + * - 하수처리시설에 하수재이용 시설 시설 정보를 등록한다. + * - form으로 시설정보 및 차수별 정보의 컴포넌트 데이터를 관리한다 + * indexMng: 시설정보 + * indexBiz: 차수별 정보 + * 로 하수재이용 시설에 등록된 시설 및 차수별 정보를 관리한다. + * */ export function PbnstMngForm({ form, formType, diff --git a/apps/wr/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal.tsx b/apps/wr/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal.tsx index a692553af..6947224e1 100644 --- a/apps/wr/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal.tsx +++ b/apps/wr/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal.tsx @@ -43,11 +43,11 @@ export function BdstReg({ setIsModal, isModal, }: BdstRegProps) { - const { code, bdst, findBdst } = useWrStore((state) => { + const { code, bdst, auth, findBdst } = useWrStore((state) => { return state; }); - const { userSiSggCd } = code; + const { laeSeCd } = auth; const [bdstTable, setBdstTable] = useState(); const [bdstForm, setBdstForm] = useState( @@ -88,29 +88,32 @@ export function BdstReg({ }, [bdst]); useEffect(() => { - if (userSiSggCd.length === 2 && code.cityCd.length > 0) { - const city = code.cityCd.filter((item) => item.val === userSiSggCd); - const sgg = code.sggCd.filter( - (item) => item.val.slice(0, 2) === userSiSggCd - ); + if (laeSeCd.length === 2 && code.cityCd.length > 0) { + const city = code.cityCd.filter((item) => item.val === laeSeCd); + const sgg = code.sggCd.filter((item) => item.val.slice(0, 2) === laeSeCd); sgg.unshift({ text: "전체", val: "0" }); setUserCityCd(city); // Fix: Ensure city is of type SelectDataType[] setObjSearch({ ...objSearch, city: String(city[0]?.val) }); setUserSggCd(sgg); } else if ( - userSiSggCd.length === 5 && + laeSeCd.length === 5 && code.cityCd.length > 0 && code.sggCd.length > 0 ) { const city = code.cityCd.filter( - (item) => item.val === userSiSggCd.slice(0, 2) + (item) => item.val === laeSeCd.slice(0, 2) ); setUserCityCd(city); - const sgg = code.sggCd.filter((item) => item.val === userSiSggCd); + const sgg = code.sggCd.filter((item) => item.val === laeSeCd); setUserSggCd(sgg); setObjSearch({ city: String(city[0]?.val), sgg: String(sgg[0]?.val) }); + } else if ( + laeSeCd === "0" && + code.cityCd.length > 0 && + code.sggCd.length > 0 + ) { } - }, [userSiSggCd, code.cityCd, code.sggCd]); + }, [laeSeCd, code.cityCd, code.sggCd]); const tableClick: (val: number | undefined, headId: string) => void = ( val @@ -197,35 +200,35 @@ export function BdstReg({
-
- {moType === "RNB" ? ( - - ) : moType === "RST" ? ( - { - if (setIsModal && open) { - setIsModal(open); - } - }} - > - ) : ( - { - if (setIsModal && open) { - setIsModal(open); - } - }} - > - )} -
+
+ {moType === "RNB" ? ( + + ) : moType === "RST" ? ( + { + if (setIsModal && open) { + setIsModal(open); + } + }} + > + ) : ( + { + if (setIsModal && open) { + setIsModal(open); + } + }} + > + )} +
diff --git a/apps/wr/components/ui/table/pbnstReg/ruseMngTableForm/ruseMngTableForm.tsx b/apps/wr/components/ui/table/pbnstReg/ruseMngTableForm/ruseMngTableForm.tsx index 0f919a603..fb243010e 100644 --- a/apps/wr/components/ui/table/pbnstReg/ruseMngTableForm/ruseMngTableForm.tsx +++ b/apps/wr/components/ui/table/pbnstReg/ruseMngTableForm/ruseMngTableForm.tsx @@ -39,6 +39,21 @@ type RuseMngTableProps = { readonly?: boolean; }; + +/** + * 재이용시설 등록 - 하수재이용 시설등록 + * 재이용시설 등록 - 하수재이용 시설현황 + * - layout.tsx에 의해 공통 레이아웃이 적용됨 + * - with-layout 적용 + * - 하수처리시설에 하수재이용 시설 시설 정보를 등록한다. + * - form으로 시설정보 및 차수별 정보의 컴포넌트 데이터를 관리한다 + * indexMng: 시설정보 + * indexBiz: 차수별 정보 + * 로 하수재이용 시설에 등록된 시설 및 차수별 정보를 관리한다. + * + * 시설정보및 차수별정보의 테이블 데이터를 만들고 생성한다. + * */ + const RuseMngTableForm = React.forwardRef( ( { From ac292172567f47db9487d7e3c84bf44501a1b444 Mon Sep 17 00:00:00 2001 From: swcho Date: Thu, 18 Sep 2025 14:16:43 +0900 Subject: [PATCH 29/46] =?UTF-8?q?refactor:=20console.log=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20=EB=B0=8F=20=EC=A0=95=EB=A6=AC=20(=ED=95=84?= =?UTF-8?q?=EC=9A=94=ED=95=9C=20=EB=A1=9C=EA=B7=B8=EB=8A=94=20=EC=9E=88?= =?UTF-8?q?=EC=9D=8C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map/components/popupComponent/MsSwagePpl.tsx | 3 --- .../map/components/popupComponent/Ssc.tsx | 13 ------------- .../components/popupComponent/chart/aplcnYms.ts | 8 -------- .../components/popupComponent/chart/infilChart.tsx | 1 - .../popupComponent/featureClickEventPopup.tsx | 10 ---------- .../(map-layout)/map/searchModal/useBasicTab.ts | 5 ----- .../map/searchModal/useOperationTab.ts | 1 - .../app/(with-base-layout)/ii/irsetting/page.tsx | 13 ------------- apps/sn/app/(with-base-layout)/ii/rdii/page.tsx | 10 ---------- .../app/(with-base-layout)/ii/rdiiResult/page.tsx | 11 ----------- apps/sn/app/(with-base-layout)/ii/result/page.tsx | 14 -------------- .../oper/floodPre/inputTableBody.tsx | 1 - .../app/(with-base-layout)/oper/floodPre/page.tsx | 1 - .../oper/floodPre/tableModal.tsx | 6 ------ .../sn/app/components/lib/utils/fileDeleteUtil.tsx | 2 -- .../app/components/ui/ctpvSggPrcsFcltSelectBox.tsx | 5 ----- apps/sn/app/components/ui/fileUploadForm.tsx | 2 -- apps/sn/app/store/index.ts | 2 -- apps/sn/middleware.ts | 12 +++--------- apps/sn/src/shared/store/data-store.ts | 1 - 20 files changed, 3 insertions(+), 118 deletions(-) diff --git a/apps/sn/app/(map-layout)/map/components/popupComponent/MsSwagePpl.tsx b/apps/sn/app/(map-layout)/map/components/popupComponent/MsSwagePpl.tsx index 04490f741..2c28be0d4 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/MsSwagePpl.tsx +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/MsSwagePpl.tsx @@ -88,9 +88,6 @@ const MsSwagePpl = ({ featureData, onSaveClick }: { featureData: any, onSaveClic setInspectionData(inspectionArr); setCleaningData(cleaningArr); setRepairData(repairArr); - console.log('inspectionArr', inspectionArr); - console.log('cleaningArr', cleaningArr); - console.log('repairArr', repairArr); }; fetchAll(); }, [featureData]); diff --git a/apps/sn/app/(map-layout)/map/components/popupComponent/Ssc.tsx b/apps/sn/app/(map-layout)/map/components/popupComponent/Ssc.tsx index 1b5a25aa3..3743410e7 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/Ssc.tsx +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/Ssc.tsx @@ -34,8 +34,6 @@ const Ssc = ({ featureData, isMainSsc, chmbrXcnts, chmbrYdnts, onSaveClick }: { const [isResetDetailPage, setIsResetDetailPage] = useState(true); const [isResetSelection, setIsResetSelection] = useState(false); - console.log('featureData', featureData); - // 강우, 측정 정보 API 호출 함수 const fetchRainMeasureData = async (chmbrXcnts: string, chmbrYdnts: string) => { setIsResetDetailPage(true); @@ -53,13 +51,8 @@ const Ssc = ({ featureData, isMainSsc, chmbrXcnts, chmbrYdnts, onSaveClick }: { size: '3', }); - console.log('queryParams', queryParams.toString()); - console.log(`추가 데이터 API 호출 시작: v1/onsemiro/getSwgRainsByGeomety?${queryParams.toString()}`); - const result = await getData(`v1/onsemiro/getSwgRainsByGeomety?${queryParams.toString()}`); - console.log('추가 데이터 API 호출 성공:', result); - const processedDataArray: any[] = result.content.map((data: any) => { // 🎯 formatDisplayData로 기본 포맷팅 적용 const formattedItem = formatDisplayData(data); @@ -92,12 +85,8 @@ const Ssc = ({ featureData, isMainSsc, chmbrXcnts, chmbrYdnts, onSaveClick }: { size: '3', }); - console.log(`SSC 추가 데이터 API 호출 시작: v1/onsemiro/swgRain/${adstDstrCd}/${manageNo}/mntrngs?${queryParams.toString()}`); - const result = await getData(`v1/onsemiro/swgRain/${adstDstrCd}/${manageNo}/mntrngs?${queryParams.toString()}`); - console.log('SSC 추가 데이터 API 호출 성공:', result); - // 각 아이템 전처리 const processedDataArray = result.content.map((data: any) => { // 기본 포맷팅 적용 @@ -107,8 +96,6 @@ const Ssc = ({ featureData, isMainSsc, chmbrXcnts, chmbrYdnts, onSaveClick }: { }; }); - console.log('processedDataArray', processedDataArray); - setMntrngsData(processedDataArray); setTotalDetailCount(result?.totalElements || 0); } catch (error) { diff --git a/apps/sn/app/(map-layout)/map/components/popupComponent/chart/aplcnYms.ts b/apps/sn/app/(map-layout)/map/components/popupComponent/chart/aplcnYms.ts index ae5c87298..aba8d2eed 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/chart/aplcnYms.ts +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/chart/aplcnYms.ts @@ -84,7 +84,6 @@ const selectAplcnYms = async(gubun:string) => { // 상수사용월 const queryString = ''; const result = await getData(`v1/${gubun}/aplcnYm${queryString ? `?${queryString}` : ''}`); if (result && result.length > 0) { - console.log("selectAplcnYms", result); return getOptionsAplcnYm(result); } } catch (error) { @@ -119,7 +118,6 @@ export const selectInftwtAnls = async(aplcnYm:string) => { // 침입수분석 const queryString = aplcnYm ? `aplcnYmFrom=${aplcnYm}&aplcnYmTo=${aplcnYm}` : ''; const result = await getData(`v1/inftwtAnls${queryString ? `?${queryString}` : ''}`); if (result && result.numberOfElements > 0) { - console.log("selectInftwtAnls", result.content); return result.content; } } catch (error) { @@ -141,7 +139,6 @@ export const selectInftwtAnlsRslt = async(inftwtAnlsSn:number, pplMngNo:string) } const result = await getData(`v1/inftwtAnlsRslt/ppl/${inftwtAnlsSn}/${pplMngNo}`); if (result && result.numberOfElements > 0) { - console.log("selectInftwtAnlsRslt", result.content); return result.content; } } catch (error) { @@ -163,7 +160,6 @@ export const selectOilq = async(inftwtAnlsSn:number, pplMngNo:string) => { // } const result = await getData(`v1/inftwtAnlsRslt/oilqPpl/${inftwtAnlsSn}/${pplMngNo}`); if (result && result.numberOfElements > 0) { - console.log("selectOilq", result.content); return result.content; } } catch (error) { @@ -178,7 +174,6 @@ export const selectPplInftwtQty = async(inftwtAnlsSn:number, pplMngNo:string) => } const result = await getData(`v1/inftwtAnlsRslt/pplInftwtQty/${inftwtAnlsSn}/${pplMngNo}`); if (result.length > 0) { - console.log("selectPplInftwtQty", result); return result[0].avg_day_flow; } else { return 0; // 데이터가 없을 경우 0 반환 @@ -196,7 +191,6 @@ export const selectPplRdiiQty = async(rainInfwtAnlsSn:number, pplMngNo:string) = } const result = await getData(`v1/rdiiAnlsRslt/pplRdiiQty/${rainInfwtAnlsSn}/${pplMngNo}`); if (result?.sustaintime > 0) { - console.log("selectPplRdiiQty", result); return result; } } catch (error) { @@ -218,7 +212,6 @@ export const selectRdiiAnls = async(aplcnYm:string) => { // 침입수분석 const queryString = aplcnYm ? `aplcnYmFrom=${aplcnYm}&aplcnYmTo=${aplcnYm}` : ''; const result = await getData(`v1/rdiiAnls${queryString ? `?${queryString}` : ''}`); if (result && result.numberOfElements > 0) { - console.log("selectRdiiAnls", result.content); return result.content; } } catch (error) { @@ -262,7 +255,6 @@ export const selectRainData = async(rainInfwtAnlsSn:number) => { // 강우데이 } const result = await getData(`v1/rdiiAnlsRslt/rainData/${rainInfwtAnlsSn}`); if (result && result.numberOfElements > 0) { - console.log("selectRainData", result.content); return result.content; } } catch (error) { diff --git a/apps/sn/app/(map-layout)/map/components/popupComponent/chart/infilChart.tsx b/apps/sn/app/(map-layout)/map/components/popupComponent/chart/infilChart.tsx index 542156c2a..9f481a2b9 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/chart/infilChart.tsx +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/chart/infilChart.tsx @@ -63,7 +63,6 @@ const InfilChart = ({ pplMngNo }: ModalOpenProp) => { // 상수사용월 변경 핸들러 const handleAplcnYmChange = async (val: string | number) => { const selectedValue = String(val); - console.log("선택된 상수사용월:", selectedValue); setSelectedAplcnYm(selectedValue); diff --git a/apps/sn/app/(map-layout)/map/components/popupComponent/featureClickEventPopup.tsx b/apps/sn/app/(map-layout)/map/components/popupComponent/featureClickEventPopup.tsx index b3db19b1c..a2138319f 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/featureClickEventPopup.tsx +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/featureClickEventPopup.tsx @@ -75,7 +75,6 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void, if (featureData['ol_uid']) { // Gis 레이어 클릭 이벤트 setIsClicked(true); - console.log('gis data', featureData.values_); const lyrTyNm = featureData.id_.split('.')[0]; switch (lyrTyNm) { @@ -139,7 +138,6 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void, else { // SearchModal 클릭 이벤트 setIsClicked(false); - console.log('SearchModal data', featureData); const lyrTyNm = featureData.lyrTypeNm; switch (lyrTyNm) { @@ -158,12 +156,10 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void, case 'tb_ms_swage_pmstn': { const drtwPumpCode = DRTW_SEWAGE_PUMP_USE_CODES.find(code => code.text === '오수펌프장'); if (drtwPumpCode && featureData.usgCd.trim() === drtwPumpCode.val) { - console.log('오수펌프장'); setIsDrtwSewagePump(false); setHeadlist(ExclnSewagePumpCol2) } else { - console.log('빗물펌프장'); setIsDrtwSewagePump(true); setHeadlist(DrtwSewagePumpCol2) } @@ -299,9 +295,6 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void, const result = await getData(apiEndpoint); if (result) { - console.log('API 데이터 로드 성공:', result); - - // ✅ codeMapper 사용하여 API 결과도 변환 const processedApiData = codeMapper({ layerName: selectedLayerName, data: { ...result, ...tableData } @@ -381,12 +374,9 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void, bodyData.prrtymngYn = 'N'; } } - console.log('bodyData', bodyData); - console.log('apiEndpoint', apiEndpoint); try { result = await postData(apiEndpoint, bodyData); - console.log('result', result); if (result) { alert('저장되었습니다'); diff --git a/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts b/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts index 6dd239c59..3c7c9409d 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts +++ b/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts @@ -66,11 +66,6 @@ export default function useBasicTab() { if (cqlFilters.length > 0) queryParams.append('cqlFiter', cqlFilters.join(' and ')); const res = await getData(`v1/fclts?${queryParams.toString()}`); - // const res = await axios.get(`${API_URL}/v1/fclts?${queryParams.toString()}`); - console.log('fetch res', res); - console.log('fetch res.data', res.data); - console.log('fetch res.count', res.count); - console.log('fetch res.length', res.length); // 🎯 각 아이템을 개별적으로 포맷팅하면서 일련번호 추가 const dataWithRowNumber = (res.data || []).map((item: any, index: number) => { diff --git a/apps/sn/app/(map-layout)/map/searchModal/useOperationTab.ts b/apps/sn/app/(map-layout)/map/searchModal/useOperationTab.ts index ef1464c49..8e1c35a91 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/useOperationTab.ts +++ b/apps/sn/app/(map-layout)/map/searchModal/useOperationTab.ts @@ -368,7 +368,6 @@ export default function useOperationTab() { }; const res = await getData(`v1/bizInfo/fclts?${new URLSearchParams(RequestDTO).toString()}`); - console.log('res', res); // 헤더 매핑 정의 const headerMapping: { [key: string]: string } = { diff --git a/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx b/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx index 88a7282e9..1074c3bc9 100644 --- a/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx @@ -146,15 +146,12 @@ const IrSetting = () => { }; return newData; }); - console.log(`Page: File data received for form index ${index}`, { fileName: selectedFile?.name, cd, id }); }; const registFile = async (analysisData: any) => { setIsLoadingResult(true); - console.log("Submitting combined analysis data to backend:", analysisData); const data = await postMutiPart('v1/inftwtAnls/savewithfile', analysisData); - console.log("Response from backend:", data); if (data) { setIsLoadingResult(false); alert("분석 데이터가 성공적으로 제출되었습니다."); @@ -167,7 +164,6 @@ const IrSetting = () => { // 침입수 분석 실행 버튼 클릭 핸들러 const handleAnalysisClick = async () => { - console.log('분석 시작'); setIsLoadingResult(true); // 로딩 상태 시작 // 기본 선택 항목들 검증 (환경청, 시도, 시군구, 하수처리장) @@ -181,19 +177,12 @@ const IrSetting = () => { return; } - console.log(uploadedFilesData); const file1 = uploadedFilesData[0]; // 오수관망도 const file2 = uploadedFilesData[1]; // 수용가-맨홀 매칭결과 const file3 = uploadedFilesData[2]; // 오수량 시간패턴 const file4 = uploadedFilesData[3]; // 유량자료 const file5 = uploadedFilesData[4]; // 수용가 상수사용량 - console.log("오수관망도 정보:", file1?.file); - console.log("수용가-맨홀 매칭결과 정보:", file2); - console.log("오수량 시간패턴 정보:", file3); - console.log("유량자료 정보:", file4); - console.log("수용가 상수사용량 정보:", file5); - // 모든 필수 파일이 선택되었는지 확인 (UploadedFileInfo 객체와 그 안의 file 객체 모두 확인) // 유량자료는 선택값 if (!file1?.file || !file2?.file || !file3?.file) { @@ -343,8 +332,6 @@ const IrSetting = () => { tbSnRcptrInfo: rcptrInfoData, // 수용가 상수사용량 (없을 수 있음) }; - console.log("통합 분석 데이터 (JSON):", jsonData); - const jsonBlob = new Blob([JSON.stringify(jsonData)], { type: 'application/json' }); diff --git a/apps/sn/app/(with-base-layout)/ii/rdii/page.tsx b/apps/sn/app/(with-base-layout)/ii/rdii/page.tsx index 30bf0a92e..10b630393 100644 --- a/apps/sn/app/(with-base-layout)/ii/rdii/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/rdii/page.tsx @@ -170,14 +170,11 @@ export default function RTKForm() { }; return newData; }); - console.log(`Page: File data received for form index ${index}`, { fileName: selectedFile?.name, cd, id }); }; const registFile = async (analysisData: any) => { setIsLoadingResult(true); - console.log("Submitting combined analysis data to backend", analysisData); const data = await postMutiPart('v1/rdiiAnls/savewithfile', analysisData); - console.log("Response from backend:", data); if (data) { setIsLoadingResult(false); alert("분석 데이터가 성공적으로 제출되었습니다."); @@ -204,15 +201,10 @@ export default function RTKForm() { } const formData = form.getValues(); - console.log('uploadedFilesData', uploadedFilesData); const file1 = uploadedFilesData[0]; // 오수관망도 const file2 = uploadedFilesData[1]; // 수용가-맨홀 매칭결과 const file3 = uploadedFilesData[2]; // 강우자료 - console.log("오수관망도 정보:", file1?.file); - console.log("수용가-맨홀 매칭결과 정보:", file2); - console.log("강우자료:", file3); - // 모든 필수 파일이 선택되었는지 확인 if (!file1?.file || !file2?.file || !file3?.file) { setIsLoadingResult(false); @@ -368,8 +360,6 @@ export default function RTKForm() { tbSnRainData: rainData, // 강우자료 }; - console.log("통합 분석 데이터 (JSON):", jsonData); - const jsonBlob = new Blob([JSON.stringify(jsonData)], { type: 'application/json' }); diff --git a/apps/sn/app/(with-base-layout)/ii/rdiiResult/page.tsx b/apps/sn/app/(with-base-layout)/ii/rdiiResult/page.tsx index 6696cab4f..cc5e1e47b 100644 --- a/apps/sn/app/(with-base-layout)/ii/rdiiResult/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/rdiiResult/page.tsx @@ -126,7 +126,6 @@ const Result = () => { setResetSelection(true); const formValues = form.getValues(); // react-hook-form에서 현재 값 가져오기 - console.log("formValues", formValues); const inftwtAnlsSearchDto = { aplcnYmFrom: formValues.aplcnYmFrom?.trim() ? formValues.aplcnYmFrom : null, @@ -137,8 +136,6 @@ const Result = () => { auth: AUTH, }; - console.log("Search DTO:", inftwtAnlsSearchDto); - const queryParams = new URLSearchParams({ page: `${curPage - 1}`, size: '10', @@ -151,7 +148,6 @@ const Result = () => { }); const queryString = queryParams.toString(); - console.log("API: ", `v1/rdiiAnls${queryString ? `?${queryString}` : ''}`); try { const data = await getData(`v1/rdiiAnls${queryString ? `?${queryString}` : ''}`); @@ -177,8 +173,6 @@ const Result = () => { setTableData(dataWithRowNumber); setTotalData(dataWithRowNumber.length); - console.log("response:", data); - console.log("response data:", dataWithRowNumber); setIsLoadingResult(false); } catch (error) { setIsLoadingResult(false); @@ -195,14 +189,12 @@ const Result = () => { const handleCellClick = (index: number | undefined, headId: string) => { if (index !== undefined && tableData[index]) { setSelectedRowData(tableData[index]); - console.log("Selected row data:", tableData[index]); } }; // Excel 다운로드 핸들러 추가 const handleExcelDownload = async () => { setIsLoadingResult(true); - console.log("Selected row data for download:", selectedRowData); if (!selectedRowData || selectedRowData.rainInfwtAnlsSn === undefined) { setIsLoadingResult(false); alert('다운로드할 데이터를 선택해주세요.'); @@ -244,7 +236,6 @@ const Result = () => { // 파일 삭제 핸들러 추가 const handleFileDelete = async () => { setIsLoadingResult(true); - console.log("Selected row data for deletion:", selectedRowData); if (!selectedRowData || selectedRowData.rainInfwtAnlsSn === undefined) { alert('삭제할 파일을 선택해주세요.'); return; @@ -265,8 +256,6 @@ const Result = () => { handleDeleteSuccess: (response) => console.log("파일 삭제 성공:", response), handleDeleteError: (error) => console.error("파일 삭제 실패:", error), }); - console.log("File delete response1:", response1); - console.log("File delete response2:", response2); // 테이블 선택 상태 초기화 트리거 setResetSelection(true); diff --git a/apps/sn/app/(with-base-layout)/ii/result/page.tsx b/apps/sn/app/(with-base-layout)/ii/result/page.tsx index ca0be0221..23b6d1912 100644 --- a/apps/sn/app/(with-base-layout)/ii/result/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/result/page.tsx @@ -120,7 +120,6 @@ const Result = () => { setIsLoadingResult(true); setResetSelection(true); const formValues = form.getValues(); // react-hook-form에서 현재 값 가져오기 - console.log("formValues", formValues); let inftwtAnlsSearchDto = { "aplcnYmFrom": formValues.aplcnYmFrom && formValues.aplcnYmFrom !== '' ? formValues.aplcnYmFrom : null, @@ -131,8 +130,6 @@ const Result = () => { "auth": AUTH, }; - console.log("Search DTO:", inftwtAnlsSearchDto); - const queryParams = new URLSearchParams({ page: `${curPage - 1}`, size: '10', @@ -144,11 +141,8 @@ const Result = () => { } }); const queryString = queryParams.toString(); - - console.log("API: ", `v1/inftwtAnls${queryString ? `?${queryString}` : ''}`); try { const data = await getData(`v1/inftwtAnls${queryString ? `?${queryString}` : ''}`); - console.log("API response:", data); // 🎯 각 아이템을 개별적으로 포맷팅하면서 일련번호 추가 const dataWithRowNumber = (data.content || []).map((item: any, index: number) => { @@ -172,8 +166,6 @@ const Result = () => { setTableData(dataWithRowNumber); setTotalData(data?.totalElements || 0); // totalElements가 없을 경우 0으로 설정 - console.log("response:", data); - console.log("response data:", dataWithRowNumber); setIsLoadingResult(false); } catch (error) { setIsLoadingResult(false); @@ -190,14 +182,12 @@ const Result = () => { const handleCellClick = (index: number | undefined, headId: string) => { if (index !== undefined && tableData[index]) { setSelectedRowData(tableData[index]); - console.log("Selected row data:", tableData[index]); } }; // Excel 다운로드 핸들러 추가 const handleExcelDownload = async () => { setIsLoadingResult(true); - console.log("Selected row data for download:", selectedRowData); if (!selectedRowData || selectedRowData.inftwtAnlsSn === undefined) { setIsLoadingResult(false); alert('다운로드할 데이터를 선택해주세요.'); @@ -239,7 +229,6 @@ const Result = () => { // 파일 삭제 핸들러 추가 const handleFileDelete = async () => { setIsLoadingResult(true); - console.log("Selected row data for deletion:", selectedRowData); if (!selectedRowData || selectedRowData.inftwtAnlsSn === undefined) { setIsLoadingResult(false); alert('삭제할 파일을 선택해주세요.'); @@ -253,7 +242,6 @@ const Result = () => { try { // // 삭제 API 호출 - console.log("Deleting analysis result with inftwtAnlsSn:", selectedRowData.inftwtAnlsSn); const response1 = await deleteData(`v1/inftwtAnlsRslt/${selectedRowData.inftwtAnlsSn}`); const response2 = await deleteData(`v1/inftwtAnls/${selectedRowData.inftwtAnlsSn}`); // 첨부파일(inp파일) 삭제 API 호출 @@ -262,8 +250,6 @@ const Result = () => { handleDeleteSuccess: (response) => console.log("파일 삭제 성공:", response), handleDeleteError: (error) => console.error("파일 삭제 실패:", error), }); - console.log("File delete response1:", response1); - console.log("File delete response2:", response2); // 테이블 선택 상태 초기화 트리거 setResetSelection(true); diff --git a/apps/sn/app/(with-base-layout)/oper/floodPre/inputTableBody.tsx b/apps/sn/app/(with-base-layout)/oper/floodPre/inputTableBody.tsx index 550fcbd15..c064319a6 100644 --- a/apps/sn/app/(with-base-layout)/oper/floodPre/inputTableBody.tsx +++ b/apps/sn/app/(with-base-layout)/oper/floodPre/inputTableBody.tsx @@ -92,7 +92,6 @@ export const InputTableBody = ( return ( {headList.map((head, headIndex) => { - // console.log('head, head.id', head, head.id); const isTextColumn = head.id === "__EMPTY_3"; const textAlignClass = isTextColumn ? "text-center" diff --git a/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx b/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx index 8cd1aed7a..a029e9617 100644 --- a/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx +++ b/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx @@ -151,7 +151,6 @@ const Page = () => { sbmrgPrevntBizNm: fileName, rgtr: tokenManager.getToken(AUTH_USER_ID) || null } - console.log('request DTO', json); const data = await postData('v1/sbmrgPrevnt', json) if (data) { alert('파일이 등록되었습니다.'); diff --git a/apps/sn/app/(with-base-layout)/oper/floodPre/tableModal.tsx b/apps/sn/app/(with-base-layout)/oper/floodPre/tableModal.tsx index 3ef37d9ba..97bd24c3e 100644 --- a/apps/sn/app/(with-base-layout)/oper/floodPre/tableModal.tsx +++ b/apps/sn/app/(with-base-layout)/oper/floodPre/tableModal.tsx @@ -85,15 +85,12 @@ const TableModal: React.FC = ({ fileNm, atflId }) => { })); setManagementTableHeader(filteredManagementHeader); - console.log('managementTableHeader', filteredManagementHeader); const managementData = Array.isArray(jsonDataBySheet['관리SHEET']) ? jsonDataBySheet['관리SHEET'].slice(8) : []; - // console.log('변환 후:', excelToManagementData(managementData)); const filteredManagementData = filterEmptyRows(managementData); setManagementTableData(filteredManagementData); - console.log('managementTableData', filteredManagementData); // 운영관리현황 점검결과 const resultHeader = jsonDataBySheet['운영관리현황 점검결과']?.[2] || []; @@ -110,14 +107,12 @@ const TableModal: React.FC = ({ fileNm, atflId }) => { mergeCell: false }); setResultTableHeader(dynamicResultHeader); - console.log('resultTableHeader', dynamicResultHeader); const resultData = Array.isArray(jsonDataBySheet['운영관리현황 점검결과']) ? jsonDataBySheet['운영관리현황 점검결과'].slice(3) : []; const filteredResultData = filterEmptyRows(resultData); setResultTableData(filteredResultData); - console.log('resultTableData', filteredResultData); } catch (error) { console.error('파일 처리 중 오류 발생:', error); alert('파일 처리 중 오류가 발생했습니다.'); @@ -188,7 +183,6 @@ const TableModal: React.FC = ({ fileNm, atflId }) => { if (sheetName) { const sheet = wb.Sheets[sheetName]; if (sheet) { - console.log(`Found sheet: "${sheetName}"`); const jsonData = XLSX.utils.sheet_to_json(sheet, { range: headerNum, raw: false }); result[targetSheetName] = jsonData; } diff --git a/apps/sn/app/components/lib/utils/fileDeleteUtil.tsx b/apps/sn/app/components/lib/utils/fileDeleteUtil.tsx index ccc257f1f..6878a3a14 100644 --- a/apps/sn/app/components/lib/utils/fileDeleteUtil.tsx +++ b/apps/sn/app/components/lib/utils/fileDeleteUtil.tsx @@ -54,7 +54,6 @@ export const handleDelete = async ( } options?.handleDeleteSuccess?.(response); - console.log("파일 삭제 완료:", atflCd); } catch (error) { const deleteError = error instanceof Error @@ -109,7 +108,6 @@ export const handleDelete = async ( // } // options?.handleDeleteSuccess?.(new Response()); -// console.log("모든 파일 삭제 완료:", atflCds); // } catch (error) { // const deleteError = error instanceof Error diff --git a/apps/sn/app/components/ui/ctpvSggPrcsFcltSelectBox.tsx b/apps/sn/app/components/ui/ctpvSggPrcsFcltSelectBox.tsx index 249dd00bf..32b69138b 100644 --- a/apps/sn/app/components/ui/ctpvSggPrcsFcltSelectBox.tsx +++ b/apps/sn/app/components/ui/ctpvSggPrcsFcltSelectBox.tsx @@ -77,7 +77,6 @@ export function CtpvSggPrcsFcltSelectBox({ const fetchData = async () => { if (!sggName) { - console.log("BaseLayout: Skipping fetchData because sigungu.val is:", sggName); setPrcsFcltOptions([]); if (setIsLoading) setIsLoading(false); return; @@ -96,12 +95,8 @@ export function CtpvSggPrcsFcltSelectBox({ if (sggName) cqlFiltersFacility.push(`sgg_nm ILIKE '%${sggName}%'`); if (cqlFiltersFacility.length > 0) queryParamsFacility.append('cqlFiter', cqlFiltersFacility.join(' and ')); - console.log("BaseLayout API URL for Facilities:", `v1/fclts?${queryParamsFacility.toString()}`); - const facilityRes = await getData(`v1/fclts?${queryParamsFacility.toString()}`); - console.log('facilityRes.data', facilityRes.data); - const facilities = (facilityRes.data || []) .map((item: any) => ({ text: item.swtrmtFcltNm, diff --git a/apps/sn/app/components/ui/fileUploadForm.tsx b/apps/sn/app/components/ui/fileUploadForm.tsx index e0489b2c7..fc1e2b779 100644 --- a/apps/sn/app/components/ui/fileUploadForm.tsx +++ b/apps/sn/app/components/ui/fileUploadForm.tsx @@ -53,7 +53,6 @@ const FileUploadForm = ({ const [selectedQuarter, setSelectedQuarter] = useState(quater[0]?.val || ''); function registFile() { - console.log(files?.[0]?.name) if (!currentFile) { alert('파일을 선택해주세요.'); return; @@ -99,7 +98,6 @@ const FileUploadForm = ({ } const { atflCd: newAtflCd, atflId: newAtflId } = JSON.parse(fileInfo) ?? {}; - console.log(`FileUploadForm (idx: ${fileIdx ?? 'N/A'}) - Upload completed:`, newAtflCd, newAtflId); // 내부 상태도 업데이트 (다른 용도로 사용할 수 있음) setInternalAtflCd(newAtflCd); diff --git a/apps/sn/app/store/index.ts b/apps/sn/app/store/index.ts index 6b42b7a81..1241bf6f9 100644 --- a/apps/sn/app/store/index.ts +++ b/apps/sn/app/store/index.ts @@ -72,8 +72,6 @@ export const fetchCtpv = async (set: (state: any) => void) => { // 둘 다 커스텀 순서에 없으면 기본 알파벳 순서 return a.text.localeCompare(b.text, 'ko'); }); - - console.log('시도 데이터', list); set({ ctpv: list }); }; diff --git a/apps/sn/middleware.ts b/apps/sn/middleware.ts index 6ddf29f9f..1a29b839a 100644 --- a/apps/sn/middleware.ts +++ b/apps/sn/middleware.ts @@ -80,9 +80,7 @@ export function middleware(req: NextRequest) { if (token) requestHeaders.set(CLAIM_NAME, token); if (userId) requestHeaders.set(AUTH_USER_ID, userId); - console.log( - `[Middleware] Rewriting from '/attach-service' path to: ${newUrl}`, - ); + console.log(`[Middleware] Rewriting from '/attach-service' path to: ${newUrl}`); return NextResponse.rewrite(new URL(newUrl), { headers: requestHeaders, }); @@ -92,9 +90,7 @@ export function middleware(req: NextRequest) { const requestHeaders = new Headers(req.headers); const newUrl = `${SERVER_API_URL}${pathname}`; - console.log( - `[Middleware] Rewriting from '/user-service' path to: ${newUrl}`, - ); + console.log(`[Middleware] Rewriting from '/user-service' path to: ${newUrl}`); return NextResponse.rewrite(new URL(newUrl), { headers: requestHeaders, }); @@ -107,9 +103,7 @@ export function middleware(req: NextRequest) { .join("&"); const newUrl = `${DC_URL}${pathname}${decodedParams ? `?${decodedParams}` : ""}`; - console.log( - `[Middleware] Rewriting from '/dc-service' path to: ${newUrl}`, - ); + console.log(`[Middleware] Rewriting from '/dc-service' path to: ${newUrl}`); return NextResponse.rewrite(new URL(newUrl), { headers: requestHeaders, }); diff --git a/apps/sn/src/shared/store/data-store.ts b/apps/sn/src/shared/store/data-store.ts index fec870234..4414ac69f 100644 --- a/apps/sn/src/shared/store/data-store.ts +++ b/apps/sn/src/shared/store/data-store.ts @@ -36,7 +36,6 @@ export const defaultInitState: DataState = { const fetchCtpvSggData = async (set: (state: any) => void) => { try { const ctpvData = await getCmsData('/api/v1/code/cache/ADSTDSTRCD'); - console.log("CTPV Data:", ctpvData); const ctpvList: Option[] = ctpvData .filter((item: any) => typeof item.lwpoCd === 'string' && item.lwpoCd.length === 2) .map((feature: any) => ({ From 4610f671b11f8b79268656f9ebd11e25595b4fe3 Mon Sep 17 00:00:00 2001 From: swcho Date: Thu, 18 Sep 2025 18:15:46 +0900 Subject: [PATCH 30/46] =?UTF-8?q?fix,=20refactor:=20-=20=ED=95=98=EC=88=98?= =?UTF-8?q?=EB=8F=84=EC=A0=95=EB=B9=84=EA=B8=B0=EB=B3=B8=EA=B3=84=ED=9A=8D?= =?UTF-8?q?=EB=B3=B4=EA=B3=A0=EC=84=9C=20=EB=AA=A8=EB=8B=AC=20=ED=91=9C?= =?UTF-8?q?=EC=B6=9C=20=EC=97=90=EB=9F=AC=20=EC=88=98=EC=A0=95=20-=20impor?= =?UTF-8?q?t=20=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map/searchModal/reportTab.tsx | 23 +++++++++++++++---- .../map/searchModal/useBasicTab.ts | 6 ++--- .../map/searchModal/useReportTab.ts | 2 +- apps/sn/app/store/useReportTabStore.ts | 10 +++++++- 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/apps/sn/app/(map-layout)/map/searchModal/reportTab.tsx b/apps/sn/app/(map-layout)/map/searchModal/reportTab.tsx index e57a1a222..0817cc422 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/reportTab.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/reportTab.tsx @@ -23,6 +23,7 @@ import LoadingOverlay from '@/components/ui/LoadingBar'; import useReportTab from './useReportTab'; import useStore from '@/store/useStore'; import { CtpvSggPrcsFcltSelectBox } from '@/components/ui/ctpvSggPrcsFcltSelectBox'; +import useSearchModalStore from '@/store/useSearchModalStore'; import { useReportTabStore } from '@/store/useReportTabStore'; import ReportFilesModal from './reportFilesModal'; // 파일목록모달 @@ -47,19 +48,31 @@ interface ReportTabProps { const ReportTab: React.FC = ({ open, isSearch = true, ctpvNm, sggNm }) => { - const [isLoading, setIsLoading] = useState(false); + // const [isLoading, setIsLoading] = useState(false); const [isResetPage, setIsResetPage] = useState(false); const [isResetSelection, setIsResetSelection] = useState(false); const [showTable, setShowTable] = useState(false); - const [tableData, setTableData] = useState([]); - const [tableCount, setTableCount] = useState(0); - const [curPage, setCurPage] = useState(1); - const [yearFilter, setYearFilter] = useState({ start: "", end: "" }); + // const [tableData, setTableData] = useState([]); + // const [tableCount, setTableCount] = useState(0); + // const [curPage, setCurPage] = useState(1); + // const [yearFilter, setYearFilter] = useState({ start: "", end: "" }); const [ctpvCd, setCtpvCd] = useState('0'); const [sggCd, setSggCd] = useState('0'); const [reportGubun, setReportGubun] = useState("0"); const [clsfSystmSn, setClsfSystmSn] = useState(''); // 자료관 기본계획 일련번호 + const { + tableData, + tableCount, + isLoading, + yearFilter, + curPage, + setTableData, + setTableCount, + setIsLoading, + setYearFilter, + setCurPage + } = useSearchModalStore(); const { ctpv, sgg } = useStore(); const { isOpen: isReportFilesModalOpen, diff --git a/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts b/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts index 3c7c9409d..9177ddee5 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts +++ b/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts @@ -12,9 +12,7 @@ * 🔗 사용 API * - 시설물 조회: GET /v1/fclts (sewerage-service) */ -import { useEffect, useState } from 'react'; import { downloadExcelWithKoreanHeaders } from '@common/business_components/ui'; -import axios from 'axios'; import { MS_SWAGE_PPL_USE_CODES, MS_SWAGE_MHL_CODES, MS_SWAGE_MHL_USE_CODES, MsSwagePplExcelCol, SwtrmtFcltExcelCol, SwtrmtPrcsZoneExcelCol, MsSwageMhlExcelCol, ExclnSewagePumpExcelCol, stofcbrExcelCol @@ -22,11 +20,11 @@ import { import { getData } from "@/components/lib/api"; import { BASIC_TYPES } from './basicTab'; import { formatDisplayData } from '@/components/lib/utils/formatDisplayValue'; -import useStore from '../../../store/useStore'; +import useStore from '@/store/useStore'; import GisApp from "@common/business_components/ui/map/lib/gis.core"; import { confirmToast } from '@/components/ui/toast' import { toast } from "react-hot-toast"; -import useSearchModalStore from '../../../store/useSearchModalStore'; +import useSearchModalStore from '@/store/useSearchModalStore'; import { swagePplCqlFilters } from './swagePpl'; import { swagePrcsFcltCqlFilters } from './swagePrcsFclt'; import { swagePrcsZoneCqlFilters } from './swagePrcsZone'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/useReportTab.ts b/apps/sn/app/(map-layout)/map/searchModal/useReportTab.ts index 0ebb6fd13..0eea86286 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/useReportTab.ts +++ b/apps/sn/app/(map-layout)/map/searchModal/useReportTab.ts @@ -16,7 +16,7 @@ import { getDcData } from '@/components/lib/api'; import { fileDownload } from '@/utils'; import { useReportTabStore } from '@/store/useReportTabStore'; -import useSearchModalStore from '@/app/store/useSearchModalStore'; +import useSearchModalStore from '@/store/useSearchModalStore'; export type Folder = { clsfSystmSn: string; diff --git a/apps/sn/app/store/useReportTabStore.ts b/apps/sn/app/store/useReportTabStore.ts index f0ac88002..1c72db6ee 100644 --- a/apps/sn/app/store/useReportTabStore.ts +++ b/apps/sn/app/store/useReportTabStore.ts @@ -44,7 +44,15 @@ export const useReportTabStore = create((set, get) => ({ } }, fetchDcFiles: async (clsfSystmNm: string) => { - const { getDcFiles } = useReportTab(); + const getDcFiles = async (clsfSystmSn: string): Promise => { + if (!clsfSystmSn) { + console.error("clsfSystmSn is required to get files."); + return []; + } + const queryString = 'clsfSystmSn=' + clsfSystmSn; + const result = await getDcData(`/api/v1/dc/file${queryString ? `?${queryString}` : ''}`); + return result; + }; const { dcFiles } = get(); try { const result = await getDcFiles(clsfSystmNm); From 0995e6e43ba93913dfee017fd3bb5d33e18243c1 Mon Sep 17 00:00:00 2001 From: swcho Date: Fri, 19 Sep 2025 18:09:47 +0900 Subject: [PATCH 31/46] =?UTF-8?q?docs:=20=ED=95=98=EC=88=98=EA=B4=80?= =?UTF-8?q?=EB=A1=9C=20=EC=A3=BC=EC=84=9D=20API=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/popupComponent/MsSwagePpl.tsx | 15 ++++++++++++ .../map/components/popupComponent/Ssc.tsx | 18 +++++++++++++-- .../components/popupComponent/SwtrmtFclt.tsx | 10 ++++++++ .../popupComponent/featureClickEventPopup.tsx | 23 +++++++++++++++++++ .../components/popupComponent/sewagePump.tsx | 12 +++++++++- .../map/components/popupComponent/smh.tsx | 15 +++++++++++- .../popupComponent/stormWaterPump.tsx | 9 ++++++++ apps/sn/app/(map-layout)/map/page.tsx | 2 +- .../map/searchModal/operationTab.tsx | 3 --- .../map/searchModal/reportFilesModal.tsx | 3 --- .../map/searchModal/reportTab.tsx | 3 --- .../map/searchModal/searchModal.tsx | 5 ---- .../(map-layout)/map/searchModal/stofcbr.tsx | 3 --- .../(map-layout)/map/searchModal/swageMhl.tsx | 3 --- .../map/searchModal/swagePmstn.tsx | 3 --- .../(map-layout)/map/searchModal/swagePpl.tsx | 3 --- .../map/searchModal/swagePrcsFclt.tsx | 3 --- .../map/searchModal/swagePrcsZone.tsx | 3 --- .../map/searchModal/useBasicTab.ts | 2 +- .../map/searchModal/useOperationTab.ts | 4 ++-- .../map/searchModal/useReportTab.ts | 4 ++-- .../map/searchModal/useSearchModal.ts | 2 +- .../(with-base-layout)/ii/fileupload/page.tsx | 5 ++-- .../(with-base-layout)/ii/irsetting/page.tsx | 3 ++- .../app/(with-base-layout)/ii/rdii/page.tsx | 3 ++- .../(with-base-layout)/ii/rdiiResult/page.tsx | 14 +++++------ .../app/(with-base-layout)/ii/result/page.tsx | 12 +++++----- .../(with-base-layout)/oper/floodPre/page.tsx | 6 ++--- .../oper/floodPre/tableModal.tsx | 8 +++---- .../(with-base-layout)/oper/oldPp/page.tsx | 6 ++--- .../oper/oldPp/tableModal.tsx | 2 +- .../app/components/lib/common/apiHelpers.ts | 4 ++-- .../components/lib/utils/fileDeleteUtil.tsx | 2 +- .../app/components/lib/utils/fileDownload.ts | 1 - .../ui/ctpvSggPrcsFcltSelectBox.tsx | 2 +- .../app/components/ui/operFileUploadForm.tsx | 3 --- apps/sn/app/page.tsx | 2 +- apps/sn/app/store/index.ts | 2 ++ apps/sn/app/store/useReportTabStore.ts | 6 +++-- 39 files changed, 147 insertions(+), 82 deletions(-) diff --git a/apps/sn/app/(map-layout)/map/components/popupComponent/MsSwagePpl.tsx b/apps/sn/app/(map-layout)/map/components/popupComponent/MsSwagePpl.tsx index 2c28be0d4..0e2ec3780 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/MsSwagePpl.tsx +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/MsSwagePpl.tsx @@ -1,3 +1,18 @@ +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (시설물 클릭) - 오른쪽 팝업창 (하수관로) + * + * 📄 MsSwagePpl + * 하수관로 정보 컴포넌트 + * + * - 하수관로의 자체입력정보 표시 및 편집 기능 + * - 보수 및 갱신, 청소 및 준설, 점검 및 진단 데이터 조회 및 표시 + * - VerticalTable을 통한 입력 폼 렌더링 + * - InputSection을 통한 운영 데이터 관리 + * - 저장 버튼을 통한 데이터 저장 기능 + * + * 🔗 사용 API + * - 시설별 운영 정보 조회: GET /api/v1/bizInfo/bizByFclt (sewerage-service) + */ 'use client' import { VerticalTable } from '@/components/ui/verticalTable'; import React, { useState, useEffect } from 'react' diff --git a/apps/sn/app/(map-layout)/map/components/popupComponent/Ssc.tsx b/apps/sn/app/(map-layout)/map/components/popupComponent/Ssc.tsx index 3743410e7..d55e1c9c2 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/Ssc.tsx +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/Ssc.tsx @@ -1,7 +1,21 @@ -// 우수토실 +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (시설물 클릭) - 오른쪽 팝업창 (우수토실) + * + * 📄 Ssc + * 우수토실 정보 컴포넌트 + * + * - 우수토실의 자체입력정보 표시 및 편집 기능 + * - 중점우수토실 운영정보 모달 표시 (강우/측정 정보, 수량/수질측정 정보) + * - VerticalTable을 통한 입력 폼 렌더링 + * - 저장 버튼을 통한 데이터 저장 기능 + * + * 🔗 사용 API + * - 위경도로 강우시 미처리 하수 목록 조회: GET /api/v1/onsemiro/getSwgRainsByGeomety (sewerage-service) + * - 강우시 월류 하수 관리 모니터링 조회: GET /api/v1/onsemiro/swgRain/{adstDstrCd}/{manageNo}/mntrngs (sewerage-service) + */ import { UiModal, UiTable } from '@common/business_components/ui'; import { Button, TableHead, TableRow } from '@common/components/ui'; -import React, { useState, useEffect, useCallback } from 'react'; +import React, { useState, useEffect } from 'react'; import { untrtSwgRainCol3, untrtSwgRainCol4, untrtSwgRainCol5 } from '../common/table'; import { VerticalTable } from '@/components/ui/verticalTable'; import { getData } from "@/components/lib/api"; diff --git a/apps/sn/app/(map-layout)/map/components/popupComponent/SwtrmtFclt.tsx b/apps/sn/app/(map-layout)/map/components/popupComponent/SwtrmtFclt.tsx index 366218ec1..8b029673f 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/SwtrmtFclt.tsx +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/SwtrmtFclt.tsx @@ -1,3 +1,13 @@ +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (시설물 클릭) - 오른쪽 팝업창 (하수처리시설) + * + * 📄 SwtrmtFclt + * 하수처리시설 정보 컴포넌트 + * + * - 하수처리시설의 디지털 자료관 연계 정보 표시 + * - VerticalTable을 통한 테이블 렌더링 + * - 조회 버튼을 통한 모달 표시 및 ReportTab 연동 + */ 'use client' import React, { useState } from 'react' import { VerticalTable } from '@/components/ui/verticalTable'; diff --git a/apps/sn/app/(map-layout)/map/components/popupComponent/featureClickEventPopup.tsx b/apps/sn/app/(map-layout)/map/components/popupComponent/featureClickEventPopup.tsx index a2138319f..e0fe03a92 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/featureClickEventPopup.tsx +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/featureClickEventPopup.tsx @@ -1,3 +1,26 @@ +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (시설물 클릭) - 오른쪽 팝업창 + * + * 📄 FeatureClickEventPopup + * 시설물(피처) 클릭시 오른쪽 팝업창 컴포넌트 + * + * - 지도 시설물(피처) 클릭 시 팝업 표시 및 데이터 로딩 + * - 레이어 유형에 따른 동적 테이블 및 헤드리스트 설정 + * - 자체입력정보 조회 및 저장 기능 (하수관로, 우수토실, 하수펌프장, 하수맨홀) + * - 코드 매핑 및 데이터 포맷팅 처리 + * - 상류관로 검색, 침입수/RDII 분석 차트 표시 + * - 모달을 통한 저장 확인 및 API 연동 + * + * 🔗 사용 API + * - 하수관로 자체입력정보 조회: GET /api/v1/fcltppl/{fcltMngNo}/{mngInstCd} (sewerage-service) + * - 우수토실 자체입력정보 조회: GET /api/v1/fcltstofcbr/{fcltMngNo}/{mngInstCd} (sewerage-service) + * - 하수펌프장 자체입력정보 조회: GET /api/v1/fcltpump/{fcltMngNo}/{mngInstCd} (sewerage-service) + * - 하수맨홀 자체입력정보 조회: GET /api/v1/fcltmhl/{fcltMngNo}/{mngInstCd} (sewerage-service) + * - 하수관로 자체입력정보 저장: POST /api/v1/fcltppl (sewerage-service) + * - 우수토실 자체입력정보 저장: POST /api/v1/fcltstofcbr (sewerage-service) + * - 하수펌프장 자체입력정보 저장: POST /api/v1/fcltpump (sewerage-service) + * - 하수맨홀 자체입력정보 저장: POST /api/v1/fcltmhl (sewerage-service) + */ 'use client' import { getData, postData } from "@/components/lib/api"; import Modal from "@/components/ui/modal"; diff --git a/apps/sn/app/(map-layout)/map/components/popupComponent/sewagePump.tsx b/apps/sn/app/(map-layout)/map/components/popupComponent/sewagePump.tsx index 5dcde5f5e..07d78a7d1 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/sewagePump.tsx +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/sewagePump.tsx @@ -1,3 +1,13 @@ +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (시설물 클릭) - 오른쪽 팝업창 (하수펌프장) + * + * 📄 sewagePump + * 하수펌프장 정보 컴포넌트 + * + * - 빗물펌프장 및 오수펌프장 구분에 따른 자체 입력 정보 표시 및 편집 기능 + * - VerticalTable을 통한 입력 폼 렌더링 + * - 저장 버튼을 통한 데이터 저장 기능 + */ import { VerticalTable } from '@/components/ui/verticalTable'; import React, { useState, useEffect } from 'react' // 빗물펌프장 자체 입력 정보 @@ -12,7 +22,7 @@ const drtwInputColumn = [ { id: "mltvDtdvNm", title: "처리분구", type: "input" }, ] -// 하수펌프장 + const sewagePump = ({ featureData, isDrtwSewagePump, onSaveClick }: { featureData: any, isDrtwSewagePump?: boolean, onSaveClick?: () => void }) => { const [formData, setFormData] = useState({}); diff --git a/apps/sn/app/(map-layout)/map/components/popupComponent/smh.tsx b/apps/sn/app/(map-layout)/map/components/popupComponent/smh.tsx index 5d5365834..01e0a3043 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/smh.tsx +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/smh.tsx @@ -1,4 +1,17 @@ -// 하수맨홀 +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (시설물 클릭) - 오른쪽 팝업창 (하수맨홀) + * + * 📄 Smh + * 하수맨홀 정보 컴포넌트 + * + * - 하수맨홀의 자체입력정보 표시 및 편집 기능 + * - VerticalTable을 통한 입력 폼 렌더링 + * - 상류관로 검색 및 지도 포커스 기능 + * - 저장 버튼을 통한 데이터 저장 기능 + * + * 🔗 사용 API + * - 상류관로 조회: GET /api/v1/fcltmhl/upperPpls/{fcltMngNo} (sewerage-service) + */ import { VerticalTable } from '@/components/ui/verticalTable'; import { useEffect, useState } from 'react'; import GisApp from "@common/business_components/ui/map/lib/gis.core"; diff --git a/apps/sn/app/(map-layout)/map/components/popupComponent/stormWaterPump.tsx b/apps/sn/app/(map-layout)/map/components/popupComponent/stormWaterPump.tsx index 96f10fa55..92973b133 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/stormWaterPump.tsx +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/stormWaterPump.tsx @@ -1,3 +1,12 @@ +/** + * ➡️ 경로 : 하수관망도 메인 페이지 (시설물 클릭) - 오른쪽 팝업창 (빗물펌프) + * + * 📄 StormWaterPump + * 빗물펌프 정보 컴포넌트 + * + * - 빗물펌프의 자체입력정보 표시 및 편집 기능 + * - VerticalTable을 통한 입력 폼 렌더링 + */ import { VerticalTable } from '@/components/ui/verticalTable'; import React from 'react' const inputColumn = [ diff --git a/apps/sn/app/(map-layout)/map/page.tsx b/apps/sn/app/(map-layout)/map/page.tsx index b9fb0e352..651738642 100644 --- a/apps/sn/app/(map-layout)/map/page.tsx +++ b/apps/sn/app/(map-layout)/map/page.tsx @@ -12,7 +12,7 @@ * - Zustand를 통한 검색 모달 상태 관리 * * 🔗 사용 API - * - 레이어 설정 조회: GET /v1/map/lyrStngs/SN_NETWORK (sewerage-service) + * - 레이어 설정 조회: GET /api/v1/map/lyrStngs/{lyrGrp} (sewerage-service) */ "use client"; diff --git a/apps/sn/app/(map-layout)/map/searchModal/operationTab.tsx b/apps/sn/app/(map-layout)/map/searchModal/operationTab.tsx index 853d05c38..13025e2ec 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/operationTab.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/operationTab.tsx @@ -10,9 +10,6 @@ * - 조회 버튼을 통한 데이터 검색 트리거 * - Zustand를 통한 상태 관리 및 필터 값 저장 * - Enter 키 입력 시 자동 조회 지원 - * - * 🔗 사용 API - * - 운영 사업 현황 조회: GET /v1/operation/business/status (sewerage-service) */ import React from 'react'; import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/reportFilesModal.tsx b/apps/sn/app/(map-layout)/map/searchModal/reportFilesModal.tsx index ced0ba14b..8be73ba1e 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/reportFilesModal.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/reportFilesModal.tsx @@ -10,9 +10,6 @@ * - 파일 클릭 이벤트 처리 및 상세 조회 * - Zustand를 통한 모달 상태 및 데이터 관리 * - 모달 열림/닫힘 시 데이터 초기화 기능 - * - * 🔗 사용 API - * - 보고서 파일 조회: GET /v1/report/sewerage-plan (sewerage-service) */ 'use client' import React, { useEffect } from 'react'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/reportTab.tsx b/apps/sn/app/(map-layout)/map/searchModal/reportTab.tsx index 0817cc422..cbc635a7c 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/reportTab.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/reportTab.tsx @@ -10,9 +10,6 @@ * - 보고서 클릭 시 파일 목록 모달 열기 * - Zustand를 통한 모달 상태 및 데이터 관리 * - 로딩 오버레이 및 선택 초기화 기능 - * - * 🔗 사용 API - * - 보고서 데이터 조회: GET /v1/report/sewerage-plan (sewerage-service) */ 'use client'; import React, { useEffect, useState } from 'react'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx b/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx index 400217a4b..d2537663e 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx @@ -10,11 +10,6 @@ * - 엑셀 다운로드 및 지도에서 보기 기능 * - Zustand를 통한 검색 모달 상태 관리 * - 로딩 오버레이 및 선택 초기화 지원 - * - * 🔗 사용 API - * - 시설물 조회: GET /v1/map/facility/search (sewerage-service) - * - 운영 사업 현황 조회: GET /v1/operation/business/status (sewerage-service) - * - 보고서 데이터 조회: GET /v1/report/sewerage-plan (sewerage-service) */ import LoadingOverlay from '@/components/ui/LoadingBar'; import { UiModal, UITab, UiTable } from '@common/business_components/ui'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/stofcbr.tsx b/apps/sn/app/(map-layout)/map/searchModal/stofcbr.tsx index 522063a29..4fc830c59 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/stofcbr.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/stofcbr.tsx @@ -9,9 +9,6 @@ * - 조회 버튼을 통한 데이터 검색 트리거 * - Zustand를 통한 상태 관리 및 필터 값 저장 * - Enter 키 입력 시 자동 조회 지원 - * - * 🔗 사용 API - * - 시설물 조회: GET /v1/map/facility/search (sewerage-service) */ import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; import { Button } from '@common/components'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx b/apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx index f13341b9c..aade9662a 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx @@ -10,9 +10,6 @@ * - 조회 버튼을 통한 데이터 검색 트리거 * - Zustand를 통한 상태 관리 및 필터 값 저장 * - Enter 키 입력 시 자동 조회 지원 - * - * 🔗 사용 API - * - 시설물 조회: GET /v1/map/facility/search (sewerage-service) */ import React from 'react'; import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/swagePmstn.tsx b/apps/sn/app/(map-layout)/map/searchModal/swagePmstn.tsx index 4e09a2b3e..a9be8704e 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/swagePmstn.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/swagePmstn.tsx @@ -10,9 +10,6 @@ * - 조회 버튼을 통한 데이터 검색 트리거 * - Zustand를 통한 상태 관리 및 필터 값 저장 * - Enter 키 입력 시 자동 조회 지원 - * - * 🔗 사용 API - * - 시설물 조회: GET /v1/map/facility/search (sewerage-service) */ import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; import { Button, Input, Label } from '@common/components'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/swagePpl.tsx b/apps/sn/app/(map-layout)/map/searchModal/swagePpl.tsx index a92395da7..9378c779b 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/swagePpl.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/swagePpl.tsx @@ -10,9 +10,6 @@ * - 조회 버튼을 통한 데이터 검색 트리거 * - Zustand를 통한 상태 관리 및 필터 값 저장 * - Enter 키 입력 시 자동 조회 지원 - * - * 🔗 사용 API - * - 시설물 조회: GET /v1/map/facility/search (sewerage-service) */ import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; import { SelectBox } from '@common/business_components/ui'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/swagePrcsFclt.tsx b/apps/sn/app/(map-layout)/map/searchModal/swagePrcsFclt.tsx index 7791dc435..395c936a4 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/swagePrcsFclt.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/swagePrcsFclt.tsx @@ -10,9 +10,6 @@ * - 조회 버튼을 통한 데이터 검색 트리거 * - Zustand를 통한 상태 관리 및 필터 값 저장 * - Enter 키 입력 시 자동 조회 지원 - * - * 🔗 사용 API - * - 시설물 조회: GET /v1/map/facility/search (sewerage-service) */ import React from 'react'; import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/swagePrcsZone.tsx b/apps/sn/app/(map-layout)/map/searchModal/swagePrcsZone.tsx index b072e00c4..0d1fb9fc4 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/swagePrcsZone.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/swagePrcsZone.tsx @@ -9,9 +9,6 @@ * - 조회 버튼을 통한 데이터 검색 트리거 * - Zustand를 통한 상태 관리 및 필터 값 저장 * - Enter 키 입력 시 자동 조회 지원 - * - * 🔗 사용 API - * - 시설물 조회: GET /v1/map/facility/search (sewerage-service) */ import React from 'react'; import { CtpvSggPrcsFcltSelectBox } from '@/components/ui/ctpvSggPrcsFcltSelectBox'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts b/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts index 9177ddee5..80d3deb50 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts +++ b/apps/sn/app/(map-layout)/map/searchModal/useBasicTab.ts @@ -10,7 +10,7 @@ * - 데이터 매핑 및 코드 변환 (시도/시군구, 용도 등) * * 🔗 사용 API - * - 시설물 조회: GET /v1/fclts (sewerage-service) + * - 관망도 시설물 목록 조회: GET /api/v1/fclts (sewerage-service) */ import { downloadExcelWithKoreanHeaders } from '@common/business_components/ui'; import { diff --git a/apps/sn/app/(map-layout)/map/searchModal/useOperationTab.ts b/apps/sn/app/(map-layout)/map/searchModal/useOperationTab.ts index 8e1c35a91..a4df8ae92 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/useOperationTab.ts +++ b/apps/sn/app/(map-layout)/map/searchModal/useOperationTab.ts @@ -11,8 +11,8 @@ * - 데이터 매핑 및 코드 변환 (사업 유형, 용도, 재질 등) * * 🔗 사용 API - * - 사업 현황 조회: GET /v1/bizInfo (sewerage-service) - * - 사업 결과표 조회: GET /v1/bizInfo/fclts (sewerage-service) + * - 운영정보 목록 조회: GET /api/v1/bizInfo (sewerage-service) + * - 운영정보(사업정보) 관련 시설 목록 조회: GET /api/v1/bizInfo/fclts (sewerage-service) */ import { downloadExcelWithKoreanHeaders } from '@common/business_components/ui'; import { MS_SWAGE_PPL_CODES, MS_SWAGE_PPL_USE_CODES } from '../components/common/table'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/useReportTab.ts b/apps/sn/app/(map-layout)/map/searchModal/useReportTab.ts index 0eea86286..b93b6fb47 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/useReportTab.ts +++ b/apps/sn/app/(map-layout)/map/searchModal/useReportTab.ts @@ -10,8 +10,8 @@ * - 데이터 매핑 및 코드 변환 (시도/시군구, 보고서 유형 등) * * 🔗 사용 API - * - 보고서 파일 조회: GET /api/v1/dc/file (sewerage-service) - * - 파일 다운로드: GET /api/v1/dc/file/download (sewerage-service) + * - 보고서 파일 조회: GET /api/v1/dc/file (dc-service) + * - 파일 다운로드: GET /api/v1/dc/file/download (dc-service) */ import { getDcData } from '@/components/lib/api'; import { fileDownload } from '@/utils'; diff --git a/apps/sn/app/(map-layout)/map/searchModal/useSearchModal.ts b/apps/sn/app/(map-layout)/map/searchModal/useSearchModal.ts index 89363a247..770a8700d 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/useSearchModal.ts +++ b/apps/sn/app/(map-layout)/map/searchModal/useSearchModal.ts @@ -10,7 +10,7 @@ * - 데이터 매핑 및 코드 변환 (사업 유형 등) * * 🔗 사용 API - * - 사업 현황 조회: GET /v1/bizInfo (sewerage-service) + * - 운영정보 목록 조회: GET /api/v1/bizInfo (sewerage-service) */ import { getData } from "@/components/lib/api"; import { formatDisplayData } from '@/components/lib/utils/formatDisplayValue'; diff --git a/apps/sn/app/(with-base-layout)/ii/fileupload/page.tsx b/apps/sn/app/(with-base-layout)/ii/fileupload/page.tsx index 705de23cc..bd2a3f034 100644 --- a/apps/sn/app/(with-base-layout)/ii/fileupload/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/fileupload/page.tsx @@ -12,8 +12,9 @@ * - 폼 제출 및 에러 핸들링 * * 🔗 사용 API - * - 사용자 조회: POST /v1/inftwtAnls/users (sewerage-service) - * - 파일 업로드: POST /v1/rdiiAnls/savewithfile (sewerage-service) + * - 사이트 정보 조회: POST /api/v1/inftwtAnls/users/{userId} (sewerage-service) + * - 침입수분석 등록 첨부파일INP 포함: POST /api/v1/rdiiAnls/savewithfile (sewerage-service) + * - 사용자 단 건 조회: GET /api/v1/users/{userUnqId} (user-service) */ 'use client' diff --git a/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx b/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx index 1074c3bc9..e2a23759b 100644 --- a/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx @@ -12,7 +12,8 @@ * - 로딩 오버레이 및 에러 핸들링 지원 * * 🔗 사용 API - * - 침입수 분석 데이터 저장: POST /v1/inftwtAnls/savewithfile (sewerage-service) + * - 침입수분석 등록 첨부파일INP 포함: POST /api/v1/inftwtAnls/savewithfile (sewerage-service) + * - 로그인된 사용자의 사용자 정보 조회: GET /api/v1/users/info/me (user-service) */ 'use client' import { postMutiPart } from '@/components/lib/api' diff --git a/apps/sn/app/(with-base-layout)/ii/rdii/page.tsx b/apps/sn/app/(with-base-layout)/ii/rdii/page.tsx index 10b630393..4fd6d947a 100644 --- a/apps/sn/app/(with-base-layout)/ii/rdii/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/rdii/page.tsx @@ -13,7 +13,8 @@ * - 로딩 오버레이 및 에러 핸들링 지원 * * 🔗 사용 API - * - RDII 분석 데이터 저장: POST /v1/rdiiAnls/savewithfile (sewerage-service) + * - 침입수분석 등록 첨부파일INP 포함: POST /api/v1/inftwtAnls/savewithfile (sewerage-service) + * - 로그인된 사용자의 사용자 정보 조회: GET /api/v1/users/info/me (user-service) */ "use client" diff --git a/apps/sn/app/(with-base-layout)/ii/rdiiResult/page.tsx b/apps/sn/app/(with-base-layout)/ii/rdiiResult/page.tsx index cc5e1e47b..52685aaf8 100644 --- a/apps/sn/app/(with-base-layout)/ii/rdiiResult/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/rdiiResult/page.tsx @@ -12,10 +12,10 @@ * - Zustand를 통한 상태 관리 및 데이터 포맷팅 * * 🔗 사용 API - * - RDII 분석 결과 조회: GET /v1/rdiiAnls (sewerage-service) - * - RDII 분석 결과 상세 조회: GET /v1/rdiiAnlsRslt/ppl (sewerage-service) - * - RDII 분석 결과 삭제: DELETE /v1/rdiiAnlsRslt (sewerage-service) - * - RDII 분석 삭제: DELETE /v1/rdiiAnls (sewerage-service) + * - RDII분석 목록 조회: GET /api/v1/rdiiAnls (sewerage-service) + * - RDII분석결과관로 목록 조회: GET /api/v1/rdiiAnlsRslt/ppl/{rainInfwtAnlsSn} (sewerage-service) + * - RDII분석결과 삭제: DELETE /api/v1/rdiiAnlsRslt/{rainInfwtAnlsSn} (sewerage-service) + * - RDII분석 삭제: DELETE /api/v1/rdiiAnls/{rainInfwtAnlsSn} (sewerage-service) */ 'use client' import { deleteData, getData, useCookieAuth } from '@/components/lib/api' @@ -27,7 +27,7 @@ import { z } from 'zod' import BaseLayout from '../BaseLayout' import { handleDelete } from '@/components/lib/utils' import { formatDisplayData } from '@/components/lib/utils/formatDisplayValue'; -import useStore from '../../../store/useStore'; +import useStore from '@/store/useStore'; const formSchema = z.object({ @@ -248,8 +248,8 @@ const Result = () => { try { // 삭제 API 호출 - const response1 = await deleteData(`v1/rdiiAnlsRslt/${selectedRowData.rainInfwtAnlsSn}`); - const response2 = await deleteData(`v1/rdiiAnls/${selectedRowData.rainInfwtAnlsSn}`); + await deleteData(`v1/rdiiAnlsRslt/${selectedRowData.rainInfwtAnlsSn}`); + await deleteData(`v1/rdiiAnls/${selectedRowData.rainInfwtAnlsSn}`); // 첨부파일(inp파일) 삭제 API 호출 handleDelete(selectedRowData.atflCd, { handleDeleteStart: () => console.log("파일 삭제 시작"), diff --git a/apps/sn/app/(with-base-layout)/ii/result/page.tsx b/apps/sn/app/(with-base-layout)/ii/result/page.tsx index 23b6d1912..59ccf0b08 100644 --- a/apps/sn/app/(with-base-layout)/ii/result/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/result/page.tsx @@ -12,10 +12,10 @@ * - Zustand를 통한 상태 관리 및 데이터 포맷팅 * * 🔗 사용 API - * - 침입수 분석 결과 조회: GET /v1/inftwtAnls (sewerage-service) - * - 침입수 분석 결과 상세 조회: GET /v1/inftwtAnlsRslt/ppl (sewerage-service) - * - 침입수 분석 결과 삭제: DELETE /v1/inftwtAnlsRslt (sewerage-service) - * - 침입수 분석 삭제: DELETE /v1/inftwtAnls (sewerage-service) + * - 침입수분석 목록 조회: GET /api/v1/inftwtAnls (sewerage-service) + * - 침입수분석결과관로 목록 조회: GET /api/v1/inftwtAnlsRslt/ppl/{inftwtAnlsSn} (sewerage-service) + * - 침입수분석결과 삭제: DELETE /api/v1/inftwtAnlsRslt/{inftwtAnlsSn} (sewerage-service) + * - 침입수분석 삭제: DELETE /api/v1/inftwtAnls/{inftwtAnlsSn} (sewerage-service) */ 'use client' import { deleteData, getData, useCookieAuth } from '@/components/lib/api' @@ -242,8 +242,8 @@ const Result = () => { try { // // 삭제 API 호출 - const response1 = await deleteData(`v1/inftwtAnlsRslt/${selectedRowData.inftwtAnlsSn}`); - const response2 = await deleteData(`v1/inftwtAnls/${selectedRowData.inftwtAnlsSn}`); + await deleteData(`v1/inftwtAnlsRslt/${selectedRowData.inftwtAnlsSn}`); + await deleteData(`v1/inftwtAnls/${selectedRowData.inftwtAnlsSn}`); // 첨부파일(inp파일) 삭제 API 호출 handleDelete(selectedRowData.atflCd, { handleDeleteStart: () => console.log("파일 삭제 시작"), diff --git a/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx b/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx index a029e9617..3b547cf09 100644 --- a/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx +++ b/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx @@ -12,9 +12,9 @@ * - 로딩 오버레이 및 에러 핸들링 지원 * * 🔗 사용 API - * - 사업 정보 조회: GET /v1/sbmrgPrevnt (sewerage-service) - * - 파일 삭제: DELETE /attach-service/api/v1/atfl/attachments (attach-service) - * - 사업 정보 등록: POST /v1/sbmrgPrevnt (sewerage-service) + * - 도시침수예방사업 목록 조회: GET /api/v1/sbmrgPrevnt (sewerage-service) + * - 도시침수예방사업 등록: POST /api/v1/sbmrgPrevnt (sewerage-service) + * - 첨부파일 삭제및 Soft Delete 삭제: DELETE /api/v1/atfl/attachments/{atflId} (attach-service) */ 'use client' import { deleteData, postData, useCookieAuth } from '@/components/lib/api' diff --git a/apps/sn/app/(with-base-layout)/oper/floodPre/tableModal.tsx b/apps/sn/app/(with-base-layout)/oper/floodPre/tableModal.tsx index 97bd24c3e..ad8fcf72f 100644 --- a/apps/sn/app/(with-base-layout)/oper/floodPre/tableModal.tsx +++ b/apps/sn/app/(with-base-layout)/oper/floodPre/tableModal.tsx @@ -10,16 +10,16 @@ * - 테이블 헤더 및 데이터 동적 생성 * * 🔗 사용 API - * - 파일 다운로드: GET /attach-service/api/v1/download/{atflId} (attach-service) + * - 첨부파일 다운로드(파일ID): GET /attach-service/api/v1/download/{atflId} (attach-service) */ 'use client' import { useState, useEffect } from 'react' import LoadingOverlay from '@/components/ui/LoadingBar' import { UITab, UiTable } from '@common/business_components/ui' -import { Table, TableBody, TableHeader } from "@common/components/ui"; import * as XLSX from 'xlsx'; -import { HeadMakeFloodPre } from './headMakeFloodPre'; -import { InputTableBody } from './inputTableBody'; +// import { Table, TableBody, TableHeader } from "@common/components/ui"; +// import { HeadMakeFloodPre } from './headMakeFloodPre'; +// import { InputTableBody } from './inputTableBody'; const TABS = [ { val: "management", text: "관리SHEET" }, diff --git a/apps/sn/app/(with-base-layout)/oper/oldPp/page.tsx b/apps/sn/app/(with-base-layout)/oper/oldPp/page.tsx index 0a1ec566f..93151a938 100644 --- a/apps/sn/app/(with-base-layout)/oper/oldPp/page.tsx +++ b/apps/sn/app/(with-base-layout)/oper/oldPp/page.tsx @@ -12,9 +12,9 @@ * - 로딩 오버레이 및 에러 핸들링 지원 * * 🔗 사용 API - * - 사업 정보 조회: GET /v1/dcrpPpl (sewerage-service) - * - 파일 삭제: DELETE /attach-service/api/v1/atfl/attachments (attach-service) - * - 사업 정보 등록: POST /v1/dcrpPpl (sewerage-service) + * - 노후관로정비사업 목록 조회: GET /api/v1/dcrpPpl (sewerage-service) + * - 노후관로정비사업 목록 등록: POST /api/v1/dcrpPpl (sewerage-service) + * - 첨부파일 삭제및 Soft Delete 삭제: DELETE /api/v1/atfl/attachments/{atflId} (attach-service) */ 'use client' import { deleteData, postData, useCookieAuth } from '@/components/lib/api' diff --git a/apps/sn/app/(with-base-layout)/oper/oldPp/tableModal.tsx b/apps/sn/app/(with-base-layout)/oper/oldPp/tableModal.tsx index 3b94c20f0..dece4c4f8 100644 --- a/apps/sn/app/(with-base-layout)/oper/oldPp/tableModal.tsx +++ b/apps/sn/app/(with-base-layout)/oper/oldPp/tableModal.tsx @@ -10,7 +10,7 @@ * - 테이블 헤더 및 데이터 동적 생성 * * 🔗 사용 API - * - 파일 다운로드: GET /attach-service/api/v1/download/{atflId} (attach-service) + * - 첨부파일 다운로드(파일ID): GET /attach-service/api/v1/download/{atflId} (attach-service) */ 'use client' import { useState, useEffect } from 'react' diff --git a/apps/sn/app/components/lib/common/apiHelpers.ts b/apps/sn/app/components/lib/common/apiHelpers.ts index 9fecf9cf8..8f9abbf08 100644 --- a/apps/sn/app/components/lib/common/apiHelpers.ts +++ b/apps/sn/app/components/lib/common/apiHelpers.ts @@ -1,6 +1,6 @@ /** * 📄 API Helpers - * API 호출 헬퍼 유틸리티 + * 공통 코드 cs-service API 호출 유틸리티 * * - 검색 데이터 조회 및 파라미터 처리 * - 상위 코드로 하위 코드 조회 기능 @@ -10,7 +10,7 @@ * - 타입 안전성 보장을 위한 제네릭 활용 * * 🔗 사용 API - * - 상위 코드 조회: GET /cms-service/api/v1/code/cache/{upCd} (cms-service) + * - 하위코드페이지 캐시 목록 조회: GET /api/v1/code/cache/{upCd} (cms-service) */ import { getData } from "../api"; diff --git a/apps/sn/app/components/lib/utils/fileDeleteUtil.tsx b/apps/sn/app/components/lib/utils/fileDeleteUtil.tsx index 6878a3a14..768c3ef9c 100644 --- a/apps/sn/app/components/lib/utils/fileDeleteUtil.tsx +++ b/apps/sn/app/components/lib/utils/fileDeleteUtil.tsx @@ -10,7 +10,7 @@ * - 파일 삭제 진행 상태 콜백 지원 * * 🔗 사용 API - * - 첨부 파일 삭제: DELETE /attach-service/api/v1/atfl/attachments/atflCd (attach-service) + * - 첨부파일 삭제및 Soft Delete 삭제(첨부파일코드로 삭제): DELETE /api/v1/atfl/attachments/atflCd/{atflCd} (attach-service) */ import { getCookie } from "@/shared/lib"; import { ENDPOINT } from "../api/attachment/attachment-service"; diff --git a/apps/sn/app/components/lib/utils/fileDownload.ts b/apps/sn/app/components/lib/utils/fileDownload.ts index 97ff4b68b..855488692 100644 --- a/apps/sn/app/components/lib/utils/fileDownload.ts +++ b/apps/sn/app/components/lib/utils/fileDownload.ts @@ -9,7 +9,6 @@ * - 다양한 파일 타입 지원 (엑셀, PDF 등) * - Fetch 기반 HTTP 요청 처리 */ -const BASE_URL = process.env.NEXT_PUBLIC_SERVER_API_URL || ''; export const handleDownload = async (api: string, fileNm: string) => { try { diff --git a/apps/sn/app/components/ui/ctpvSggPrcsFcltSelectBox.tsx b/apps/sn/app/components/ui/ctpvSggPrcsFcltSelectBox.tsx index 32b69138b..25eb0a9d1 100644 --- a/apps/sn/app/components/ui/ctpvSggPrcsFcltSelectBox.tsx +++ b/apps/sn/app/components/ui/ctpvSggPrcsFcltSelectBox.tsx @@ -10,7 +10,7 @@ * - CQL 필터를 통한 시설물 검색 조건 설정 * * 🔗 사용 API - * - 시설물 조회: GET /v1/fclts (sewerage-service) + * - 관망도 시설물 목록 조회: GET /api/v1/fclts (sewerage-service) */ import React, { useState, useEffect } from "react"; import { SelectBox } from '@common/business_components/ui' diff --git a/apps/sn/app/components/ui/operFileUploadForm.tsx b/apps/sn/app/components/ui/operFileUploadForm.tsx index 78a390aec..d4c2e5eeb 100644 --- a/apps/sn/app/components/ui/operFileUploadForm.tsx +++ b/apps/sn/app/components/ui/operFileUploadForm.tsx @@ -16,9 +16,6 @@ import FileUploadForm from './fileUploadForm'; import { yearOptions, getQuarterOptions } from '@/components/lib/utils'; const operFileUploadForm = ({ title, onSubmit }: { title: string, onSubmit: (files: string, year: string, quarter: string, code: string, id: string) => void }) => { - const [atflCd, setAtflCd] = useState(null); - const [atflId, setAtflId] = useState(null); - const [selectedYear, setSelectedYear] = useState(yearOptions[0]?.val || ''); const [quaterOptions, setQuaterOptions] = useState(() => getQuarterOptions(selectedYear)); const [selectedQuarter, setSelectedQuarter] = useState(quaterOptions[0]?.val || ''); diff --git a/apps/sn/app/page.tsx b/apps/sn/app/page.tsx index c8ad51fdf..d3e22baee 100644 --- a/apps/sn/app/page.tsx +++ b/apps/sn/app/page.tsx @@ -12,7 +12,7 @@ * - Next.js useRouter를 통한 클라이언트 사이드 라우팅 * * 🔗 사용 API - * - 로그인: POST /v1/auth/login (auth-service) + * - 로그인: POST /api/v1/auth/login (user-service) */ "use client"; import { LoginApi } from "@/entities/auth"; diff --git a/apps/sn/app/store/index.ts b/apps/sn/app/store/index.ts index 1241bf6f9..91577ae1a 100644 --- a/apps/sn/app/store/index.ts +++ b/apps/sn/app/store/index.ts @@ -26,6 +26,7 @@ export type BIZ_CD_TYPE = { prntLwpoCd: null }; +// 시도 데이터 조회 export const fetchCtpv = async (set: (state: any) => void) => { const url = `/geoserver/hasudo/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=hasudo:tb_ms_ctpv&outputFormat=application/json&propertyName=mctpv_korn_nm,mctpv_cd`; const res = await fetch(url).then(res => res.json()); @@ -75,6 +76,7 @@ export const fetchCtpv = async (set: (state: any) => void) => { set({ ctpv: list }); }; +// 시군구 데이터 조회 export const fetchSgg = async (set: (state: any) => void) => { const url = `/geoserver/hasudo/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=hasudo:tb_ms_sgg&outputFormat=application/json&propertyName=sgg_cd,sgg_korn_nm`; const res = await fetch(url).then(res => res.json()); diff --git a/apps/sn/app/store/useReportTabStore.ts b/apps/sn/app/store/useReportTabStore.ts index 1c72db6ee..bb2cd875a 100644 --- a/apps/sn/app/store/useReportTabStore.ts +++ b/apps/sn/app/store/useReportTabStore.ts @@ -10,9 +10,10 @@ * - 데이터 변경 감지 및 불필요한 재렌더링 방지 * * 🔗 사용 API - * - 보고서 분류 조회: GET /api/v1/dc/clsf (sewerage-service) + * - DC 트리 데이터 조회: GET /dc-service//api/v1/dc/clsf + * - DC 파일 목록 조회: GET /dc-service//api/v1/dc/file */ -import useReportTab, { type Folder, type ReportDataFile } from '../(map-layout)/map/searchModal/useReportTab'; +import { type Folder, type ReportDataFile } from '../(map-layout)/map/searchModal/useReportTab'; import { create } from 'zustand'; import { getDcData } from '@/components/lib/api'; @@ -53,6 +54,7 @@ export const useReportTabStore = create((set, get) => ({ const result = await getDcData(`/api/v1/dc/file${queryString ? `?${queryString}` : ''}`); return result; }; + const { dcFiles } = get(); try { const result = await getDcFiles(clsfSystmNm); From bc016c71aeea8209cf63582349ee8786c087e526 Mon Sep 17 00:00:00 2001 From: swcho Date: Mon, 22 Sep 2025 09:53:56 +0900 Subject: [PATCH 32/46] =?UTF-8?q?refactor:=20drgtSttn(=EA=B0=80=EB=AD=84?= =?UTF-8?q?=EC=A0=95=EB=B3=B4)=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=ED=8C=A8?= =?UTF-8?q?=ED=82=A4=EC=A7=80=20=EA=B2=BD=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/(with-layout)/{matMng/coMng => }/drgtSttn/page.tsx | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename apps/wr/app/(with-layout)/{matMng/coMng => }/drgtSttn/page.tsx (100%) diff --git a/apps/wr/app/(with-layout)/matMng/coMng/drgtSttn/page.tsx b/apps/wr/app/(with-layout)/drgtSttn/page.tsx similarity index 100% rename from apps/wr/app/(with-layout)/matMng/coMng/drgtSttn/page.tsx rename to apps/wr/app/(with-layout)/drgtSttn/page.tsx From 39e2734a49bbb9b3180b589c3b46e14916e2ee87 Mon Sep 17 00:00:00 2001 From: swcho Date: Mon, 22 Sep 2025 09:54:35 +0900 Subject: [PATCH 33/46] =?UTF-8?q?fix:=20searchBar.tsx=20=ED=95=98=EC=88=98?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=EC=8B=9C=EC=84=A4=20=EA=B2=80=EC=83=89=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business_components/src/ui/map/searchBar/searchBar.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/common/business_components/src/ui/map/searchBar/searchBar.tsx b/packages/common/business_components/src/ui/map/searchBar/searchBar.tsx index 919b3c4a9..1fe3f799a 100644 --- a/packages/common/business_components/src/ui/map/searchBar/searchBar.tsx +++ b/packages/common/business_components/src/ui/map/searchBar/searchBar.tsx @@ -165,7 +165,10 @@ export const SearchBar = ({ let list: SelectDataType[] = []; if (type === "tb_il_swage_prcs_fclt") { - const cqlFilter = `ctpv_nm='${sidoNm}' and sgg_nm='${sggNm}' and swtrmt_fclt_nm like '%${fcltyNm}%'`; + // 하수처리시설 + let cqlFilter = `swtrmt_fclt_nm like '%${fcltyNm}%'`; + if (sggNm !== "시군구" && sggNm) cqlFilter = `sgg_nm='${sggNm}' and ` + cqlFilter; + if (sidoNm !== "시도" && sidoNm) cqlFilter = `ctpv_nm='${sidoNm}' and ` + cqlFilter; url += encodeURIComponent(cqlFilter); const res = await fetch(url); const json = await res.json(); From d12610db98178c8ab19d21a0b5d9764feaa6eb4e Mon Sep 17 00:00:00 2001 From: swcho Date: Mon, 22 Sep 2025 13:49:01 +0900 Subject: [PATCH 34/46] =?UTF-8?q?fix:=20=EC=A7=80=EB=8F=84=EC=A0=90?= =?UTF-8?q?=EA=B2=80=EA=B2=B0=EA=B3=BC=20=EB=93=B1=EB=A1=9D=20=ED=86=A0?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EB=A9=94=EC=84=B8=EC=A7=80=20=EC=98=A4?= =?UTF-8?q?=ED=83=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/index.tsx b/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/index.tsx index e30606651..1a0af3fad 100644 --- a/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/index.tsx +++ b/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/index.tsx @@ -264,7 +264,7 @@ export const rainChkgdnActionsExport: (set: any) => rainChkgdnActions = ( const res = await putFectch("/reuseChk/rainy/list", chData); if (res) { toast.success( - "지도점검 대체수 및 밋물이용량 수정이 완료되었습니다. " + "지도점검 대체수 및 빗물이용량 수정이 완료되었습니다. " ); const rainChkRes = await initFetch( 1, @@ -281,11 +281,11 @@ export const rainChkgdnActionsExport: (set: any) => rainChkgdnActions = ( }, })); } else { - toast.error("지도점검 대체수 및 밋물이용량 수정 오류입니다."); + toast.error("지도점검 대체수 및 빗물이용량 수정 오류입니다."); } } catch (error) { console.log(error); - toast.error("지도점검 대체수 및 밋물이용량 수정 오류입니다."); + toast.error("지도점검 대체수 및 빗물이용량 수정 오류입니다."); } }, rainChkGuidUpdate: async (rainChk: rainChkZodType) => { From 29e8223efae162c3872595cf1dac2e33f9d04cd9 Mon Sep 17 00:00:00 2001 From: swcho Date: Mon, 22 Sep 2025 14:01:58 +0900 Subject: [PATCH 35/46] =?UTF-8?q?fix:=20-=20=EC=98=A4=ED=83=80=EC=88=98?= =?UTF-8?q?=EC=A0=95(upadateData=20->=20updateData)=20-=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=20=ED=9B=84=20=EC=85=80=20=EC=84=A0=ED=83=9D=20?= =?UTF-8?q?=EC=B4=88=EA=B8=B0=ED=99=94=20=EC=97=90=EB=9F=AC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../matMng/coMng/coSttn/page.tsx | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/apps/wr/app/(with-layout)/matMng/coMng/coSttn/page.tsx b/apps/wr/app/(with-layout)/matMng/coMng/coSttn/page.tsx index da5b9b560..c8ffb904e 100644 --- a/apps/wr/app/(with-layout)/matMng/coMng/coSttn/page.tsx +++ b/apps/wr/app/(with-layout)/matMng/coMng/coSttn/page.tsx @@ -63,7 +63,8 @@ export default function CoSttn() { }); const [seartchTxt, setSearchTxt] = useState(); - const [upadateData, setUpdateData] = useState(); + const [updateData, setUpdateData] = useState(); + const [isResetSelection, setIsResetSelection] = useState(false); const getSelCity = useCallback( (val: string | number) => { @@ -135,6 +136,10 @@ export default function CoSttn() { } }, [coSttn.excelList, code]); + useEffect(() => { + setIsResetSelection(false); + }, [updateData]); + const excelClick = useCallback(() => { const con = objSearch.sgg && objSearch.sgg !== "0" ? objSearch.sgg : objSearch.city; @@ -160,8 +165,8 @@ export default function CoSttn() { }; const { t } = useTranslation('base'); const initPassword = () => { - if (upadateData) { - const dmdInfoId = upadateData.dmdInfoId; + if (updateData) { + const dmdInfoId = updateData.dmdInfoId; const dmdInfoSliceId = `${dmdInfoId.slice(0, 3)}-${dmdInfoId.slice(3, 5)}-${dmdInfoId.slice(5, 10)}-${dmdInfoId.slice(10)}` const handleConfirm = () => { coSttnPwInit(dmdInfoId); @@ -219,6 +224,7 @@ export default function CoSttn() { size={"sm"} className={btnClass} onClick={() => { + setIsResetSelection(true); setUpdateData(undefined); setIsDmdModal({ ...isDmdModal, isMoal: true }); }} @@ -231,7 +237,7 @@ export default function CoSttn() { className={btnClass} onClick={() => { /* 저장 로직 */ - if (!upadateData) { + if (!updateData) { toast.error("수요처 변경을 원하는 행을 선택해주세요"); } else { setIsDmdModal({ @@ -283,13 +289,14 @@ export default function CoSttn() { setPageNation(page); coSttnSearch(String(page), "13", String(con)); }} + resetSelection={isResetSelection} > { @@ -308,7 +315,7 @@ export default function CoSttn() { objSearch.sgg && objSearch.sgg !== "0" ? objSearch.sgg : objSearch.city; - if (upadateData?.dmdInfoId) { + if (updateData?.dmdInfoId) { await updateDemandCompany(data as DemandCompType); coSttnInit("1", "13", String(con)); setIsDmdModal({ @@ -335,7 +342,7 @@ export default function CoSttn() { } }} bodyClassNm={"w-full mx-auto bg-white rounded-lg shadow-md p-6"} - updateList={upadateData} + updateList={updateData} openNetwork={false} > } From 64e5c4c0fbe62cb01f040d57aeb6d2792bee7682 Mon Sep 17 00:00:00 2001 From: swcho Date: Mon, 22 Sep 2025 15:39:19 +0900 Subject: [PATCH 36/46] =?UTF-8?q?fix:=20=EC=A7=80=EB=8F=84=EC=A0=90?= =?UTF-8?q?=EA=B2=80=EA=B2=B0=EA=B3=BC=20=EB=93=B1=EB=A1=9D=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20updateRainDetail=20=EC=B4=88=EA=B8=B0?= =?UTF-8?q?=ED=99=94=20=EC=97=90=EB=9F=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruseFcltMng/prfmncReg/chkgdnReg/page.tsx | 8 ++------ .../ui/table/chkgdTable/rainChkgd/rainChkgdTable.tsx | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/apps/wr/app/(with-layout)/ruseFcltMng/prfmncReg/chkgdnReg/page.tsx b/apps/wr/app/(with-layout)/ruseFcltMng/prfmncReg/chkgdnReg/page.tsx index 06003462f..aea5c4b39 100644 --- a/apps/wr/app/(with-layout)/ruseFcltMng/prfmncReg/chkgdnReg/page.tsx +++ b/apps/wr/app/(with-layout)/ruseFcltMng/prfmncReg/chkgdnReg/page.tsx @@ -67,12 +67,8 @@ export default function Page() { }); const { regAuthrtYn, mdfcnAuthrtYn, delAuthrtYn,laeSeCd } = auth; const [isRegExcel, setIsRegExcel] = useState(false); - const [updateRainDetail, setUpdateRainDetail] = useState( - [] - ); - const [updateRswtDetail, setUpdateRSwtDetail] = useState< - rswtrChkDetailsZodType[] - >([]); + const [updateRainDetail, setUpdateRainDetail] = useState([]); + const [updateRswtDetail, setUpdateRSwtDetail] = useState([]); const [deleteIdx, setDeleteIdx] = useState([]); const [rainPageNation, setRainPageNation] = useState(1); const [rswtPageNation, setRswtPageNation] = useState(1); diff --git a/apps/wr/components/ui/table/chkgdTable/rainChkgd/rainChkgdTable.tsx b/apps/wr/components/ui/table/chkgdTable/rainChkgd/rainChkgdTable.tsx index 4717e8346..8727f037e 100644 --- a/apps/wr/components/ui/table/chkgdTable/rainChkgd/rainChkgdTable.tsx +++ b/apps/wr/components/ui/table/chkgdTable/rainChkgd/rainChkgdTable.tsx @@ -155,7 +155,7 @@ export default function RainChkgdTable({ setUpRaintDetail(updateTableData as rainChkZodType[]); - } + } else setUpRaintDetail(selectedData); }, [makeTableData, selectedIds]); useEffect(() => { From 0d9ebcbd551ac0426e193f6dc03b445a680f593d Mon Sep 17 00:00:00 2001 From: leedj312 Date: Mon, 22 Sep 2025 17:17:30 +0900 Subject: [PATCH 37/46] =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=EC=9E=90=20=EA=B1=B4=EC=B6=95=EB=AC=BC=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=20=EC=8B=9C=EB=8F=84=EC=BD=94=EB=93=9C=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9/=20=ED=95=98=EC=88=98=EC=B2=98=EB=A6=AC=EC=9E=A5=20?= =?UTF-8?q?=EC=A7=80=EB=8F=84PopUp=20data=20=EC=98=A4=EB=A5=98=20=EC=8A=88?= =?UTF-8?q?=E3=85=9C=EC=A0=95/=EC=A7=80=EB=8F=84=EC=A0=90=EA=B2=80=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(popUp-layout)/mapFeaturePopup/page.tsx | 4 +- .../ruseFcltMng/prfmncReg/chkgdnReg/page.tsx | 2 + .../ruseFcltMng/fcltReg/bdstReg/index.tsx | 349 +++++++++++------- apps/wr/components/lib/func/commom.tsx | 117 ++++-- .../ui/form/fcltReg/bdstReg/bdstReg.tsx | 60 ++- .../fcltReg/bdstRegModal/bdstRegModal.tsx | 48 ++- .../공사비산정 방법 정리_20241119_1.xlsx | Bin 0 -> 20685 bytes 7 files changed, 378 insertions(+), 202 deletions(-) create mode 100644 apps/wr/wr_doc/공사비산정 방법 정리_20241119_1.xlsx diff --git a/apps/wr/app/(popUp-layout)/mapFeaturePopup/page.tsx b/apps/wr/app/(popUp-layout)/mapFeaturePopup/page.tsx index 680f637d4..90b1cbc8a 100644 --- a/apps/wr/app/(popUp-layout)/mapFeaturePopup/page.tsx +++ b/apps/wr/app/(popUp-layout)/mapFeaturePopup/page.tsx @@ -55,12 +55,14 @@ export default function MapFeaturePopup() { useEffect(() => { + console.log(' layerNm ' , layerNm) if (isFeatureCd && layerNm) { if (layerNm === "tb_wr_bdst_ruse_fclt") { setIsDetail(isFeatureCd); } else if (layerNm === "tb_il_swage_prcs_fclt") { pbnMapDetaile(isFeatureCd).then((res) => { - setIsDetail(res); + console.log('res', res) + setIsDetail([res]); }); } else if (layerNm === "tb_wr_rnwtr_utztn_fclt") { rainMapDetile(isFeatureCd).then((res) => { diff --git a/apps/wr/app/(with-layout)/ruseFcltMng/prfmncReg/chkgdnReg/page.tsx b/apps/wr/app/(with-layout)/ruseFcltMng/prfmncReg/chkgdnReg/page.tsx index aea5c4b39..d38e14c96 100644 --- a/apps/wr/app/(with-layout)/ruseFcltMng/prfmncReg/chkgdnReg/page.tsx +++ b/apps/wr/app/(with-layout)/ruseFcltMng/prfmncReg/chkgdnReg/page.tsx @@ -255,12 +255,14 @@ export default function Page() { if (selFcltDiv === "RNB") { if (updateRainDetail && updateRainDetail.length > 0) { rainChkDetilUpdate(updateRainDetail, searchYear); + setUpdateRainDetail([]) } else { toast.error("수정을 원하는 행을 선택하고 저장버튼을 눌러주세요 "); } } else { if (updateRswtDetail && updateRswtDetail.length > 0) { rswtChkDetilsUpdate(updateRswtDetail, searchYear); + setUpdateRSwtDetail([]) } else { toast.error("수정을 원하는 행을 선택하고 저장버튼을 눌러주세요 "); } diff --git a/apps/wr/app/store/ruseFcltMng/fcltReg/bdstReg/index.tsx b/apps/wr/app/store/ruseFcltMng/fcltReg/bdstReg/index.tsx index 1d9a0f6af..837b669ec 100644 --- a/apps/wr/app/store/ruseFcltMng/fcltReg/bdstReg/index.tsx +++ b/apps/wr/app/store/ruseFcltMng/fcltReg/bdstReg/index.tsx @@ -1,201 +1,266 @@ import { getFetch } from "@/components/lib/api"; -import { TEST_UUID, type customRainBdst } from "../rainReg"; +import { TEST_UUID, type customRainBdst } from "../rainReg"; import type { customHtdflBdst } from "../htdflReg"; import type { customRswtBdst } from "../rswtReg"; import type { TableUpperProps } from "@/app/store/common/type/header"; +import type { SelectDataType } from "@common/business_components/ui"; +const moUpHeadList: TableUpperProps[] = [ + { id: "cityText", title: "시도" }, + { id: "sggText", title: "시군구" }, + { id: "bdstNm", title: "시설명" }, + { id: "daddr", title: "위치" }, + { id: "frstArchPrmsnDt", title: "최초건축허가일" }, + { id: "archArea", title: "건축면적(㎡)" }, +]; - const moUpHeadList: TableUpperProps[] = [ - { id: "cityText", title: "시도" }, - { id: "sggText", title: "시군구" }, - { id: "bdstNm", title: "시설명" }, - { id: "daddr", title: "위치" }, - { id: "frstArchPrmsnDt", title: "최초건축허가일" }, - { id: "archArea", title: "건축면적(㎡)", }, - ]; +const bdstChgHeadList: TableUpperProps[] = [ + { id: "bdstChgNm", title: "구분" }, + { id: "archChgPrmsnDt", title: "허가일" }, + { id: "archChgArea", title: "변경면적(㎡)" }, +]; +const bdstBase: any[] = []; - const bdstChgHeadList: TableUpperProps[] = [ - { id: "bdstChgNm", title: "구분" }, - { id: "archChgPrmsnDt", title: "허가일" }, - { id: "archChgArea", title: "변경면적(㎡)" }, - - ]; - - - -const bdstBase:any[] = []; - - -const isRainBdst = (data: any): data is customRainBdst=> { +const isRainBdst = (data: any): data is customRainBdst => { return data.reuseBuilding?.[0]?.rainyObj !== undefined; -} +}; -const isHtdflBdst = (data: any): data is customHtdflBdst=> { +const isHtdflBdst = (data: any): data is customHtdflBdst => { return data.reuseBuilding?.[0]?.htdflObj !== undefined; -} +}; -const isRswtBdst = (data: any): data is customRswtBdst =>{ +const isRswtBdst = (data: any): data is customRswtBdst => { return data.reuseBuilding?.[0]?.rswtrObj !== undefined; -} +}; +export const makeRstr = ( + data: customRainBdst | customHtdflBdst | customRswtBdst +) => { + data.rgtr = TEST_UUID; - - export const makeRstr =(data:customRainBdst|customHtdflBdst|customRswtBdst) =>{ - data.rgtr = TEST_UUID; - - let chData - if(isRainBdst(data)){ + let chData; + if (isRainBdst(data)) { chData = data.reuseBuilding.map((item) => ({ ...item, - rgtr : TEST_UUID, - rainyObj:{ + rgtr: TEST_UUID, + rainyObj: { ...item.rainyObj, - rgtr:TEST_UUID - } + rgtr: TEST_UUID, + }, })); - data.reuseBuilding=chData; - }else if(isHtdflBdst(data)){ + data.reuseBuilding = chData; + } else if (isHtdflBdst(data)) { chData = data.reuseBuilding.map((item) => ({ ...item, - rgtr : TEST_UUID, - htdflObj:{ + rgtr: TEST_UUID, + htdflObj: { ...item.htdflObj, - rgtr:TEST_UUID - } + rgtr: TEST_UUID, + }, })); - data.reuseBuilding=chData; - }else if (isRswtBdst(data)){ + data.reuseBuilding = chData; + } else if (isRswtBdst(data)) { chData = data.reuseBuilding.map((item) => ({ ...item, - rgtr : TEST_UUID, - rswtrObj:{ + rgtr: TEST_UUID, + rswtrObj: { ...item.rswtrObj, - rgtr:TEST_UUID - } + rgtr: TEST_UUID, + }, })); - data.reuseBuilding=chData; + data.reuseBuilding = chData; } - - if('chgBuilding' in data && Array.isArray(data.chgBuilding) && data.chgBuilding.length > 0){ - const chRgtr = data.chgBuilding.map((item) =>({...item, rgtr:TEST_UUID, mdfr: item.mdfr ?? null })) - data.chgBuilding =chRgtr; - } - return data; - + if ( + "chgBuilding" in data && + Array.isArray(data.chgBuilding) && + data.chgBuilding.length > 0 + ) { + const chRgtr = data.chgBuilding.map((item) => ({ + ...item, + rgtr: TEST_UUID, + mdfr: item.mdfr ?? null, + })); + data.chgBuilding = chRgtr; } + return data; +}; - export const makeMdfr =(data:customRainBdst|customHtdflBdst|customRswtBdst) =>{ - data.mdfr = TEST_UUID; - let chData - if(isRainBdst(data)){ - chData = data.reuseBuilding.map((item) => ({ - ...item, - mdfr : TEST_UUID, - rainyObj:{ - ...item.rainyObj, - mdfr:TEST_UUID - } - })); - if(data?.chgBuilding.length>0){ - const chRgtr = data.chgBuilding.map((item) =>({...item, rgtr:TEST_UUID, mdfr: item.mdfr ?? null })) - data.chgBuilding =chRgtr; - } - - data.reuseBuilding=chData - }else if(isHtdflBdst(data)){ - chData = data.reuseBuilding.map((item) => ({ +export const makeMdfr = ( + data: customRainBdst | customHtdflBdst | customRswtBdst +) => { + data.mdfr = TEST_UUID; + let chData; + if (isRainBdst(data)) { + chData = data.reuseBuilding.map((item) => ({ + ...item, + mdfr: TEST_UUID, + rainyObj: { + ...item.rainyObj, + mdfr: TEST_UUID, + }, + })); + if (data?.chgBuilding.length > 0) { + const chRgtr = data.chgBuilding.map((item) => ({ ...item, - mdfr : TEST_UUID, - htdflObj:{ - ...item.htdflObj, - mdfr:TEST_UUID - } + rgtr: TEST_UUID, + mdfr: item.mdfr ?? null, })); - data.reuseBuilding=chData; - }else if (isRswtBdst(data)){ - chData = data.reuseBuilding.map((item) => ({ - ...item, - mdfr : TEST_UUID, - rswtrObj:{ - ...item.rswtrObj, - mdfr:TEST_UUID - } - })); - data.reuseBuilding=chData; + data.chgBuilding = chRgtr; } - if('chgBuilding' in data && Array.isArray(data.chgBuilding) && data.chgBuilding.length > 0){ - const chMdfr = data.chgBuilding.map((item) =>({...item, mdfr:TEST_UUID, archChgArea: item.archChgArea ?? '' })) - data.chgBuilding =chMdfr; - } - - return data; - + data.reuseBuilding = chData; + } else if (isHtdflBdst(data)) { + chData = data.reuseBuilding.map((item) => ({ + ...item, + mdfr: TEST_UUID, + htdflObj: { + ...item.htdflObj, + mdfr: TEST_UUID, + }, + })); + data.reuseBuilding = chData; + } else if (isRswtBdst(data)) { + chData = data.reuseBuilding.map((item) => ({ + ...item, + mdfr: TEST_UUID, + rswtrObj: { + ...item.rswtrObj, + mdfr: TEST_UUID, + }, + })); + data.reuseBuilding = chData; } + if ( + "chgBuilding" in data && + Array.isArray(data.chgBuilding) && + data.chgBuilding.length > 0 + ) { + const chMdfr = data.chgBuilding.map((item) => ({ + ...item, + mdfr: TEST_UUID, + archChgArea: item.archChgArea ?? "", + })); + data.chgBuilding = chMdfr; + } + + return data; +}; + export type bdstFulType = bdstState & bdstActions; - export type bdstState = { bdst: { bdstBase: any[]; - moUpHeadList:TableUpperProps[] - bdstChgHeadList:TableUpperProps[] + moUpHeadList: TableUpperProps[]; + bdstChgHeadList: TableUpperProps[]; + userCityCd: SelectDataType[]; + userSggCd: SelectDataType[]; }; }; type bdstActions = { - findBdst: (sggCd:string, searchTxt:string, flag:string) => void ; - }; - - - const findBdstInfo = async(sggCd:string, searchTxt:string ,flg:string)=>{ - return await getFetch('wr', `/reuseFc/building/${flg}/${sggCd}`+(searchTxt?`/${searchTxt}`:'' )) - - } - + findBdst: (sggCd: string, searchTxt: string, flag: string) => void; + setUserCitySggCd: ( + laeSeCd: string, + cityCd: SelectDataType[], + sggCd: SelectDataType[]) => void; + setUserSggCd: ( userCityCd: string,sggCd: SelectDataType[]) => void; +}; + +const findBdstInfo = async (sggCd: string, searchTxt: string, flg: string) => { + return await getFetch( + "wr", + `/reuseFc/building/${flg}/${sggCd}` + (searchTxt ? `/${searchTxt}` : "") + ); +}; + export const bdstStateExport: bdstState = { bdst: { bdstBase: bdstBase, // Updated to match the array type - moUpHeadList:moUpHeadList, - bdstChgHeadList:bdstChgHeadList, + userCityCd: [], + userSggCd: [], + moUpHeadList: moUpHeadList, + bdstChgHeadList: bdstChgHeadList, }, }; -export const bdstActionsExport: (set: any) => bdstActions = ( - set: any -) => { +export const bdstActionsExport: (set: any) => bdstActions = (set: any) => { return { - - findBdst: async(sggCd:string, searchTxt:string ,flg:string ) =>{ - try{ - - const bdst = await findBdstInfo(sggCd, searchTxt, flg); - const makeBdst = bdst.map((item:any) => { - return { - ...item, - reuseBuilding:[] - }; - }) - return set((state:bdstState) =>({ - ...state, - bdst:{ - ...state.bdst, - bdstBase:makeBdst - } - - })) - }catch(error1){ - console.log("error ", error1) - - }finally{ - - } + findBdst: async (sggCd: string, searchTxt: string, flg: string) => { + try { + const bdst = await findBdstInfo(sggCd, searchTxt, flg); + const makeBdst = bdst.map((item: any) => { + return { + ...item, + reuseBuilding: [], + }; + }); + return set((state: bdstState) => ({ + ...state, + bdst: { + ...state.bdst, + bdstBase: makeBdst, + }, + })); + } catch (error1) { + console.log("error ", error1); + } finally { + } }, + setUserCitySggCd: ( + laeSeCd: string, + cityCd: SelectDataType[], + sggCd: SelectDataType[] + ) => { + let city = [...cityCd]; + let sgg = [...sggCd] + console.log('sgg ', sgg) + if (laeSeCd === "0" && cityCd.length > 0) { + city = city; + sgg = [{ val: "0", text: "전체" }] + } else if (laeSeCd.length === 2 && cityCd.length > 0) { + city = cityCd.filter((item) => item.val === laeSeCd); + sgg = sggCd.filter((item) => item.val.slice(0, 2) === laeSeCd); + sggCd.unshift({ val: "0", text: "전체" }); + } else if ( + laeSeCd.length === 5 && + cityCd.length > 0 && + sggCd.length > 0 + ) { + city = cityCd.filter((item) => item.val === laeSeCd.slice(0, 2)); + sgg = sggCd.filter((item) => item.val === laeSeCd); + + + } + + return set((state: bdstState) => ({ + + + ...state, + bdst: { + ...state.bdst, + userCityCd: city, + userSggCd: sgg, + }, + })); + },setUserSggCd( userCityCd: string,sggCd: SelectDataType[]){ + + + const sgg = sggCd.filter((item) => item.val.slice(0, 2) === userCityCd); + + return set((state: bdstState) => ({ + ...state, + bdst: { + ...state.bdst, + userSggCd: sgg, + }, + })); + }, }; }; diff --git a/apps/wr/components/lib/func/commom.tsx b/apps/wr/components/lib/func/commom.tsx index 1e15fae1c..a99dd8db8 100644 --- a/apps/wr/components/lib/func/commom.tsx +++ b/apps/wr/components/lib/func/commom.tsx @@ -37,7 +37,11 @@ export const tableData = (data: any, code: comCodeState) => { (item: { sggCd: string; ctpvCd: string; - reuseBuilding: { lawTrgtYn: string; bdstUsgCd: string ,grntchBdstCertGrd:string}[]; + reuseBuilding: { + lawTrgtYn: string; + bdstUsgCd: string; + grntchBdstCertGrd: string; + }[]; }) => { let returnData = {}; const sggText = chCode.sggCd.find( @@ -47,15 +51,13 @@ export const tableData = (data: any, code: comCodeState) => { (cd) => cd.val === String(item.ctpvCd).trim() )?.text; if (item?.reuseBuilding?.length > 0) { - const bdsgUsgText = chCode?.bdstTotalUsgType?.find( (cd) => cd.val === item?.reuseBuilding[0]?.bdstUsgCd )?.text; const lawTrgtYn = item?.reuseBuilding[0]?.lawTrgtYn; - - const grntchBdstCertGrdText =chCode?.bdstGrntchClass?.find( + const grntchBdstCertGrdText = chCode?.bdstGrntchClass?.find( (cd) => cd.val === item?.reuseBuilding[0]?.grntchBdstCertGrd )?.text; @@ -65,7 +67,7 @@ export const tableData = (data: any, code: comCodeState) => { cityText: cityText ?? "없음", bdsgUsgText: bdsgUsgText, lawTrgtYn: lawTrgtYn, - grntchBdstCertGrdText:grntchBdstCertGrdText + grntchBdstCertGrdText: grntchBdstCertGrdText, }; } else { returnData = { @@ -160,13 +162,13 @@ export const formatCommaNumber = ( }; //내가 쓰는 값이 숫자이냐 아니냐 -export const isNumeric =(value: string) => { - if(value&&value.length>0){ +export const isNumeric = (value: string) => { + if (value && value.length > 0) { return value?.trim() !== "" && !isNaN(Number(value)); - }else{ - return false + } else { + return false; } -} +}; export const getCityOrSgg = (ref: RefObject) => { let con; @@ -219,11 +221,15 @@ export const formatPhoneNumber = (tel: string) => { } }; -export const confirmToast = (content: string, saveFunc: () => void, contentClass?:string) => { +export const confirmToast = ( + content: string, + saveFunc: () => void, + contentClass?: string +) => { toast( (t) => ( -
{content}
+
{content}
- {/* @@ -338,7 +345,6 @@ export default function WrStatusPage() { - ))} diff --git a/apps/dm/app/common/comFunction.ts b/apps/dm/app/common/comFunction.ts index 02db72e8d..ec4894d49 100644 --- a/apps/dm/app/common/comFunction.ts +++ b/apps/dm/app/common/comFunction.ts @@ -1,4 +1,4 @@ -import type { DmStatusChartType, DmStatusDataType, RegionData, } from "../store/wrStatus/type"; +import type { RegionData, } from "../store/wrStatus/type"; @@ -43,7 +43,7 @@ export const regionIdMap: Record = { }; -const makeRegion = (region: string) => { +export const makeRegion = (region: string) => { if (region === '서울특별시') return '서울' if (region === '부산광역시') return '부산' if (region === '대구광역시') return '대구' @@ -56,19 +56,10 @@ const makeRegion = (region: string) => { if (region === '강원특별자치도') return '강원' if (region === '충청북도') return '충북' if (region === '충청남도') return '충남' - if (region === '전라북도') return '전북' + if (region === '전북특별자치도') return '전북' if (region === '전라남도') return '전남' if (region === '경상북도') return '경북' if (region === '경상남도') return '경남' if (region === '제주특별자치도') return '제주' return region; } -export const changeStatusMapData= (data: DmStatusDataType[]) : DmStatusChartType[]=> { - return data.map((item) => ({ - label: makeRegion(item.region??''), - 하수: item.sewage.split('(')[0]?.replaceAll(',','') ??'', - 빗물: item.rainwater.split('(')[0]?.replaceAll(',','')??'', - 중수도: item.reclaimed.split('(')[0]?.replaceAll(',','') ??'', - 온배수: item.thermal.split('(')[0]?.replaceAll(',','') ??'', - })); -} \ No newline at end of file diff --git a/apps/dm/app/layout.tsx b/apps/dm/app/layout.tsx index 152a069f2..462537e09 100644 --- a/apps/dm/app/layout.tsx +++ b/apps/dm/app/layout.tsx @@ -1,4 +1,4 @@ -"use client" +"use client"; import "./globals.css"; export default function RootLayout({ @@ -6,15 +6,13 @@ export default function RootLayout({ }: Readonly<{ children: React.ReactNode; }>) { + return ( 물재이용 대민 - - {children} - + {children} ); } - diff --git a/apps/dm/app/store/common/index.tsx b/apps/dm/app/store/common/index.tsx index cf4ce14d8..6721d2620 100644 --- a/apps/dm/app/store/common/index.tsx +++ b/apps/dm/app/store/common/index.tsx @@ -214,7 +214,7 @@ const selectMiddleRegionData: SelectDataType[] = [ // 시도 API 호출 함수 추가 const fetchSidoData = async (): Promise => { try { - const res = await getFetch(fetchType.COMMON, '/addr/city'); + const res = await getFetch(fetchType.FO, '/addr/city'); const data = res.data; selectSidoData = [ { text: "전체", val: '0'}, @@ -233,7 +233,7 @@ const fetchSidoData = async (): Promise => { // 시군구 API 호출 함수 추가 const fetchSigunData = async (): Promise => { try { - const res = await getFetch(fetchType.COMMON, '/addr/sgg'); + const res = await getFetch(fetchType.FO, '/addr/sgg'); const data = res.data; selectSigunData = [ { text: "전체", val: '0' }, @@ -253,7 +253,7 @@ const fetchSigunData = async (): Promise => { // 권역 API 호출 함수 추가 const fetchRegionData = async (): Promise => { try { - const res = await getFetch(fetchType.COMMON, '/addr/sarea'); + const res = await getFetch(fetchType.FO, '/addr/sarea'); const data = res.data; return [ { text: "전체", val: '0'}, @@ -271,7 +271,7 @@ const fetchRegionData = async (): Promise => { // 중권역 API 호출 함수 추가 const fetchMiddleRegionData = async (): Promise => { try { - const res = await getFetch(fetchType.COMMON, '/addr/midArea'); + const res = await getFetch(fetchType.FO, '/addr/midArea'); const data = res.data; return [ { text: "전체", val: '0' }, @@ -290,7 +290,7 @@ const fetchMiddleRegionData = async (): Promise => { // 단위유역 API 호출 함수 추가 const fetchUnitWaterShedData = async (): Promise => { try { - const res = await getFetch(fetchType.COMMON, '/addr/largeArea'); + const res = await getFetch(fetchType.FO, '/addr/largeArea'); const data = res.data; return [ { text: "전체", val: '0' }, @@ -309,7 +309,7 @@ const fetchUnitWaterShedData = async (): Promise => { // 환경청 데이터 const fetchEnvPartData = async (): Promise => { try { - const res = await getFetch(fetchType.COMMON, '/addr/govArea'); + const res = await getFetch(fetchType.FO, '/addr/govArea'); const data = res.data; selectEnvPartData = [ { text: "전체", val: '0', adstDliStrCd: '' }, diff --git a/apps/dm/app/store/map/index.tsx b/apps/dm/app/store/map/index.tsx index 7b5eb0cca..5ed066f73 100644 --- a/apps/dm/app/store/map/index.tsx +++ b/apps/dm/app/store/map/index.tsx @@ -1,9 +1,9 @@ -import { getFetch } from "@/components/ui/api"; +import { fetchType, getFetch } from "@/components/ui/api"; import { DEV_URL_FO } from "@/components/ui/config"; import type { FacilityInfo, SubsInfo } from "./type"; const checkWrRegList = async () => { - const wrRegList = await getFetch("wr", `/reuseFc/pubFc`); + const wrRegList = await getFetch(fetchType.WR, `/reuseFc/pubFc`); return wrRegList; }; diff --git a/apps/dm/app/store/wrStatus/index.tsx b/apps/dm/app/store/wrStatus/index.tsx index 417bfab6c..10ef19216 100644 --- a/apps/dm/app/store/wrStatus/index.tsx +++ b/apps/dm/app/store/wrStatus/index.tsx @@ -1,12 +1,14 @@ -import { changeStatusMapData } from "@/app/common/comFunction"; import { fetchType, getFetch } from "@/components/ui/api"; import type { DmStatusDataType, DmStatusChartType, + DmStatusBoardType, } from "./type"; +import type { SelectDataType } from "../common"; +import { makeRegion } from "@/app/common/comFunction"; export type DmStatusActions = { - getDmStatusData(year: string): void; + getDmStatusData(cityCd: SelectDataType[]): void; }; export type DmStatusType = { @@ -28,32 +30,89 @@ export type DmStatusStore = DmStatusType & DmStatusActions; export const DmStatusReducer = (set: any): DmStatusActions => { return { - getDmStatusData: async (year: string) => { - const data = await getFetch(fetchType.WR, "/daemin/" + year); - let isData:DmStatusDataType[] =[] - if(data.data&&data.data.length>0){ - isData=data.data - }else{ - fetch(`data/wrStatusData.json`).then((res) => res.json()).then((json) => isData=json)//만약 백엔드에서 못가져올경우 방어책 - } + getDmStatusData: async (cityCd: SelectDataType[]) => { + const data = await getFetch(fetchType.FO, "/dashBoard/daemin"); - const orgin: DmStatusDataType[] = isData; - const chartData = changeStatusMapData(orgin); + const dataSum = data.data.reduce( + (acc: DmStatusDataType, item: DmStatusDataType) => { + acc.sewage = ( + parseInt(acc.sewage.replaceAll(",", "")) + + parseInt(item.sewage.replaceAll(",", "")) + ).toLocaleString(); + acc.rainwater = ( + parseInt(acc.rainwater.replaceAll(",", "")) + + parseInt(item.rainwater.replaceAll(",", "")) + ).toLocaleString(); + acc.reclaimed = ( + parseInt(acc.reclaimed.replaceAll(",", "")) + + parseInt(item.reclaimed.replaceAll(",", "")) + ).toLocaleString(); + acc.sewageCnt = ( + parseInt(acc.sewageCnt.replaceAll(",", "")) + + parseInt(item.sewageCnt.replaceAll(",", "")) + ).toLocaleString(); + acc.rainwaterCnt = ( + parseInt(acc.rainwaterCnt.replaceAll(",", "")) + + parseInt(item.rainwaterCnt.replaceAll(",", "")) + ).toLocaleString(); + acc.reclaimedCnt = ( + parseInt(acc.reclaimedCnt.replaceAll(",", "")) + + parseInt(item.reclaimedCnt.replaceAll(",", "")) + ).toLocaleString(); + return acc; + }, + { + region: "합계", + sewage: "0", + rainwater: "0", + reclaimed: "0", + sewageCnt: "0", + rainwaterCnt: "0", + reclaimedCnt: "0", + } + ); + data.data.unshift(dataSum); + + console.log("dataSum ", dataSum); const facilityTotals = [ - "하수재이용시설" + "(총" + orgin[0]?.sewage.split("(")[0] + "개소)", - "빗물재이용시설" + "(총" + orgin[0]?.rainwater.split("(")[0] + "개소)", - "중수도재이용시설" + - "(총" + - orgin[0]?.reclaimed.split("(")[0] + - "개소)", - "온배수재이용시설" + "(총" + orgin[0]?.thermal.split("(")[0] + "개소)", + "하수재이용시설" + "(총" + dataSum?.sewageCnt + "개소)", + "빗물재이용시설" + "(총" + dataSum?.rainwaterCnt + "개소)", + "중수도재이용시설" + "(총" + dataSum?.reclaimedCnt + "개소)", ]; + const boardData: DmStatusBoardType[] = data.data.map( + (item: DmStatusDataType) => { + const regionText = cityCd.find((city) => item.region === city.val); + const sewage = item.sewage; + const rainwater = item.rainwater; + const reclaimed = item.reclaimed; + const sewageCnt = item.sewageCnt; + const rainwaterCnt = item.rainwaterCnt; + const reclaimedCnt = item.reclaimedCnt; + + return { + region: regionText ? regionText.text : item.region, + sewage: sewageCnt + "(" + sewage + ")", + rainwater: rainwaterCnt + "(" + rainwater + ")", + reclaimed: reclaimedCnt + "(" + reclaimed + ")", + }; + } + ); + + const chartData = data.data.map((item) => ({ + label: makeRegion( + cityCd.find((city) => item.region === city.val)?.text ?? "" + ), + 하수: item.sewage, + 빗물: item.rainwater, + 중수도: item.reclaimed, + })); + set((state: DmStatusType) => ({ ...state, dmStatus: { ...state.dmStatus, - statusData: data.data, + statusData: boardData, chartData: chartData, facilityTotals: facilityTotals, }, diff --git a/apps/dm/app/store/wrStatus/type.ts b/apps/dm/app/store/wrStatus/type.ts index 3e674227b..513a5fb01 100644 --- a/apps/dm/app/store/wrStatus/type.ts +++ b/apps/dm/app/store/wrStatus/type.ts @@ -3,9 +3,17 @@ export type DmStatusDataType = { sewage: string; rainwater: string; reclaimed: string; - thermal: string; + sewageCnt:string + rainwaterCnt:string + reclaimedCnt:string }; +export type DmStatusBoardType = { + region: string; + sewage: string; + rainwater: string; + reclaimed: string; +}; export type DmStatusFcltType = { sewageFclt: string; @@ -21,7 +29,6 @@ export type DmStatusChartType = { 하수: string, 빗물: string, 중수도: string, - 온배수: string, } export type RegionData = { diff --git a/apps/dm/components/ui/api/index.ts b/apps/dm/components/ui/api/index.ts index 51d06e700..28644b00e 100644 --- a/apps/dm/components/ui/api/index.ts +++ b/apps/dm/components/ui/api/index.ts @@ -3,7 +3,8 @@ import { DEV_URL_FO, DEV_URL_WR } from "../config"; export const fetchType = { COMMON: "common", - WR: "wr" + WR: "wr", + FO:'fo' }; interface RequestParams { @@ -11,7 +12,7 @@ interface RequestParams { } export const getFetch = async (type: string, url: string) => { - const baseUrl = type === fetchType.COMMON ? DEV_URL_FO : DEV_URL_WR; + const baseUrl = type === fetchType.FO ? DEV_URL_FO : DEV_URL_WR; const response = await fetch(baseUrl + url, { method: "GET", headers: { From 6c022cd1ec8594c4072838df97f0761bb1df9a15 Mon Sep 17 00:00:00 2001 From: swcho Date: Tue, 23 Sep 2025 11:35:18 +0900 Subject: [PATCH 43/46] =?UTF-8?q?feat:=20=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EC=84=B8=EC=85=98=20=EB=A7=8C=EB=A3=8C=EC=8B=9C=20CM=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=EB=A1=9C=20=EB=A6=AC=EB=8B=A4=EC=9D=B4=EB=A0=89=ED=8A=B8=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=20(env=20=ED=8C=8C=EC=9D=BC=20=EB=8F=84?= =?UTF-8?q?=EB=A9=94=EC=9D=B8=20=EC=9E=AC=EC=84=A4=EC=A0=95=20=ED=95=84?= =?UTF-8?q?=EC=9A=94)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/sn/.env.local | 3 +++ apps/sn/src/entities/auth/lib/auth-wrapper.tsx | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/sn/.env.local b/apps/sn/.env.local index 9d5804fc0..ed1b605c3 100644 --- a/apps/sn/.env.local +++ b/apps/sn/.env.local @@ -11,6 +11,9 @@ NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr/openapi/Gettile.do?apiKey=04trYP9_ NEXT_PUBLIC_SERVER_API_URL = http://dev.onasys.co.kr:8000 NEXT_PUBLIC_SEWERAGE_API_URL=http://con.mind-one.co.kr:11083 NEXT_PUBLIC_DC_URL = https://apigateway.apps.rsonesoft.com +NEXT_PUBLIC_DEV_CM_LOGIN_PAGE_URL = http://localhost:3000/auth/login +NEXT_PUBLIC_VDI_DEV_CM_LOGIN_PAGE_URL = http://localhost:3000/auth/login +NEXT_PUBLIC_VDI_DEV_CM_LOGIN_PAGE_URL = http://localhost:3000/auth/login #NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.128:8883 #NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.222:8883 #NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.66:8883 \ No newline at end of file diff --git a/apps/sn/src/entities/auth/lib/auth-wrapper.tsx b/apps/sn/src/entities/auth/lib/auth-wrapper.tsx index f0710e249..cfe908e2a 100644 --- a/apps/sn/src/entities/auth/lib/auth-wrapper.tsx +++ b/apps/sn/src/entities/auth/lib/auth-wrapper.tsx @@ -10,6 +10,7 @@ import { getCookie } from "@/shared/lib"; import { LoginApi } from "../api/login-service"; const CLAIM_NAME = process.env.NEXT_PUBLIC_CLAIM_NAME || "Authorization"; +const LOGIN_PAGE_URL = process.env.NEXT_PUBLIC_DEV_CM_LOGIN_PAGE_URL; // 개발 환경 URL const AuthWrapper = ({ children }: { children: React.ReactNode }) => { const router = useRouter(); @@ -40,7 +41,10 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => { } catch (refreshError) { console.error("Token refresh failed:", refreshError); setUserInfo(null); - router.push("/"); + // router.push("/"); // 개발시 홈으로 돌아가기 + + window.location.href = LOGIN_PAGE_URL; // 세션 만료 시 CM 로그인 페이지로 리다이렉트 + // router.push는 같은 Next.js 앱 내에서만 작동하므로 다른 앱으로 이동할 때는 window.location.href 사용 } } })(); From 5952760b05d46831209dd38ccf058c59ad55504e Mon Sep 17 00:00:00 2001 From: jsyang Date: Tue, 23 Sep 2025 14:06:18 +0900 Subject: [PATCH 44/46] =?UTF-8?q?=EB=B9=8C=EB=93=9C=EC=97=90=EB=9F=AC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95,=20=EC=9C=A0=EB=9F=89=ED=98=84=ED=99=A9=20?= =?UTF-8?q?=EC=97=91=EC=85=80=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(with-layout)/facilityWaterQlty/modal/page.tsx | 8 ++++---- .../app/pages/(with-layout)/flowRate/modal/page.tsx | 11 ++++++----- apps/fo/app/pages/(with-layout)/flowRate/page.tsx | 8 ++++---- .../(with-layout)/processFacility/modal/page.tsx | 3 +-- apps/fo/app/store/flowRate/index.tsx | 11 ++++++----- 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx index 9e8ba4ff6..e76778d89 100644 --- a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx @@ -5,17 +5,17 @@ */ "use client" +import CommaToNumber from "@/app/components/common/CommaToNumber"; +import { roundNumber } from "@/app/components/common/DataForm"; +import UnderComment from "@/app/components/common/UnderComment"; import { useFoStore } from "@/app/store"; import type { FacilityWaterQltyProps, modalExcelType } from "@/app/store/facilityWaterQlty"; -import { downloadExcel, downloadExcelFormat, UITab, UiTable } from "@common/business_components/ui"; +import { downloadExcelFormat, UITab, UiTable } from "@common/business_components/ui"; import { Button, TabsContent } from "@common/components/ui"; import { useCallback, useEffect, useRef, useState } from "react"; import type { ReturnType } from "../../../../components/common/FacilityTermModalHeader"; import FacilityTermModalHeader from "../../../../components/common/FacilityTermModalHeader"; import { HeadMakeColSpan } from "../HeadMakeColSpan"; -import { roundNumber } from "@/app/components/common/DataForm"; -import UnderComment from "@/app/components/common/UnderComment"; -import CommaToNumber from "@/app/components/common/CommaToNumber"; const commentArrayChungchun = [ "청천시 : 강우량이 3mm미만의 날" diff --git a/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx b/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx index 9f026430a..30b97c945 100644 --- a/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx @@ -15,6 +15,7 @@ import type { ReturnType } from "../../../../components/common/FacilityTermModal import { roundUp } from "@/app/store/common"; import { roundNumber } from "@/app/components/common/DataForm"; import UnderComment from "@/app/components/common/UnderComment"; +import CommaToNumber from "@/app/components/common/CommaToNumber"; const tabList = [ { value: 'tab_term_year', label: '연간' }, @@ -186,11 +187,11 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st copyYearList.forEach((item) => { excelDownList.push({ "날짜": item.msrDt, - "총유입량(m³/일)": item.totInflAmnt, - "하수유입량(m³/일)": item.inflAmnt, - "연계처리량(m³/일)": item.sumFlow, - "총인반류수량(m³/일)": item.returnAmnt, - "방류량(m³/일)": item.efflAmnt, + "총유입량(m³/일)": CommaToNumber(item.totInflAmnt), + "하수유입량(m³/일)": CommaToNumber(item.inflAmnt), + "연계처리량(m³/일)": CommaToNumber(item.sumFlow), + "총인반류수량(m³/일)": CommaToNumber(item.returnAmnt), + "방류량(m³/일)": CommaToNumber(item.efflAmnt), /* "강우량(mm/일)": item.infoRnDay, */ }); }); diff --git a/apps/fo/app/pages/(with-layout)/flowRate/page.tsx b/apps/fo/app/pages/(with-layout)/flowRate/page.tsx index 750395cbd..5b53f51a2 100644 --- a/apps/fo/app/pages/(with-layout)/flowRate/page.tsx +++ b/apps/fo/app/pages/(with-layout)/flowRate/page.tsx @@ -7,12 +7,12 @@ "use client" import { useFoStore } from "@/app/store"; import type { TableUpperProps } from "@/app/store/common"; -import { ContentsDiv, downloadExcel, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiModal, UiTable, type ReturnType } from "@common/business_components"; +import type { ExcelType } from "@/app/store/flowRate"; +import { ContentsDiv, downloadExcelFormat, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiModal, UiTable, type ReturnType } from "@common/business_components"; import ListDiv from "@common/business_components/ui/list_div"; +import LoadingOverlay from "@common/business_components/ui/loadingBar"; import { useCallback, useEffect, useRef, useState } from "react"; import FlowRateModal from "./modal/page"; -import type { ExcelType } from "@/app/store/flowRate"; -import LoadingOverlay from "@common/business_components/ui/loadingBar"; export default function ProcessFacilitySearch() { const {Common @@ -140,7 +140,7 @@ export default function ProcessFacilitySearch() { useEffect(() => { if (excelList && excelList.length > 0) { - downloadExcel({ data: JSON.parse(JSON.stringify(excelList)), fileName: '시설별 유량현황', sheetNameArray: ['시설별 유량현황'], headerRange: 'A1:O1' }); + downloadExcelFormat({ data: JSON.parse(JSON.stringify(excelList)), fileName: '시설별 유량현황', sheetNameArray: ['시설별 유량현황'], headerRange: 'A1:O1', decimalArray0: [9,10,11,12,13,14] }); } else if (prevExcelListRef.current && prevExcelListRef.current.length > 0) { alert('다운받을 데이터가 없습니다.'); } diff --git a/apps/fo/app/pages/(with-layout)/processFacility/modal/page.tsx b/apps/fo/app/pages/(with-layout)/processFacility/modal/page.tsx index 5b7324c1d..fbda7a140 100644 --- a/apps/fo/app/pages/(with-layout)/processFacility/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/processFacility/modal/page.tsx @@ -5,10 +5,9 @@ */ "use client" -import { roundNumber } from "@/app/components/common/DataForm"; import { useFoStore } from "@/app/store"; import type { TableUpperProps } from "@/app/store/dashboard"; -import { downloadExcel, downloadExcelFormat, filePickedBlobArray, UITab, UiTable } from "@common/business_components/ui"; +import { downloadExcelFormat, filePickedBlobArray, UITab, UiTable } from "@common/business_components/ui"; import ListDiv from "@common/business_components/ui/list_div"; import { TabsContent diff --git a/apps/fo/app/store/flowRate/index.tsx b/apps/fo/app/store/flowRate/index.tsx index ab9100d09..05a41e556 100644 --- a/apps/fo/app/store/flowRate/index.tsx +++ b/apps/fo/app/store/flowRate/index.tsx @@ -3,6 +3,7 @@ import type { TableUpperProps } from "../dashboard"; import DataForm, { roundNumber } from "@/app/components/common/DataForm"; import CalcRainEffect from "@/app/components/common/CalcRainEffect"; import { fetchFacilityWaterQltyListHist } from "../facilityWaterQlty"; +import CommaToNumber from "@/app/components/common/CommaToNumber"; /**==================================== * Store - 타입 @@ -300,11 +301,11 @@ export const flowRateSearchReducer:(set:(fn: (state: FlowRateSearchType) => Flow 시설이름: item.bscFctNm, 주소: item.daddr, "시설용량(m³/일)": item.fctCpc, - "총유입량(m³/일)": item.totInflAmnt, - "하수유입량(m³/일)": item.inflAmnt, - "연계처리량(m³/일)": item.sumFlow, - "총인반류수량(m³/일)": item.returnAmnt, - "방류량(m³/일)": item.efflAmnt, + "총유입량(m³/일)": CommaToNumber(item.totInflAmnt), + "하수유입량(m³/일)": CommaToNumber(item.inflAmnt), + "연계처리량(m³/일)": CommaToNumber(item.sumFlow), + "총인반류수량(m³/일)": CommaToNumber(item.returnAmnt), + "방류량(m³/일)": CommaToNumber(item.efflAmnt), }); }); } From c72fa450bc4122312281d21890fc139e62ab8d2e Mon Sep 17 00:00:00 2001 From: jsyang Date: Tue, 23 Sep 2025 14:06:45 +0900 Subject: [PATCH 45/46] =?UTF-8?q?=EC=97=91=EC=85=80=EB=8B=A4=EC=9A=B4?= =?UTF-8?q?=EB=A1=9C=EB=93=9C=20=EC=9E=90=EC=97=B0=EC=88=98=EA=B9=8C?= =?UTF-8?q?=EC=A7=80=20=EB=82=98=EC=98=A4=EB=8F=84=EB=A1=9D=20array?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business_components/src/ui/excel/index.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/common/business_components/src/ui/excel/index.tsx b/packages/common/business_components/src/ui/excel/index.tsx index 1e4626440..aedb32256 100644 --- a/packages/common/business_components/src/ui/excel/index.tsx +++ b/packages/common/business_components/src/ui/excel/index.tsx @@ -6,6 +6,7 @@ type ExcelDownloadProps = { fileName: string; sheetNameArray: string[]; headerRange?: string; + decimalArray0? : number[]; decimalArray1? : number[]; decimalArray2? : number[]; decimalArray3? : number[]; @@ -18,11 +19,11 @@ export const downloadExcel = ({ data, fileName = new Date().getTime().toString() excelStyle(XLSX.write(workbook, { bookType: "xlsx", type: "buffer" }), headerRange, fileName); }; -export const downloadExcelFormat = ({ data, fileName = new Date().getTime().toString() + '.xlsx', sheetNameArray = ["Sheet1"], headerRange='A1:V3', decimalArray1=[], decimalArray2=[], decimalArray3=[]}: ExcelDownloadProps) => { +export const downloadExcelFormat = ({ data, fileName = new Date().getTime().toString() + '.xlsx', sheetNameArray = ["Sheet1"], headerRange='A1:V3', decimalArray0=[], decimalArray1=[], decimalArray2=[], decimalArray3=[]}: ExcelDownloadProps) => { const worksheet = XLSX.utils.json_to_sheet(Array.isArray(data) ? data : [data]); const workbook = XLSX.utils.book_new(); XLSX.utils.book_append_sheet(workbook, worksheet, sheetNameArray[0]); - + console.log('decimalArray0 : ', decimalArray0); const headerEnd = XLSX.utils.decode_range(headerRange).e.r; // 0-based index const startRow = headerEnd + 1; @@ -37,18 +38,20 @@ export const downloadExcelFormat = ({ data, fileName = new Date().getTime().toSt const cell = worksheet[cellAddr]; if (cell && typeof cell.v === "number") { if(decimal===1){ - cell.z = "0.0"; // 소수점 3자리 + cell.z = "#,##0.0"; // 소수점 3자리 }else if(decimal===2){ - cell.z = "0.00"; + cell.z = "#,##0.00"; }else if(decimal===3){ - cell.z = "0.000"; + cell.z = "#,##0.000"; + }else{ + cell.z = "#,##0"; // 기본 천단위 콤마 } } } } } }; - + chaneValue(decimalArray0, 0); chaneValue(decimalArray1, 1); chaneValue(decimalArray2, 2); chaneValue(decimalArray3, 3); From 00a8165476c7c25a8ee2bfc9ab951e24201bd162 Mon Sep 17 00:00:00 2001 From: swcho Date: Wed, 24 Sep 2025 09:23:21 +0900 Subject: [PATCH 46/46] =?UTF-8?q?remove,=20fix:=20-=20CLAIM=5FNAME=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=20-=20LOGIN=5FPAGE=5FURL=20Default=20?= =?UTF-8?q?=EA=B0=92=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/sn/src/entities/auth/lib/auth-wrapper.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/sn/src/entities/auth/lib/auth-wrapper.tsx b/apps/sn/src/entities/auth/lib/auth-wrapper.tsx index cfe908e2a..5d93b000d 100644 --- a/apps/sn/src/entities/auth/lib/auth-wrapper.tsx +++ b/apps/sn/src/entities/auth/lib/auth-wrapper.tsx @@ -9,8 +9,8 @@ import { ENDPOINT, AUTH_USER_ID } from "@/shared/config"; import { getCookie } from "@/shared/lib"; import { LoginApi } from "../api/login-service"; -const CLAIM_NAME = process.env.NEXT_PUBLIC_CLAIM_NAME || "Authorization"; -const LOGIN_PAGE_URL = process.env.NEXT_PUBLIC_DEV_CM_LOGIN_PAGE_URL; // 개발 환경 URL + +const LOGIN_PAGE_URL = process.env.NEXT_PUBLIC_DEV_CM_LOGIN_PAGE_URL || "http://localhost:3000/auth/login"; // 로그인 페이지 URL const AuthWrapper = ({ children }: { children: React.ReactNode }) => { const router = useRouter();
하수재이용시설 빗물이용시설 중수도시설온배수시설하수(이용량,천𝓂³/년) 빗물(이용량,천𝓂³/년) 중수도(이용량,천𝓂³/년){row.sewage} {row.rainwater} {row.reclaimed}{row.thermal}