|
@@ -83,7 +83,7 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
model.setModelType("pointcloud"); //深时点云类型
|
|
model.setModelType("pointcloud"); //深时点云类型
|
|
if(param.getType() != 2){ //不为深时
|
|
if(param.getType() != 2){ //不为深时
|
|
model.setModelObjUrl(String.format(OBJ_PATH ,num) +"/mesh.obj");
|
|
model.setModelObjUrl(String.format(OBJ_PATH ,num) +"/mesh.obj");
|
|
- model.setModelGlbUrl(getGlbUrl(param.getType(),num));
|
|
|
|
|
|
+ model.setModelGlbUrl(getGlbUrl(param.getType(),num,model));
|
|
model.setModelType("glb");
|
|
model.setModelType("glb");
|
|
}
|
|
}
|
|
model.setNum(num);
|
|
model.setNum(num);
|
|
@@ -102,7 +102,7 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
caseViewService.deleteByNumList(caseId,updateNumList);
|
|
caseViewService.deleteByNumList(caseId,updateNumList);
|
|
}
|
|
}
|
|
|
|
|
|
- private String getGlbUrl(Integer type, String num) {
|
|
|
|
|
|
+ private String getGlbUrl(Integer type, String num,Model model) {
|
|
if(type == 0 || type == 1){ //看看,看见
|
|
if(type == 0 || type == 1){ //看看,看见
|
|
String objPath = String.format(OBJ_PATH ,num);
|
|
String objPath = String.format(OBJ_PATH ,num);
|
|
String glbPath = String.format(GLB_PATH,num) +"/mesh.glb";
|
|
String glbPath = String.format(GLB_PATH,num) +"/mesh.glb";
|
|
@@ -120,6 +120,10 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
String localPath = objPath +"/"+split[split.length-1];
|
|
String localPath = objPath +"/"+split[split.length-1];
|
|
uploadToOssUtil.downFormAli(fileName,localPath);
|
|
uploadToOssUtil.downFormAli(fileName,localPath);
|
|
}
|
|
}
|
|
|
|
+ File file = new File(glbPath);
|
|
|
|
+ if(file!=null){
|
|
|
|
+ model.setModelSize(file.length());
|
|
|
|
+ }
|
|
OBJToGLBUtil.objToGlb(objPath,glbPath );
|
|
OBJToGLBUtil.objToGlb(objPath,glbPath );
|
|
uploadToOssUtil.uploadOss(glbPath,glbOssPath);
|
|
uploadToOssUtil.uploadOss(glbPath,glbOssPath);
|
|
FileUtil.del(objPath);
|
|
FileUtil.del(objPath);
|