lin 4 年之前
父节点
当前提交
c6a9fa5efe

+ 14 - 0
src/main/java/com/zcxk/meterreadingsystemv2/entity/PushRecord.java

@@ -0,0 +1,14 @@
+package com.zcxk.meterreadingsystemv2.entity;
+
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+@Data
+public class PushRecord {
+    private Integer id;
+    private String name;
+    private Integer customerId;
+    private Integer lastDate;
+    private LocalDateTime updateDate;
+}

+ 8 - 6
src/main/java/com/zcxk/meterreadingsystemv2/scheduled/MeterReadingScheduleTask.java

@@ -298,9 +298,10 @@ public class MeterReadingScheduleTask {
 
 
     /**
-     * 萝北 每月最后一天
+     * 萝北 每月26号推送
      */
-    @Scheduled(cron = "0 10 7 28,29,30,31 * ?")
+    //@Scheduled(cron = "0 10 7 28,29,30,31 * ?")
+    @Scheduled(cron = "0 10 7 26 * ?")
     public void lbTasks() {
         log.info("开始执行萝北定时任务");
         if(!"prd".equals(active)){
@@ -321,7 +322,8 @@ public class MeterReadingScheduleTask {
 
         Date date = Jdk8DateUtils.getLocalDateTimeToDate(ldt);*/
 
-        Integer startDate = Integer.valueOf(LocalDateTime.now().plusMonths(-1).plusDays(-1).with(TemporalAdjusters.lastDayOfMonth()).format(DateTimeFormatter.ofPattern(DateTimeUtil.DATE_FORMAT)));
+        Integer startDate = 20210401;
+        //Integer startDate = Integer.valueOf(LocalDateTime.now().plusMonths(-1).plusDays(-1).with(TemporalAdjusters.lastDayOfMonth()).format(DateTimeFormatter.ofPattern(DateTimeUtil.DATE_FORMAT)));
         Integer endDate = Integer.valueOf(LocalDateTime.now().plusDays(-1).format(DateTimeFormatter.ofPattern(DateTimeUtil.DATE_FORMAT)));
 
         AtomicInteger count = new AtomicInteger(0);
@@ -472,7 +474,7 @@ public class MeterReadingScheduleTask {
     /**
      * 绥阳 每月4号推送
      */
-    @Scheduled(cron = "0 25 7 04 * ?")
+    //@Scheduled(cron = "0 25 7 04 * ?")
     public void suiyangTasks() {
         log.info("开始执行绥阳定时任务");
         if(!"prd".equals(active)){
@@ -484,8 +486,8 @@ public class MeterReadingScheduleTask {
         Integer startDate = Integer.valueOf(LocalDateTime.now().plusMonths(-1).plusDays(-1).format(DateTimeFormatter.ofPattern(DateTimeUtil.DATE_FORMAT)));
         Integer endDate = Integer.valueOf(LocalDateTime.now().plusDays(-1).format(DateTimeFormatter.ofPattern(DateTimeUtil.DATE_FORMAT)));
 
-        //Integer startDate = 20210103;
-        //Integer endDate = 20210203;
+        //Integer startDate = 20210303;
+        //Integer endDate = 20210401;
         AtomicInteger count = new AtomicInteger(0);
 
         try {