From c2defb8ee038ae780e2f8c57839ea3558f4f1f4b Mon Sep 17 00:00:00 2001
From: aix <vip_xiaobin810@163.com>
Date: Fri, 19 Jul 2024 17:20:26 +0800
Subject: [PATCH] 新建面状航线

---
 src/main/java/com/dji/sample/patches/utils/TimerUtil.java |   49 ++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 46 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/dji/sample/patches/utils/TimerUtil.java b/src/main/java/com/dji/sample/patches/utils/TimerUtil.java
index 30f0135..3ba0976 100644
--- a/src/main/java/com/dji/sample/patches/utils/TimerUtil.java
+++ b/src/main/java/com/dji/sample/patches/utils/TimerUtil.java
@@ -144,7 +144,7 @@
 //    }
     @Scheduled(cron = "0 0 1 * * ?")
     public void mytask4() throws IOException {
-        Long time = getCurrentTimestampPlus8Hours(1);
+        Long time = getCurrentTimestampPlus8Hours(8);
         List<List<Long>> listOfLists = new ArrayList<>();
         List<Long> sublist = new ArrayList<>();
         sublist.add(time); // 添加整数值
@@ -152,7 +152,7 @@
         List<Long> lists1 = new ArrayList<>();
         lists1.add(time);
         String times = convertTimestampToFormattedString(time);
-        sendPostWithParameters("别墅巡查一段", "c1b9c70e-2e58-4147-b43e-aa4f639726bb", times, lists1, listOfLists);
+        sendPostWithParameters("别墅巡查一段", "2a44748a-1500-406f-80cf-ad92186fe8d2", times, lists1, listOfLists);
     }
 
     @Scheduled(cron = "0 50 0 * * ?")
@@ -165,7 +165,7 @@
         List<Long> lists1 = new ArrayList<>();
         lists1.add(time);
         String times = convertTimestampToFormattedString(time);
-        sendPostWithParameters("别墅巡查二段", "561ecb37-d673-40f8-a859-05dbfc7d9976", times, lists1, listOfLists);
+        sendPostWithParameters("别墅巡查二段", "a07229af-471a-4058-9da6-5a2b84308b9e", times, lists1, listOfLists);
     }
 
     @Scheduled(cron = "0 40 1 * * ?")
@@ -194,6 +194,48 @@
         sendPostWithParameters("九洲巡河二段", "58cd4261-02d7-4c4e-b876-25a4a2630c18", times, lists1, listOfLists);
     }
 
+    @Scheduled(cron = "0 30 2 * * ?")
+    public void mytask8() throws IOException {
+        Long time = getCurrentTimestampPlus8Hours(12);
+        List<List<Long>> listOfLists = new ArrayList<>();
+        List<Long> sublist = new ArrayList<>();
+        sublist.add(time); // 添加整数值
+        listOfLists.add(sublist);
+        List<Long> lists1 = new ArrayList<>();
+        lists1.add(time);
+        String times = convertTimestampToFormattedString(time);
+        sendPostWithParameters("定时任务2:30", "c3a7b125-bc0b-49d4-96ed-80743200ab80", times, lists1, listOfLists);
+    }
+    @Scheduled(cron = "0 30 2 * * ?")
+    public void mytask9() throws IOException {
+        Long time = getCurrentTimestampPlus8Hours(14);
+        List<List<Long>> listOfLists = new ArrayList<>();
+        List<Long> sublist = new ArrayList<>();
+        sublist.add(time); // 添加整数值
+        listOfLists.add(sublist);
+        List<Long> lists1 = new ArrayList<>();
+        lists1.add(time);
+        String times = convertTimestampToFormattedString(time);
+        sendPostWithParameters("定时任务4:30", "c3a7b125-bc0b-49d4-96ed-80743200ab80", times, lists1, listOfLists);
+    }
+    @Scheduled(cron = "0 0 6 * * ?")
+    public static void mytask10() {
+        File directory = new File("/tmp");
+        String[] partialFileNames = {"temp", "mark"}; // 要匹配的部分文件名
+        if (directory.isDirectory()) {
+            File[] files = directory.listFiles();
+            if (files != null) {
+                for (File file : files) {
+                    for (String partialFileName : partialFileNames) {
+                        if (file.isFile() && file.getName().contains(partialFileName)) {
+                            file.delete();
+                            break; // 跳出内层循环,以免重复删除同一个文件
+                        }
+                    }
+                }
+            }
+        }
+    }
     /**
      * 完成对未推送的图斑数据进行整合发送
      *
@@ -248,6 +290,7 @@
         return convert(new File(destKMZFile));
     }
 
+
     /**
      * 将航线上传Oss
      *

--
Gitblit v1.9.3