Explorar o código

修改预警bug

shengyang000 %!s(int64=3) %!d(string=hai) anos
pai
achega
eaf15e5545

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

@@ -143,21 +143,21 @@ public class ToBeDoneJob implements Job, Serializable {
143 143
 
144 144
         Date startDate = null;
145 145
         if(timeType.equals(GrainConstant.STR_MINUTE)) {
146
-            startDate = DateUtil.getNextMinute();
146
+            startDate = DateUtil.getCurrMinute();
147 147
         } else if(timeType.equals(GrainConstant.STR_HOUR)) {
148
-            startDate = DateUtil.getNextHour();
148
+            startDate = DateUtil.getCurrHour();
149 149
         } else if(timeType.equals(GrainConstant.STR_DAY)) {
150
-            startDate = DateUtil.getNextDate();
150
+            startDate = DateUtil.getCurrDate();
151 151
         } else if(timeType.equals(GrainConstant.STR_WEEKDAY)) {
152
-            startDate = DateUtil.getNextWeekday();
152
+            startDate = DateUtil.getCurrDate();
153 153
         } else if(timeType.equals(GrainConstant.STR_WEEK)) {
154
-            startDate = DateUtil.getFirstDateOfNextWeek();
154
+            startDate = DateUtil.getFirstDateOfCurrWeek();
155 155
         } else if(timeType.equals(GrainConstant.STR_MONTH)) {
156
-            startDate = DateUtil.getFirstDateOfNextMonth();
156
+            startDate = DateUtil.getFirstDateOfCurrMonth();
157 157
         } else if(timeType.equals(GrainConstant.STR_SEASON)) {
158
-            startDate = DateUtil.getFirstDateOfNextSeason();
158
+            startDate = DateUtil.getFirstDateOfCurrSeason();
159 159
         } else if(timeType.equals(GrainConstant.STR_YEAR)) {
160
-            startDate = DateUtil.getFirstDateOfNextYear();
160
+            startDate = DateUtil.getFirstDateOfCurrYear();
161 161
         }
162 162
 
163 163
         return startDate;

+ 10 - 8
src/main/java/com/unissoft/service/impl/SysEarlyWarningServiceImpl.java

@@ -402,19 +402,21 @@ public class SysEarlyWarningServiceImpl extends ServiceImpl<SysEarlyWarningMappe
402 402
     private static Date getStartAtDate4ToBeDone(String periodType) {
403 403
         Date startAt = null;
404 404
         if(periodType.equals(GrainConstant.STR_MINUTE)) {
405
-            startAt = DateUtil.getCurrMinute();
405
+            startAt = DateUtil.getNextMinute();
406 406
         } else if(periodType.equals(GrainConstant.STR_HOUR)) {
407
-            startAt = DateUtil.getCurrHour();
408
-        } else if(periodType.equals(GrainConstant.STR_DAY) || periodType.equals(GrainConstant.STR_WEEKDAY)) {
409
-            startAt = DateUtil.getCurrDate();
407
+            startAt = DateUtil.getNextHour();
408
+        } else if(periodType.equals(GrainConstant.STR_DAY)) {
409
+            startAt = DateUtil.getNextDate();
410
+        } else if(periodType.equals(GrainConstant.STR_WEEKDAY)) {
411
+            startAt = DateUtil.getNextWeekday();
410 412
         } else if(periodType.equals(GrainConstant.STR_WEEK)) {
411
-            startAt = DateUtil.getFirstDateOfCurrWeek();
413
+            startAt = DateUtil.getFirstDateOfNextWeek();
412 414
         } else if(periodType.equals(GrainConstant.STR_MONTH)) {
413
-            startAt = DateUtil.getFirstDateOfCurrMonth();
415
+            startAt = DateUtil.getFirstDateOfNextMonth();
414 416
         } else if(periodType.equals(GrainConstant.STR_SEASON)) {
415
-            startAt = DateUtil.getFirstDateOfCurrSeason();
417
+            startAt = DateUtil.getFirstDateOfNextSeason();
416 418
         } else if(periodType.equals(GrainConstant.STR_YEAR)) {
417
-            startAt = DateUtil.getFirstDateOfCurrYear();
419
+            startAt = DateUtil.getFirstDateOfNextYear();
418 420
         }
419 421
 
420 422
         return startAt;