Преглед изворни кода

下载图片数据防止重复下载

祝雷 пре 2 година
родитељ
комит
9ccca93bec

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

@@ -41,7 +41,7 @@ public class SatelliteRadarImageCollectionTask {
     /**
      * 50分钟一次
      */
-    @Scheduled(cron = "0 0/50 * * * ? ")
+    @Scheduled(cron = "0 0/50x * * * ? ")
     public void download1() {
         if (ybFixedTime) {
             return;
@@ -87,7 +87,7 @@ public class SatelliteRadarImageCollectionTask {
                 String fileName = "IMAGE,fyhw," + yearPlist + "_" + monthPlist + "_" + dayPlist + "_" + timePlist + "_" + minutePlist + "_00.JPG";
                 log.info("fileName:" + fileName);
                 reader = new BufferedReader(new FileReader(
-                        "/Users/zhulei/test/test.txt"));
+                        duplicateFile));
                 String line = reader.readLine();
                 int temp = 0;
                 while (line != null) {
@@ -150,7 +150,7 @@ public class SatelliteRadarImageCollectionTask {
                 String fileName = "IMAGE,fysq," + yearPlist + "_" + monthPlist + "_" + dayPlist + "_" + timePlist + "_" + minutePlist + "_00.JPG";
                 log.info("fileName:" + fileName);
                 reader = new BufferedReader(new FileReader(
-                        "/Users/zhulei/test/test.txt"));
+                        duplicateFile));
                 String line = reader.readLine();
                 int temp = 0;
                 while (line != null) {
@@ -213,7 +213,7 @@ public class SatelliteRadarImageCollectionTask {
                 String fileName = "IMAGE,fy2g," + yearPlist + "_" + monthPlist + "_" + dayPlist + "_" + timePlist + "_" + minutePlist + "_00.JPG";
                 log.info("fileName:" + fileName);
                 reader = new BufferedReader(new FileReader(
-                        "/Users/zhulei/test/test.txt"));
+                        duplicateFile));
                 String line = reader.readLine();
                 int temp = 0;
                 while (line != null) {
@@ -276,7 +276,7 @@ public class SatelliteRadarImageCollectionTask {
                 String fileName = "IMAGE,ldpt," + yearPlist + "_" + monthPlist + "_" + dayPlist + "_" + timePlist + "_" + minutePlist + "_00.JPG";
                 log.info("fileName:" + fileName);
                 reader = new BufferedReader(new FileReader(
-                        "/Users/zhulei/test/test.txt"));
+                        duplicateFile));
                 String line = reader.readLine();
                 int temp = 0;
                 while (line != null) {
@@ -398,7 +398,7 @@ public class SatelliteRadarImageCollectionTask {
     /**
      * 0晨6分去重
      */
-    @Scheduled(cron = "0 6 0 * * ")
+    @Scheduled(cron = "0 6 0 ? * * ")
     public  void duplicate() {
         try {
             File file = new File(duplicateFile);

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

@@ -7,7 +7,7 @@ snow.qzk.file=/media/sky/73b9d852-878a-4b11-a82f-249a237fa9e7/sky/LCJ/SnowCoverP
 download.file.path=/usr/local/LCJ/data/receivedata/
 
 
-duplicate.file=/Users/zhulei/test/test.txt
+duplicate.file=D:\hnrlcj\sjxz\duplicate\duplicate.txt
 
 yb.startTime=2022_12_29_00_00_00
 yb.endTime=2022_12_30_00_00_00