단속자료 처리유형별 통계 표시

main
이범준 1 year ago
parent 246aeed494
commit defff182f2

@ -23,6 +23,11 @@ public class StatQuery extends CmmnQuery {
*/
private String structureType;
/**
*
*/
private String statDomain;
/**
*
*/
@ -98,6 +103,15 @@ public class StatQuery extends CmmnQuery {
return self();
}
public String getStatDomain() {
return ifEmpty(statDomain, () -> null);
}
public <T extends StatQuery> T setStatDomain(String statDomain) {
this.statDomain = statDomain;
return self();
}
public String getRefListYn() {
return ifEmpty(refListYn, () -> null);
}

@ -35,14 +35,16 @@ public class StatBean extends AbstractComponent {
public void daySetting(CmmnQuery someQuery, String className, String dayCol, String from, String to) {
try {
if(dayCol.equals("REG_DT")) {
if(className.equals("SndbQuery") || className.equals("LevyExclQuery")) {
Method m0 = someQuery.getClass().getDeclaredMethod("schDetailRegDtOpt", String.class);
Method m0 = someQuery.getClass().getDeclaredMethod("setSchDetailRegDtOpt", String.class);
m0.invoke(someQuery, "regDt");
Method m1 = someQuery.getClass().getDeclaredMethod("schDetailRegDtFrom", String.class);
Method m1 = someQuery.getClass().getDeclaredMethod("setSchDetailRegDtFrom", String.class);
m1.invoke(someQuery, from);
Method m2 = someQuery.getClass().getDeclaredMethod("schDetailRegDtTo", String.class);
Method m2 = someQuery.getClass().getDeclaredMethod("setSchDetailRegDtTo", String.class);
m2.invoke(someQuery, to);
} else if(className.equals("CrdnQuery")) {
} else if(className.equals("CrdnQuery") || className.equals("CrdnSttsHstryQuery")) {
Method m0 = CmmnQuery.class.getDeclaredMethod("setSchDateOpt", String.class);
m0.invoke(someQuery, "regDt");
Method m1 = CmmnQuery.class.getDeclaredMethod("setSchDateFrom", String.class);

@ -12,13 +12,14 @@ import org.springframework.stereotype.Service;
import cokr.xit.base.code.CommonCode;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.CrdnSttsHstryQuery;
import cokr.xit.fims.cmmn.service.CrdnSttsHstryService;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.excl.LevyExclQuery;
import cokr.xit.fims.excl.service.OpnnSbmsnService;
import cokr.xit.fims.sndb.SndbQuery;
import cokr.xit.fims.sndb.service.SndngService;
import cokr.xit.fims.stat.GroupInfo;
import cokr.xit.fims.stat.NumberValueInfo;
import cokr.xit.fims.stat.Stat;
import cokr.xit.fims.stat.StatQuery;
@ -32,6 +33,9 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
@Resource(name = "crdnService")
private CrdnService crdnService;
@Resource(name = "crdnSttsHstryService")
private CrdnSttsHstryService crdnSttsHstryService;
@Resource(name = "opnnSbmsnService")
private OpnnSbmsnService opnnSbmsnService;
@ -131,36 +135,7 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
}
String domain = "";
List<GroupInfo> GroupInfoList = statQuery.getGroupInfoList();
for(GroupInfo groupInfo : GroupInfoList) {
String categorization = groupInfo.getRefCol();
switch(categorization) {
case "CRDN_SE_CD" :
case "등록대상,이첩대상" :
case "초기자료처리" :
domain = "crdn";
break;
case "SNDNG_SE_CD" :
domain = "sndb";
break;
case "OPNN_SBMSN_STTS_CD" :
domain = "excl";
break;
case "수납상태" :
domain = "levy";
break;
}
if(!domain.equals("")) {
break;
}
}
String domain = statQuery.getStatDomain();
if(domain.equals("")) {
throw new RuntimeException("통계 유형 확인 오류");
@ -174,20 +149,34 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
crdnQuery.setTaskSeCd(statQuery.getTaskSeCd());
if(daySetting) {
statBean.daySetting(crdnQuery, crdnQuery.getClass().getName(), dayColumn, firstDay, lastDay);
statBean.daySetting(crdnQuery, crdnQuery.getClass().getSimpleName(), dayColumn, firstDay, lastDay);
}
queryResult = crdnService.getCrackdownList(crdnQuery);
}
else if(domain.equals("crdnSttsHstry")) {
CrdnSttsHstryQuery crdnSttsHstryQuery = new CrdnSttsHstryQuery();
crdnSttsHstryQuery.setSggCd(statQuery.getSggCd());
crdnSttsHstryQuery.setTaskSeCd(statQuery.getTaskSeCd());
crdnSttsHstryQuery.setUseYN("Y");
if(daySetting) {
statBean.daySetting(crdnSttsHstryQuery, crdnSttsHstryQuery.getClass().getSimpleName(), dayColumn, firstDay, lastDay);
}
queryResult = crdnSttsHstryService.getCrdnSttsHstryList(crdnSttsHstryQuery);
}
else if(domain.equals("sndb")) {
SndbQuery sndbQuery = new SndbQuery();
sndbQuery.setSggCd(statQuery.getSggCd());
sndbQuery.setTaskSeCd(statQuery.getTaskSeCd());
if(daySetting) {
statBean.daySetting(sndbQuery, sndbQuery.getClass().getName(), dayColumn, firstDay, lastDay);
statBean.daySetting(sndbQuery, sndbQuery.getClass().getSimpleName(), dayColumn, firstDay, lastDay);
}
queryResult = sndngService.getSndngList(sndbQuery);
}
@ -198,7 +187,7 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
levyExclQuery.setTaskSeCd(statQuery.getTaskSeCd());
if(daySetting) {
statBean.daySetting(levyExclQuery, levyExclQuery.getClass().getName(), dayColumn, firstDay, lastDay);
statBean.daySetting(levyExclQuery, levyExclQuery.getClass().getSimpleName(), dayColumn, firstDay, lastDay);
}
queryResult = opnnSbmsnService.getOpnnSbmsnList(levyExclQuery);

@ -41,6 +41,7 @@
, CSH.MDFR /* 수정자 */
, (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = CSH.MDFR) AS MDFR_NM /* 수정자 명 */
FROM TB_CRDN_STTS_HSTRY CSH
LEFT OUTER JOIN TB_CRDN C ON (CSH.CRDN_ID = C.CRDN_ID)
</sql>
<select id="selectCrdnSttsHstryList" parameterType="map" resultType="dataobject">/* 단속 상태 이력 목록 조회(crdnSttsHstryMapper.selectCrdnSttsHstryList) */
@ -53,6 +54,17 @@
<if test="useYN != null">
AND CSH.USE_YN = #{useYN}
</if>
<if test="sggCd != null">
AND C.SGG_CD = #{sggCd}
</if>
<if test="taskSeCd != null">
AND C.TASK_SE_CD = #{taskSeCd}
</if>
<if test="schDateOpt == 'regDt'">
<if test="schDateFrom != null">AND SUBSTR(CSH.REG_DT,1,8) <![CDATA[ >= ]]> #{schDateFrom} </if>
<if test="schDateTo != null">AND SUBSTR(CSH.REG_DT,1,8) <![CDATA[ <= ]]> #{schDateTo} </if>
</if>
</where>
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix" />

@ -214,6 +214,7 @@ function fnMakeStatReq(taskSeCd){
//단속구분별 전체/완료 건수
defaultQuery = {
structureType : "dummy",
statDomain : "crdn",
fixedItemId : ["01","02","minwon","dobo"],
namedNumberValueSeperator : "completeAndTotal",
globalAggregate : "count",
@ -262,6 +263,7 @@ function fnMakeStatReq(taskSeCd){
//초기자료처리별 전체/완료건수
defaultQuery = {
structureType : "dummy",
statDomain : "crdn",
fixedItemId : ["등록대상","이첩대상"],
namedNumberValueSeperator : "completeAndTotal",
globalAggregate : "count",
@ -292,6 +294,7 @@ function fnMakeStatReq(taskSeCd){
//발송문서별 전체/완료 건수
defaultQuery = {
structureType : "dummy",
statDomain : "sndb",
fixedItemId : ["01", "02", "03"],
namedNumberValueSeperator : "completeAndTotal",
globalAggregate : "count",
@ -322,6 +325,7 @@ function fnMakeStatReq(taskSeCd){
//의견진술자료상태
defaultQuery = {
structureType : "dummy",
statDomain : "excl",
fixedItemId : ["00", "acceptOrNonAccept", "03"],
namedNumberValueSeperator : "completeAndTotal",
globalAggregate : "count",
@ -363,6 +367,7 @@ function fnMakeStatReq(taskSeCd){
//단속구분별 최근n일 건수
defaultQuery = {
structureType : "aggregate",
statDomain : "crdn",
fixedItemId : ["01","02","dobo","minwon"],
namedNumberValueSeperator : "lastFewDays",
globalAggregate : "count",
@ -408,8 +413,9 @@ function fnMakeStatReq(taskSeCd){
//초기자료처리별 건수 차트
defaultQuery = {
structureType : "dummy",
fixedItemId : ["단속","계고","서손"],
structureType : "aggregate",
statDomain : "crdnSttsHstry",
fixedItemId : ["dansokProcess","81","83"],
taskSeCd : taskSeCd,
dayColumn : "REG_DT",
firstDay : firstDay,
@ -418,15 +424,14 @@ function fnMakeStatReq(taskSeCd){
groupInfoList = [
{
refCol : "초기자료처리",
refCol : "CRDN_STTS_CD",
ctgrType : ["code"],
dtlCtgr : ["FIM999"]
dtlCtgr : ["FIM010"]
}
];
queryInQuery1 = fnJsonArrayToFormData(groupInfoList, "groupInfoList");
numberValueInfoList = [
{
aggregateType : "count"
@ -435,7 +440,18 @@ function fnMakeStatReq(taskSeCd){
queryInQuery2 = fnJsonArrayToFormData(numberValueInfoList, "numberValueInfoList");
mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery2 };
codeSubsetInfoList = [
{
sourceGroup : "FIM010",
sourceCodes : ["21"],
targetCode : "dansokProcess",
targetCodeVal : "단속"
}
];
queryInQuery3 = fnJsonArrayToFormData(codeSubsetInfoList, "codeSubsetInfoList");
mergedQuery = {...defaultQuery, ...queryInQuery1, ...queryInQuery2, ...queryInQuery3};
statReqArr.push({
query : mergedQuery,
@ -446,6 +462,7 @@ function fnMakeStatReq(taskSeCd){
//발송문서종류별 건수 차트
defaultQuery = {
structureType : "aggregate",
statDomain : "sndb",
fixedItemId : ["01", "02", "03"],
taskSeCd : taskSeCd,
dayColumn : "SNDNG_YMD",
@ -482,6 +499,7 @@ function fnMakeStatReq(taskSeCd){
//의견진술결과별 건수 차트
defaultQuery = {
structureType : "aggregate",
statDomain : "excl",
fixedItemId : ["01", "02", "03"],
taskSeCd : taskSeCd,
dayColumn : "REG_DT",

Loading…
Cancel
Save