|
|
|
@ -85,13 +85,18 @@ public class MyScheduling {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//10分钟执行一次
|
|
|
|
|
@Scheduled(fixedRate = 1000 * 60 * 30)
|
|
|
|
|
@Scheduled(fixedRate = 1000 * 60 * 60 * 5)
|
|
|
|
|
public void ruyuan() {
|
|
|
|
|
log.info("----------开始采集------------");
|
|
|
|
|
log.info("-----采集时间:"+oneDate);
|
|
|
|
|
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
String format = fmt.format(oneDate);
|
|
|
|
|
log.info("-----采集时间:开始时间:"+ format);
|
|
|
|
|
Date twoDate = new Date();
|
|
|
|
|
String format1 = fmt.format(twoDate);
|
|
|
|
|
log.info("-----采集时间:结束时间:"+ format1);
|
|
|
|
|
|
|
|
|
|
//获取jzh列表
|
|
|
|
|
List<String> jzhs = afCollectTaskService.listJZHByDate(oneDate, twoDate);
|
|
|
|
|
List<String> jzhs = afCollectTaskService.listJZHByDate(format, format1);
|
|
|
|
|
int size = jzhs.size();
|
|
|
|
|
log.info("-------本次采集数:" + size);
|
|
|
|
|
if(size==0){
|
|
|
|
@ -189,7 +194,7 @@ public class MyScheduling {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
log.info("-------本次成功采集数:" + size);
|
|
|
|
|
oneDate = twoDate;
|
|
|
|
|
// oneDate = twoDate;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String requestFunctionWebService(Object[] params,
|
|
|
|
|