Browse Source

1.更新钉钉自动任务

verguenza 4 years ago
parent
commit
9e75a3c527

+ 5 - 4
src/main/java/com/galaxis/manatee/service/DingTalkScheduledTask.java

@@ -16,6 +16,7 @@ import com.galaxis.manatee.entity.chuanyun.data.object.ChuanyunProjectChangeDO;
 import com.galaxis.manatee.entity.ding.DingTalkProcessInstance;
 import com.galaxis.manatee.entity.ding.DingTalkProcessInstance;
 import com.taobao.api.ApiException;
 import com.taobao.api.ApiException;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import java.time.LocalDateTime;
 import java.time.LocalDateTime;
@@ -73,7 +74,7 @@ public class DingTalkScheduledTask {
      * 每个小时定期更新出差申请数据
      * 每个小时定期更新出差申请数据
      * 出差申请信息暂时不进行更新
      * 出差申请信息暂时不进行更新
      */
      */
-//    @Scheduled(fixedDelay = 3600000L,initialDelay = 10000L)
+    @Scheduled(fixedDelay = 3600000L,initialDelay = 10000L)
     void updateBusinessTripProcessInstanceIdList() throws ApiException {
     void updateBusinessTripProcessInstanceIdList() throws ApiException {
         updateProcessInstanceIdList(DingTalkConstant.PROCESS_CODE_BUSINESS_TRIP);
         updateProcessInstanceIdList(DingTalkConstant.PROCESS_CODE_BUSINESS_TRIP);
     }
     }
@@ -84,7 +85,7 @@ public class DingTalkScheduledTask {
      * 每小时根据出差申请Id跟新出差申请信息。
      * 每小时根据出差申请Id跟新出差申请信息。
      * 出差申请信息暂时不进行更新
      * 出差申请信息暂时不进行更新
      */
      */
-//    @Scheduled(fixedDelay = 3600000L,initialDelay = 10000L)
+    @Scheduled(fixedDelay = 3600000L,initialDelay = 10000L)
     void updateProcessInstanceList() throws ApiException {
     void updateProcessInstanceList() throws ApiException {
          updateChuanyunAskForLeave(DingTalkConstant.PROCESS_CODE_ASKFORLEAVE);
          updateChuanyunAskForLeave(DingTalkConstant.PROCESS_CODE_ASKFORLEAVE);
     }
     }
@@ -93,7 +94,7 @@ public class DingTalkScheduledTask {
      * 业务招待申请更新
      * 业务招待申请更新
      * @throws ApiException
      * @throws ApiException
      */
      */
-//    @Scheduled(fixedDelay = 3600000L,initialDelay = 10000L)
+    @Scheduled(fixedDelay = 3600000L,initialDelay = 10000L)
     void updateChuanyunBusinessEntertainmentProcessInstanceList() throws ApiException {
     void updateChuanyunBusinessEntertainmentProcessInstanceList() throws ApiException {
         updateChuanyunBusinessEntertainment(DingTalkConstant.PROCESS_CODE_BUSINESSENTERTAINMENT);
         updateChuanyunBusinessEntertainment(DingTalkConstant.PROCESS_CODE_BUSINESSENTERTAINMENT);
     }
     }
@@ -101,7 +102,7 @@ public class DingTalkScheduledTask {
     /**
     /**
      * 每个小时定期更新项目实施变更申请数据
      * 每个小时定期更新项目实施变更申请数据
      */
      */
-//    @Scheduled(fixedDelay = 3600000L,initialDelay = 10000L)
+    @Scheduled(fixedDelay = 3600000L,initialDelay = 10000L)
     void updateProjectChangeProcessInstanceIdList() throws ApiException {
     void updateProjectChangeProcessInstanceIdList() throws ApiException {
         updateChuanyunProjectChangeProcessInstanceIdList(DingTalkConstant.PROCESS_CODE_PROJECT_CHANGE);
         updateChuanyunProjectChangeProcessInstanceIdList(DingTalkConstant.PROCESS_CODE_PROJECT_CHANGE);
     }
     }