|
@@ -126,26 +126,30 @@ 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) {
|
|
|
- File file = new File(localGlbPath);
|
|
|
- if(file!=null){
|
|
|
- model.setModelSize(FileWriterUtil.setFileSize(file.length()));
|
|
|
- }
|
|
|
String ossGlbPath = localGlbPath.replace(FilePath.LOCAL_BASE_PATH,"fusion/");
|
|
|
uploadToOssUtil.uploadOss(localGlbPath,ossGlbPath);
|
|
|
if(ossGlbPath.contains("lod_")){
|
|
|
if(ossGlbPath.contains("lod_0")){
|
|
|
ossGlbPaths.add(queryPath +ossGlbPath);
|
|
|
}
|
|
|
+ File file = new File(localGlbPath);
|
|
|
+ if(file!=null){
|
|
|
+ modelSize += file.length();
|
|
|
+ }
|
|
|
continue;
|
|
|
}
|
|
|
+ File file = new File(localGlbPath);
|
|
|
+ if(file!=null){
|
|
|
+ modelSize += file.length();
|
|
|
+ }
|
|
|
ossGlbPaths.add(queryPath +ossGlbPath);
|
|
|
}
|
|
|
return JSONArray.toJSONString(ossGlbPaths);
|
|
|
}
|
|
|
-
|
|
|
+ model.setModelSize(FileWriterUtil.setFileSize(modelSize));
|
|
|
FileUtil.del(objPath);
|
|
|
}
|
|
|
return null;
|