|
@@ -37,6 +37,7 @@ import com.fdkankan.scene.oss.OssUtil;
|
|
|
import com.fdkankan.scene.service.*;
|
|
|
import com.fdkankan.scene.util.CmdBuildUtil;
|
|
|
import com.fdkankan.scene.util.MergeVideoUtil;
|
|
|
+import com.fdkankan.scene.util.VisionUtil;
|
|
|
import com.fdkankan.scene.vo.*;
|
|
|
import com.fdkankan.web.response.ResultData;
|
|
|
import com.google.common.collect.Lists;
|
|
@@ -930,7 +931,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
// String path = "F:\\test";
|
|
|
String path = sceneService.getDataSource(num, scenePlus.getSceneSource(), scenePlusExt.getDataSource());
|
|
|
//全景图计算根目录
|
|
|
- String target = path + "_images";
|
|
|
+ String target = path.substring(0, path.lastIndexOf(File.separator)) + "_images";
|
|
|
//解压缩文件存放目录
|
|
|
String targetImagesPath = target + "/extras/images/";
|
|
|
//压缩文件保存目录
|
|
@@ -1024,7 +1025,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
|
|
|
String imgViewPath = String.format(UploadFilePath.IMG_VIEW_PATH, num);
|
|
|
ossUtil.downloadFile(bucket, imgViewPath + "vision.modeldata", target + File.separator + "extras" + File.separator + "vision.modeldata");
|
|
|
- CreateObjUtil.convertVisionmodeldataToTxt(target + File.separator + "extras" + File.separator + "vision.modeldata",
|
|
|
+ VisionUtil.convertVisionmodeldataToTxt(target + File.separator + "extras" + File.separator + "vision.modeldata",
|
|
|
target + File.separator + "extras" + File.separator + "vision.txt");
|
|
|
|
|
|
String ossResultPath = sceneService.getDataSource(num, scenePlus.getSceneSource(), scenePlusExt.getDataSource());
|
|
@@ -1047,13 +1048,13 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
skyboxType = "SKYBOX_V7";
|
|
|
}
|
|
|
//sceneScheme为3切成瓦片图
|
|
|
- if(scenePlusExt.getSceneScheme() == 3){
|
|
|
+// if(scenePlusExt.getSceneScheme() == 3){
|
|
|
if("4k".equals(scenePlusExt.getSceneResolution())){
|
|
|
skyboxType = "SKYBOX_V14";
|
|
|
}else{
|
|
|
skyboxType = "SKYBOX_V13";
|
|
|
}
|
|
|
- }
|
|
|
+// }
|
|
|
dataJson.put("skybox_type", skyboxType);
|
|
|
FileUtils.writeFile(target + File.separator+"data.json", new String(dataJson.toString().getBytes(), "UTF-8"));
|
|
|
}
|
|
@@ -1197,6 +1198,11 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
String dataSource = sceneService.getDataSource(num, scenePlus.getSceneSource(), scenePlusExt.getDataSource());
|
|
|
String ossCachesImagesPath = dataSource + "caches/images/";
|
|
|
FileUtil.copyContent(new File(targetImagesPath), new File(ossCachesImagesPath), true);
|
|
|
+
|
|
|
+ if(map.size()>0) {
|
|
|
+ ossUtil.uploadMulFiles(bucket, map);
|
|
|
+ }
|
|
|
+
|
|
|
//更新数据库版本号
|
|
|
SceneEditInfo sceneEditInfo = this.getByScenePlusId(scenePlus.getId());
|
|
|
this.upgradeVersionAndImgVersionById(sceneEditInfo.getId());
|