dengsixing 1 dag geleden
bovenliggende
commit
5747fd367d
1 gewijzigde bestanden met toevoegingen van 21 en 27 verwijderingen
  1. 21 27
      src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoServiceImpl.java

+ 21 - 27
src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoServiceImpl.java

@@ -2186,9 +2186,6 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
         file.transferTo(targetFile);
 
         //调用算法切全景图
-        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");
         JSONObject visionJson = new JSONObject();
         JSONArray visionArray = new JSONArray();
         visionJson.put("uuid", sid);
@@ -2201,32 +2198,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 dataJson = JSONObject.parseObject(data);
-            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";
-            }
-            if(scenePlusExt.getSceneScheme() == 3){
-                if("4k".equals(scenePlusExt.getSceneResolution())){
-                    skyboxType = "SKYBOX_V14";
-                }else{
-                    skyboxType = "SKYBOX_V13";
-                }
+        JSONObject floorplanJson = new JSONObject();
+        floorplanJson.put("has_source_images", true);
+        floorplanJson.put("has_vision_txt", true);
+
+        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";
+        }
+        if(scenePlusExt.getSceneScheme() == 3){
+            if("4k".equals(scenePlusExt.getSceneResolution())){
+                skyboxType = "SKYBOX_V14";
+            }else{
+                skyboxType = "SKYBOX_V13";
             }
-            dataJson.put("skybox_type", skyboxType);
-
-            cn.hutool.core.io.FileUtil.writeString(dataJson.toString(), target + File.separator+"data.json", StandardCharsets.UTF_8);
         }
+        dataJson.put("skybox_type", skyboxType);
+
+        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";