Browse Source

1修改预计费统计时间

Xiaojh 4 years ago
parent
commit
09973d82db

+ 5 - 1
smart-city-platform/src/main/java/com/bz/smart_city/quartz/service/impl/EstimatedDayServiceImpl.java

@@ -57,7 +57,11 @@ public class EstimatedDayServiceImpl implements EstimatedDayService, Initializin
         // modify by pengdi ,判断定时任务是否存在,不存在才进行新增
 
         boolean exists = jobAndTriggerService.isExists(entity);
-        if(!exists) {
+        if(exists)
+            //先删除之前Job
+            jobAndTriggerService.deleteJob(entity);
+
+        if(true) {
             //String cron = "0 */2 * * * ?";
             //String cron = "0 0 0 * * ?";
             //String cron = "0 0 15 * * ?";