fn_cmndataValueChk 모듈 업데이트
This commit is contained in:
parent
c72f207dfc
commit
5c2f7f5e73
@ -135,7 +135,7 @@ public final class DateUtil {
|
||||
}
|
||||
|
||||
|
||||
public static boolean dateChk365AndValueChk(String searchStartDate, String searchEndDate) {
|
||||
public static boolean dateChkAndValueChk(String searchStartDate, String searchEndDate, int dateVal) {
|
||||
|
||||
|
||||
boolean isValid = true;
|
||||
@ -170,7 +170,7 @@ public final class DateUtil {
|
||||
// 총 기간이 365일을 넘는지 확인
|
||||
if (isValid) {
|
||||
long daysBetween = ChronoUnit.DAYS.between(startDate, endDate);
|
||||
if (daysBetween > 365) {
|
||||
if (daysBetween > dateVal) {
|
||||
isValid = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -229,7 +229,7 @@ public class MjonMsgCustomWebController {
|
||||
// 검색 데이터가 없거나
|
||||
// 시작일자가 종료일자보다 이후이거나
|
||||
// 총 기간이 365일이 넘으면 현재일부터 365일 전 날짜를 넣어서 검색
|
||||
if(!DateUtil.dateChk365AndValueChk(mjonMsgCustomVO.getSearchStartDate(),mjonMsgCustomVO.getSearchEndDate() )) {
|
||||
if(!DateUtil.dateChkAndValueChk(mjonMsgCustomVO.getSearchStartDate(),mjonMsgCustomVO.getSearchEndDate(), 365 )) {
|
||||
|
||||
mjonMsgCustomVO.setSearchStartDate(DateUtil.getDateDaysAgo(365));
|
||||
mjonMsgCustomVO.setSearchEndDate(DateUtil.getCurrentDate());
|
||||
|
||||
@ -2746,7 +2746,7 @@ public class MjonPayController {
|
||||
// 검색 데이터가 없거나
|
||||
// 시작일자가 종료일자보다 이후이거나
|
||||
// 총 기간이 365일이 넘으면 현재일부터 365일 전 날짜를 넣어서 검색
|
||||
if(!DateUtil.dateChk365AndValueChk(mjonMsgVO.getStartDate(),mjonMsgVO.getEndDate() )) {
|
||||
if(!DateUtil.dateChkAndValueChk(mjonMsgVO.getStartDate(),mjonMsgVO.getEndDate(), 365 )) {
|
||||
|
||||
mjonMsgVO.setStartDate(DateUtil.getDateDaysAgo(365));
|
||||
mjonMsgVO.setEndDate(DateUtil.getCurrentDate());
|
||||
|
||||
@ -28,7 +28,13 @@ function fn_cmndataValueChk(startId, endId, chkDay){
|
||||
var diffTime = Math.abs(end - start);
|
||||
var diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||
if (diffDays > chkDay) {
|
||||
alert("총 검색 기간은 "+chkDay+"일을 넘을 수 없습니다.");
|
||||
|
||||
var chkDayTxt = "";
|
||||
if(chkDay == 365){
|
||||
chkDayTxt = '1년';
|
||||
}
|
||||
|
||||
alert("총 검색 기간은 "+chkDayTxt+"을 넘을 수 없습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user