|
@@ -0,0 +1,877 @@
|
|
|
+package com.fdkankan.common.util;
|
|
|
+
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+//import com.fdkankan.base.mq.ModelingMsgProducer;
|
|
|
+import com.fdkankan.common.constant.ConstantFileName;
|
|
|
+import com.fdkankan.common.constant.ConstantFilePath;
|
|
|
+import com.fdkankan.common.constant.ConstantUrl;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.joda.time.DateTime;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+import org.springframework.util.ObjectUtils;
|
|
|
+import org.springframework.util.StringUtils;
|
|
|
+
|
|
|
+import java.io.File;
|
|
|
+import java.util.*;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 生成场景和计算场景
|
|
|
+ * Created by Hb_zzZ on 2019/5/8.
|
|
|
+ */
|
|
|
+@Slf4j
|
|
|
+@Component
|
|
|
+public class ComputerUtil {
|
|
|
+
|
|
|
+
|
|
|
+// public static Map<String,String> computer(String projectNum, String path, String buildType, String ossType) throws Exception{
|
|
|
+// Map<String,String> map = new HashMap<String,String>();
|
|
|
+// path = path.replace("//", "/");
|
|
|
+//
|
|
|
+// log.info("开始建模:"+projectNum);
|
|
|
+// //构建算法isModel去掉,因此改成空字符串
|
|
|
+// if("V2".equals(buildType)){
|
|
|
+// CreateObjUtil.build3dModelOld(path, "");
|
|
|
+// }
|
|
|
+// if("V3".equals(buildType)){
|
|
|
+// CreateObjUtil.build3dModel(path, "");
|
|
|
+//// CreateObjUtil.build3dModel(unicode, "");
|
|
|
+// }
|
|
|
+// log.info("建模完成转换数据:"+projectNum);
|
|
|
+//
|
|
|
+// boolean vision2 = false;
|
|
|
+// //读取upload文件,检验需要上传的文件是否存在
|
|
|
+// String uploadData = FileUtils.readFile(path + File.separator + "results" +File.separator+"upload.json");
|
|
|
+// JSONObject uploadJson = null;
|
|
|
+// JSONArray array = null;
|
|
|
+// if(uploadData!=null) {
|
|
|
+// uploadJson = JSONObject.parseObject(uploadData);
|
|
|
+// array = uploadJson.getJSONArray("upload");
|
|
|
+// }
|
|
|
+// if(array == null){
|
|
|
+// String instanceId = FileUtils.readFile("/opt/hosts/hosts.txt");
|
|
|
+// FileUtils.writeFile(path + File.separator + "javaErrorNow.log", instanceId + ":计算错误!");
|
|
|
+//
|
|
|
+// Thread.sleep(10000L);
|
|
|
+// FileUtils.writeFile(path + File.separator + "javaError.log", instanceId + ":计算错误!");
|
|
|
+// throw new Exception("upload.json数据出错");
|
|
|
+// }
|
|
|
+// JSONObject fileJson = null;
|
|
|
+// String fileName = "";
|
|
|
+// String meshfix = ""; //双模型时候会有改文件路径
|
|
|
+// for(int i = 0, len = array.size(); i < len; i++){
|
|
|
+// fileJson = array.getJSONObject(i);
|
|
|
+// fileName = fileJson.getString("file");
|
|
|
+// //文件不存在抛出异常
|
|
|
+// if(!new File(path + File.separator + "results" +File.separator + fileName).exists()){
|
|
|
+// throw new Exception(path + File.separator + "results" +File.separator + fileName+"文件不存在");
|
|
|
+// }
|
|
|
+//
|
|
|
+// //判断是否有vision2.txt
|
|
|
+// if("vision2.txt".equals(fileName)){
|
|
|
+// vision2 = true;
|
|
|
+// }
|
|
|
+//
|
|
|
+// //tex文件夹
|
|
|
+// if(fileJson.getIntValue("clazz") == 2 && !fileJson.containsKey("pack-file")){
|
|
|
+// if(fileName.contains("meshfix.txt")){
|
|
|
+// meshfix = fileName;
|
|
|
+// }else {
|
|
|
+// map.put(path + File.separator + "results" +File.separator+ fileName,"images/images"+
|
|
|
+// projectNum+"/"+ ConstantFileName.modelUUID+"_50k_texture_jpg_high1/"+fileName.replace("tex/", ""));
|
|
|
+// }
|
|
|
+// continue;
|
|
|
+// }
|
|
|
+//
|
|
|
+// //high文件夹
|
|
|
+// if(fileJson.getIntValue("clazz") == 3){
|
|
|
+// map.put(path + File.separator + "results" +File.separator+ fileName,"images/images"+
|
|
|
+// projectNum+"/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/", ""));
|
|
|
+// continue;
|
|
|
+// }
|
|
|
+//
|
|
|
+// //tiles文件夹,亚马逊没有裁剪图片api,不需要上传4k图
|
|
|
+//// if(fileJson.getIntValue("clazz") == 5 && !"s3".equals(ossType)){
|
|
|
+//// map.put(path + File.separator + "results" + File.separator+ fileName,"images/images"+
|
|
|
+//// projectNum+ File.separator + fileName);
|
|
|
+//// continue;
|
|
|
+//// }
|
|
|
+// if(fileJson.getIntValue("clazz") == 5 ){
|
|
|
+// map.put(path + File.separator + "results" + File.separator+ fileName,"images/images"+
|
|
|
+// projectNum+ File.separator + fileName);
|
|
|
+// continue;
|
|
|
+// }
|
|
|
+//
|
|
|
+// //tiles文件夹,亚马逊瓦片图
|
|
|
+// if(fileJson.getIntValue("clazz") == 7 ){
|
|
|
+// if(fileName.contains("/4k_")){
|
|
|
+// continue;
|
|
|
+// }
|
|
|
+// map.put(path + File.separator + "results" + File.separator+ fileName,"images/images"+
|
|
|
+// projectNum+ File.separator + fileName);
|
|
|
+// continue;
|
|
|
+// }
|
|
|
+//
|
|
|
+// //updown文件复制一份到ecs中并去掉换行符
|
|
|
+// if(fileJson.getIntValue("clazz") == 10){
|
|
|
+// String updown = FileUtils.readFile(path + File.separator + "results" +File.separator+ fileName);
|
|
|
+// JSONObject updownJson = JSONObject.parseObject(updown);
|
|
|
+// FileUtils.writeFile(ConstantFilePath.SCENE_PATH + "data" + File.separator + "data" + projectNum +
|
|
|
+// File.separator + fileName.replace("updown", "mapping"), updownJson.toString());
|
|
|
+// continue;
|
|
|
+// }
|
|
|
+//
|
|
|
+// //video视频文件或封面图
|
|
|
+// if(fileJson.getIntValue("clazz") == 11 || fileJson.getIntValue("cl" +
|
|
|
+// "azz") == 12){
|
|
|
+// map.put(path + File.separator + "results" + File.separator+ fileName,"video/video"+
|
|
|
+// projectNum+ File.separator + fileName.replace("videos/", ""));
|
|
|
+//
|
|
|
+// if(fileName.contains(".mp4")){
|
|
|
+//// CreateObjUtil.mp4ToFlv(path + File.separator + "results" + File.separator+ fileName,
|
|
|
+//// path + File.separator + "results" + File.separator+ fileName.replace("mp4", "flv"));
|
|
|
+//
|
|
|
+// map.put(path + File.separator + "results" + File.separator+ fileName.replace("mp4", "flv"),"video/video"+
|
|
|
+// projectNum+ File.separator + fileName.replace("videos/", "").replace("mp4", "flv"));
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// //2048的模型和贴图
|
|
|
+// if(fileJson.getIntValue("clazz") == 16){
|
|
|
+// map.put(path + File.separator + "results" + File.separator+ fileName,"data/data"+
|
|
|
+// projectNum+ File.separator + fileName);
|
|
|
+// }
|
|
|
+//
|
|
|
+// if(fileJson.getIntValue("clazz") == 18){
|
|
|
+// map.put(path + File.separator + "results" + File.separator+ fileName,"images/images"+
|
|
|
+// projectNum+ File.separator + fileName);
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// CreateObjUtil.convertTxtToDam( path + File.separator + "results" + File.separator+"tex"+File.separator+"modeldata.txt", path + File.separator + "results" +File.separator+ ConstantFileName.modelUUID+"_50k.dam");
|
|
|
+// CreateObjUtil.convertDamToLzma(path + File.separator + "results");
|
|
|
+// CreateObjUtil.convertTxtToDam( path + File.separator + "results" +File.separator+"tex"+File.separator+"modeldata.txt", path + File.separator + "results" + File.separator+ConstantFileName.modelUUID+"_50k.dam");
|
|
|
+// //有meshfix,表示双模型
|
|
|
+// if(!"".equals(meshfix)){
|
|
|
+// CreateObjUtil.convertTxtToDam( path + File.separator + "results" + File.separator+meshfix, path + File.separator + "results" +File.separator+ ConstantFileName.modelUUID+"_50k2.dam");
|
|
|
+// CreateObjUtil.convertDamToLzma2(path + File.separator + "results");
|
|
|
+// CreateObjUtil.convertTxtToDam( path + File.separator + "results" +File.separator+meshfix, path + File.separator + "results" + File.separator+ConstantFileName.modelUUID+"_50k2.dam");
|
|
|
+// map.put(path + File.separator + "results" +File.separator+ConstantFileName.modelUUID+"_50k2.dam.lzma", "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");
|
|
|
+// }
|
|
|
+// //8目相机有两个vision.txt因此第二个叫vision2.txt
|
|
|
+// CreateObjUtil.convertTxtToVisionmodeldata(path + File.separator + "results" +File.separator+"vision.txt",path + File.separator + "results" +File.separator+"vision.modeldata");
|
|
|
+// if(vision2){
|
|
|
+// 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");
|
|
|
+// }else {
|
|
|
+// CreateObjUtil.convertTxtToVisionmodeldataCommon(path + File.separator + "results" +File.separator+"vision.txt",path + File.separator + "results" +File.separator+"vision.modeldata");
|
|
|
+// }
|
|
|
+// log.info("数据转换完成:"+projectNum);
|
|
|
+//
|
|
|
+// File file = new File(path + File.separator + "results" +File.separator+ConstantFileName.modelUUID+"_50k.dam.lzma");
|
|
|
+// while(!file.exists())
|
|
|
+// {
|
|
|
+// Thread.sleep(60000);
|
|
|
+// }
|
|
|
+//
|
|
|
+// map.put(path + File.separator + "results" +File.separator+"vision.modeldata", "images/images"+projectNum+"/"+"vision.modeldata");
|
|
|
+// map.put(path + File.separator + "results" +File.separator+ConstantFileName.modelUUID+"_50k.dam.lzma", "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");
|
|
|
+//
|
|
|
+// file = new File(ConstantFilePath.SCENE_PATH+"data"+File.separator+"data"+projectNum);
|
|
|
+// if(!file.exists())
|
|
|
+// {
|
|
|
+// file.mkdir();
|
|
|
+// }
|
|
|
+// FileUtils.copyFile(path + File.separator + "results" +File.separator+"floor.json", ConstantFilePath.SCENE_PATH+"data"+File.separator+"data"+projectNum+File.separator+"floor.json", true);
|
|
|
+// FileUtils.copyFile(path + File.separator + "results" +File.separator+"floorplan.json", ConstantFilePath.SCENE_PATH+"data"+File.separator+"data"+projectNum+File.separator+"floor.json", true);
|
|
|
+// FileUtils.copyFile(path + File.separator + "results" +File.separator+"floorplan.json", ConstantFilePath.SCENE_PATH+"data"+File.separator+"data"+projectNum+File.separator+"floorplan.json", true);
|
|
|
+// log.info("floor.json路径:"+ path + File.separator + "results" +File.separator+"floor.json");
|
|
|
+// map.put(path + File.separator + "results" +File.separator+"floor.json","data/data"+projectNum+"/floor.json");
|
|
|
+// 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");
|
|
|
+// log.info("准备上传文件到oss:"+projectNum);
|
|
|
+// return map;
|
|
|
+// }
|
|
|
+//
|
|
|
+//
|
|
|
+// public static Map<String,String> computerRebuildVideo(String projectNum, String path) throws Exception{
|
|
|
+// Map<String,String> map = new HashMap<String,String>();
|
|
|
+// path = path.replace("//", "/");
|
|
|
+//
|
|
|
+// log.info("开始建模:"+projectNum);
|
|
|
+// //构建算法isModel去掉,因此改成空字符串
|
|
|
+// CreateObjUtil.build3dModel(path, "");
|
|
|
+// log.info("建模完成转换数据:"+projectNum);
|
|
|
+//
|
|
|
+// boolean vision2 = false;
|
|
|
+// //读取upload文件,检验需要上传的文件是否存在
|
|
|
+// String uploadData = FileUtils.readFile(path + File.separator + "results" +File.separator+"upload.json");
|
|
|
+// JSONObject uploadJson = null;
|
|
|
+// JSONArray array = null;
|
|
|
+// if(uploadData!=null) {
|
|
|
+// uploadJson = JSONObject.parseObject(uploadData);
|
|
|
+// array = uploadJson.getJSONArray("upload");
|
|
|
+// }
|
|
|
+//
|
|
|
+// if(array == null){
|
|
|
+// String instanceId = FileUtils.readFile("/opt/hosts/hosts.txt");
|
|
|
+// FileUtils.writeFile(path + File.separator + "javaErrorNow.log", instanceId + ":计算错误!");
|
|
|
+//
|
|
|
+// Thread.sleep(10000L);
|
|
|
+// FileUtils.writeFile(path + File.separator + "javaError.log", instanceId + ":计算错误!");
|
|
|
+// throw new Exception("upload.json数据出错");
|
|
|
+// }
|
|
|
+//
|
|
|
+// JSONObject fileJson = null;
|
|
|
+// String fileName = "";
|
|
|
+// for(int i = 0, len = array.size(); i < len; i++) {
|
|
|
+// fileJson = array.getJSONObject(i);
|
|
|
+// fileName = fileJson.getString("file");
|
|
|
+// //文件不存在抛出异常
|
|
|
+// if (!new File(path + File.separator + "results" + File.separator + fileName).exists()) {
|
|
|
+// throw new Exception(path + File.separator + "results" + File.separator + fileName + "文件不存在");
|
|
|
+// }
|
|
|
+//
|
|
|
+// //video视频文件或封面图
|
|
|
+// if (fileJson.getIntValue("clazz") == 20) {
|
|
|
+// if (fileName.contains(".flv")) {
|
|
|
+// map.put(path + File.separator + "results" + File.separator + fileName, "video/video" +
|
|
|
+// projectNum + File.separator + fileName.replace("videos/", ""));
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (fileName.contains(".mp4")) {
|
|
|
+// map.put(path + File.separator + "results" + File.separator + fileName, "video/video" +
|
|
|
+// projectNum + File.separator + fileName.replace("videos/", ""));
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// log.info("准备上传文件到oss:"+projectNum);
|
|
|
+// return map;
|
|
|
+// }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 标定算法
|
|
|
+ * @param path
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ public static Map<String,String> computerCalibration(String path) throws Exception{
|
|
|
+
|
|
|
+ Map<String,String> map = new HashMap<String,String>();
|
|
|
+
|
|
|
+ log.info("开始标定:" );
|
|
|
+ //构建算法isModel去掉,因此改成空字符串
|
|
|
+ CreateObjUtil.build3dModel(path, "");
|
|
|
+// CreateObjUtil.build3dModel(unicode, "");
|
|
|
+ log.info("标定完成转换数据:" );
|
|
|
+
|
|
|
+ boolean vision2 = false;
|
|
|
+ //读取upload文件,检验需要上传的文件是否存在
|
|
|
+ String uploadData = FileUtils.readFile(path + File.separator + "results" +File.separator+"upload.json");
|
|
|
+ JSONObject uploadJson = null;
|
|
|
+ JSONArray array = null;
|
|
|
+ if(uploadData!=null) {
|
|
|
+ uploadJson = JSONObject.parseObject(uploadData);
|
|
|
+ array = uploadJson.getJSONArray("upload");
|
|
|
+ }
|
|
|
+ if(array == null){
|
|
|
+ throw new Exception("upload.json数据出错");
|
|
|
+ }
|
|
|
+ JSONObject fileJson = null;
|
|
|
+ String fileName = "";
|
|
|
+ for(int i = 0, len = array.size(); i < len; i++) {
|
|
|
+ fileJson = array.getJSONObject(i);
|
|
|
+ fileName = fileJson.getString("file");
|
|
|
+ //文件不存在抛出异常
|
|
|
+ if (!new File(path + File.separator + "results" + File.separator + fileName).exists()) {
|
|
|
+ throw new Exception(path + File.separator + "results" + File.separator + fileName + "文件不存在");
|
|
|
+ }
|
|
|
+
|
|
|
+ if(fileJson.getIntValue("clazz") == 13 || fileJson.getIntValue("clazz") == 14){
|
|
|
+ map.put(path + File.separator + "results" +File.separator+ fileName,
|
|
|
+ ConstantFilePath.OSS_PREFIX + path.replace(ConstantFilePath.BUILD_MODEL_PATH, "") +
|
|
|
+ File.separator + fileName);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+//
|
|
|
+// public static void createJson(String path, String splitType, String skyboxType, String dataDescribe,
|
|
|
+// String sceneNum, String dataSource) throws Exception{
|
|
|
+// JSONObject projectJson = new JSONObject();
|
|
|
+// projectJson.put("version", "201909231830");
|
|
|
+// projectJson.put("protocol", "file api 1.4");
|
|
|
+// projectJson.put("uuid", UUID.randomUUID().toString());
|
|
|
+// projectJson.put("description", "");
|
|
|
+// projectJson.put("time", System.currentTimeMillis());
|
|
|
+// projectJson.put("category", "default");
|
|
|
+// projectJson.put("tag", null);
|
|
|
+// projectJson.put("status", null);
|
|
|
+// projectJson.put("sceneNum", sceneNum);
|
|
|
+// projectJson.put("dataSource", dataSource);
|
|
|
+// FileUtils.writeFile(path + File.separator + "project.json", projectJson.toString());
|
|
|
+//
|
|
|
+// JSONObject dataJson = new JSONObject();
|
|
|
+// dataJson.put("split_type", splitType);
|
|
|
+// dataJson.put("skybox_type", skyboxType);
|
|
|
+// dataJson.put("extras", null);
|
|
|
+// FileUtils.writeFile(path + File.separator + "data.json", dataJson.toString());
|
|
|
+// }
|
|
|
+//
|
|
|
+// public static void createExtras(String rebuildParam, String hdrParam, String path) throws Exception {
|
|
|
+//
|
|
|
+// FileUtils.writeFile( path + File.separator + "extras" + File.separator + "videos_hdr_param.json", hdrParam);
|
|
|
+//
|
|
|
+// FileUtils.writeFile( path + File.separator + "extras" + File.separator + "required_videos.json", rebuildParam);
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+// public static void createExtras(String rebuildParam,String path) throws Exception {
|
|
|
+// FileUtils.writeFile( path + File.separator + "extras" + File.separator + "image-ROI.json", rebuildParam);
|
|
|
+// }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成标定数据
|
|
|
+ * @param calPath
|
|
|
+ * @param prefix
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ public static void createCalibrationData(String calPath, String prefix) throws Exception{
|
|
|
+ File calFile = new File(calPath);
|
|
|
+ if(calFile.exists()){
|
|
|
+ calFile.mkdirs();
|
|
|
+ }
|
|
|
+ //删除results和capture文件夹
|
|
|
+ FileUtils.deleteDirectory(calPath + "/capture");
|
|
|
+ FileUtils.deleteDirectory(calPath + "/results");
|
|
|
+
|
|
|
+// CreateObjUtil.ossUtilCp(ConstantFilePath.OSS_PREFIX + prefix, calPath + "/capture");
|
|
|
+ for(File oldFile : new File(prefix).listFiles()){
|
|
|
+ FileUtils.copyFile(oldFile.getAbsolutePath(), calPath + "/capture/" + oldFile.getName(), true);
|
|
|
+ }
|
|
|
+ JSONObject dataJson = new JSONObject();
|
|
|
+ dataJson.put("split_type", "SPLIT_V7");
|
|
|
+ dataJson.put("skybox_type", "SKYBOX_V5");
|
|
|
+ FileUtils.writeFile(calPath + "/data.json", dataJson.toString());
|
|
|
+ }
|
|
|
+
|
|
|
+// public static Map<String, String> getTypeString(String cameraType, String algorithm, String resolution){
|
|
|
+// Map<String, String> map = new HashMap<>();
|
|
|
+// String splitType = "";
|
|
|
+// String skyboxType = "";
|
|
|
+// String dataDescribe = "";
|
|
|
+// if(Integer.parseInt(cameraType) >= 4){
|
|
|
+// if("0".equals(resolution)){
|
|
|
+//// skyboxType = "SKYBOX_V4"; //tiles
|
|
|
+//// skyboxType = "SKYBOX_V6"; //high,low,4k
|
|
|
+// skyboxType = "SKYBOX_V7"; //high,low,2k
|
|
|
+// }else {
|
|
|
+// skyboxType = "SKYBOX_V1";
|
|
|
+// }
|
|
|
+// splitType = "SPLIT_V1";
|
|
|
+//// skyboxType = "SKYBOX_V4"; //tiles
|
|
|
+// dataDescribe = "double spherical";
|
|
|
+//
|
|
|
+// if(Integer.parseInt(cameraType) == 5 ){
|
|
|
+// //新双目相机
|
|
|
+//// skyboxType = "SKYBOX_V9";
|
|
|
+// splitType = "SPLIT_V9";
|
|
|
+// skyboxType = "SKYBOX_V1";
|
|
|
+// }
|
|
|
+// if(Integer.parseInt(cameraType) == 6){
|
|
|
+// //小红屋新双目相机
|
|
|
+//// skyboxType = "SKYBOX_V9";
|
|
|
+// splitType = "SPLIT_V3";
|
|
|
+// skyboxType = "SKYBOX_V7";
|
|
|
+// }
|
|
|
+//
|
|
|
+// if(Integer.parseInt(cameraType) == 13){
|
|
|
+// //转台相机
|
|
|
+// skyboxType = "SKYBOX_V6";
|
|
|
+// splitType = "SPLIT_V12";
|
|
|
+// }
|
|
|
+//
|
|
|
+// if(Integer.parseInt(cameraType) == 14){
|
|
|
+// //转台相机
|
|
|
+// log.info("激光转台相机调用算法");
|
|
|
+// skyboxType = "SKYBOX_V11";
|
|
|
+// splitType = "SPLIT_V14";
|
|
|
+// }
|
|
|
+//
|
|
|
+// }else {
|
|
|
+// if("sfm".equals(algorithm)){
|
|
|
+// splitType = "SPLIT_V2";
|
|
|
+// skyboxType = "SKYBOX_V1";
|
|
|
+// dataDescribe = "old sfm";
|
|
|
+// }else {
|
|
|
+// splitType = "SPLIT_V3";
|
|
|
+// skyboxType = "SKYBOX_V1";
|
|
|
+// dataDescribe = "old slam";
|
|
|
+// }
|
|
|
+// }
|
|
|
+// map.put("splitType", splitType);
|
|
|
+// map.put("skyboxType", skyboxType);
|
|
|
+// map.put("dataDescribe", dataDescribe);
|
|
|
+// return map;
|
|
|
+// }
|
|
|
+//
|
|
|
+// public static SceneEntity createScene(String projectNum, Long cameraId, String cameraName, String phoneId, String scenepsd,
|
|
|
+// String unicode, Long cameraType, String fileId, String prefix,
|
|
|
+// String imgsName, String pic, String isModel, Long userId, String userName,
|
|
|
+// String algorithm, Integer sceneShootCount, String sceneName,
|
|
|
+// String sceneDec, Integer sceneType, String gps, ISceneService sceneService,
|
|
|
+// Integer type, ModelingMsgProducer producer, String url, String ecsType,
|
|
|
+// RubberSheetingUtil rubberSheetingUtil)throws Exception{
|
|
|
+// //先返回链接地址
|
|
|
+// SceneEntity scene = new SceneEntity();
|
|
|
+// scene.setWebSite(url+projectNum);
|
|
|
+// scene.setCameraId(cameraId);
|
|
|
+// scene.setPhoneId(phoneId);
|
|
|
+// scene.setNum(String.valueOf(projectNum));
|
|
|
+// if(scenepsd == null)
|
|
|
+// {
|
|
|
+// scenepsd = "";
|
|
|
+// }
|
|
|
+// if(!scenepsd.equals(""))
|
|
|
+// {
|
|
|
+// scene.setSceneKey(scenepsd);
|
|
|
+// }
|
|
|
+//
|
|
|
+// if(!StringUtils.isEmpty(ecsType)){
|
|
|
+// scene.setEcs(ecsType);
|
|
|
+// }
|
|
|
+//
|
|
|
+// String path = ConstantFilePath.BUILD_MODEL_PATH + unicode;
|
|
|
+//
|
|
|
+// if(cameraType.longValue() >= 4){
|
|
|
+// scene.setDataSource(ConstantFilePath.BUILD_MODEL_PATH +
|
|
|
+// cameraName.replace("4DKKPRO_", "").replace("-fdage", "").toLowerCase() + File.separator + fileId + File.separator + unicode);
|
|
|
+// }else {
|
|
|
+// scene.setDataSource(prefix+imgsName);
|
|
|
+// }
|
|
|
+//
|
|
|
+// if(cameraType.longValue() == 14){
|
|
|
+//
|
|
|
+// scene.setDataSource(ConstantFilePath.BUILD_MODEL_LASER_PATH +
|
|
|
+// cameraName.replace("4DKKPRO_", "").replace("-fdage", "").toLowerCase() + File.separator +
|
|
|
+// fileId + File.separator + unicode);
|
|
|
+//
|
|
|
+// log.info("激光相机 dataSource :" + scene.getDataSource());
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+//
|
|
|
+// if(pic!=null&&pic.length()>5)
|
|
|
+// {
|
|
|
+// scene.setThumb(pic);
|
|
|
+// }
|
|
|
+// else
|
|
|
+// {
|
|
|
+// scene.setThumb(ConstantUrl.DEFAULT_SCENE_PIC);
|
|
|
+// }
|
|
|
+//
|
|
|
+// String parametr = "";
|
|
|
+// parametr+=unicode+":;"+path+":;"+prefix+":;"+imgsName+":;"+projectNum+":;"+isModel;
|
|
|
+// if(userName!=null&&!userName.trim().equals(""))
|
|
|
+// {
|
|
|
+// parametr+=":;"+userName;
|
|
|
+// scene.setUserId(userId);
|
|
|
+// }
|
|
|
+// else
|
|
|
+// {
|
|
|
+// parametr+=":;noMan";
|
|
|
+// }
|
|
|
+// parametr+=":;"+cameraType;
|
|
|
+// parametr+=":;"+algorithm;
|
|
|
+// parametr += ":;" + fileId;
|
|
|
+// parametr += ":;" + cameraName;
|
|
|
+// parametr += ":;1";
|
|
|
+// log.info("大场景添加到队列:"+parametr);
|
|
|
+// producer.sendMsg(parametr);
|
|
|
+//
|
|
|
+// if(sceneShootCount == null)
|
|
|
+// {
|
|
|
+// scene.setShootCount(0);
|
|
|
+// }
|
|
|
+// else
|
|
|
+// {
|
|
|
+// scene.setShootCount(sceneShootCount);
|
|
|
+// }
|
|
|
+// if(sceneName!=null)
|
|
|
+// {
|
|
|
+// scene.setSceneName(sceneName);
|
|
|
+// }
|
|
|
+// if(sceneDec!=null)
|
|
|
+// {
|
|
|
+// scene.setSceneDec("<p>"+sceneDec+"</p>");
|
|
|
+// }
|
|
|
+//
|
|
|
+// if(sceneType!=null)
|
|
|
+// {
|
|
|
+// scene.setSceneType(sceneType);
|
|
|
+// }
|
|
|
+//
|
|
|
+// if(gps!=null&&!gps.trim().equals(""))
|
|
|
+// {
|
|
|
+// scene.setGps(gps);
|
|
|
+// }
|
|
|
+//
|
|
|
+// scene.setSceneScheme(cameraType.intValue());
|
|
|
+// scene.setAlgorithm(algorithm);
|
|
|
+// log.info("场景记录添加到数据库:"+projectNum);
|
|
|
+// if(type == 0){
|
|
|
+// sceneService.save(scene);
|
|
|
+// }
|
|
|
+//
|
|
|
+// JSONObject scenejson = JSONObject.parseObject(JSONObject.toJSONString(scene));
|
|
|
+// scenejson.put("thumbImg", 0);
|
|
|
+// scenejson.put("version", 0);
|
|
|
+// scenejson.put("floorLogo", 0);
|
|
|
+// if(!scenepsd.equals("")){
|
|
|
+// scenejson.put("scenePsd", scenepsd);
|
|
|
+// scenejson.put("public", 1);
|
|
|
+// }else{
|
|
|
+// scenejson.put("scenePsd", "");
|
|
|
+// scenejson.put("public", 0);
|
|
|
+// }
|
|
|
+// if(cameraType < 4){
|
|
|
+// scenejson.put("visions", 1);
|
|
|
+// }else {
|
|
|
+// scenejson.put("visions", 2);
|
|
|
+// }
|
|
|
+// scenejson.put("createTime", new DateTime(new Date()).toString("yyyy-MM-dd HH:mm"));
|
|
|
+//
|
|
|
+// File file = new File(ConstantFilePath.SCENE_PATH+"data/data"+projectNum);
|
|
|
+// if(!file.exists()||!file.isDirectory())
|
|
|
+// {
|
|
|
+// file.mkdirs();
|
|
|
+// }
|
|
|
+// FileUtils.writeFile(ConstantFilePath.SCENE_PATH+"data/data"+projectNum+File.separator+"scene.json", scenejson.toString());
|
|
|
+//
|
|
|
+// //生成二维码
|
|
|
+// MatrixToImageWriterUtil.createQRCode(url + projectNum, ConstantFilePath.BASE_PATH + File.separator + "sceneQRcode/"+projectNum+".png", null);
|
|
|
+// MatrixToImageWriterUtil.createQRCode(url + projectNum + "&lang=en", ConstantFilePath.BASE_PATH + File.separator + "sceneQRcode/"+projectNum+"_en.png", null);
|
|
|
+// log.info("二维码生成完成");
|
|
|
+//
|
|
|
+// return scene;
|
|
|
+// }
|
|
|
+//
|
|
|
+// public static SceneProEntity createScenePro(String projectNum, Long cameraId, String cameraName, String phoneId, String sceneKey,
|
|
|
+// String unicode, Long cameraType, String fileId, String prefix,
|
|
|
+// String imgsName, String pic, String isModel, Long userId, String userName,
|
|
|
+// String algorithm, Integer sceneShootCount, String sceneName,
|
|
|
+// String sceneDec, Integer sceneType, String gps, ISceneProService sceneProService,
|
|
|
+// ISceneProEditService sceneProEditService, Integer type, ModelingMsgProducer producer,
|
|
|
+// Integer resolution, String firmwareVersion, String url, String buildType, String ossType, String ecsType,
|
|
|
+// ISceneCooperationService sceneCooperationService,
|
|
|
+// ISceneResourceCooperationService sceneResourceCooperationService,
|
|
|
+// ISceneResourceCameraService sceneResourceCameraService, Long cooperationUser,
|
|
|
+// RubberSheetingUtil rubberSheetingUtil)throws Exception{
|
|
|
+// //先返回链接地址
|
|
|
+// SceneProEntity scene = new SceneProEntity();
|
|
|
+// scene.setWebSite(url+projectNum);
|
|
|
+// scene.setCameraId(cameraId);
|
|
|
+// scene.setPhoneId(phoneId);
|
|
|
+// scene.setNum(projectNum);
|
|
|
+//
|
|
|
+// String path = ConstantFilePath.BUILD_MODEL_PATH + unicode;
|
|
|
+//
|
|
|
+// scene.setSceneSource(1);
|
|
|
+// if(cameraType.longValue() == 5 || cameraType.longValue() == 6){
|
|
|
+// //场景来源双目相机
|
|
|
+// scene.setSceneSource(2);
|
|
|
+// scene.setDataSource(ConstantFilePath.BUILD_MODEL_PATH + unicode);
|
|
|
+// }else if(cameraType.longValue() == 14){
|
|
|
+//
|
|
|
+// scene.setDataSource(ConstantFilePath.BUILD_MODEL_LASER_PATH +
|
|
|
+// cameraName.replace("4DKKPRO_", "").replace("-fdage", "").toLowerCase() + File.separator +
|
|
|
+// fileId + File.separator + unicode);
|
|
|
+// path = ConstantFilePath.BUILD_MODEL_LASER_PATH + unicode;
|
|
|
+// log.info("激光相机 dataSource :" + scene.getDataSource());
|
|
|
+//
|
|
|
+// }else if(cameraType.longValue() >= 3){
|
|
|
+// scene.setDataSource(ConstantFilePath.BUILD_MODEL_PATH +
|
|
|
+// cameraName.replace("4DKKPRO_", "").replace("-fdage", "").toLowerCase() + File.separator +
|
|
|
+// fileId + File.separator + unicode);
|
|
|
+// }else {
|
|
|
+// scene.setDataSource(prefix+imgsName);
|
|
|
+// }
|
|
|
+//
|
|
|
+// if(!StringUtils.isEmpty(ecsType)){
|
|
|
+// scene.setEcs(ecsType);
|
|
|
+// }
|
|
|
+//
|
|
|
+// if(resolution == null || resolution.intValue() == 0){
|
|
|
+// scene.setSceneScheme(cameraType.intValue());
|
|
|
+// }else {
|
|
|
+// scene.setSceneScheme(4);
|
|
|
+// }
|
|
|
+//
|
|
|
+// //场景来源双目相机,sceneScheme为4,加载high,low图
|
|
|
+// if(cameraType.longValue() == 5 || cameraType.longValue() == 6){
|
|
|
+// scene.setSceneScheme(4);
|
|
|
+// }
|
|
|
+//
|
|
|
+// //转台相机用4k图
|
|
|
+// if(cameraType.longValue() == 13 ){
|
|
|
+// scene.setSceneSource(3);
|
|
|
+// scene.setSceneScheme(10);
|
|
|
+// }
|
|
|
+//
|
|
|
+// //激光相机
|
|
|
+// if(cameraType.longValue() == 14 ){
|
|
|
+// scene.setSceneSource(4);
|
|
|
+// scene.setSceneScheme(10);
|
|
|
+// }
|
|
|
+//
|
|
|
+// //亚马逊s3没有裁剪4k图的api
|
|
|
+//// if("s3".equals(ossType)){
|
|
|
+//// scene.setSceneScheme(3);
|
|
|
+//// }
|
|
|
+//
|
|
|
+// if(pic!=null&&pic.length()>5)
|
|
|
+// {
|
|
|
+// scene.setThumb(pic);
|
|
|
+//// scene.setThumbImg(2);
|
|
|
+// }
|
|
|
+// else
|
|
|
+// {
|
|
|
+// scene.setThumb(ConstantUrl.DEFAULT_SCENE_PIC);
|
|
|
+// }
|
|
|
+// scene.setThumb(scene.getThumb().concat("?t=")+System.currentTimeMillis());
|
|
|
+// String parametr = getMQMsg(projectNum, cameraName, unicode, cameraType, fileId, prefix, imgsName, isModel,
|
|
|
+// userName, algorithm, resolution, buildType, path);
|
|
|
+// if(!ObjectUtils.isEmpty(userName)){
|
|
|
+// scene.setUserId(userId);
|
|
|
+// }
|
|
|
+// scene.setMqMsg(parametr);
|
|
|
+//
|
|
|
+// if(sceneShootCount == null)
|
|
|
+// {
|
|
|
+// scene.setShootCount(0);
|
|
|
+// }
|
|
|
+// else
|
|
|
+// {
|
|
|
+// scene.setShootCount(sceneShootCount);
|
|
|
+// }
|
|
|
+// if(sceneName!=null)
|
|
|
+// {
|
|
|
+// scene.setSceneName(sceneName);
|
|
|
+// }
|
|
|
+// if(sceneDec!=null)
|
|
|
+// {
|
|
|
+// scene.setSceneDec("<p>"+ new String(sceneDec.getBytes("UTF-8"))+"</p>");
|
|
|
+// }
|
|
|
+//
|
|
|
+// if(sceneType!=null)
|
|
|
+// {
|
|
|
+// scene.setSceneType(sceneType);
|
|
|
+// }
|
|
|
+//
|
|
|
+// if(gps!=null&&!gps.trim().equals(""))
|
|
|
+// {
|
|
|
+// scene.setGps(gps);
|
|
|
+// }
|
|
|
+//
|
|
|
+// scene.setAlgorithm(algorithm);
|
|
|
+// scene.setFilesName(imgsName);
|
|
|
+// if(!StringUtils.isEmpty(firmwareVersion)){
|
|
|
+// scene.setFirmwareVersion(firmwareVersion);
|
|
|
+// }
|
|
|
+// scene.setBuildType(buildType);
|
|
|
+// log.info("场景记录添加到数据库:"+projectNum);
|
|
|
+// //type=0为新生成场景,其余为重新计算场景
|
|
|
+//
|
|
|
+// SceneProEditEntity sceneEdit = new SceneProEditEntity();
|
|
|
+// if(type == 0){
|
|
|
+// sceneProService.save(scene);
|
|
|
+//
|
|
|
+// sceneEdit = new SceneProEditEntity();
|
|
|
+// sceneEdit.setNeedKey(0);
|
|
|
+//
|
|
|
+// if(sceneKey == null) {
|
|
|
+// sceneKey = "";
|
|
|
+// }
|
|
|
+// sceneEdit.setSceneKey(sceneKey);
|
|
|
+// if(!sceneKey.equals("")) {
|
|
|
+// sceneEdit.setNeedKey(1);
|
|
|
+// }else {
|
|
|
+// sceneEdit.setNeedKey(0);
|
|
|
+// }
|
|
|
+//
|
|
|
+// sceneEdit.setProId(scene.getId());
|
|
|
+// sceneEdit.setMapVisi(1);
|
|
|
+// sceneEdit.setTourVisi(1);
|
|
|
+// sceneEdit.setVrVisi(1);
|
|
|
+// sceneEdit.setRulerVisi(1);
|
|
|
+// sceneEdit.setCadImgVisi(1);
|
|
|
+// sceneEdit.setPanoVisi(1);
|
|
|
+// sceneEdit.setM2dVisi(1);
|
|
|
+// sceneEdit.setM3dVisi(1);
|
|
|
+// sceneEdit.setMeasureVisi(0);
|
|
|
+// sceneEdit.setFloorLogoSize(100);
|
|
|
+// sceneEdit.setCreateTime(new Date());
|
|
|
+// sceneProEditService.save(sceneEdit);
|
|
|
+//
|
|
|
+// //新增场景时,同时新增场景协作信息
|
|
|
+// if(cooperationUser != null){
|
|
|
+// SceneCooperationEntity sceneCooperationEntity = new SceneCooperationEntity();
|
|
|
+// sceneCooperationEntity.setSceneNum(projectNum);
|
|
|
+// sceneCooperationEntity.setUserId(cooperationUser);
|
|
|
+// sceneCooperationService.save(sceneCooperationEntity);
|
|
|
+//
|
|
|
+// List<SceneResourceCameraEntity> resourceCameraList = sceneResourceCameraService.findListByCameraId(cameraId);
|
|
|
+//
|
|
|
+// SceneResourceCooperationEntity sceneResourceCooperationEntity = null;
|
|
|
+// if(resourceCameraList != null && resourceCameraList.size() > 0){
|
|
|
+// for (SceneResourceCameraEntity sceneResourceCameraEntity : resourceCameraList) {
|
|
|
+// sceneResourceCooperationEntity = new SceneResourceCooperationEntity();
|
|
|
+// sceneResourceCooperationEntity.setSceneResourceId(sceneResourceCameraEntity.getSceneResourceId());
|
|
|
+// sceneResourceCooperationEntity.setSceneCooperationId(sceneCooperationEntity.getId());
|
|
|
+// sceneResourceCooperationService.save(sceneResourceCooperationEntity);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }else {
|
|
|
+// SceneProEntity oldScene = sceneProService.findBySceneNum(projectNum);
|
|
|
+// scene.setId(oldScene.getId());
|
|
|
+// scene.setStatus(0);
|
|
|
+// scene.setPayStatus(0);
|
|
|
+// scene.setRecStatus("A");
|
|
|
+// scene.setCreateTime(new Date());
|
|
|
+// scene.setSpace(oldScene.getSpace());
|
|
|
+// scene.setEcs(oldScene.getEcs());
|
|
|
+// scene.setViewCount(oldScene.getViewCount());
|
|
|
+// if(sceneName!=null) {
|
|
|
+// scene.setSceneName(sceneName);
|
|
|
+// }
|
|
|
+// if(sceneType!=null) {
|
|
|
+// scene.setSceneType(sceneType);
|
|
|
+// }
|
|
|
+// sceneProService.updateAll(scene);
|
|
|
+//
|
|
|
+// SceneProEditEntity oldSceneEdit = sceneProEditService.findByProId(scene.getId());
|
|
|
+// sceneEdit = new SceneProEditEntity();
|
|
|
+// sceneEdit.setNeedKey(0);
|
|
|
+//
|
|
|
+// if(sceneKey == null) {
|
|
|
+// sceneKey = "";
|
|
|
+// }
|
|
|
+// sceneEdit.setSceneKey(sceneKey);
|
|
|
+// if(!sceneKey.equals("")) {
|
|
|
+// sceneEdit.setNeedKey(1);
|
|
|
+// }else {
|
|
|
+// sceneEdit.setNeedKey(0);
|
|
|
+// }
|
|
|
+//
|
|
|
+// sceneEdit.setProId(scene.getId());
|
|
|
+// sceneEdit.setMapVisi(1);
|
|
|
+// sceneEdit.setTourVisi(1);
|
|
|
+// sceneEdit.setVrVisi(1);
|
|
|
+// sceneEdit.setRulerVisi(1);
|
|
|
+// sceneEdit.setCadImgVisi(1);
|
|
|
+// sceneEdit.setPanoVisi(1);
|
|
|
+// sceneEdit.setM2dVisi(1);
|
|
|
+// sceneEdit.setM3dVisi(1);
|
|
|
+// sceneEdit.setMeasureVisi(0);
|
|
|
+// sceneEdit.setFloorLogoSize(100);
|
|
|
+// sceneEdit.setUpdateTime(new Date());
|
|
|
+// sceneEdit.setCreateTime(oldSceneEdit.getCreateTime());
|
|
|
+// sceneEdit.setRecStatus("A");
|
|
|
+// sceneEdit.setFloorPublishVer(oldSceneEdit.getFloorEditVer() + 1);
|
|
|
+// sceneEdit.setFloorEditVer(oldSceneEdit.getFloorEditVer() + 1);
|
|
|
+// sceneEdit.setVersion(oldSceneEdit.getVersion() + 1);
|
|
|
+// sceneEdit.setImagesVersion(oldSceneEdit.getImagesVersion() + 1);
|
|
|
+// sceneEdit.setId(oldSceneEdit.getId());
|
|
|
+//
|
|
|
+// sceneProEditService.updateAll(sceneEdit);
|
|
|
+//
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+// JSONObject scenejson = JSONObject.parseObject(JSONObject.toJSONString(scene));
|
|
|
+// scenejson.put("thumbImg", 0);
|
|
|
+// scenejson.put("version", 0);
|
|
|
+// scenejson.put("floorLogo", 0);
|
|
|
+// if(!sceneKey.equals("")){
|
|
|
+// scenejson.put("sceneKey", sceneKey);
|
|
|
+// scenejson.put("public", 1);
|
|
|
+// }else{
|
|
|
+// scenejson.put("sceneKey", "");
|
|
|
+// scenejson.put("public", 0);
|
|
|
+// }
|
|
|
+// if(cameraType.longValue() < 4 || cameraType.longValue() == 5 || cameraType.longValue() == 6){
|
|
|
+// scenejson.put("visions", 1);
|
|
|
+// }else {
|
|
|
+// scenejson.put("visions", 2);
|
|
|
+// }
|
|
|
+// scenejson.put("createTime", new DateTime(new Date()).toString("yyyy-MM-dd HH:mm"));
|
|
|
+//
|
|
|
+// scenejson.put("floorPublishVer", sceneEdit.getFloorPublishVer());
|
|
|
+// scenejson.put("floorEditVer", sceneEdit.getFloorEditVer());
|
|
|
+// scenejson.put("entry", null);
|
|
|
+//
|
|
|
+// if(!StringUtils.isEmpty(sceneEdit.getHotsIds())){
|
|
|
+// scenejson.put("hots", 1);
|
|
|
+// }
|
|
|
+//
|
|
|
+// File file = new File(ConstantFilePath.SCENE_PATH+"data/data"+projectNum);
|
|
|
+// if(!file.exists()||!file.isDirectory())
|
|
|
+// {
|
|
|
+// file.mkdirs();
|
|
|
+// }
|
|
|
+// FileUtils.writeFile(ConstantFilePath.SCENE_PATH+"data/data"+projectNum+File.separator+"scene.json", scenejson.toString());
|
|
|
+//// uploadToOssUtil.upload(ConstantFilePath.SCENE_PATH+"data/data"+projectNum+File.separator+"scene.json", "data/data"+projectNum+File.separator+"scene.json");
|
|
|
+//
|
|
|
+// //生成二维码
|
|
|
+// MatrixToImageWriterUtil.createQRCode(url + projectNum, ConstantFilePath.BASE_PATH + File.separator + "sceneQRcode/"+projectNum+".png", null);
|
|
|
+// MatrixToImageWriterUtil.createQRCode(url + projectNum + "&lang=en", ConstantFilePath.BASE_PATH + File.separator + "sceneQRcode/"+projectNum+"_en.png", null);
|
|
|
+// log.info("二维码生成完成");
|
|
|
+//
|
|
|
+// //当mq排队数大于指定数量时使用弹性升缩
|
|
|
+//// int mqNum = producer.getMessageCount();
|
|
|
+//// log.info("mqNum:" + mqNum);
|
|
|
+//// if(mqNum - Integer.parseInt(baseNum) > 0){
|
|
|
+//// log.info("使用弹性升缩开启一台ECS");
|
|
|
+//// log.info(rubberSheetingUtil.createEcs());
|
|
|
+//// }
|
|
|
+// return scene;
|
|
|
+// }
|
|
|
+//
|
|
|
+// public static String getMQMsg(String projectNum, String cameraName, String unicode, Long cameraType, String fileId,
|
|
|
+// String prefix, String imgsName, String isModel,String userName,
|
|
|
+// String algorithm, Integer resolution, String buildType, String path) {
|
|
|
+// String parametr = "";
|
|
|
+// parametr+= unicode +":;"+ path +":;"+ prefix +":;"+ imgsName +":;"+ projectNum +":;"+ isModel;
|
|
|
+// if(userName !=null&&!userName.trim().equals("")){
|
|
|
+// parametr+=":;"+ userName;
|
|
|
+// }else{
|
|
|
+// parametr+=":;noMan";
|
|
|
+// }
|
|
|
+// parametr+=":;"+ cameraType;
|
|
|
+// parametr+=":;"+ algorithm;
|
|
|
+// parametr += ":;" + fileId;
|
|
|
+// parametr += ":;" + cameraName;
|
|
|
+// if(resolution == null){
|
|
|
+// parametr += ":;0";
|
|
|
+// }else {
|
|
|
+// parametr += ":;" + resolution.intValue();
|
|
|
+// }
|
|
|
+//
|
|
|
+// if(buildType != null){
|
|
|
+// parametr += ":;" + buildType;
|
|
|
+// }
|
|
|
+//
|
|
|
+// log.info("pro大场景添加到队列:"+parametr);
|
|
|
+// return parametr;
|
|
|
+// }
|
|
|
+}
|