|
@@ -91,6 +91,7 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
|
continue;
|
|
|
}
|
|
|
Model model = modelService.getIsNullNewByNum(num,param.getType());
|
|
|
+ model.setUpdateTime(null);
|
|
|
model.setModelDateType("obj");
|
|
|
model.setType(param.getType());
|
|
|
model.setModelType("pointcloud"); //深时点云类型
|
|
@@ -126,7 +127,6 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
|
List<String> ossGlbPaths = new ArrayList<>();
|
|
|
File localFile = new File(objPath);
|
|
|
this.toGlB(localFile,localGlbPaths);
|
|
|
-
|
|
|
Long modelSize = 0L;
|
|
|
if(localGlbPaths.size() >0){
|
|
|
for (String localGlbPath : localGlbPaths) {
|
|
@@ -135,22 +135,17 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
|
if(ossGlbPath.contains("lod_")){
|
|
|
if(ossGlbPath.contains("lod_0")){
|
|
|
ossGlbPaths.add(queryPath +ossGlbPath);
|
|
|
- }
|
|
|
- File file = new File(localGlbPath);
|
|
|
- if(file!=null){
|
|
|
- modelSize += file.length();
|
|
|
+ modelSize += uploadToOssUtil.getSize(ossGlbPath);
|
|
|
}
|
|
|
continue;
|
|
|
}
|
|
|
- File file = new File(localGlbPath);
|
|
|
- if(file!=null){
|
|
|
- modelSize += file.length();
|
|
|
- }
|
|
|
+ modelSize += uploadToOssUtil.getSize(ossGlbPath);
|
|
|
ossGlbPaths.add(queryPath +ossGlbPath);
|
|
|
}
|
|
|
+ model.setModelSize(FileWriterUtil.setFileSize(modelSize));
|
|
|
+ FileUtil.del(objPath);
|
|
|
return JSONArray.toJSONString(ossGlbPaths);
|
|
|
}
|
|
|
- model.setModelSize(FileWriterUtil.setFileSize(modelSize));
|
|
|
FileUtil.del(objPath);
|
|
|
}
|
|
|
return null;
|