Переглянути джерело

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

shengyang000 3 роки тому
батько
коміт
269314b5a8
1 змінених файлів з 10 додано та 8 видалено
  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 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;