|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|