Commit 2f4bdc88 authored by 周健威's avatar 周健威

修改代码

parent 7a1caf44
...@@ -51,44 +51,11 @@ public class CoverScheduleTask { ...@@ -51,44 +51,11 @@ public class CoverScheduleTask {
@Autowired @Autowired
RscpAreaInfoBiz rscpAreaInfoBiz; RscpAreaInfoBiz rscpAreaInfoBiz;
//定时按月份统计覆盖率 //定时按月份统计覆盖率(每天凌晨2:00)
//@Scheduled(cron = "0 0 2 * * ?") @Scheduled(cron = "0 0 2 * * ?")
//或直接指定时间间隔,例如:5秒
//@Scheduled(fixedRate=5000) //@Scheduled(fixedRate=5000)
public void configureTasks() { public void configureTasks() {
//定时统计覆盖率数据 //定时统计覆盖率数据
//查询未处理覆盖率影像最早时间和最晚时间 rscpImageCoverBiz.coverTask();
// MaxMinVO vo = rscpImageDataTotalBiz.coverStatisticsMaxMin();
// if(null == vo.getMaxTime()) {
// log.info("无需更新");
// return;
// }
}
private void insertPart(int sort, String satelliteType, Integer countAll, int type) {
insertPart(sort, satelliteType, countAll, type, null);
}
private void insertPart(int sort, String satelliteType, Integer countAll, int type, String year) {
RscpImageStatistics rscpImageStatisticsAll = new RscpImageStatistics();
rscpImageStatisticsAll.setName(satelliteType);
rscpImageStatisticsAll.setNum(countAll);
rscpImageStatisticsAll.setSort(sort);
rscpImageStatisticsAll.setType(type);
rscpImageStatisticsAll.setDateyear(Integer.valueOf(year));
rscpImageStatisticsBiz.insertSelective(rscpImageStatisticsAll);
}
private void yearInsert(String year, String satelliteType, Integer sort) {
Integer countYear = rscpImageDataTotalBiz.selectCountByWeekend(w-> {
w.andEqualTo(RscpImageDataTotal::getImageSatelliteType, satelliteType);
w.andEqualTo(RscpImageDataTotal::getImageYear, year);
return w;
});
//添加
insertPart(sort, satelliteType, countYear, RscpImageStatistics.TYPE_YEAR, year);
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment