Browse Source

计算完成时间

lyhzzz 5 tháng trước cách đây
mục cha
commit
299e9c98d7

+ 6 - 3
src/main/java/com/fdkankan/fusion/service/impl/CaseNumServiceImpl.java

@@ -119,6 +119,9 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
                 model.setModelType("pointcloud");    //深时点云类型
                 model.setCreateStatus(1);
                 Scene scene = sceneService.getByNum(num);
+                if(scene == null){
+                    continue;
+                }
                 if(type == 0 || type == 1 || type == 4 || type == 6 || type == 7){           //看看,看见
                     String mesh3DtilesPath  =  String.format(FilePath.OBJ_OSS_PATH,num) + "/images/3dtiles/tileset.json";
 
@@ -126,14 +129,14 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
                     if(localToOssUtil.existKey(scene.getWebPath() +mesh3DtilesPath)){
                         model.setModelDateType("b3dm");
                         model.setModelType("b3dm");
-                        model.setModelGlbUrl(JSONArray.toJSONString(Arrays.asList(queryPath +mesh3DtilesPath)));
+                        model.setModelGlbUrl(JSONArray.toJSONString(Arrays.asList(scene.getMapping() +mesh3DtilesPath)));
                         model.setModelSize(FileWriterUtil.setFileSize(localToOssUtil.getSizeCount( sizePath)));
                     }else {
                         String meshPath = String.format(FilePath.OBJ_OSS_PATH, num)+"/data/mesh";
                         if(localToOssUtil.existKey( scene.getWebPath() +meshPath +"/mesh.obj")){
                             Long size = localToOssUtil.getSizeCount( scene.getWebPath() +meshPath);
                             model.setModelSize(FileWriterUtil.setFileSize(size));
-                            model.setModelGlbUrl(JSONArray.toJSONString(Arrays.asList(queryPath + meshPath+"/mesh.obj")));
+                            model.setModelGlbUrl(JSONArray.toJSONString(Arrays.asList(scene.getMapping() + meshPath+"/mesh.obj")));
                         }else {
                             List<String> objPaths = new ArrayList<>();
                             String meshPathjs =  String.format(FilePath.OBJ_OSS_PATH, num)+"/data/";
@@ -149,7 +152,7 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
                                 for (Object object : floors1) {
                                     JSONObject jb = (JSONObject) object;
                                     String string = jb.getString("objPath");
-                                    objPaths.add(queryPath +meshPathjs + string);
+                                    objPaths.add(scene.getMapping() +meshPathjs + string);
                                 }
                                 model.setModelGlbUrl(JSONArray.toJSONString(objPaths));
                                 Long size = localToOssUtil.getSize(scene.getWebPath() +meshPath);