Просмотр исходного кода

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

dengsixing 2 лет назад
Родитель
Сommit
0887bd6b33

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

@@ -3776,7 +3776,15 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         CreateObjUtil.build3dModel2(target , "1");
 
         //读取upload文件,检验需要上传的文件是否存在
-        String uploadData = FileUtils.readFile(target + File.separator + "results" +File.separator+"upload.json");
+        //读取upload文件,检验需要上传的文件是否存在
+        String uploadJsonPath= target + File.separator + "results" +File.separator+"upload.json";
+        Thread.sleep(2000);
+        boolean exist = ComputerUtil.checkComputeCompleted(uploadJsonPath, maxCheckTimes, waitTime);
+        if(!exist){
+            throw new BusinessException(ErrorCode.FAILURE_CODE_7013);
+        }
+
+        String uploadData = FileUtils.readFile(uploadJsonPath);
         JSONObject uploadJson = null;
         JSONArray array = null;
         if(uploadData!=null) {