|
@@ -5,6 +5,7 @@ import com.fdkankan.common.constant.CommonOperStatus;
|
|
|
import com.fdkankan.common.constant.SceneAsynFuncType;
|
|
|
import com.fdkankan.common.constant.SceneAsynModuleType;
|
|
|
import com.fdkankan.common.constant.SceneAsynOperType;
|
|
|
+import com.fdkankan.common.util.MD5;
|
|
|
import com.fdkankan.scene.vo.SaveFiltersParamVO;
|
|
|
import io.opencensus.metrics.LongGauge;
|
|
|
import java.util.Date;
|
|
@@ -693,17 +694,21 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
String path = scenePlusExt.getDataSource();
|
|
|
|
|
|
//户型图上传
|
|
|
- String userEditPath = UploadFilePath.USER_EDIT_PATH + "floor-cad-%s.%s";
|
|
|
- String floorCadPath = path + "/results/floorplan_cad";
|
|
|
- List<String> floorCadList = FileUtils.getFileList(floorCadPath);
|
|
|
- if(CollUtil.isNotEmpty(floorCadList)){
|
|
|
- floorCadList.stream().forEach(str->{
|
|
|
- String substring = str.substring(str.lastIndexOf(File.separator) + 1);
|
|
|
- String[] arr = substring.split("floor");
|
|
|
- String[] arr2 = arr[1].split("\\.");
|
|
|
- fYunFileService.uploadFile(bucket, str, String.format(userEditPath, num, arr2[0], arr2[1]));
|
|
|
- });
|
|
|
- }
|
|
|
+ String ossResultPath = String.format(UploadFilePath.scene_result_data_path, num);
|
|
|
+ String floorplanCadPath = ossResultPath + "floorplan_cad/";
|
|
|
+ fYunFileService.copyFileBetweenBucket(bucket, floorplanCadPath, bucket, String.format(UploadFilePath.USER_EDIT_PATH, num));
|
|
|
+
|
|
|
+// String userEditPath = UploadFilePath.USER_EDIT_PATH + "floor-cad-%s.%s";
|
|
|
+// String floorCadPath = path + "/results/floorplan_cad";
|
|
|
+// List<String> floorCadList = FileUtils.getFileList(floorCadPath);
|
|
|
+// if(CollUtil.isNotEmpty(floorCadList)){
|
|
|
+// floorCadList.stream().forEach(str->{
|
|
|
+// String substring = str.substring(str.lastIndexOf(File.separator) + 1);
|
|
|
+// String[] arr = substring.split("floor");
|
|
|
+// String[] arr2 = arr[1].split("\\.");
|
|
|
+// fYunFileService.uploadFile(bucket, str, String.format(userEditPath, num, arr2[0], arr2[1]));
|
|
|
+// });
|
|
|
+// }
|
|
|
|
|
|
//根据floorplan_cad.json生成houseType.json
|
|
|
this.uploadHouseTypeJson(num, bucket);
|
|
@@ -1572,8 +1577,8 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
fYunFileService.uploadFile(bucket, target + File.separator + "extras/video/" + videoName.replace("mp4", "flv"),videosViewPath + videoName.replace("mp4", "flv"));
|
|
|
|
|
|
//覆盖原始视频资源
|
|
|
- FileUtils.copyFile(target + File.separator + "extras/video/" + videoName,
|
|
|
- path + File.separator + "caches/videos/" + videoName, true);
|
|
|
+// FileUtils.copyFile(target + File.separator + "extras/video/" + videoName,
|
|
|
+// path + File.separator + "caches/videos/" + videoName, true);
|
|
|
|
|
|
}
|
|
|
FileUtils.deleteDirectory(target + File.separator + "extras/video/");
|
|
@@ -1645,15 +1650,20 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
if(new File(target + File.separator + "results").exists()){
|
|
|
FileUtils.delAllFile(target + File.separator + "results");
|
|
|
}
|
|
|
+
|
|
|
//创建文件夹,并link文件夹
|
|
|
new File(target + File.separator + "caches").mkdirs();
|
|
|
- CreateObjUtil.createSoftConnection(path + File.separator + "capture", target + File.separator + "capture");
|
|
|
+ fYunFileService.downloadFileByCommand(target + File.separator + "capture", SceneUtil.getHomePath(path));
|
|
|
+// CreateObjUtil.createSoftConnection(path + File.separator + "capture", target + File.separator + "capture");
|
|
|
if(new File(path + File.separator + "caches" + File.separator + "images").exists()){
|
|
|
CreateObjUtil.createSoftConnection(path + File.separator + "caches" + File.separator + "images", target + File.separator + "caches" + File.separator + "images");
|
|
|
}
|
|
|
|
|
|
- FileUtils.copyFile(path + File.separator + "data.json", target + File.separator+"data.json", true);
|
|
|
- FileUtils.copyFile(path + File.separator + "project.json", target + File.separator+"project.json", true);
|
|
|
+ String ossResultPath = String.format(UploadFilePath.scene_result_data_path, num);
|
|
|
+ fYunFileService.downloadFile(bucket, ossResultPath + "data.json", target + File.separator+"data.json");
|
|
|
+ fYunFileService.downloadFile(bucket, ossResultPath + "project.json", target + File.separator+"project.json");
|
|
|
+// FileUtils.copyFile(path + File.separator + "data.json", target + File.separator+"data.json", true);
|
|
|
+// FileUtils.copyFile(path + File.separator + "project.json", target + File.separator+"project.json", true);
|
|
|
|
|
|
//data.json增加extras为执行重建算法
|
|
|
String project = FileUtils.readFile(target + File.separator+"project.json");
|