|
@@ -122,19 +122,21 @@ public class ToBeDoneJob implements Job, Serializable {
|
122
|
122
|
|
123
|
123
|
Date startDate = null;
|
124
|
124
|
if(timeType.equals(GrainConstant.STR_MINUTE)) {
|
125
|
|
- startDate = DateUtil.getCurrMinute();
|
|
125
|
+ startDate = DateUtil.getNextMinute();
|
126
|
126
|
} else if(timeType.equals(GrainConstant.STR_HOUR)) {
|
127
|
|
- startDate = DateUtil.getCurrHour();
|
128
|
|
- } else if(timeType.equals(GrainConstant.STR_DAY) || timeType.equals(GrainConstant.STR_WEEKDAY)) {
|
129
|
|
- startDate = DateUtil.getCurrDate();
|
|
127
|
+ startDate = DateUtil.getNextHour();
|
|
128
|
+ } else if(timeType.equals(GrainConstant.STR_DAY)) {
|
|
129
|
+ startDate = DateUtil.getNextDate();
|
|
130
|
+ } else if(timeType.equals(GrainConstant.STR_WEEKDAY)) {
|
|
131
|
+ startDate = DateUtil.getNextWeekday();
|
130
|
132
|
} else if(timeType.equals(GrainConstant.STR_WEEK)) {
|
131
|
|
- startDate = DateUtil.getCurrDate();
|
|
133
|
+ startDate = DateUtil.getFirstDateOfNextWeek();
|
132
|
134
|
} else if(timeType.equals(GrainConstant.STR_MONTH)) {
|
133
|
|
- startDate = DateUtil.getCurrDate();
|
|
135
|
+ startDate = DateUtil.getFirstDateOfNextMonth();
|
134
|
136
|
} else if(timeType.equals(GrainConstant.STR_SEASON)) {
|
135
|
|
- startDate = DateUtil.getCurrDate();
|
|
137
|
+ startDate = DateUtil.getFirstDateOfNextSeason();
|
136
|
138
|
} else if(timeType.equals(GrainConstant.STR_YEAR)) {
|
137
|
|
- startDate = DateUtil.getCurrDate();
|
|
139
|
+ startDate = DateUtil.getFirstDateOfNextYear();
|
138
|
140
|
}
|
139
|
141
|
|
140
|
142
|
return startDate;
|