통계 수정

main
이범준 1 year ago
parent 5fccfbd924
commit 246aeed494

@ -96,7 +96,7 @@ public class StatBean extends AbstractComponent {
//고정 항목 설정 //고정 항목 설정
if(statQuery.getFixedItemId() != null) { if(statQuery.getFixedItemId() != null) {
this.itemFix(group, statQuery.getFixedItemId()); this.itemFix(group, statQuery);
} }
//수치 값 추출 //수치 값 추출
@ -211,10 +211,12 @@ public class StatBean extends AbstractComponent {
} }
/** . /** .
* @param group , fixedItemId ID; * @param group , statQuery ;
* @return * @return
*/ */
public void itemFix(Map<String, List<DataObject>> group, String[] fixedItemId) { public void itemFix(Map<String, List<DataObject>> group, StatQuery statQuery) {
String[] fixedItemId = statQuery.getFixedItemId();
for(int i=0; i < fixedItemId.length; i++) { for(int i=0; i < fixedItemId.length; i++) {
if(!group.containsKey(fixedItemId[i])) { if(!group.containsKey(fixedItemId[i])) {

@ -174,8 +174,10 @@ height="250" viewBox="0 0 24 24" style="fill: rgba(0, 0, 0, 1);transform: ;msFil
<path class="skeleton" d="M18 13c-.478 2.833-2.982 4.949-5.949 4.949-3.309 0-6-2.691-6-6C6.051 8.982 8.167 6.478 11 6V2c-5.046.504-8.949 4.773-8.949 9.949 0 5.514 4.486 10 10 10 5.176 0 9.445-3.903 9.949-8.949h-4z"></path> <path class="skeleton" d="M18 13c-.478 2.833-2.982 4.949-5.949 4.949-3.309 0-6-2.691-6-6C6.051 8.982 8.167 6.478 11 6V2c-5.046.504-8.949 4.773-8.949 9.949 0 5.514 4.486 10 10 10 5.176 0 9.445-3.903 9.949-8.949h-4z"></path>
</svg>`; </svg>`;
var statReqArr = [];
fnMakeSkeleton(); fnMakeSkeleton();
sleep(3000).then(() => fnLoadStatisticsDatas($("#layout-navbar input[name='taskSeCd']:checked").val())); sleep(3000).then(() => fnMakeStatReq($("#layout-navbar input[name='taskSeCd']:checked").val()));
//데이터 로딩 전 이미지 표시 //데이터 로딩 전 이미지 표시
@ -193,8 +195,8 @@ function fnMakeSkeleton(){
} }
//통계 데이터 조회(여러 건) //통계 요청 데이터 생성(여러 건)
function fnLoadStatisticsDatas(taskSeCd){ function fnMakeStatReq(taskSeCd){
var lastDay = DateUtil.getDate().date.replace("-",""); var lastDay = DateUtil.getDate().date.replace("-","");
var firstDay = DateUtil.getDateDay(-14).date.replaceAll("-",""); var firstDay = DateUtil.getDateDay(-14).date.replaceAll("-","");
@ -211,7 +213,7 @@ function fnLoadStatisticsDatas(taskSeCd){
//단속구분별 전체/완료 건수 //단속구분별 전체/완료 건수
defaultQuery = { defaultQuery = {
structureType : "aggregate", structureType : "dummy",
fixedItemId : ["01","02","minwon","dobo"], fixedItemId : ["01","02","minwon","dobo"],
namedNumberValueSeperator : "completeAndTotal", namedNumberValueSeperator : "completeAndTotal",
globalAggregate : "count", globalAggregate : "count",
@ -250,11 +252,16 @@ function fnLoadStatisticsDatas(taskSeCd){
mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery3}; mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery3};
//fnLoadStatisticsData(mergedQuery, "card1", "progressAndTotal");
statReqArr.push({
query : mergedQuery,
cursor : "card1",
statType : "progressAndTotal"
});
//초기자료처리별 전체/완료건수 //초기자료처리별 전체/완료건수
defaultQuery = { defaultQuery = {
structureType : "aggregate", structureType : "dummy",
fixedItemId : ["등록대상","이첩대상"], fixedItemId : ["등록대상","이첩대상"],
namedNumberValueSeperator : "completeAndTotal", namedNumberValueSeperator : "completeAndTotal",
globalAggregate : "count", globalAggregate : "count",
@ -276,11 +283,15 @@ function fnLoadStatisticsDatas(taskSeCd){
mergedQuery = {...defaultQuery, ...queryInQuery1 }; mergedQuery = {...defaultQuery, ...queryInQuery1 };
//fnLoadStatisticsData(mergedQuery, "card2", "progressAndTotal"); statReqArr.push({
query : mergedQuery,
cursor : "card2",
statType : "progressAndTotal"
});
//발송문서별 전체/완료 건수 //발송문서별 전체/완료 건수
defaultQuery = { defaultQuery = {
structureType : "aggregate", structureType : "dummy",
fixedItemId : ["01", "02", "03"], fixedItemId : ["01", "02", "03"],
namedNumberValueSeperator : "completeAndTotal", namedNumberValueSeperator : "completeAndTotal",
globalAggregate : "count", globalAggregate : "count",
@ -302,11 +313,15 @@ function fnLoadStatisticsDatas(taskSeCd){
mergedQuery = {...defaultQuery, ...queryInQuery1 }; mergedQuery = {...defaultQuery, ...queryInQuery1 };
//fnLoadStatisticsData(mergedQuery, "card3" , "progressAndTotal"); statReqArr.push({
query : mergedQuery,
cursor : "card3",
statType : "progressAndTotal"
});
//의견진술자료상태 //의견진술자료상태
defaultQuery = { defaultQuery = {
structureType : "aggregate", structureType : "dummy",
fixedItemId : ["00", "acceptOrNonAccept", "03"], fixedItemId : ["00", "acceptOrNonAccept", "03"],
namedNumberValueSeperator : "completeAndTotal", namedNumberValueSeperator : "completeAndTotal",
globalAggregate : "count", globalAggregate : "count",
@ -339,7 +354,11 @@ function fnLoadStatisticsDatas(taskSeCd){
mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery3}; mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery3};
//fnLoadStatisticsData(mergedQuery, "card4" , "progressAndTotal"); statReqArr.push({
query : mergedQuery,
cursor : "card4",
statType : "progressAndTotal"
});
//단속구분별 최근n일 건수 //단속구분별 최근n일 건수
defaultQuery = { defaultQuery = {
@ -381,16 +400,20 @@ function fnLoadStatisticsDatas(taskSeCd){
mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery3}; mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery3};
fnLoadStatisticsData(mergedQuery, "lineChart", "line"); statReqArr.push({
query : mergedQuery,
cursor : "lineChart",
statType : "line"
});
//초기자료처리별 건수 차트 //초기자료처리별 건수 차트
defaultQuery = { defaultQuery = {
structureType : "aggregate", structureType : "dummy",
fixedItemId : ["단속","계고","서손"], fixedItemId : ["단속","계고","서손"],
taskSeCd : taskSeCd, taskSeCd : taskSeCd,
dayColumn : "REG_DT", dayColumn : "REG_DT",
firstDay : firstDay, firstDay : firstDay,
lastDay : lastDay lastDay : firstDay
}; };
groupInfoList = [ groupInfoList = [
@ -414,7 +437,11 @@ function fnLoadStatisticsDatas(taskSeCd){
mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery2 }; mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery2 };
//fnLoadStatisticsData(mergedQuery, "doughnutChart1", "doughnut"); statReqArr.push({
query : mergedQuery,
cursor : "doughnutChart1",
statType : "doughnut"
});
//발송문서종류별 건수 차트 //발송문서종류별 건수 차트
defaultQuery = { defaultQuery = {
@ -423,7 +450,7 @@ function fnLoadStatisticsDatas(taskSeCd){
taskSeCd : taskSeCd, taskSeCd : taskSeCd,
dayColumn : "SNDNG_YMD", dayColumn : "SNDNG_YMD",
firstDay : firstDay, firstDay : firstDay,
lastDay : lastDay lastDay : firstDay
}; };
groupInfoList = [ groupInfoList = [
@ -446,7 +473,11 @@ function fnLoadStatisticsDatas(taskSeCd){
mergedQuery = {...defaultQuery, ...queryInQuery1, ... queryInQuery2}; mergedQuery = {...defaultQuery, ...queryInQuery1, ... queryInQuery2};
fnLoadStatisticsData(mergedQuery, "doughnutChart2", "doughnut"); statReqArr.push({
query : mergedQuery,
cursor : "doughnutChart2",
statType : "doughnut"
});
//의견진술결과별 건수 차트 //의견진술결과별 건수 차트
defaultQuery = { defaultQuery = {
@ -455,7 +486,7 @@ function fnLoadStatisticsDatas(taskSeCd){
taskSeCd : taskSeCd, taskSeCd : taskSeCd,
dayColumn : "REG_DT", dayColumn : "REG_DT",
firstDay : firstDay, firstDay : firstDay,
lastDay : lastDay lastDay : firstDay
}; };
groupInfoList = [ groupInfoList = [
@ -478,19 +509,35 @@ function fnLoadStatisticsDatas(taskSeCd){
mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery2 }; mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery2 };
fnLoadStatisticsData(mergedQuery, "doughnutChart3", "doughnut"); statReqArr.push({
query : mergedQuery,
cursor : "doughnutChart3",
statType : "doughnut"
});
fnLoadStatisticsData();
} }
//통계 데이터 조회 //통계 데이터 조회
function fnLoadStatisticsData(queryParam, cursor, statType){ function fnLoadStatisticsData(){
var statArr = statReqArr.pop();
ajax.get({ ajax.get({
url : wctx.url("/stat/stat01/010/info.do"), url : wctx.url("/stat/stat01/010/info.do"),
data : queryParam, data : statArr.query,
success : (resp) => { success : (resp) => {
var statData = resp.stat; var statData = resp.stat;
fnRenderDashboardContents(statData, cursor , statType);
if(statData != null && statData.statItems != null){
fnRenderDashboardContents(statData, statArr.cursor , statArr.statType);
}
if(statReqArr.length != 0){
fnLoadStatisticsData();
}
} }
}); });
} }
//대시보드 콘텐츠 표시 //대시보드 콘텐츠 표시

Loading…
Cancel
Save