|
@@ -34,9 +34,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.io.File;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* Created by Hb_zzZ on 2020/12/1.
|
|
@@ -584,6 +582,19 @@ public class ManagerController extends BaseController {
|
|
|
//先执行python-NewResortForOne脚本,处理obj文件
|
|
|
CreateObjUtil.objHandle(buildPath + modelUploadEntity.getObjPath());
|
|
|
|
|
|
+
|
|
|
+ log.info("配件obj转换成mview格式");
|
|
|
+ Map<String, String> paramsMap = new HashMap<>();
|
|
|
+ paramsMap.put("uuid",modelUploadEntity.getFileId());
|
|
|
+ paramsMap.put("inObj",buildPath + modelUploadEntity.getObjPath());
|
|
|
+ paramsMap.put("outFilePath",buildPath + buildPath + modelUploadEntity.getObjPath().replace(".obj", ""));
|
|
|
+ OkHttpUtils.httpPostForm(maxObjUrl+"toToolbag",paramsMap);
|
|
|
+ Thread.sleep(1000);
|
|
|
+ uploadToOssUtil.uploadTo4dTjw(buildPath + modelUploadEntity.getObjPath().replace(".obj", ".mview"), "domain/eHome/furniture/temp/" + modelUploadEntity.getFileId() + ".mview");
|
|
|
+ log.info("配件obj转换成mview格式结束{}",modelUploadEntity.getObjPath().replace(".obj", ".mview"));
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//obj转换成glb格式
|
|
|
String glbPath = buildPath + "upload/" + modelUploadEntity.getFileId() + "/" + modelUploadEntity.getFileId() + ".glb";
|
|
|
log.info("obj转换成glb格式路径-{}", glbPath);
|
|
@@ -616,7 +627,7 @@ public class ManagerController extends BaseController {
|
|
|
RenovationPartsDetailEntity renovationPartsDetailEntity = new RenovationPartsDetailEntity();
|
|
|
BeanUtils.copyProperties(param, renovationPartsDetailEntity);
|
|
|
renovationPartsDetailEntity.setExamine(0);
|
|
|
-
|
|
|
+ renovationPartsDetailEntity.setMviewPath(prefix + "domain/eHome/furniture/temp/" + modelUploadEntity.getFileId() + ".mview");
|
|
|
renovationPartsDetailEntity.setName(modelUploadEntity.getFileId());
|
|
|
renovationPartsDetailEntity.setPath(prefix + "domain/eHome/furniture/temp/" + modelUploadEntity.getFileId() + ".glb");
|
|
|
|
|
@@ -773,11 +784,18 @@ public class ManagerController extends BaseController {
|
|
|
uploadToOssUtil.copyTo4dTjw(renovationPartsDetailEntity.getPath().replace(prefix, ""),
|
|
|
renovationPartsDetailEntity.getPath().replace("/temp/", "/models/").replace(prefix, ""));
|
|
|
|
|
|
+ uploadToOssUtil.copyTo4dTjw(renovationPartsDetailEntity.getMviewPath().replace(prefix, ""),
|
|
|
+ renovationPartsDetailEntity.getMviewPath().replace("/temp/", "/models/").replace(prefix, ""));
|
|
|
+
|
|
|
uploadToOssUtil.deleteTo4dTjw(renovationPartsDetailEntity.getImg().replace(prefix, ""));
|
|
|
uploadToOssUtil.deleteTo4dTjw(renovationPartsDetailEntity.getPath().replace(prefix, ""));
|
|
|
+ uploadToOssUtil.deleteTo4dTjw(renovationPartsDetailEntity.getMviewPath().replace(prefix, ""));
|
|
|
+
|
|
|
renovationPartsDetailEntity.setImg(renovationPartsDetailEntity.getImg().replace("/temp/", "/models/"));
|
|
|
renovationPartsDetailEntity.setHighImg(renovationPartsDetailEntity.getHighImg().replace("/temp/", "/models/"));
|
|
|
renovationPartsDetailEntity.setPath(renovationPartsDetailEntity.getPath().replace("/temp/", "/models/"));
|
|
|
+ renovationPartsDetailEntity.setMviewPath(renovationPartsDetailEntity.getMviewPath().replace("/temp/", "/models/"));
|
|
|
+
|
|
|
}
|
|
|
|
|
|
renovationPartsDetailService.updateById(renovationPartsDetailEntity);
|