|
|
@ -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(); |
|
|
|
|
|
|
|