Xiaojh преди 4 години
родител
ревизия
1191dc43a1

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

@@ -78,7 +78,7 @@ public class EstimateMsgSendServiceImpl implements EstimateMsgSendService, Initi
                 //String cron = "0 */3 * * * ?";
                 //String cron ="0 40 14 * * ?";
                 //String cron = "0 "+Integer.valueOf(minute)+" "+Integer.valueOf(time)+" * * ?";
-                String cron = String.format("%s %s %s * * ?",0,15,17);
+                String cron = String.format("%s %s %s * * ?",0,Integer.valueOf(minute),Integer.valueOf(time));
                 //String cron = "0 2 15 * * ?";
                 log.info("预计费每天推送:" + cron);
                 log.info("预计费每天推送:" + "站点ID:"+siteId+"水司ID:"+customerId);

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

@@ -61,7 +61,7 @@ public class EstimatedDayServiceImpl implements EstimatedDayService, Initializin
             //String cron = "0 */2 * * * ?";
             //String cron = "0 0 0 * * ?";
             //String cron = "0 0 15 * * ?";
-            String cron = String.format("%s %s %s * * ?",0,10,17);
+            String cron = String.format("%s %s %s * * ?",0,0,0);
             log.info("预计费每天统计:" + cron);
             log.info("预计费每天统计:" + "站点ID:"+siteId+"水司ID:"+customerId);
             entity.setCronExpression(cron);

+ 2 - 3
smart-city-platform/src/main/java/com/bz/smart_city/quartz/service/impl/EstimatedValveServiceImpl.java

@@ -74,9 +74,8 @@ public class EstimatedValveServiceImpl implements EstimatedValveService, Initial
                 String currTime = LocalDateTime.now().format(dfYmd) + " " + sendTime;;
                 DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
                 LocalDateTime localDateTime = LocalDateTime.parse(currTime,df);
-                LocalDateTime esTime = localDateTime.plusMinutes(30);
-                //String cron = String.format("%s %s %s * * ?",esTime.getSecond(),esTime.getMinute(),esTime.getHour());
-                String cron = String.format("%s %s %s * * ?",0,12,17);
+                localDateTime = localDateTime.plusMinutes(30);
+                String cron = String.format("%s %s %s * * ?",localDateTime.getSecond(),localDateTime.getMinute(),localDateTime.getHour());
                 //String cron = "0 */2 * * * ?";
                 //String cron ="0 40 14 * * ?";
                 //String cron = "0 "+Integer.valueOf(minute)+" "+Integer.valueOf(time)+" * * ?";