diff --git a/src/main/java/cokr/xit/fims/stat/StatQuery.java b/src/main/java/cokr/xit/fims/stat/StatQuery.java index 8c6dffb7..f09df09f 100644 --- a/src/main/java/cokr/xit/fims/stat/StatQuery.java +++ b/src/main/java/cokr/xit/fims/stat/StatQuery.java @@ -93,6 +93,10 @@ public class StatQuery extends CmmnQuery { */ private int dayRange; + /** + * 차량구분 + */ + private String carGb; public String getStructureType() { return ifEmpty(structureType, () -> null); @@ -230,4 +234,13 @@ public class StatQuery extends CmmnQuery { return self(); } + public String getCarGb() { + return ifEmpty(carGb, () -> null); + } + + public T setCarGb(String carGb) { + this.carGb = carGb; + return self(); + } + } diff --git a/src/main/java/cokr/xit/fims/stat/service/bean/StatServiceBean.java b/src/main/java/cokr/xit/fims/stat/service/bean/StatServiceBean.java index 74118721..a3cda2b1 100644 --- a/src/main/java/cokr/xit/fims/stat/service/bean/StatServiceBean.java +++ b/src/main/java/cokr/xit/fims/stat/service/bean/StatServiceBean.java @@ -16,6 +16,7 @@ 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.crdn.service.bean.CrdnStngBean; import cokr.xit.fims.excl.LevyExclQuery; import cokr.xit.fims.excl.service.OpnnSbmsnService; import cokr.xit.fims.sndb.SndbQuery; @@ -45,6 +46,8 @@ public class StatServiceBean extends AbstractServiceBean implements StatService @Resource(name = "statBean") private StatBean statBean; + @Resource(name = "crdnStngBean") + private CrdnStngBean crdnStngBean; @Override public Stat getStatistics(StatQuery statQuery, Map> commonCodes) { @@ -198,6 +201,10 @@ public class StatServiceBean extends AbstractServiceBean implements StatService } + if(!ifEmpty(statQuery.getCarGb(), ()->"").equals("")) { + queryResult.removeIf(item -> !(crdnStngBean.getCarGb(item.string("VHRNO")).equals(statQuery.getCarGb()))); + } + //통계 생성 stat = statBean.groupByCartegory(queryResult, statQuery); diff --git a/src/main/webapp/WEB-INF/jsp/fims/stat/stat01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/stat/stat01010-main.jsp index c5a834ca..41bb67ab 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/stat/stat01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/stat/stat01010-main.jsp @@ -378,6 +378,8 @@ $(document).ready(function(){ statQuery.firstDay = formFieldsData.firstDay; statQuery.lastDay = formFieldsData.lastDay; + statQuery.carGb = formFieldsData.carGb; + //통계 유형 var preset = $("#preset--${pageName}").find(":selected"); if(preset.val() == "totCnt"){