Browse Source

修改预警生成代办中代办的开始时间

shengyang000 3 years ago
parent
commit
269314b5a8
1 changed files with 10 additions and 8 deletions
  1. 10 8
      src/main/java/com/unissoft/job/ToBeDoneJob.java

+ 10 - 8
src/main/java/com/unissoft/job/ToBeDoneJob.java

@@ -122,19 +122,21 @@ public class ToBeDoneJob implements Job, Serializable {
122
 
122
 
123
         Date startDate = null;
123
         Date startDate = null;
124
         if(timeType.equals(GrainConstant.STR_MINUTE)) {
124
         if(timeType.equals(GrainConstant.STR_MINUTE)) {
125
-            startDate = DateUtil.getCurrMinute();
125
+            startDate = DateUtil.getNextMinute();
126
         } else if(timeType.equals(GrainConstant.STR_HOUR)) {
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
         } else if(timeType.equals(GrainConstant.STR_WEEK)) {
132
         } else if(timeType.equals(GrainConstant.STR_WEEK)) {
131
-            startDate = DateUtil.getCurrDate();
133
+            startDate = DateUtil.getFirstDateOfNextWeek();
132
         } else if(timeType.equals(GrainConstant.STR_MONTH)) {
134
         } else if(timeType.equals(GrainConstant.STR_MONTH)) {
133
-            startDate = DateUtil.getCurrDate();
135
+            startDate = DateUtil.getFirstDateOfNextMonth();
134
         } else if(timeType.equals(GrainConstant.STR_SEASON)) {
136
         } else if(timeType.equals(GrainConstant.STR_SEASON)) {
135
-            startDate = DateUtil.getCurrDate();
137
+            startDate = DateUtil.getFirstDateOfNextSeason();
136
         } else if(timeType.equals(GrainConstant.STR_YEAR)) {
138
         } else if(timeType.equals(GrainConstant.STR_YEAR)) {
137
-            startDate = DateUtil.getCurrDate();
139
+            startDate = DateUtil.getFirstDateOfNextYear();
138
         }
140
         }
139
 
141
 
140
         return startDate;
142
         return startDate;