Przeglądaj źródła

上传结算结果

dsx 2 lat temu
rodzic
commit
69eeb0ebaa

+ 39 - 13
src/main/java/com/fdkankan/job/job/UploadResultDataHandler.java

@@ -69,24 +69,13 @@ public class UploadResultDataHandler {
                     ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(plus.getId());
                     String dataSource = scenePlusExt.getDataSource();
                     if(StrUtil.isNotEmpty(dataSource)){
+
                         //上传caches/images
                         String localCachesImagePath = dataSource + "/caches/images/";
                         String ossCachesImagePath = ossResultPath + "caches/images/";
                         //先清除旧的全景图
-                        fYunFileService.deleteFolder(ossCachesImagePath);
                         if(FileUtil.exist(localCachesImagePath)){
-                            List<String> imagesList = FileUtil.listFileNames(localCachesImagePath);
-                            if(CollUtil.isNotEmpty(imagesList)){
-                                String visionPath = dataSource + "/results/vision.txt";
-                                List<String> panoramaImageList = SceneUtil.getPanoramaImageList(FileUtil.readUtf8String(visionPath));
-                                imagesList.stream().forEach(fileName -> {
-                                    if (panoramaImageList.contains(fileName)) {
-                                        String srcPath = localCachesImagePath + fileName;
-                                        String ossPath = ossCachesImagePath + fileName;
-                                        uploadMap.put(srcPath, ossPath);
-                                    }
-                                });
-                            }
+                            fYunFileService.uploadFileByCommand(localCachesImagePath, ossCachesImagePath);
                         }
 
                         //上传vision.txt
@@ -127,6 +116,43 @@ public class UploadResultDataHandler {
                             });
                         }
 
+                        //上传深时场景生成obj需要的文件
+                        String localReconstruction = dataSource + "/caches/reconstruction/";
+                        String ossReconstruction = ossResultPath + "caches/reconstruction/";
+                        if(FileUtil.exist(localReconstruction)){
+                            fYunFileService.uploadFileByCommand(localReconstruction, ossReconstruction);
+                        }
+                        String localDepthmap = dataSource + "/caches/depthmap/";
+                        String ossDepthmap = ossResultPath + "caches/depthmap/";
+                        if(FileUtil.exist(localDepthmap)){
+                            fYunFileService.uploadFileByCommand(localDepthmap, ossDepthmap);
+                        }
+                        String localDepthmapAsc = dataSource + "/caches/depthmap_csc/";
+                        String ossDepthmapAsc = ossResultPath + "caches/depthmap_csc/";
+                        if(FileUtil.exist(localDepthmapAsc)){
+                            fYunFileService.uploadFileByCommand(localDepthmapAsc, ossDepthmapAsc);
+                        }
+                        String localPanoramaJson =  dataSource + "/caches/panorama.json";
+                        String ossPanoramaJson =  ossResultPath + "caches/panorama.json";
+                        if(FileUtil.exist(localPanoramaJson)){
+                            fYunFileService.uploadFile(localPanoramaJson, ossPanoramaJson);
+                        }
+                        String localLaserPly = dataSource + "/results/laserData/laser.ply";
+                        String ossLaserPly =  ossResultPath + "results/laserData/laser.ply";
+                        if(FileUtil.exist(localLaserPly)){
+                            fYunFileService.uploadFile(localLaserPly, ossLaserPly);
+                        }
+                        String localFloorGroupFixJson = dataSource + "/caches/floor_group_fix.json";
+                        String ossFloorGroupFixJson = ossResultPath + "caches/floor_group_fix.json";
+                        if(FileUtil.exist(localFloorGroupFixJson)){
+                            fYunFileService.uploadFile(localFloorGroupFixJson, ossFloorGroupFixJson);
+                        }
+                        String localDepthmapVis = dataSource + "/caches/depthmap_vis";
+                        String ossDepthmapVis = ossResultPath + "caches/depthmap_vis";
+                        if(FileUtil.exist(localDepthmapVis)){
+                            fYunFileService.uploadFileByCommand(localDepthmapVis, ossDepthmapVis);
+                        }
+
                         //开始上传
                         fYunFileService.uploadMulFiles(uploadMap);