From 2bf63c2d700628f744527ef8cebcfa083b8e4955 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Fri, 10 Nov 2023 09:14:09 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EC=97=85=EC=9A=A9=20=EC=B0=A8?= =?UTF-8?q?=EB=9F=89=20=EA=B5=AC=EB=B6=84=20=EB=A9=94=EC=86=8C=EB=93=9C=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fims/crdn/service/bean/CrdnStngBean.java | 21 +++++++++++++++++++ .../xit/fims/stat/service/bean/StatBean.java | 21 +++++++++++++++++-- .../WEB-INF/jsp/fims/stat/stat02010-main.jsp | 2 +- .../WEB-INF/jsp/fims/stat/stat05010-main.jsp | 2 +- .../webapp/WEB-INF/jsp/include/dashboard.jsp | 20 ++++++++++++++++-- 5 files changed, 60 insertions(+), 6 deletions(-) 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" >차종