|
@@ -198,7 +198,8 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
|
|
|
}
|
|
|
}
|
|
|
model.setModelGlbUrl(JSONArray.toJSONString(Arrays.asList(queryPath + glbOssPath)));
|
|
|
- String b3dmPath = String.format(FilePath.B3DM_OSS_PATH,environment, model.getModelId());
|
|
|
+
|
|
|
+ String b3dmPath = objPathFile.getPath().replace(FilePath.LOCAL_BASE_PATH,"fusion/");
|
|
|
if(name.contains(".osgb")){
|
|
|
model.setModelDateType("osgb");
|
|
|
model.setModelType("b3dm");
|
|
@@ -214,15 +215,15 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
|
|
|
|
|
|
redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"80");
|
|
|
ShellUtil.yunUpload(localPath,b3dmPath);
|
|
|
- model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(queryPath + b3dmPath+ objPathFile.getName() +"/" + jsonPath))));
|
|
|
+ model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(queryPath + jsonPath.replace(FilePath.LOCAL_BASE_PATH,"fusion/")))));
|
|
|
//FileUtil.del(localPath);
|
|
|
}
|
|
|
- if(name.contains(".b3dm")){
|
|
|
+ if(name.contains(".b3dm") && b3dmJsonPath != null){
|
|
|
model.setModelDateType("b3dm");
|
|
|
model.setModelType("b3dm");
|
|
|
redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"60");
|
|
|
ShellUtil.yunUpload(objPathFile.getPath(),b3dmPath);
|
|
|
- model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(queryPath + b3dmPath + objPathFile.getName() +"/" + b3dmJsonPath))));
|
|
|
+ model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(queryPath + b3dmJsonPath.replace(FilePath.LOCAL_BASE_PATH,"fusion/")))));
|
|
|
}
|
|
|
|
|
|
setCreateStatus(model,1);
|
|
@@ -233,13 +234,13 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
|
|
|
log.error("uploadObj--ThreadError-modeId:{},error:{}",model.getModelId(),e);
|
|
|
}finally {
|
|
|
if(newObjFile!=null){
|
|
|
- FileUtil.del(newObjFile);
|
|
|
+ //FileUtil.del(newObjFile);
|
|
|
}
|
|
|
if(objPathFile!=null){
|
|
|
- FileUtil.del(objPathFile);
|
|
|
+ //FileUtil.del(objPathFile);
|
|
|
}
|
|
|
if(mntFile!=null){
|
|
|
- FileUtil.del(mntFile.getParentFile());
|
|
|
+ //FileUtil.del(mntFile.getParentFile());
|
|
|
}
|
|
|
}
|
|
|
}, executor).whenComplete((reslut, e) -> {
|