diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java index cc9a355d..6ad2854c 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java @@ -203,6 +203,27 @@ public class CrdnStngBean extends AbstractComponent { return amt; } + /** 차종과 차량번호로 영업용 차량 여부를 확인한다. + * @param ffnlgCarmdlCd 차종, vhrno 차량번호 + * @return 영업용 차량 여부 판단 결과 + */ + public String getBusinessYnOfCar(String ffnlgCarmdlCd, String vhrno) { + + if(vhrno.equals("")) { + return "차량번호없음"; + } + if(ffnlgCarmdlCd.equals("") || ffnlgCarmdlCd.equals("31")) { + return "판단불가"; + } + + if(vhrno.contains("바") || vhrno.contains("사") || vhrno.contains("아") || vhrno.contains("자")) { + return "영업용"; + } else { + return "비영업용"; + } + + } + /** 연계파일 레이아웃 정보를 조회한다. * @param query 연계파일 레이아웃 조회조건 * @return 연계파일 레이아웃 정보 diff --git a/src/main/java/cokr/xit/fims/stat/service/bean/StatBean.java b/src/main/java/cokr/xit/fims/stat/service/bean/StatBean.java index 50336fac..03217b3c 100644 --- a/src/main/java/cokr/xit/fims/stat/service/bean/StatBean.java +++ b/src/main/java/cokr/xit/fims/stat/service/bean/StatBean.java @@ -18,6 +18,7 @@ import cokr.xit.base.code.CommonCode; import cokr.xit.fims.cmmn.CmmnQuery; import cokr.xit.fims.cmmn.CmmnUtil; import cokr.xit.fims.cmmn.CodeConverter; +import cokr.xit.fims.crdn.service.bean.CrdnStngBean; import cokr.xit.fims.stat.CodeSubsetInfo; import cokr.xit.fims.stat.GroupInfo; import cokr.xit.fims.stat.NumberValueInfo; @@ -35,6 +36,9 @@ public class StatBean extends AbstractComponent { @Resource(name = "statMapper") StatMapper statMapper; + @Resource(name = "crdnStngBean") + CrdnStngBean crdnStngBean; + /**쿼리에서 날짜와 관련된 파라미터를 설정한다. * @param sql처리용 query, dayCol 날짜조회용 컬럼, from 조회시작일, to 조회종료일 * @return @@ -206,7 +210,19 @@ public class StatBean extends AbstractComponent { } result += colValue; - } else { + + } else if(ctgrType.equals("method")) { + + if(addOption.equals("businessYnOfCar")){ + + String ffnlgCarmdlCd = item.string("FFNLG_CARMDL_CD"); + String vhrno = item.string("VHRNO"); + + result += crdnStngBean.getBusinessYnOfCar(ffnlgCarmdlCd, vhrno); + } + + } + else { result += colValue; } @@ -374,7 +390,8 @@ public class StatBean extends AbstractComponent { String dtlCtgr = ifEmpty(groupInfo.getDtlCtgr(), ()-> ""); - if(ctgrType.equals("") || ctgrType.equals("plain") || ctgrType.equals("date")) { //일반텍스트 + if(ctgrType.equals("") || ctgrType.equals("plain") + || ctgrType.equals("date") || ctgrType.equals("method")) { //일반텍스트 compositeItemName[i] = compositeItemId[i]; continue; } diff --git a/src/main/webapp/WEB-INF/jsp/fims/stat/stat02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/stat/stat02010-main.jsp index ea96118a..1ce748f4 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/stat/stat02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/stat/stat02010-main.jsp @@ -104,7 +104,7 @@ data-ref-col="FFNLG_CARMDL_CD" data-ctgr-type="code" data-dtl-ctgr="FIM009" >차종