|
|
@@ -3,11 +3,13 @@ package com.xunmei.job.task;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.xunmei.common.core.constant.SecurityConstants;
|
|
|
-import com.xunmei.common.core.domain.R;
|
|
|
-import com.xunmei.system.api.RemoteSyncOrgAndUserService;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import com.xunmei.common.core.web.domain.AjaxResult;
|
|
|
+import com.xunmei.system.api.RemoteRetrievalTaskService;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.time.LocalDate;
|
|
|
+
|
|
|
/**
|
|
|
* 监控调阅定时任务
|
|
|
*
|
|
|
@@ -16,14 +18,16 @@ import org.springframework.stereotype.Component;
|
|
|
|
|
|
@Component("RetrievalTask")
|
|
|
public class RetrievalTask {
|
|
|
-
|
|
|
+ @Resource
|
|
|
+ private RemoteRetrievalTaskService remoteRetrievalTaskService;
|
|
|
|
|
|
/**
|
|
|
* 每天生成日任务 如果当天是周一还需生成周任务
|
|
|
*/
|
|
|
- public void RetrievalDayTask()
|
|
|
- {
|
|
|
-
|
|
|
+ public void retrieveDayTask(LocalDate taskTime)
|
|
|
+ { System.out.println("监控调阅每日每周任务生产服务有参"+taskTime);
|
|
|
+ AjaxResult result = remoteRetrievalTaskService.dayTask(taskTime, SecurityConstants.INNER);
|
|
|
+ System.out.println(JSON.toJSONString(result));
|
|
|
}
|
|
|
/**
|
|
|
* 1.1生成周期为每月,每季,每半年,每年的任务
|
|
|
@@ -32,10 +36,30 @@ public class RetrievalTask {
|
|
|
* 其他日期生成月任务
|
|
|
*
|
|
|
*/
|
|
|
- public void RetrievalMonthTask()
|
|
|
- {
|
|
|
+ public void retrieveMonthTask(LocalDate taskTime)
|
|
|
+ { System.out.println("监控调阅每月任务生产服务有参"+taskTime);
|
|
|
+ AjaxResult result = remoteRetrievalTaskService.monthTask(taskTime,SecurityConstants.INNER);
|
|
|
+ System.out.println(JSON.toJSONString(result));
|
|
|
+ }
|
|
|
|
|
|
+ public void retrieveDayTask()
|
|
|
+ { System.out.println("监控调阅每日每周任务生产服务无参");
|
|
|
+ AjaxResult result = remoteRetrievalTaskService.dayTask(SecurityConstants.INNER);
|
|
|
+ System.out.println(JSON.toJSONString(result));
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 1.1生成周期为每月,每季,每半年,每年的任务
|
|
|
+ * 4.1||10.1日生成周期为每月,每季
|
|
|
+ * 7.1日获取执行周期为每月,每季,每半年的
|
|
|
+ * 其他日期生成月任务
|
|
|
+ *
|
|
|
+ */
|
|
|
+ public void retrieveMonthTask()
|
|
|
+ { System.out.println("监控调阅每月任务生产服务无参");
|
|
|
+ AjaxResult result = remoteRetrievalTaskService.monthTask(SecurityConstants.INNER);
|
|
|
+ System.out.println(JSON.toJSONString(result));
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
|