|
@@ -2040,8 +2040,6 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
|
|
|
//调用算法切全景图
|
|
|
String ossResultPath = sceneService.getDataSource(num, scenePlus.getSceneSource(), scenePlusExt.getDataSource());
|
|
|
- FileUtil.copy(ossResultPath + "data.json",target + File.separator+"data.json", true);
|
|
|
- FileUtil.copy(ossResultPath + "project.json",target + File.separator+"project.json", true);
|
|
|
JSONObject visionJson = new JSONObject();
|
|
|
JSONArray visionArray = new JSONArray();
|
|
|
visionJson.put("uuid", sid);
|
|
@@ -2054,32 +2052,29 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
|
|
|
//data.json增加extras为执行重建算法
|
|
|
String type = "4k";
|
|
|
- String data = FileUtils.readFile(target + File.separator + "data.json");
|
|
|
- if(data != null){
|
|
|
- JSONObject floorplanJson = new JSONObject();
|
|
|
- floorplanJson.put("has_source_images", true);
|
|
|
- floorplanJson.put("has_vision_txt", true);
|
|
|
+ JSONObject floorplanJson = new JSONObject();
|
|
|
+ floorplanJson.put("has_source_images", true);
|
|
|
+ floorplanJson.put("has_vision_txt", true);
|
|
|
|
|
|
- JSONObject dataJson = JSONObject.parseObject(data);
|
|
|
- dataJson.put("extras", floorplanJson);
|
|
|
- dataJson.put("split_type", "SPLIT_V8");//替换全景图算法
|
|
|
+ JSONObject dataJson = new JSONObject();
|
|
|
+ dataJson.put("extras", floorplanJson);
|
|
|
+ dataJson.put("split_type", "SPLIT_V8");//替换全景图算法
|
|
|
|
|
|
- String skyboxType = "SKYBOX_V6";//默认4k minion
|
|
|
- if(SceneFrom.PRO.code().equals(scenePlusExt.getSceneFrom())){
|
|
|
- skyboxType = "SKYBOX_V7";
|
|
|
- type = "2k";
|
|
|
- }
|
|
|
+ String skyboxType = "SKYBOX_V6";//默认4k minion
|
|
|
+ if(SceneFrom.PRO.code().equals(scenePlusExt.getSceneFrom())){
|
|
|
+ skyboxType = "SKYBOX_V7";
|
|
|
+ type = "2k";
|
|
|
+ }
|
|
|
// if(scenePlusExt.getSceneScheme() == 3){
|
|
|
- if("4k".equals(scenePlusExt.getSceneResolution())){
|
|
|
- skyboxType = "SKYBOX_V14";
|
|
|
- }else{
|
|
|
- skyboxType = "SKYBOX_V13";
|
|
|
- }
|
|
|
+ if("4k".equals(scenePlusExt.getSceneResolution())){
|
|
|
+ skyboxType = "SKYBOX_V14";
|
|
|
+ }else{
|
|
|
+ skyboxType = "SKYBOX_V13";
|
|
|
+ }
|
|
|
// }
|
|
|
- dataJson.put("skybox_type", skyboxType);
|
|
|
+ dataJson.put("skybox_type", skyboxType);
|
|
|
|
|
|
- cn.hutool.core.io.FileUtil.writeString(dataJson.toString(), target + File.separator+"data.json", StandardCharsets.UTF_8);
|
|
|
- }
|
|
|
+ cn.hutool.core.io.FileUtil.writeString(dataJson.toString(), target + File.separator+"data.json", StandardCharsets.UTF_8);
|
|
|
|
|
|
//创建文件夹软连接并且复制data.json和project.json
|
|
|
String capturePath = target + File.separator + "capture";
|