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