Merge remote-tracking branch 'origin/master'

This commit is contained in:
duwenyuan 2025-12-18 14:53:12 +08:00
commit 1a53e4f1c6

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());