통계 수정

main
이범준 1 year ago
parent 649bce1083
commit bdda77e52e

@ -39,7 +39,12 @@ public class StatQuery extends CmmnQuery {
private List<NumberValueInfo> numberValueInfoList; private List<NumberValueInfo> numberValueInfoList;
/** /**
* ID ( ) *
*/
List<CodeSubsetInfo> codeSubsetInfoList;
/**
* ID ( )
*/ */
private String[] fixedItemId; private String[] fixedItemId;
@ -69,14 +74,20 @@ public class StatQuery extends CmmnQuery {
private String dayColumn; private String dayColumn;
/** /**
* *
*/ */
private int dayRange; private String firstDay;
/** /**
* *
*/ */
List<CodeSubsetInfo> codeSubsetInfoList; private String lastDay;
/**
*
*/
private int dayRange;
public String getStructureType() { public String getStructureType() {
return ifEmpty(structureType, () -> null); return ifEmpty(structureType, () -> null);
@ -178,6 +189,24 @@ public class StatQuery extends CmmnQuery {
return self(); return self();
} }
public String getFirstDay() {
return ifEmpty(firstDay, () -> null);
}
public <T extends StatQuery> T setFirstDay(String firstDay) {
this.firstDay = firstDay;
return self();
}
public String getLastDay() {
return ifEmpty(lastDay, () -> null);
}
public <T extends StatQuery> T setLastDay(String lastDay) {
this.lastDay = lastDay;
return self();
}
public List<CodeSubsetInfo> getCodeSubsetInfoList() { public List<CodeSubsetInfo> getCodeSubsetInfoList() {
return this.codeSubsetInfoList; return this.codeSubsetInfoList;
} }

@ -49,6 +49,11 @@ public class StatBean extends AbstractComponent {
m1.invoke(someQuery, from); m1.invoke(someQuery, from);
Method m2 = someQuery.getClass().getDeclaredMethod("setSchCrdnYmdTo", String.class); Method m2 = someQuery.getClass().getDeclaredMethod("setSchCrdnYmdTo", String.class);
m2.invoke(someQuery, to); m2.invoke(someQuery, to);
} else if(dayCol.equals("SNDNG_YMD")) {
Method m1 = someQuery.getClass().getDeclaredMethod("setSchSndngYmdFrom", String.class);
m1.invoke(someQuery, from);
Method m2 = someQuery.getClass().getDeclaredMethod("setSchSndngYmdTo", String.class);
m2.invoke(someQuery, to);
} }
} }

@ -57,14 +57,20 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
if(statQuery.getStructureType().equals("aggregate")) { if(statQuery.getStructureType().equals("aggregate")) {
String dayColumn = ifEmpty(statQuery.getDayColumn(), () -> "");
String lastDay = ifEmpty(statQuery.getLastDay(), () -> "");
String firstDay = ifEmpty(statQuery.getFirstDay(), () -> "");
if(!dayColumn.equals("")) {
daySetting = true;
}
String[] numberValueLabel = null; String[] numberValueLabel = null;
int dayRange = statQuery.getDayRange() == 0 ? 15 : statQuery.getDayRange(); String namedNumberValueSeperator = ifEmpty(statQuery.getNamedNumberValueSeperator(), () -> "");
String firstDay = CmmnUtil.addDay(today, (-1 * (dayRange-1)));
String dayColumn = statQuery.getDayColumn() == null ? "REG_DT" : statQuery.getDayColumn(); if(namedNumberValueSeperator.equals("completeAndTotal")) { //완료자료 및 전체자료
if(statQuery.getNamedNumberValueSeperator().equals("completeAndTotal")) { //완료자료 및 전체자료
String globalAggregate = statQuery.getGlobalAggregate(); String globalAggregate = statQuery.getGlobalAggregate();
String globalSumRefCol = ifEmpty(statQuery.getGlobalSumRefCol(), () -> "") ; String globalSumRefCol = ifEmpty(statQuery.getGlobalSumRefCol(), () -> "") ;
@ -86,7 +92,17 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
daySetting = true; daySetting = true;
} else if(statQuery.getNamedNumberValueSeperator().equals("lastFewDays")) { } else if(namedNumberValueSeperator.equals("lastFewDays")) {
daySetting = true;
int dayRange = statQuery.getDayRange() == 0 ? 15 : statQuery.getDayRange();
if(dayColumn.equals("")) {
dayColumn = "REG_DT";
}
lastDay = today;
firstDay = CmmnUtil.addDay(lastDay, (-1 * (dayRange-1)));
String globalAggregate = statQuery.getGlobalAggregate(); String globalAggregate = statQuery.getGlobalAggregate();
@ -113,7 +129,6 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
} }
} }
daySetting = true;
} }
String domain = ""; String domain = "";
@ -156,9 +171,10 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
CrdnQuery crdnQuery = new CrdnQuery(); CrdnQuery crdnQuery = new CrdnQuery();
crdnQuery.setSggCd(statQuery.getSggCd()); crdnQuery.setSggCd(statQuery.getSggCd());
crdnQuery.setTaskSeCd(statQuery.getTaskSeCd());
if(daySetting) { if(daySetting) {
statBean.daySetting(crdnQuery, dayColumn, firstDay, today); statBean.daySetting(crdnQuery, dayColumn, firstDay, lastDay);
} }
queryResult = crdnService.getCrackdownList(crdnQuery); queryResult = crdnService.getCrackdownList(crdnQuery);
@ -167,18 +183,22 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
else if(domain.equals("sndb")) { else if(domain.equals("sndb")) {
SndbQuery sndbQuery = new SndbQuery(); SndbQuery sndbQuery = new SndbQuery();
sndbQuery.setSggCd(statQuery.getSggCd());
sndbQuery.setTaskSeCd(statQuery.getTaskSeCd());
if(daySetting) { if(daySetting) {
statBean.daySetting(sndbQuery, dayColumn, firstDay, today); statBean.daySetting(sndbQuery, dayColumn, firstDay, lastDay);
} }
//queryResult = sndngService.getList(sndbQuery) queryResult = sndngService.getSndngList(sndbQuery);
} }
else if(domain.equals("excl")) { else if(domain.equals("excl")) {
LevyExclQuery levyExclQuery = new LevyExclQuery(); LevyExclQuery levyExclQuery = new LevyExclQuery();
levyExclQuery.setSggCd(statQuery.getSggCd());
levyExclQuery.setTaskSeCd(statQuery.getTaskSeCd());
if(daySetting) { if(daySetting) {
statBean.daySetting(levyExclQuery, dayColumn, firstDay, today); statBean.daySetting(levyExclQuery, dayColumn, firstDay, lastDay);
} }
//queryResult = opnnSbmsnService.getList(levyExclQuery) //queryResult = opnnSbmsnService.getList(levyExclQuery)

@ -175,7 +175,7 @@ height="250" viewBox="0 0 24 24" style="fill: rgba(0, 0, 0, 1);transform: ;msFil
</svg>`; </svg>`;
fnMakeSkeleton(); fnMakeSkeleton();
sleep(3000).then(() => fnLoadStatisticsDatas()); sleep(3000).then(() => fnLoadStatisticsDatas($("#layout-navbar input[name='taskSeCd']:checked").val()));
//데이터 로딩 전 이미지 표시 //데이터 로딩 전 이미지 표시
@ -194,8 +194,10 @@ function fnMakeSkeleton(){
//통계 데이터 조회(여러 건) //통계 데이터 조회(여러 건)
function fnLoadStatisticsDatas(){ function fnLoadStatisticsDatas(taskSeCd){
var lastDay = DateUtil.getDate().date.replace("-","");
var firstDay = DateUtil.getDateDay(-14).date.replaceAll("-","");
var mergedQuery = {}; var mergedQuery = {};
var groupInfoList = []; var groupInfoList = [];
@ -212,7 +214,11 @@ function fnLoadStatisticsDatas(){
structureType : "aggregate", structureType : "aggregate",
fixedItemId : ["01","02","minwon","dobo"], fixedItemId : ["01","02","minwon","dobo"],
namedNumberValueSeperator : "completeAndTotal", namedNumberValueSeperator : "completeAndTotal",
globalAggregate : "count" globalAggregate : "count",
taskSeCd : taskSeCd,
dayColumn : "REG_DT",
firstDay : firstDay,
lastDay : lastDay
}; };
groupInfoList = [ groupInfoList = [
@ -244,14 +250,18 @@ function fnLoadStatisticsDatas(){
mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery3}; mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery3};
fnLoadStatisticsData(mergedQuery, "card1", "progressAndTotal"); //fnLoadStatisticsData(mergedQuery, "card1", "progressAndTotal");
//초기자료처리별 전체/완료건수 //초기자료처리별 전체/완료건수
defaultQuery = { defaultQuery = {
structureType : "aggregate", structureType : "aggregate",
fixedItemId : ["등록대상","이첩대상"], fixedItemId : ["등록대상","이첩대상"],
namedNumberValueSeperator : "completeAndTotal", namedNumberValueSeperator : "completeAndTotal",
globalAggregate : "count" globalAggregate : "count",
taskSeCd : taskSeCd,
dayColumn : "REG_DT",
firstDay : firstDay,
lastDay : lastDay
}; };
groupInfoList = [ groupInfoList = [
@ -273,7 +283,11 @@ function fnLoadStatisticsDatas(){
structureType : "aggregate", structureType : "aggregate",
fixedItemId : ["01", "02", "03"], fixedItemId : ["01", "02", "03"],
namedNumberValueSeperator : "completeAndTotal", namedNumberValueSeperator : "completeAndTotal",
globalAggregate : "count" globalAggregate : "count",
taskSeCd : taskSeCd,
dayColumn : "REG_DT",
firstDay : firstDay,
lastDay : lastDay
}; };
groupInfoList = [ groupInfoList = [
@ -295,7 +309,11 @@ function fnLoadStatisticsDatas(){
structureType : "aggregate", structureType : "aggregate",
fixedItemId : ["00", "acceptOrNonAccept", "03"], fixedItemId : ["00", "acceptOrNonAccept", "03"],
namedNumberValueSeperator : "completeAndTotal", namedNumberValueSeperator : "completeAndTotal",
globalAggregate : "count" globalAggregate : "count",
taskSeCd : taskSeCd,
dayColumn : "REG_DT",
firstDay : firstDay,
lastDay : lastDay
}; };
groupInfoList = [ groupInfoList = [
@ -329,8 +347,9 @@ function fnLoadStatisticsDatas(){
fixedItemId : ["01","02","dobo","minwon"], fixedItemId : ["01","02","dobo","minwon"],
namedNumberValueSeperator : "lastFewDays", namedNumberValueSeperator : "lastFewDays",
globalAggregate : "count", globalAggregate : "count",
dayRange : 15, taskSeCd : taskSeCd,
dayColumn : "CRDN_YMD" dayColumn : "CRDN_YMD",
dayRange : 15
}; };
groupInfoList = [ groupInfoList = [
@ -366,8 +385,12 @@ function fnLoadStatisticsDatas(){
//초기자료처리별 건수 차트 //초기자료처리별 건수 차트
defaultQuery = { defaultQuery = {
structureType : "aggregate", structureType : "aggregate",
fixedItemId : ["단속","계고","서손"] fixedItemId : ["단속","계고","서손"],
taskSeCd : taskSeCd,
dayColumn : "REG_DT",
firstDay : firstDay,
lastDay : lastDay
}; };
groupInfoList = [ groupInfoList = [
@ -395,13 +418,17 @@ function fnLoadStatisticsDatas(){
//발송문서종류별 건수 차트 //발송문서종류별 건수 차트
defaultQuery = { defaultQuery = {
structureType : "aggregate", structureType : "aggregate",
fixedItemId : ["01", "02", "03"] fixedItemId : ["01", "02", "03"],
taskSeCd : taskSeCd,
dayColumn : "SNDNG_YMD",
firstDay : firstDay,
lastDay : lastDay
}; };
groupInfoList = [ groupInfoList = [
{ {
refCol : "SNDNG_SE_CD", refCol : "SNDNG_SE_CD",
ctgrType : ["code"], ctgrType : ["code"],
dtlCtgr : ["FIM047"] dtlCtgr : ["FIM047"]
} }
@ -419,12 +446,16 @@ function fnLoadStatisticsDatas(){
mergedQuery = {...defaultQuery, ...queryInQuery1, ... queryInQuery2}; mergedQuery = {...defaultQuery, ...queryInQuery1, ... queryInQuery2};
//fnLoadStatisticsData(mergedQuery, "doughnutChart2", "doughnut"); fnLoadStatisticsData(mergedQuery, "doughnutChart2", "doughnut");
//의견진술결과별 건수 차트 //의견진술결과별 건수 차트
defaultQuery = { defaultQuery = {
structureType : "aggregate", structureType : "aggregate",
fixedItemId : ["01", "02", "03"] fixedItemId : ["01", "02", "03"],
taskSeCd : taskSeCd,
dayColumn : "REG_DT",
firstDay : firstDay,
lastDay : lastDay
}; };
groupInfoList = [ groupInfoList = [
@ -700,7 +731,7 @@ function fnRenderDoughnut(returnData, cursor){
label: function (context) { label: function (context) {
const label = context.label || ''; const label = context.label || '';
const value = context.parsed; const value = context.parsed;
const output = ' ' + label + ' : ' + value + ' %'; const output = ' ' + label + ' : ' + value + ' ';
return output; return output;
} }
}, },

Loading…
Cancel
Save