통계 수정

main
이범준 1 year ago
parent 09d42166f8
commit c409611ed2

@ -204,6 +204,27 @@ public class CrdnStngBean extends AbstractComponent {
return amt;
}
/** .
* @param vhrno
* @return
*/
public boolean isRent(String vhrno) {
int len = vhrno.length();
if(len >= 7) {
String fifthFromLast = vhrno.substring(len-5, len-4);
if(fifthFromLast.equals("하")
|| fifthFromLast.equals("허")
|| fifthFromLast.equals("호")
|| fifthFromLast.equals("후")) {
return true;
}
}
return false;
}
/** .
* @param ffnlgCarmdlCd , vhrno
* @return
@ -551,4 +572,6 @@ public class CrdnStngBean extends AbstractComponent {
}
}

@ -98,6 +98,17 @@ public class StatQuery extends CmmnQuery {
*/
private String carGb;
/**
*
*/
private String schExclEnd;
/**
*
*/
private String schOnlyRent;
public String getStructureType() {
return ifEmpty(structureType, () -> null);
}
@ -243,4 +254,22 @@ public class StatQuery extends CmmnQuery {
return self();
}
public String getSchExclEnd() {
return ifEmpty(schExclEnd, () -> null);
}
public <T extends StatQuery> T setSchExclEnd(String schExclEnd) {
this.schExclEnd = schExclEnd;
return self();
}
public String getSchOnlyRent() {
return ifEmpty(schOnlyRent, () -> null);
}
public <T extends StatQuery> T setSchOnlyRent(String schOnlyRent) {
this.schOnlyRent = schOnlyRent;
return self();
}
}

@ -201,9 +201,18 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
}
//차량구분 지정
if(!ifEmpty(statQuery.getCarGb(), ()->"").equals("")) {
queryResult.removeIf(item -> !(crdnStngBean.getCarGb(item.string("VHRNO")).equals(statQuery.getCarGb())));
}
//서손자료 제외
if(!ifEmpty(statQuery.getSchExclEnd(), ()->"").equals("")) {
queryResult.removeIf(item -> item.string("CRDN_STTS_CD").equals("81"));
}
//렌트카만 조회
if(!ifEmpty(statQuery.getSchOnlyRent(), ()->"").equals("")) {
queryResult.removeIf(item -> !crdnStngBean.isRent(item.string("VHRNO")));
}
//통계 생성
stat = statBean.groupByCartegory(queryResult, statQuery);

@ -379,6 +379,8 @@ $(document).ready(function(){
statQuery.lastDay = formFieldsData.lastDay;
statQuery.carGb = formFieldsData.carGb;
statQuery.schExclEnd = formFieldsData.schExclEnd;
statQuery.schOnlyRent = formFieldsData.schOnlyRent;
//통계 유형
var preset = $("#preset--${pageName}").find(":selected");

Loading…
Cancel
Save