|
@@ -203,7 +203,7 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
|
|
|
|
|
|
String b3dmPath = objPathFile.getPath().replace(FilePath.LOCAL_BASE_PATH,"fusion/");
|
|
String b3dmPath = objPathFile.getPath().replace(FilePath.LOCAL_BASE_PATH,"fusion/");
|
|
if(name.contains(".osgb")){
|
|
if(name.contains(".osgb")){
|
|
- model.setModelDateType("osgb");
|
|
|
|
|
|
+ model.setModelDateType("b3dm");
|
|
model.setModelType("b3dm");
|
|
model.setModelType("b3dm");
|
|
|
|
|
|
redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"60");
|
|
redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"60");
|
|
@@ -216,15 +216,17 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
|
|
throw new BusinessException(-1,"缺少tileset.json文件");
|
|
throw new BusinessException(-1,"缺少tileset.json文件");
|
|
}
|
|
}
|
|
redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"80");
|
|
redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"80");
|
|
|
|
+
|
|
|
|
+
|
|
ShellUtil.yunUpload(localPath,b3dmPath);
|
|
ShellUtil.yunUpload(localPath,b3dmPath);
|
|
- model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(queryPath + jsonPath.replace(FilePath.LOCAL_BASE_PATH,"fusion/")))));
|
|
|
|
|
|
+ model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(queryPath + b3dmPath+"/"+jsonPath))));
|
|
}
|
|
}
|
|
if(name.contains(".b3dm") && b3dmJsonPath != null){
|
|
if(name.contains(".b3dm") && b3dmJsonPath != null){
|
|
model.setModelDateType("b3dm");
|
|
model.setModelDateType("b3dm");
|
|
model.setModelType("b3dm");
|
|
model.setModelType("b3dm");
|
|
redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"60");
|
|
redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"60");
|
|
ShellUtil.yunUpload(objPathFile.getPath(),b3dmPath);
|
|
ShellUtil.yunUpload(objPathFile.getPath(),b3dmPath);
|
|
- model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(queryPath + b3dmJsonPath.replace(FilePath.LOCAL_BASE_PATH,"fusion/")))));
|
|
|
|
|
|
+ model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(queryPath + b3dmPath + "/" + b3dmJsonPath))));
|
|
}
|
|
}
|
|
|
|
|
|
setCreateStatus(model,1);
|
|
setCreateStatus(model,1);
|