t1h 修改 hky

This commit is contained in:
panbaolin 2025-12-18 10:31:11 +08:00
parent af58b31fa6
commit e667a04fdb

View File

@ -7,6 +7,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.codec.digest.DigestUtils;
import org.jeecg.common.constant.enums.T1hFilePrefixEnum; import org.jeecg.common.constant.enums.T1hFilePrefixEnum;
import org.jeecg.common.constant.enums.WeatherDataSourceEnum; import org.jeecg.common.constant.enums.WeatherDataSourceEnum;
import org.jeecg.common.constant.enums.WeatherFileSuffixEnum;
import org.jeecg.common.properties.SystemStorageProperties; import org.jeecg.common.properties.SystemStorageProperties;
import org.jeecg.common.properties.T1hDownloadProperties; import org.jeecg.common.properties.T1hDownloadProperties;
import org.jeecg.common.util.ExecutePyUtils; import org.jeecg.common.util.ExecutePyUtils;
@ -189,6 +190,8 @@ public class DownloadT1hJob {
String folderPath = getFullPath(systemStorageProperties.getT1h(), baseTime); String folderPath = getFullPath(systemStorageProperties.getT1h(), baseTime);
try (Stream<Path> paths = Files.list(Paths.get(folderPath))) { try (Stream<Path> paths = Files.list(Paths.get(folderPath))) {
return paths.filter(Files::isRegularFile) return paths.filter(Files::isRegularFile)
.filter(Files::isRegularFile)
.filter(path -> path.toString().toLowerCase().endsWith(WeatherFileSuffixEnum.GRIB2.getValue()))
.map(Path::toFile) .map(Path::toFile)
.map(file -> extractFileInfo(file, baseTime)) .map(file -> extractFileInfo(file, baseTime))
.collect(Collectors.toList()); .collect(Collectors.toList());