|
@@ -36,22 +36,23 @@ public class CommonServiceImpl implements ICommonService {
|
|
|
String localCachesImagePath = dataSource + "/caches/images/";
|
|
|
String ossCachesImagePath = ossResultPath + "caches/images/";
|
|
|
//先清除旧的全景图
|
|
|
- fYunFileServiceInterface.deleteFolder(ossCachesImagePath);
|
|
|
+// fYunFileServiceInterface.deleteFolder(ossCachesImagePath);
|
|
|
if(FileUtil.exist(localCachesImagePath)){
|
|
|
- List<String> imagesList = FileUtil.listFileNames(localCachesImagePath);
|
|
|
- if(CollUtil.isNotEmpty(imagesList)){
|
|
|
- String ossVisionPath = String.format(UploadFilePath.IMG_VIEW_PATH, num) + "vision.txt";
|
|
|
- String visionPath = String.format(ConstantFilePath.SCENE_DATA_PATH_V4, num) + "vision.txt";
|
|
|
- fYunFileServiceInterface.downloadFile(ossVisionPath, visionPath);
|
|
|
- List<String> panoramaImageList = SceneUtil.getPanoramaImageList(visionPath);
|
|
|
- imagesList.stream().forEach(fileName -> {
|
|
|
- if (panoramaImageList.contains(fileName)) {
|
|
|
- String srcPath = localCachesImagePath + fileName;
|
|
|
- String ossPath = ossCachesImagePath + fileName;
|
|
|
- uploadMap.put(srcPath, ossPath);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ fYunFileServiceInterface.uploadFileByCommand(localCachesImagePath, ossCachesImagePath);
|
|
|
+// List<String> imagesList = FileUtil.listFileNames(localCachesImagePath);
|
|
|
+// if(CollUtil.isNotEmpty(imagesList)){
|
|
|
+// String ossVisionPath = String.format(UploadFilePath.IMG_VIEW_PATH, num) + "vision.txt";
|
|
|
+// String visionPath = String.format(ConstantFilePath.SCENE_DATA_PATH_V4, num) + "vision.txt";
|
|
|
+// fYunFileServiceInterface.downloadFile(ossVisionPath, visionPath);
|
|
|
+// List<String> panoramaImageList = SceneUtil.getPanoramaImageList(visionPath);
|
|
|
+// imagesList.stream().forEach(fileName -> {
|
|
|
+// if (panoramaImageList.contains(fileName)) {
|
|
|
+// String srcPath = localCachesImagePath + fileName;
|
|
|
+// String ossPath = ossCachesImagePath + fileName;
|
|
|
+// uploadMap.put(srcPath, ossPath);
|
|
|
+// }
|
|
|
+// });
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
//上传project.json
|
|
@@ -85,6 +86,44 @@ public class CommonServiceImpl implements ICommonService {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ //上传深时场景生成obj需要的文件
|
|
|
+ String localReconstruction = dataSource + "/caches/reconstruction/";
|
|
|
+ String ossReconstruction = ossResultPath + "caches/reconstruction/";
|
|
|
+ if(FileUtil.exist(localReconstruction)){
|
|
|
+ fYunFileServiceInterface.uploadFileByCommand(localReconstruction, ossReconstruction);
|
|
|
+ }
|
|
|
+ String localDepthmap = dataSource + "/caches/depthmap/";
|
|
|
+ String ossDepthmap = ossResultPath + "caches/depthmap/";
|
|
|
+ if(FileUtil.exist(localDepthmap)){
|
|
|
+ fYunFileServiceInterface.uploadFileByCommand(localDepthmap, ossDepthmap);
|
|
|
+ }
|
|
|
+ String localDepthmapAsc = dataSource + "/caches/depthmap_csc/";
|
|
|
+ String ossDepthmapAsc = ossResultPath + "caches/depthmap_csc/";
|
|
|
+ if(FileUtil.exist(localDepthmap)){
|
|
|
+ fYunFileServiceInterface.uploadFileByCommand(localDepthmapAsc, ossDepthmapAsc);
|
|
|
+ }
|
|
|
+ String localPanoramaJson = dataSource + "/caches/panorama.json";
|
|
|
+ String ossPanoramaJson = ossResultPath + "caches/panorama.json";
|
|
|
+ if(FileUtil.exist(localPanoramaJson)){
|
|
|
+ fYunFileServiceInterface.uploadFile(localPanoramaJson, ossPanoramaJson);
|
|
|
+ }
|
|
|
+ String localLaserPly = dataSource + "/results/laserData/laser.ply";
|
|
|
+ String ossLaserPly = ossResultPath + "results/laserData/laser.ply";
|
|
|
+ if(FileUtil.exist(localLaserPly)){
|
|
|
+ fYunFileServiceInterface.uploadFile(localLaserPly, ossLaserPly);
|
|
|
+ }
|
|
|
+ String localFloorGroupFixJson = dataSource + "/caches/floor_group_fix.json";
|
|
|
+ String ossFloorGroupFixJson = ossResultPath + "caches/floor_group_fix.json";
|
|
|
+ if(FileUtil.exist(localFloorGroupFixJson)){
|
|
|
+ fYunFileServiceInterface.uploadFile(localFloorGroupFixJson, ossFloorGroupFixJson);
|
|
|
+ }
|
|
|
+ String localDepthmapVis = dataSource + "/caches/depthmap_vis";
|
|
|
+ String ossDepthmapVis = ossResultPath + "caches/depthmap_vis";
|
|
|
+ if(FileUtil.exist(localDepthmapVis)){
|
|
|
+ fYunFileServiceInterface.uploadFile(localDepthmapVis, ossDepthmapVis);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
//开始上传
|
|
|
fYunFileServiceInterface.uploadMulFiles(uploadMap);
|
|
|
}
|