From 5fa0c89ee1650c8478dad2db8b5c7716d9cc00a7 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Mon, 6 Nov 2023 13:50:05 +0900 Subject: [PATCH] =?UTF-8?q?=ED=86=B5=EA=B3=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/stat/service/bean/StatBean.java | 42 ++++++++++++------- .../stat/service/bean/StatServiceBean.java | 6 +-- 2 files changed, 29 insertions(+), 19 deletions(-) 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 bf8e030d..bed2971e 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 @@ -32,31 +32,41 @@ public class StatBean extends AbstractComponent { * @param sql처리용 query, dayCol 날짜조회용 컬럼, from 조회시작일, to 조회종료일 * @return */ - public void daySetting(CmmnQuery someQuery, String dayCol, String from, String to) { + public void daySetting(CmmnQuery someQuery, String className, String dayCol, String from, String to) { try { if(dayCol.equals("REG_DT")) { - - Method m0 = CmmnQuery.class.getDeclaredMethod("setSchDateOpt", String.class); - m0.invoke(someQuery, "regDt"); - Method m1 = CmmnQuery.class.getDeclaredMethod("setSchDateFrom", String.class); - m1.invoke(someQuery, from); - Method m2 = CmmnQuery.class.getDeclaredMethod("setSchDateTo", String.class); - m2.invoke(someQuery, to); - } else { - - if(dayCol.equals("CRDN_YMD")) { - Method m1 = someQuery.getClass().getDeclaredMethod("setSchCrdnYmdFrom", String.class); + if(className.equals("SndbQuery") || className.equals("LevyExclQuery")) { + Method m0 = someQuery.getClass().getDeclaredMethod("schDetailRegDtOpt", String.class); + m0.invoke(someQuery, "regDt"); + Method m1 = someQuery.getClass().getDeclaredMethod("schDetailRegDtFrom", String.class); m1.invoke(someQuery, from); - Method m2 = someQuery.getClass().getDeclaredMethod("setSchCrdnYmdTo", String.class); + Method m2 = someQuery.getClass().getDeclaredMethod("schDetailRegDtTo", String.class); m2.invoke(someQuery, to); - } else if(dayCol.equals("SNDNG_YMD")) { - Method m1 = someQuery.getClass().getDeclaredMethod("setSchSndngYmdFrom", String.class); + } else if(className.equals("CrdnQuery")) { + Method m0 = CmmnQuery.class.getDeclaredMethod("setSchDateOpt", String.class); + m0.invoke(someQuery, "regDt"); + Method m1 = CmmnQuery.class.getDeclaredMethod("setSchDateFrom", String.class); m1.invoke(someQuery, from); - Method m2 = someQuery.getClass().getDeclaredMethod("setSchSndngYmdTo", String.class); + Method m2 = CmmnQuery.class.getDeclaredMethod("setSchDateTo", String.class); m2.invoke(someQuery, to); } + } else if(dayCol.equals("CRDN_YMD")) { + + Method m1 = someQuery.getClass().getDeclaredMethod("setSchCrdnYmdFrom", String.class); + m1.invoke(someQuery, from); + Method m2 = someQuery.getClass().getDeclaredMethod("setSchCrdnYmdTo", String.class); + m2.invoke(someQuery, to); + + } else if(dayCol.equals("SNDNG_YMD")) { + + Method m1 = someQuery.getClass().getDeclaredMethod("setSchSndngYmdFrom", String.class); + m1.invoke(someQuery, from); + Method m2 = someQuery.getClass().getDeclaredMethod("setSchSndngYmdTo", String.class); + m2.invoke(someQuery, to); } + + } catch (Exception e) { throw new RuntimeException(e); } 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 2ab23a66..6c1dec5c 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 @@ -174,7 +174,7 @@ public class StatServiceBean extends AbstractServiceBean implements StatService crdnQuery.setTaskSeCd(statQuery.getTaskSeCd()); if(daySetting) { - statBean.daySetting(crdnQuery, dayColumn, firstDay, lastDay); + statBean.daySetting(crdnQuery, crdnQuery.getClass().getName(), dayColumn, firstDay, lastDay); } queryResult = crdnService.getCrackdownList(crdnQuery); @@ -187,7 +187,7 @@ public class StatServiceBean extends AbstractServiceBean implements StatService sndbQuery.setTaskSeCd(statQuery.getTaskSeCd()); if(daySetting) { - statBean.daySetting(sndbQuery, dayColumn, firstDay, lastDay); + statBean.daySetting(sndbQuery, sndbQuery.getClass().getName(), dayColumn, firstDay, lastDay); } queryResult = sndngService.getSndngList(sndbQuery); } @@ -198,7 +198,7 @@ public class StatServiceBean extends AbstractServiceBean implements StatService levyExclQuery.setTaskSeCd(statQuery.getTaskSeCd()); if(daySetting) { - statBean.daySetting(levyExclQuery, dayColumn, firstDay, lastDay); + statBean.daySetting(levyExclQuery, levyExclQuery.getClass().getName(), dayColumn, firstDay, lastDay); } //queryResult = opnnSbmsnService.getList(levyExclQuery)