|
@@ -98,13 +98,7 @@ public class ThreadService {
|
|
|
model.setModelDateType("las");
|
|
|
model.setModelType("las");
|
|
|
}
|
|
|
- if(name.contains(".laz")){
|
|
|
- model.setModelDateType("laz");
|
|
|
- model.setModelType("laz");
|
|
|
- redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"65");
|
|
|
- ShellUtil.yunUpload(objPathFile.getPath(),objPathFile.getPath().replace(FilePath.LOCAL_BASE_PATH,"fusion/"));
|
|
|
- model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(queryPath + objPathFile.getPath().replace(FilePath.LOCAL_BASE_PATH,"fusion/")))));
|
|
|
- }
|
|
|
+
|
|
|
if("las".equals(model.getModelType()) || "ply".equals(model.getModelType()) ){
|
|
|
mntFile = OBJToGLBUtil.lasOrPlyToBin(file1);
|
|
|
glbOssPath = mntFile.getPath().replace("/mnt/","")+"/webcloud";
|
|
@@ -144,6 +138,13 @@ public class ThreadService {
|
|
|
ShellUtil.yunUpload(objPathFile.getPath(),b3dmPath);
|
|
|
model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(queryPath + b3dmJsonPath.replace(FilePath.LOCAL_BASE_PATH,"fusion/")))));
|
|
|
}
|
|
|
+ if(name.contains(".laz")){
|
|
|
+ model.setModelDateType("laz");
|
|
|
+ model.setModelType("laz");
|
|
|
+ redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"65");
|
|
|
+ ShellUtil.yunUpload(objPathFile.getPath(),objPathFile.getPath().replace(FilePath.LOCAL_BASE_PATH,"fusion/"));
|
|
|
+ model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(queryPath + objPathFile.getPath().replace(FilePath.LOCAL_BASE_PATH,"fusion/") + "/cloud.js"))));
|
|
|
+ }
|
|
|
|
|
|
setCreateStatus(model,1);
|
|
|
modelService.saveOrUpdate(model);
|