Преглед на файлове

Merge branch '20200918' of http://114.135.61.188:53000/ZONIOT/water-iot into 20200918

oppadmin преди 4 години
родител
ревизия
a015c2ca42

+ 0 - 5
smart-city-platform/src/main/java/com/bz/smart_city/quartz/service/EstimateMsgSendService.java

@@ -9,10 +9,5 @@ import java.math.BigInteger;
  */
 public interface EstimateMsgSendService {
     void afterPropertiesSet();
-
-    void saveQrtzTask(BigInteger siteId, BigInteger customerId, String sendTime);
-
-    void deleteQrtzTask();
-
     void send(Integer siteId, Integer customerId);
 }

+ 0 - 5
smart-city-platform/src/main/java/com/bz/smart_city/quartz/service/EstimatedDayService.java

@@ -10,10 +10,5 @@ import java.math.BigInteger;
 public interface EstimatedDayService {
 
     void afterPropertiesSet();
-
-    void saveQrtzTask(BigInteger siteId, BigInteger customerId);
-
-    void deleteQrtzTask();
-
     void start(Integer siteId,Integer customerId);
 }

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

@@ -126,7 +126,7 @@ public class ControlDayServiceImpl implements ControlDayService, InitializingBea
                     String currTime = LocalDateTime.now().format(dfYmd) + " " + sendTime;;
                     DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
                     LocalDateTime localDateTime = LocalDateTime.parse(currTime,df);
-                    localDateTime = localDateTime.plusMinutes(30);
+                    localDateTime = localDateTime.plusMinutes(60);
                     String cron = String.format("%s %s %s * * ?",localDateTime.getSecond(),localDateTime.getMinute(),localDateTime.getHour());
                     return  cron;
                 }

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

@@ -67,7 +67,11 @@ public class EstimateMsgSendServiceImpl implements EstimateMsgSendService, Initi
         // modify by pengdi ,判断定时任务是否存在,不存在才进行新增
 
         boolean exists = jobAndTriggerService.isExists(entity);
-        if(!exists) {
+        if(exists)
+            //先把之前Job删除
+            jobAndTriggerService.deleteJob(entity);
+
+        if(true) {
             String time = "";
             String minute = "";
             String second = "";

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

@@ -60,10 +60,13 @@ public class EstimatedValveServiceImpl implements EstimatedValveService, Initial
         entity.setJobGroup("预计费推送阀控");
         entity.setJobName("EstimatedValveJob"+siteId );
         entity.setDescription("EstimatedValveJob"+customerId );
-        // modify by pengdi ,判断定时任务是否存在,不存在才进行新增
 
         boolean exists = jobAndTriggerService.isExists(entity);
-        if(!exists) {
+        if(exists)
+            //先把之前Job删除
+            jobAndTriggerService.deleteJob(entity);
+
+        if(true) {
             String time = "";
             String minute = "";
             String second = "";
@@ -74,12 +77,9 @@ 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 = localDateTime.plusMinutes(30);
+                localDateTime = localDateTime.plusMinutes(60);
                 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)+" * * ?";
-                //String cron = "0 22 15 * * ?";
                 log.info("预计费推送阀控:" + cron);
                 log.info("预计费推送阀控:" + "站点ID:"+siteId+"水司ID:"+customerId);
                 entity.setCronExpression(cron);

+ 0 - 1
smart-city-platform/src/main/resources/mapper/pay/baseClosingAccountInfoMapper.xml

@@ -222,7 +222,6 @@
 			site_id as "siteId",
 			customer_id as "customerId"
 		from pay_base_closingaccountinfo
-		where site_id = 51 and customer_id = 120
 		GROUP BY site_id,customer_id
 	</select>