From cc7b680aa5b2a6ad599c394715bb4327de8670bf Mon Sep 17 00:00:00 2001
From: rain <167982779@qq.com>
Date: Tue, 25 Jun 2024 14:37:32 +0800
Subject: [PATCH] 调查取证手动航线更新图斑调查状态,新增媒体查询接口视频图片筛查,调整定时任务时间,新增航线任务错误代码识别

---
 src/main/java/com/dji/sample/patches/utils/TimerUtil.java |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 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 4230895..9509d05 100644
--- a/src/main/java/com/dji/sample/patches/utils/TimerUtil.java
+++ b/src/main/java/com/dji/sample/patches/utils/TimerUtil.java
@@ -24,6 +24,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.io.ByteArrayResource;
 import org.springframework.http.*;
+import org.springframework.http.client.SimpleClientHttpRequestFactory;
 import org.springframework.mock.web.MockMultipartFile;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
@@ -114,7 +115,7 @@
             String times = convertTimestampToFormattedString(time);
             sendPostWithParameters(waylineName, waylineFile.getWaylineId(), times, lists1, listOfLists);
             updatePatchesStatu(list);
-            time = addOneHourToTimestamp(time,1,30);
+            time = addOneHourToTimestamp(time, 1, 30);
         }
 
     }
@@ -157,7 +158,8 @@
 
     @Scheduled(cron = "0 0 0 * * ?")
     public void mytask5() throws IOException {
-        Long time = getCurrentTimestampPlus8Hours(10);
+        Long time = getCurrentTimestampPlus8Hours(9);
+        time = addOneHourToTimestamp(time, 0, 50);
         List<List<Long>> listOfLists = new ArrayList<>();
         List<Long> sublist = new ArrayList<>();
         sublist.add(time); // 添加整数值
@@ -170,7 +172,8 @@
 
     @Scheduled(cron = "0 0 0 * * ?")
     public void mytask6() throws IOException {
-        Long time = getCurrentTimestampPlus8Hours(11);
+        Long time = getCurrentTimestampPlus8Hours(9);
+        time = addOneHourToTimestamp(time, 1, 40);
         List<List<Long>> listOfLists = new ArrayList<>();
         List<Long> sublist = new ArrayList<>();
         sublist.add(time); // 添加整数值
@@ -183,7 +186,8 @@
 
     @Scheduled(cron = "0 0 0 * * ?")
     public void mytask7() throws IOException {
-        Long time = getCurrentTimestampPlus8Hours(13);
+        Long time = getCurrentTimestampPlus8Hours(9);
+        time = addOneHourToTimestamp(time, 2, 50);
         List<List<Long>> listOfLists = new ArrayList<>();
         List<Long> sublist = new ArrayList<>();
         sublist.add(time); // 添加整数值
@@ -412,7 +416,7 @@
 
             // 发送请求
             ResponseEntity<String> response = restTemplate.exchange(
-                    "https://jxlandcloud.org.cn/landCloudWork/artifact/media/upload.action",
+                    "http://39.98.49.177:8083/landCloudWork/artifact/media/upload.action",
 //                    "http://localhost:6789/territory/tbdkjbxx/upload",
                     HttpMethod.POST,
                     requestEntity,
@@ -586,7 +590,7 @@
         return timestamp / 1000;
     }
 
-    public static Long addOneHourToTimestamp(Long timestampInSeconds,long hours,long min) {
+    public static Long addOneHourToTimestamp(Long timestampInSeconds, long hours, long min) {
         // 将输入的秒级时间戳转换为Instant对象
         Instant instant = Instant.ofEpochSecond(timestampInSeconds);
 

--
Gitblit v1.9.3