|
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.fdkankan.fusion.common.FilePath;
|
|
|
import com.fdkankan.fusion.common.ResultCode;
|
|
|
import com.fdkankan.fusion.common.util.FileWriterUtil;
|
|
|
+import com.fdkankan.fusion.common.util.JwtUtil;
|
|
|
import com.fdkankan.fusion.common.util.OBJToGLBUtil;
|
|
|
import com.fdkankan.fusion.common.util.UploadToOssUtil;
|
|
|
import com.fdkankan.fusion.entity.CaseNumEntity;
|
|
@@ -126,7 +127,11 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
|
if(StringUtils.isBlank(dataSource)){
|
|
|
throw new BusinessException(ResultCode.SCENE_DATA_SOURCE_EMPTY.code,num +ResultCode.SCENE_DATA_SOURCE_EMPTY.msg);
|
|
|
}
|
|
|
- String meshPath = dataSource +"/results/mesh";
|
|
|
+ String meshPath = dataSource +"_laserData/laserData/mesh";
|
|
|
+ File meshFile = new File(meshPath);
|
|
|
+ if(!meshFile.exists()){
|
|
|
+ throw new BusinessException(ResultCode.SCENE_DATA_SOURCE_EMPTY.code,num +ResultCode.SCENE_DATA_SOURCE_EMPTY.msg);
|
|
|
+ }
|
|
|
|
|
|
String objPath = String.format(FilePath.OBJ_LOCAL_PATH ,environment,num);
|
|
|
String glbPath = String.format(FilePath.GLB_LOCAL_PATH,environment,num) +"/mesh.glb";
|
|
@@ -135,9 +140,7 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
|
FileUtil.copy(meshPath,objPath,true);
|
|
|
OBJToGLBUtil.objToGlb(objPath +"/mesh",glbPath );
|
|
|
File file = new File(glbPath);
|
|
|
- if(file!=null){
|
|
|
- model.setModelSize(FileWriterUtil.setFileSize(file.length()));
|
|
|
- }
|
|
|
+ model.setModelSize(FileWriterUtil.setFileSize(file.length()));
|
|
|
uploadToOssUtil.uploadOss(glbPath,glbOssPath);
|
|
|
FileUtil.del(objPath);
|
|
|
String ossglbPath = queryPath + "/"+glbOssPath;
|
|
@@ -146,7 +149,6 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
private String getGlbUrl(Integer type, String num,Model model) {
|
|
|
if(type == 0 || type == 1){ //看看,看见
|
|
|
String objPath = String.format(FilePath.OBJ_LOCAL_PATH ,environment,num);
|