Browse Source

http://192.168.0.21/index.php?m=bug&f=view&bugID=33596

dengsixing 2 years ago
parent
commit
17da68ab0b

+ 7 - 1
src/main/java/com/fdkankan/scene/service/impl/SceneProServiceImpl.java

@@ -3199,7 +3199,13 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
             CreateObjUtil.build3dModel(path , "1");
         }
 
-        String uploadData = FileUtils.readFile(path + File.separator + "results" +File.separator+"upload.json");
+        String uploadJsonPath = path + File.separator + "results" +File.separator+"upload.json";
+        boolean exists = ComputerUtil.checkComputeCompleted(uploadJsonPath, maxCheckTimes, waitTime);
+        if(!exists){
+            log.error("upload.json数据出错");
+            throw new BusinessException(ErrorCode.FAILURE_CODE_5017);
+        }
+        String uploadData = FileUtils.readFile(uploadJsonPath);
         JSONObject uploadJson = null;
         JSONArray array = null;
         if(uploadData!=null) {