통계 수정

main
이범준 1 year ago
parent bdda77e52e
commit 5fa0c89ee1

@ -32,31 +32,41 @@ public class StatBean extends AbstractComponent {
* @param sql query, dayCol , from , to * @param sql query, dayCol , from , to
* @return * @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 { try {
if(dayCol.equals("REG_DT")) { if(dayCol.equals("REG_DT")) {
if(className.equals("SndbQuery") || className.equals("LevyExclQuery")) {
Method m0 = CmmnQuery.class.getDeclaredMethod("setSchDateOpt", String.class); Method m0 = someQuery.getClass().getDeclaredMethod("schDetailRegDtOpt", String.class);
m0.invoke(someQuery, "regDt"); m0.invoke(someQuery, "regDt");
Method m1 = CmmnQuery.class.getDeclaredMethod("setSchDateFrom", String.class); Method m1 = someQuery.getClass().getDeclaredMethod("schDetailRegDtFrom", 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);
m1.invoke(someQuery, from); m1.invoke(someQuery, from);
Method m2 = someQuery.getClass().getDeclaredMethod("setSchCrdnYmdTo", String.class); Method m2 = someQuery.getClass().getDeclaredMethod("schDetailRegDtTo", String.class);
m2.invoke(someQuery, to); m2.invoke(someQuery, to);
} else if(dayCol.equals("SNDNG_YMD")) { } else if(className.equals("CrdnQuery")) {
Method m1 = someQuery.getClass().getDeclaredMethod("setSchSndngYmdFrom", String.class); Method m0 = CmmnQuery.class.getDeclaredMethod("setSchDateOpt", String.class);
m0.invoke(someQuery, "regDt");
Method m1 = CmmnQuery.class.getDeclaredMethod("setSchDateFrom", String.class);
m1.invoke(someQuery, from); m1.invoke(someQuery, from);
Method m2 = someQuery.getClass().getDeclaredMethod("setSchSndngYmdTo", String.class); Method m2 = CmmnQuery.class.getDeclaredMethod("setSchDateTo", String.class);
m2.invoke(someQuery, to); 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) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }

@ -174,7 +174,7 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
crdnQuery.setTaskSeCd(statQuery.getTaskSeCd()); crdnQuery.setTaskSeCd(statQuery.getTaskSeCd());
if(daySetting) { if(daySetting) {
statBean.daySetting(crdnQuery, dayColumn, firstDay, lastDay); statBean.daySetting(crdnQuery, crdnQuery.getClass().getName(), dayColumn, firstDay, lastDay);
} }
queryResult = crdnService.getCrackdownList(crdnQuery); queryResult = crdnService.getCrackdownList(crdnQuery);
@ -187,7 +187,7 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
sndbQuery.setTaskSeCd(statQuery.getTaskSeCd()); sndbQuery.setTaskSeCd(statQuery.getTaskSeCd());
if(daySetting) { if(daySetting) {
statBean.daySetting(sndbQuery, dayColumn, firstDay, lastDay); statBean.daySetting(sndbQuery, sndbQuery.getClass().getName(), dayColumn, firstDay, lastDay);
} }
queryResult = sndngService.getSndngList(sndbQuery); queryResult = sndngService.getSndngList(sndbQuery);
} }
@ -198,7 +198,7 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
levyExclQuery.setTaskSeCd(statQuery.getTaskSeCd()); levyExclQuery.setTaskSeCd(statQuery.getTaskSeCd());
if(daySetting) { if(daySetting) {
statBean.daySetting(levyExclQuery, dayColumn, firstDay, lastDay); statBean.daySetting(levyExclQuery, levyExclQuery.getClass().getName(), dayColumn, firstDay, lastDay);
} }
//queryResult = opnnSbmsnService.getList(levyExclQuery) //queryResult = opnnSbmsnService.getList(levyExclQuery)

Loading…
Cancel
Save