|
@@ -22,10 +22,6 @@ public class ComputerUtil {
|
|
|
|
|
|
public static Map<String,String> computer(String projectNum, String path, String buildType) throws Exception{
|
|
|
|
|
|
- String imgPath = String.format(UploadFilePath.IMG_VIEW_PATH, projectNum); //新版本文件路径
|
|
|
- String dataPath = String.format(UploadFilePath.DATA_VIEW_PATH, projectNum); //新版本文件路径
|
|
|
- String videosPath = String.format(UploadFilePath.VIDEOS_VIEW_PATH, projectNum); //新版本文件路径
|
|
|
-
|
|
|
Map<String,String> map = new HashMap<String,String>();
|
|
|
path = path.replace("//", "/");
|
|
|
log.info("开始建模:"+projectNum);
|
|
@@ -81,9 +77,6 @@ public class ComputerUtil {
|
|
|
}else {
|
|
|
map.put(path + File.separator + "results" +File.separator+ fileName,
|
|
|
"images/images"+projectNum+"/"+ ConstantFileName.modelUUID+"_50k_texture_jpg_high1/"+fileName.replace("tex/", ""));
|
|
|
- //todo 待删除old_path
|
|
|
- map.put(path + File.separator + "results" +File.separator+ fileName,
|
|
|
- imgPath + ConstantFileName.modelUUID+"_50k_texture_jpg_high1/"+fileName.replace("tex/", ""));
|
|
|
}
|
|
|
continue;
|
|
|
}
|
|
@@ -92,18 +85,12 @@ public class ComputerUtil {
|
|
|
if(fileJson.getIntValue("clazz") == 3){
|
|
|
map.put(path + File.separator + "results" +File.separator+ fileName,
|
|
|
"images/images"+ projectNum+"/pan/high/"+ fileName.replace("high/", ""));
|
|
|
- //todo 待删除old_path
|
|
|
- map.put(path + File.separator + "results" +File.separator+ fileName,
|
|
|
- imgPath+"/pan/high/"+ fileName.replace("high/", ""));
|
|
|
continue;
|
|
|
}
|
|
|
//low文件夹
|
|
|
if(fileJson.getIntValue("clazz") == 4){
|
|
|
map.put(path + File.separator + "results" +File.separator+ fileName,
|
|
|
"images/images"+ projectNum+"/pan/low/"+ fileName.replace("low/", ""));
|
|
|
- //todo 待删除old_path
|
|
|
- map.put(path + File.separator + "results" +File.separator+ fileName,
|
|
|
- imgPath+"/pan/low/"+ fileName.replace("low/", ""));
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -116,9 +103,6 @@ public class ComputerUtil {
|
|
|
if(fileJson.getIntValue("clazz") == 5 ){
|
|
|
map.put(path + File.separator + "results" + File.separator+ fileName,
|
|
|
"images/images"+ projectNum+ File.separator + fileName);
|
|
|
- //todo 待删除old_path
|
|
|
- map.put(path + File.separator + "results" + File.separator+ fileName,
|
|
|
- imgPath+ fileName);
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -129,9 +113,6 @@ public class ComputerUtil {
|
|
|
}
|
|
|
map.put(path + File.separator + "results" + File.separator+ fileName,
|
|
|
"images/images"+ projectNum+ File.separator + fileName);
|
|
|
- //todo 待删除old_path
|
|
|
- map.put(path + File.separator + "results" + File.separator+ fileName,
|
|
|
- imgPath + fileName);
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -149,9 +130,6 @@ public class ComputerUtil {
|
|
|
"azz") == 12){
|
|
|
map.put(path + File.separator + "results" + File.separator+ fileName,"video/video"+
|
|
|
projectNum+ File.separator + fileName.replace("videos/", ""));
|
|
|
- //todo 待删除old_path
|
|
|
- map.put(path + File.separator + "results" + File.separator+ fileName,
|
|
|
- videosPath+ fileName.replace("videos/", ""));
|
|
|
|
|
|
if(fileName.contains(".mp4")){
|
|
|
// CreateObjUtil.mp4ToFlv(path + File.separator + "results" + File.separator+ fileName,
|
|
@@ -159,9 +137,6 @@ public class ComputerUtil {
|
|
|
|
|
|
map.put(path + File.separator + "results" + File.separator+ fileName.replace("mp4", "flv"),
|
|
|
"video/video"+ projectNum+ File.separator + fileName.replace("videos/", "").replace("mp4", "flv"));
|
|
|
- //todo 待删除old_path
|
|
|
- map.put(path + File.separator + "results" + File.separator+ fileName.replace("mp4", "flv"),
|
|
|
- videosPath+ fileName.replace("videos/", "").replace("mp4", "flv"));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -169,17 +144,11 @@ public class ComputerUtil {
|
|
|
if(fileJson.getIntValue("clazz") == 16){
|
|
|
map.put(path + File.separator + "results" + File.separator+ fileName,
|
|
|
"data/data"+ projectNum+ File.separator + fileName);
|
|
|
- //todo 待删除old_path
|
|
|
- map.put(path + File.separator + "results" + File.separator+ fileName,
|
|
|
- dataPath + fileName);
|
|
|
}
|
|
|
|
|
|
if(fileJson.getIntValue("clazz") == 18){
|
|
|
map.put(path + File.separator + "results" + File.separator+ fileName,
|
|
|
"images/images"+ projectNum+ File.separator + fileName);
|
|
|
- //todo 待删除old_path
|
|
|
- map.put(path + File.separator + "results" + File.separator+ fileName,
|
|
|
- imgPath + fileName);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -195,11 +164,6 @@ public class ComputerUtil {
|
|
|
"images/images"+projectNum+"/"+ConstantFileName.modelUUID+"_50k2.dam.lzma");
|
|
|
map.put(path + File.separator + "results" +File.separator+ConstantFileName.modelUUID+"_50k2.dam",
|
|
|
"images/images"+projectNum+"/"+ConstantFileName.modelUUID+"_50k2.dam");
|
|
|
- //todo 待删除old_path
|
|
|
- map.put(path + File.separator + "results" +File.separator+ConstantFileName.modelUUID+"_50k2.dam.lzma",
|
|
|
- imgPath+ConstantFileName.modelUUID+"_50k2.dam.lzma");
|
|
|
- map.put(path + File.separator + "results" +File.separator+ConstantFileName.modelUUID+"_50k2.dam",
|
|
|
- imgPath+ConstantFileName.modelUUID+"_50k2.dam");
|
|
|
}
|
|
|
//8目相机有两个vision.txt因此第二个叫vision2.txt
|
|
|
CreateObjUtil.convertTxtToVisionmodeldata(path + File.separator + "results" +File.separator+"vision.txt",path + File.separator + "results" +File.separator+"vision.modeldata");
|
|
@@ -207,9 +171,6 @@ public class ComputerUtil {
|
|
|
CreateObjUtil.convertTxtToVisionmodeldata(path + File.separator + "results" +File.separator+"vision2.txt",path + File.separator + "results" +File.separator+"vision2.modeldata");
|
|
|
map.put(path + File.separator + "results" +File.separator+"vision2.modeldata",
|
|
|
"images/images"+projectNum+"/"+"vision2.modeldata");
|
|
|
- //todo 待删除old_path
|
|
|
- map.put(path + File.separator + "results" +File.separator+"vision2.modeldata",
|
|
|
- imgPath+"vision2.modeldata");
|
|
|
}else {
|
|
|
CreateObjUtil.convertTxtToVisionmodeldataCommon(path + File.separator + "results" +File.separator+"vision.txt",path + File.separator + "results" +File.separator+"vision.modeldata");
|
|
|
}
|
|
@@ -227,14 +188,6 @@ public class ComputerUtil {
|
|
|
"images/images"+projectNum+"/"+ConstantFileName.modelUUID+"_50k.dam.lzma");
|
|
|
map.put(path + File.separator + "results" +File.separator+ConstantFileName.modelUUID+"_50k.dam",
|
|
|
"images/images"+projectNum+"/"+ConstantFileName.modelUUID+"_50k.dam");
|
|
|
- //todo 待删除old_path
|
|
|
- map.put(path + File.separator + "results" +File.separator+"vision.modeldata",
|
|
|
- imgPath+"vision.modeldata");
|
|
|
- map.put(path + File.separator + "results" +File.separator+ConstantFileName.modelUUID+"_50k.dam.lzma",
|
|
|
- imgPath+ConstantFileName.modelUUID+"_50k.dam.lzma");
|
|
|
- map.put(path + File.separator + "results" +File.separator+ConstantFileName.modelUUID+"_50k.dam",
|
|
|
- imgPath+ConstantFileName.modelUUID+"_50k.dam");
|
|
|
-
|
|
|
file = new File(ConstantFilePath.SCENE_PATH+"data"+File.separator+"data"+projectNum);
|
|
|
if(!file.exists())
|
|
|
{
|
|
@@ -248,18 +201,10 @@ public class ComputerUtil {
|
|
|
map.put(path + File.separator + "results" +File.separator+"floorplan.json","data/data"+projectNum+"/floor.json");
|
|
|
// map.put(path + File.separator + "results" +File.separator+"floorplan_cad.json","data/data"+projectNum+"/house_floor.json");
|
|
|
map.put(path + File.separator + "results" +File.separator+"floorplan_cad.json","data/data"+projectNum+"/floorplan_cad.json");
|
|
|
- //todo 待删除old_path
|
|
|
- map.put(path + File.separator + "results" +File.separator+"floor.json",
|
|
|
- dataPath+"floor.json");
|
|
|
- map.put(path + File.separator + "results" +File.separator+"floorplan.json",
|
|
|
- dataPath+"floor.json");
|
|
|
- map.put(path + File.separator + "results" +File.separator+"floorplan_cad.json",
|
|
|
- dataPath+"floorplan_cad.json");
|
|
|
log.info("准备上传文件到oss:"+projectNum);
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
public static Map<String,String> computerRebuildVideo(String projectNum, String path) throws Exception{
|
|
|
|
|
|
String videosPath = String.format(UploadFilePath.VIDEOS_VIEW_PATH, projectNum); //新版本文件路径
|