From 28e8bd6931b9b2ea047b350c1333ab01f3da3192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Tue, 31 Dec 2024 10:07:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=B7=E8=BE=BE=E8=A7=86=E9=A2=91=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E5=8A=A03=E7=A7=92=E5=BB=B6=E8=BF=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zc/business/controller/RadarController.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/RadarController.java b/zc-business/src/main/java/com/zc/business/controller/RadarController.java index 4f33ecda..87ecbd38 100644 --- a/zc-business/src/main/java/com/zc/business/controller/RadarController.java +++ b/zc-business/src/main/java/com/zc/business/controller/RadarController.java @@ -80,6 +80,8 @@ public class RadarController { try { // 获取雷达事件视频 String baseUrl = dcWarningService.getRadarIncidentVideo(radar.getId()); + //String baseUrl = replacedUrl.replace(" ", "_"); + // System.out.println("雷达视频原始地址:" + replacedUrl); System.out.println("雷达视频地址:" + baseUrl); if (baseUrl == null || baseUrl.isEmpty()) { @@ -91,10 +93,10 @@ public class RadarController { int port= Integer.parseInt(configService.selectConfigByKey("FTP-PORT")); String username= configService.selectConfigByKey("FTP-USER");//密钥 String password= configService.selectConfigByKey("FPT-PASSWORD");//密钥 -// String ftpServer = "192.168.3.1"; -// int port = 21; -// String username = "1911390090@qq.com"; -// String password = "989878wxl"; +/* String ftpServer = "192.168.3.1"; + int port = 21; + String username = "1911390090@qq.com"; + String password = "989878wxl";*/ String[] split = StringUtils.split(baseUrl, "/"); // 拼接文件名 @@ -128,6 +130,7 @@ public class RadarController { // 空格编码并构建URL String encodedUrl = encodeUriComponent(baseUrl); System.out.println("encodedUrl: " + encodedUrl); + Thread.sleep(3000);//延迟3秒,等待服务器响应 URI uri = new URI(encodedUrl); URL url = uri.toURL();