修复pa赋值

master
chenxiwang 2024-08-16 18:11:32 +08:00
parent 1428e5d7c3
commit 59323a9c6f
2 changed files with 2 additions and 1 deletions

View File

@ -498,6 +498,8 @@ public class ForecastResultsService extends ServiceImpl<ForecastResultsMapper, F
*/ */
public static boolean isBeforeEightAM(Date date) { public static boolean isBeforeEightAM(Date date) {
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
// 先设置当前时间
calendar.setTime(date);
calendar.set(Calendar.HOUR_OF_DAY, 8); calendar.set(Calendar.HOUR_OF_DAY, 8);
calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.SECOND, 0);

View File

@ -153,7 +153,6 @@ public class PaDataTask {
*/ */
@Async @Async
@Scheduled(cron ="0 0/5 20-23 * * ?") @Scheduled(cron ="0 0/5 20-23 * * ?")
@PostConstruct
public void PaNextDataCalc() throws ParseException { public void PaNextDataCalc() throws ParseException {
Date nowTime = new Date(); Date nowTime = new Date();
// 查询所有需要统计pa值的站点 // 查询所有需要统计pa值的站点