lyhzzz 1 year ago
parent
commit
1e36a39fd8

+ 1 - 1
src/main/java/com/fdkankan/fusion/common/util/FileWriterUtil.java

@@ -71,7 +71,7 @@ public class FileWriterUtil {
         for (File file1 : files) {
             if(file1.isFile()){
                 if(file1.getName().endsWith(".obj") || file1.getName().endsWith(".las") || file1.getName().endsWith(".ply")
-                || file1.getName().endsWith(".osgb") || file1.getName().endsWith(".b3dm")){
+                || file1.getName().endsWith(".osgb") || file1.getName().endsWith(".b3dm") || file1.getName().endsWith(".laz")){
                     fileList.add(file1);
                 }
             }else {

+ 7 - 0
src/main/java/com/fdkankan/fusion/service/impl/CaseNumServiceImpl.java

@@ -135,6 +135,13 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
                     }
                     String ossGlbPath = localGlbPath.replace(FilePath.LOCAL_BASE_PATH,"fusion/");
                     uploadToOssUtil.uploadOss(localGlbPath,ossGlbPath);
+                    if(ossGlbPath.contains("lod_")){
+                        if(ossGlbPath.contains("lod_0")){
+                            ossGlbPaths.add(queryPath  +ossGlbPath);
+                        }else {
+                            continue;
+                        }
+                    }
                     ossGlbPaths.add(queryPath +ossGlbPath);
                 }
                 return JSONArray.toJSONString(ossGlbPaths);

+ 7 - 0
src/main/java/com/fdkankan/fusion/service/impl/ThreadService.java

@@ -98,6 +98,13 @@ public class ThreadService {
                 model.setModelDateType("las");
                 model.setModelType("las");
             }
+            if(name.contains(".laz")){
+                model.setModelDateType("laz");
+                model.setModelType("laz");
+                redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"65");
+                ShellUtil.yunUpload(objPathFile.getPath(),objPathFile.getPath().replace(FilePath.LOCAL_BASE_PATH,"fusion/"));
+                model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(queryPath +  objPathFile.getPath().replace(FilePath.LOCAL_BASE_PATH,"fusion/")))));
+            }
             if("las".equals(model.getModelType()) || "ply".equals(model.getModelType()) ){
                 mntFile =  OBJToGLBUtil.lasOrPlyToBin(file1);
                 glbOssPath = mntFile.getPath().replace("/mnt/","")+"/webcloud";