From e94ecffb9befaa86359c6e203587dbb39b9cd2dd Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Tue, 7 Nov 2023 09:25:49 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8C=80=EC=8B=9C=EB=B3=B4=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 --- .../webapp/WEB-INF/jsp/include/dashboard.jsp | 344 ++++++++---------- .../js/fims/framework/cmm/cmmUtil.js | 33 +- 2 files changed, 183 insertions(+), 194 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/include/dashboard.jsp b/src/main/webapp/WEB-INF/jsp/include/dashboard.jsp index 806dbab7..ddbbe145 100644 --- a/src/main/webapp/WEB-INF/jsp/include/dashboard.jsp +++ b/src/main/webapp/WEB-INF/jsp/include/dashboard.jsp @@ -200,21 +200,34 @@ function fnMakeStatReq(taskSeCd){ var lastDay = DateUtil.getDate().date.replace("-",""); var firstDay = DateUtil.getDateDay(-14).date.replaceAll("-",""); - var mergedQuery = {}; - - var groupInfoList = []; - var numberValueInfoList = []; - var codeSubsetInfoList = []; - var defaultQuery = {}; - var queryInQuery1 = {}; - var queryInQuery2 = {}; - var queryInQuery3 = {}; - + + //단속구분별 전체/완료 건수 defaultQuery = { structureType : "dummy", statDomain : "crdn", + groupInfoList : [ + { + refCol : "CRDN_SE_CD", + ctgrType : ["code"], + dtlCtgr : ["FIM002"] + } + ], + codeSubsetInfoList : [ + { + sourceGroup : "FIM002", + sourceCodes : ["08","09","10","11"], + targetCode : "minwon", + targetCodeVal : "민원" + }, + { + sourceGroup : "FIM002", + sourceCodes : ["06","13"], + targetCode : "dobo", + targetCodeVal : "도보" + } + ], fixedItemId : ["01","02","minwon","dobo"], namedNumberValueSeperator : "completeAndTotal", globalAggregate : "count", @@ -223,39 +236,13 @@ function fnMakeStatReq(taskSeCd){ firstDay : firstDay, lastDay : lastDay }; - - groupInfoList = [ - { - refCol : "CRDN_SE_CD", - ctgrType : ["code"], - dtlCtgr : ["FIM002"] - } - ]; - - queryInQuery1 = fnJsonArrayToFormData(groupInfoList, "groupInfoList"); - - codeSubsetInfoList = [ - { - sourceGroup : "FIM002", - sourceCodes : ["08","09","10","11"], - targetCode : "minwon", - targetCodeVal : "민원" - }, - { - sourceGroup : "FIM002", - sourceCodes : ["06","13"], - targetCode : "dobo", - targetCodeVal : "도보" - } - ]; - - queryInQuery3 = fnJsonArrayToFormData(codeSubsetInfoList, "codeSubsetInfoList"); - - mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery3}; - + + defaultQuery = fnJsonToFormData(defaultQuery, "groupInfoList"); + defaultQuery = fnJsonToFormData(defaultQuery, "numberValueInfoList"); + defaultQuery = fnJsonToFormData(defaultQuery, "codeSubsetInfoList"); statReqArr.push({ - query : mergedQuery, + query : defaultQuery, cursor : "card1", statType : "progressAndTotal" }); @@ -264,6 +251,13 @@ function fnMakeStatReq(taskSeCd){ defaultQuery = { structureType : "dummy", statDomain : "crdn", + groupInfoList : [ + { + refCol : "등록대상이첩대상구분", + ctgrType : ["code"], + dtlCtgr : ["FIM999"] + } + ], fixedItemId : ["등록대상","이첩대상"], namedNumberValueSeperator : "completeAndTotal", globalAggregate : "count", @@ -273,20 +267,12 @@ function fnMakeStatReq(taskSeCd){ lastDay : lastDay }; - groupInfoList = [ - { - refCol : "등록대상이첩대상구분", - ctgrType : ["code"], - dtlCtgr : ["FIM999"] - } - ]; - - queryInQuery1 = fnJsonArrayToFormData(groupInfoList, "groupInfoList"); - - mergedQuery = {...defaultQuery, ...queryInQuery1 }; + defaultQuery = fnJsonToFormData(defaultQuery, "groupInfoList"); + defaultQuery = fnJsonToFormData(defaultQuery, "numberValueInfoList"); + defaultQuery = fnJsonToFormData(defaultQuery, "codeSubsetInfoList"); statReqArr.push({ - query : mergedQuery, + query : defaultQuery, cursor : "card2", statType : "progressAndTotal" }); @@ -295,6 +281,13 @@ function fnMakeStatReq(taskSeCd){ defaultQuery = { structureType : "dummy", statDomain : "sndb", + groupInfoList : [ + { + refCol : "SNDNG_SE_CD", + ctgrType : ["code"], + dtlCtgr : ["FIM047"] + } + ], fixedItemId : ["01", "02", "03"], namedNumberValueSeperator : "completeAndTotal", globalAggregate : "count", @@ -304,20 +297,12 @@ function fnMakeStatReq(taskSeCd){ lastDay : lastDay }; - groupInfoList = [ - { - refCol : "SNDNG_SE_CD", - ctgrType : ["code"], - dtlCtgr : ["FIM047"] - } - ]; - - queryInQuery1 = fnJsonArrayToFormData(groupInfoList, "groupInfoList"); - - mergedQuery = {...defaultQuery, ...queryInQuery1 }; - + defaultQuery = fnJsonToFormData(defaultQuery, "groupInfoList"); + defaultQuery = fnJsonToFormData(defaultQuery, "numberValueInfoList"); + defaultQuery = fnJsonToFormData(defaultQuery, "codeSubsetInfoList"); + statReqArr.push({ - query : mergedQuery, + query : defaultQuery, cursor : "card3", statType : "progressAndTotal" }); @@ -326,6 +311,21 @@ function fnMakeStatReq(taskSeCd){ defaultQuery = { structureType : "dummy", statDomain : "excl", + groupInfoList : [ + { + refCol : "OPNN_SBMSN_STTS_CD", + ctgrType : ["code"], + dtlCtgr : ["FIM031"] + } + ], + codeSubsetInfoList : [ + { + sourceGroup : "FIM031", + sourceCodes : ["01","02"], + targetCode : "acceptOrNonAccept", + targetCodeVal : "수용/미수용" + } + ], fixedItemId : ["00", "acceptOrNonAccept", "03"], namedNumberValueSeperator : "completeAndTotal", globalAggregate : "count", @@ -335,31 +335,12 @@ function fnMakeStatReq(taskSeCd){ lastDay : lastDay }; - groupInfoList = [ - { - refCol : "OPNN_SBMSN_STTS_CD", - ctgrType : ["code"], - dtlCtgr : ["FIM031"] - } - ]; - - queryInQuery1 = fnJsonArrayToFormData(groupInfoList, "groupInfoList"); - - codeSubsetInfoList = [ - { - sourceGroup : "FIM031", - sourceCodes : ["01","02"], - targetCode : "acceptOrNonAccept", - targetCodeVal : "수용/미수용" - } - ]; - - queryInQuery3 = fnJsonArrayToFormData(codeSubsetInfoList, "codeSubsetInfoList"); - - mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery3}; + defaultQuery = fnJsonToFormData(defaultQuery, "groupInfoList"); + defaultQuery = fnJsonToFormData(defaultQuery, "numberValueInfoList"); + defaultQuery = fnJsonToFormData(defaultQuery, "codeSubsetInfoList"); statReqArr.push({ - query : mergedQuery, + query : defaultQuery, cursor : "card4", statType : "progressAndTotal" }); @@ -368,6 +349,27 @@ function fnMakeStatReq(taskSeCd){ defaultQuery = { structureType : "aggregate", statDomain : "crdn", + groupInfoList : [ + { + refCol : "CRDN_SE_CD", + ctgrType : ["code"], + dtlCtgr : ["FIM002"] + } + ], + codeSubsetInfoList : [ + { + sourceGroup : "FIM002", + sourceCodes : ["08","09","10","11"], + targetCode : "minwon", + targetCodeVal : "민원" + }, + { + sourceGroup : "FIM002", + sourceCodes : ["06","13"], + targetCode : "dobo", + targetCodeVal : "도보" + } + ], fixedItemId : ["01","02","dobo","minwon"], namedNumberValueSeperator : "lastFewDays", globalAggregate : "count", @@ -376,37 +378,12 @@ function fnMakeStatReq(taskSeCd){ dayRange : 15 }; - groupInfoList = [ - { - refCol : "CRDN_SE_CD", - ctgrType : ["code"], - dtlCtgr : ["FIM002"] - } - ]; - - queryInQuery1 = fnJsonArrayToFormData(groupInfoList, "groupInfoList"); - - codeSubsetInfoList = [ - { - sourceGroup : "FIM002", - sourceCodes : ["08","09","10","11"], - targetCode : "minwon", - targetCodeVal : "민원" - }, - { - sourceGroup : "FIM002", - sourceCodes : ["06","13"], - targetCode : "dobo", - targetCodeVal : "도보" - } - ]; - - queryInQuery3 = fnJsonArrayToFormData(codeSubsetInfoList, "codeSubsetInfoList"); - - mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery3}; - + defaultQuery = fnJsonToFormData(defaultQuery, "groupInfoList"); + defaultQuery = fnJsonToFormData(defaultQuery, "numberValueInfoList"); + defaultQuery = fnJsonToFormData(defaultQuery, "codeSubsetInfoList"); + statReqArr.push({ - query : mergedQuery, + query : defaultQuery, cursor : "lineChart", statType : "line" }); @@ -415,6 +392,26 @@ function fnMakeStatReq(taskSeCd){ defaultQuery = { structureType : "aggregate", statDomain : "crdnSttsHstry", + groupInfoList : [ + { + refCol : "CRDN_STTS_CD", + ctgrType : ["code"], + dtlCtgr : ["FIM010"] + } + ], + numberValueInfoList : [ + { + aggregateType : "count" + } + ], + codeSubsetInfoList : [ + { + sourceGroup : "FIM010", + sourceCodes : ["21"], + targetCode : "dansokProcess", + targetCodeVal : "단속" + } + ], fixedItemId : ["dansokProcess","81","83"], taskSeCd : taskSeCd, dayColumn : "REG_DT", @@ -422,39 +419,12 @@ function fnMakeStatReq(taskSeCd){ lastDay : firstDay }; - groupInfoList = [ - { - refCol : "CRDN_STTS_CD", - ctgrType : ["code"], - dtlCtgr : ["FIM010"] - } - ]; - - queryInQuery1 = fnJsonArrayToFormData(groupInfoList, "groupInfoList"); - - numberValueInfoList = [ - { - aggregateType : "count" - } - ]; - - queryInQuery2 = fnJsonArrayToFormData(numberValueInfoList, "numberValueInfoList"); - - codeSubsetInfoList = [ - { - sourceGroup : "FIM010", - sourceCodes : ["21"], - targetCode : "dansokProcess", - targetCodeVal : "단속" - } - ]; - - queryInQuery3 = fnJsonArrayToFormData(codeSubsetInfoList, "codeSubsetInfoList"); - - mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery2, ...queryInQuery3}; + defaultQuery = fnJsonToFormData(defaultQuery, "groupInfoList"); + defaultQuery = fnJsonToFormData(defaultQuery, "numberValueInfoList"); + defaultQuery = fnJsonToFormData(defaultQuery, "codeSubsetInfoList"); statReqArr.push({ - query : mergedQuery, + query : defaultQuery, cursor : "doughnutChart1", statType : "doughnut" }); @@ -463,6 +433,18 @@ function fnMakeStatReq(taskSeCd){ defaultQuery = { structureType : "aggregate", statDomain : "sndb", + groupInfoList : [ + { + refCol : "SNDNG_SE_CD", + ctgrType : ["code"], + dtlCtgr : ["FIM047"] + } + ], + numberValueInfoList : [ + { + aggregateType : "count" + } + ], fixedItemId : ["01", "02", "03"], taskSeCd : taskSeCd, dayColumn : "SNDNG_YMD", @@ -470,28 +452,12 @@ function fnMakeStatReq(taskSeCd){ lastDay : firstDay }; - groupInfoList = [ - { - refCol : "SNDNG_SE_CD", - ctgrType : ["code"], - dtlCtgr : ["FIM047"] - } - ]; - - queryInQuery1 = fnJsonArrayToFormData(groupInfoList, "groupInfoList"); - - numberValueInfoList = [ - { - aggregateType : "count" - } - ]; - - queryInQuery2 = fnJsonArrayToFormData(numberValueInfoList, "numberValueInfoList"); - - mergedQuery = {...defaultQuery, ...queryInQuery1, ... queryInQuery2}; + defaultQuery = fnJsonToFormData(defaultQuery, "groupInfoList"); + defaultQuery = fnJsonToFormData(defaultQuery, "numberValueInfoList"); + defaultQuery = fnJsonToFormData(defaultQuery, "codeSubsetInfoList"); statReqArr.push({ - query : mergedQuery, + query : defaultQuery, cursor : "doughnutChart2", statType : "doughnut" }); @@ -500,6 +466,18 @@ function fnMakeStatReq(taskSeCd){ defaultQuery = { structureType : "aggregate", statDomain : "excl", + groupInfoList : [ + { + refCol : "OPNN_SBMSN_STTS_CD", + ctgrType : ["code"], + dtlCtgr : ["FIM031"] + } + ], + numberValueInfoList : [ + { + aggregateType : "count" + } + ], fixedItemId : ["01", "02", "03"], taskSeCd : taskSeCd, dayColumn : "REG_DT", @@ -507,28 +485,12 @@ function fnMakeStatReq(taskSeCd){ lastDay : firstDay }; - groupInfoList = [ - { - refCol : "OPNN_SBMSN_STTS_CD", - ctgrType : ["code"], - dtlCtgr : ["FIM031"] - } - ]; - - queryInQuery1 = fnJsonArrayToFormData(groupInfoList, "groupInfoList"); - - numberValueInfoList = [ - { - aggregateType : "count" - } - ]; - - queryInQuery2 = fnJsonArrayToFormData(numberValueInfoList, "numberValueInfoList"); - - mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery2 }; - + defaultQuery = fnJsonToFormData(defaultQuery, "groupInfoList"); + defaultQuery = fnJsonToFormData(defaultQuery, "numberValueInfoList"); + defaultQuery = fnJsonToFormData(defaultQuery, "codeSubsetInfoList"); + statReqArr.push({ - query : mergedQuery, + query : defaultQuery, cursor : "doughnutChart3", statType : "doughnut" }); diff --git a/src/main/webapp/resources/js/fims/framework/cmm/cmmUtil.js b/src/main/webapp/resources/js/fims/framework/cmm/cmmUtil.js index ccd7c50b..886f8878 100644 --- a/src/main/webapp/resources/js/fims/framework/cmm/cmmUtil.js +++ b/src/main/webapp/resources/js/fims/framework/cmm/cmmUtil.js @@ -296,8 +296,8 @@ function camelToKebab(text){ * jsonArray를 FormData형식의 키를 갖는 json으로 치환한다. * @return FormData형식의 키를 갖는 json */ -function fnJsonArrayToFormData(array, name){ - newObj = {}; +function fnJsonArrayToFormData(array, arrayName){ + var newObj = {}; for(var i=0; i