فهرست منبع

1.更新每日工时更新频率

verguenza 4 سال پیش
والد
کامیت
bda305885a

+ 9 - 2
src/main/java/com/galaxis/manatee/task/WorkHourStatistics.java

@@ -39,14 +39,21 @@ public class WorkHourStatistics {
     }
 
     /**
-     * 每10天执行一次所有工时数据的标准化、上传操作。
+     * 每2天执行一次所有工时数据的标准化、上传操作。
      */
-    @Scheduled(fixedDelay = 864000000L)
+    @Scheduled(fixedDelay = 8640000000L)
     public void updateHour(){
         //每日工时标准化
         standardWorkHour();
         standardWeeklyWorkHour();
         standardMonthlyWorkHour();
+    }
+
+    /**
+     * 更新数据到
+     */
+    @Scheduled(fixedDelay = 172800000L)
+    public void updateWorkHour(){
         logService.updateAllChuanyunSelfWorkHour();
         logService.updateAllChuanyunWeekMemberHour();
         logService.updateAllChuanyunSelfCost();

+ 1 - 7
src/main/java/com/galaxis/manatee/task/WorkHourStatisticsRecently.java

@@ -3,7 +3,6 @@ package com.galaxis.manatee.task;
 import com.galaxis.manatee.dao.ChuanyunUserCompanyDao;
 import com.galaxis.manatee.entity.chuanyun.data.object.ChuanyunUserCompanyDO;
 import com.galaxis.manatee.service.LogDownloadService;
-import com.galaxis.manatee.service.LogService;
 import com.galaxis.manatee.service.LogStandardService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.data.domain.PageRequest;
@@ -22,13 +21,11 @@ public class WorkHourStatisticsRecently {
     private final LogDownloadService logDownloadService;
     private final ChuanyunUserCompanyDao chuanyunUserCompanyDao;
     private final LogStandardService logStandardService;
-    private final LogService logService;
 
-    public WorkHourStatisticsRecently(LogDownloadService logDownloadService, ChuanyunUserCompanyDao chuanyunUserCompanyDao, LogStandardService logStandardService, LogService logService) {
+    public WorkHourStatisticsRecently(LogDownloadService logDownloadService, ChuanyunUserCompanyDao chuanyunUserCompanyDao, LogStandardService logStandardService) {
         this.logDownloadService = logDownloadService;
         this.chuanyunUserCompanyDao = chuanyunUserCompanyDao;
         this.logStandardService = logStandardService;
-        this.logService = logService;
     }
 
     @Scheduled(fixedDelay = 3600000L)
@@ -37,9 +34,6 @@ public class WorkHourStatisticsRecently {
         standardWorkHour();
         standardWeeklyWorkHour();
         standardMonthlyWorkHour();
-        logService.updateAllChuanyunSelfWorkHour();
-        logService.updateAllChuanyunWeekMemberHour();
-        logService.updateAllChuanyunSelfCost();
     }
 
     /**