Ver código fonte

feat(*): 控制是否下载流量网格文件

songdandan 2 anos atrás
pai
commit
ded5656704

+ 6 - 1
tongfei_river_data_collection/src/main/java/com/ublinkage/datacollection/service/QxybDataService.java

@@ -54,6 +54,9 @@ public class QxybDataService {
     @Value("${nc.file.download.enable}")
     private Boolean ncFileDownloadEnable;
 
+    @Value("${grid.flow.download.enable}")
+    private Boolean flowGridDownloadEnable;
+
     @Autowired
     private CacheManager cacheManager;
 
@@ -672,7 +675,9 @@ public class QxybDataService {
                     downloadGridTempData(rdField, domain, p, 1);
                     downloadGridRainData(rdField, domain, p, 1);
                     downloadGridRainData(rdField, domain, p, 24);
-                    downloadGridFlowData(rdField, domain, p, 1);
+                    if (flowGridDownloadEnable) {
+                        downloadGridFlowData(rdField, domain, p, 1);
+                    }
                 });
 
             });

+ 2 - 1
tongfei_river_data_collection/src/main/resources/application-dev.properties

@@ -13,4 +13,5 @@ yb.endTime=2022_12_30_00_00_00
 
 yb.fixedTime=false
 
-nc.file.download.enable=true
+nc.file.download.enable=true
+grid.flow.download.enable=false

+ 1 - 0
tongfei_river_data_collection/src/main/resources/application-sky.properties

@@ -15,3 +15,4 @@ yb.endTime=2022_12_30_00_00_00
 yb.fixedTime=false
 
 nc.file.download.enable=true
+grid.flow.download.enable=false

+ 2 - 2
tongfei_river_data_collection/数据采集.bat

@@ -11,6 +11,6 @@ set snowqzkfile=/Users/ocean/Downloads/demo/SnowCoverPrediction/qzk/predict.csv
 
 :: 是否下载NC文件
 set ncFileDownloadEnable=true
-
+set gridFlowDownloadEnable=false
 :: 程序启动命令,不用修改。
-start jre1.8.0_171/bin/java  -Xms1g -Xmx1g -jar -Dyb.fixedTime=%ybfixedTime% -Dyb.startTime=%ybStartTime% -Dyb.endTime=%ybEndTime% -Ddownload.file.path=%downloadFilePath% -Dsnow.cd.file=%snowcdfile% -Dsnow.qzk.file=%snowqzkfile% -Dnc.file.download.enable=%ncFileDownloadEnable% river_data_transfer.jar
+start jre1.8.0_171/bin/java  -Xms1g -Xmx1g -jar -Dyb.fixedTime=%ybfixedTime% -Dyb.startTime=%ybStartTime% -Dyb.endTime=%ybEndTime% -Ddownload.file.path=%downloadFilePath% -Dsnow.cd.file=%snowcdfile% -Dsnow.qzk.file=%snowqzkfile% -Dnc.file.download.enable=%ncFileDownloadEnable% -Dgrid.flow.download.enable=%gridFlowDownloadEnable% river_data_transfer.jar

+ 1 - 0
tongfei_river_data_transfer/src/main/java/com/ublinkage/transfer/send/SendDataHandlerTask.java

@@ -72,6 +72,7 @@ public class SendDataHandlerTask {
                         String suffix = FileUtil.getSuffix(fileName.toFile());
                         //如果不是压缩包,将文件压缩在zip
                         if (!"zip".equals(suffix)) {
+                            //TODO 文件可能没写完
                             File zip = ZipUtil.zip(fileName.toFile().getAbsolutePath(), compressZipPath + FileUtil.getName(fileName.toFile()).replace(FileUtil.getSuffix(fileName.toFile()), "zip"));
                             log.info("压缩文件:{}", zip);
                             //删除源文件