xiewj 2 semanas atrás
pai
commit
a7c9113a48

+ 20 - 14
src/main/java/com/fdkankan/download/service/impl/LaserService.java

@@ -121,7 +121,6 @@ public class LaserService  implements ILaserService {
                                 }
                                 break;
                             case 3:
-//                            if (os instanceof WindowsOperatingSystem){
                                 String path = datum.getKey();
                                 if (datum.getKey().startsWith("/")) {
                                     path = path.substring(1);
@@ -131,6 +130,7 @@ public class LaserService  implements ILaserService {
                                     if (StrUtil.isEmpty(FileUtil.extName(key)) || FileUtil.extName(key).equalsIgnoreCase("ply")) {
                                         continue;
                                     }
+                                    if (path.contains("depthmap")) {
                                     downloadUtil.downloadFile(laserResourceUrl + key, sourceLocal +
                                             File.separator + num +
                                             File.separator + "www" +
@@ -141,20 +141,24 @@ public class LaserService  implements ILaserService {
                                             File.separator + datum.getSceneCode() +
                                             File.separator + "depthmap" +
                                             File.separator + FileUtil.getName(key),1);
+                                    }else if (path.contains("imagemap")){
+                                        downloadUtil.downloadFile(laserResourceUrl + key, sourceLocal +
+                                                File.separator + num +
+                                                File.separator + "www" +
+                                                File.separator + num +
+                                                File.separator + "datav1" +
+                                                File.separator + num +
+                                                File.separator + "data" +
+                                                File.separator + datum.getSceneCode() +
+                                                File.separator + "imagemap" +
+                                                File.separator + FileUtil.getName(key),1);
+//                                        String srcPath = datum.getKey();
+//                                        if ("/".equals(datum.getKey().substring(0, 1))) {
+//                                            srcPath = srcPath.substring(1);
+//                                        }
+//                                        fYunFileService.downloadFileByCommand(bucket, sourceLocal + datum.getPath(), srcPath);
+                                    }
                                 }
-//                            }else{
-//                                String srcPath=datum.getKey();
-//                                if("/".equals(datum.getKey().substring(0,1))){
-//                                    srcPath = srcPath.substring(1);
-//                                }
-//                                fYunFileService.downloadFileByCommand(bucket,sourceLocal+datum.getPath(),srcPath);
-//                                File[] deptLs = FileUtil.ls(sourceLocal+datum.getPath());
-//                                for (File dept : deptLs) {
-//                                    if (FileUtil.extName(dept).equalsIgnoreCase("ply")){
-//                                        FileUtil.del(dept);
-//                                    }
-//                                }
-//                            }
                                 break;
                             case 4:
                                 try {
@@ -192,6 +196,8 @@ public class LaserService  implements ILaserService {
                 File file=offlineZip(path,zipPath);
                 log.info("生成完成路径{}",file.getAbsoluteFile());
                 return zipPath;
+            }else {
+                log.info("laser场景不存在,num:{}", resultData.getMsg());
             }
         }catch (Exception e){
             log.error("laser场景下载报错,num:{}", num, e);

+ 2 - 2
src/main/resources/application-prod.yml

@@ -4,7 +4,7 @@ spring:
   application:
     name: 4dkankan-scene-download-tool
   redis:
-    host: r-wz9owsphxqwi4ztqlfpd.redis.rds.aliyuncs.com
+    host: r-wz9owsphxqwi4ztqlf.redis.rds.aliyuncs.com
     port: 6379
     timeout: 6000ms
     password: 3oo19bgh0cae2406&
@@ -95,7 +95,7 @@ path:
   laserschool: /mnt/fdkk_laser/uploadPath/offlineGenerate/
   source-local-laser: /mnt/laserOffline
 download:
-  dir: D:\test2\
+  dir: /mnt/task/
   task: ${download.dir}task.txt
   id: ${download.dir}id.txt
   config: