Pārlūkot izejas kodu

移除无用代码

tianboguang 3 gadi atpakaļ
vecāks
revīzija
9644a6ce25
56 mainītis faili ar 28 papildinājumiem un 59299 dzēšanām
  1. 0 49
      4dkankan-common-db/src/main/java/com/fdkankan/common/constant/ConstantFilePath.java
  2. 0 7340
      4dkankan-common-db/src/main/java/com/fdkankan/common/proto/BigSceneProto.java
  3. 0 4654
      4dkankan-common-db/src/main/java/com/fdkankan/common/proto/Common.java
  4. 0 1333
      4dkankan-common-db/src/main/java/com/fdkankan/common/proto/format/XmlFormat.java
  5. 0 65
      4dkankan-common-db/src/main/java/com/fdkankan/common/utils/Base64Converter.java
  6. 0 55
      4dkankan-common-db/src/main/java/com/fdkankan/common/utils/ConstantCmd.java
  7. 0 602
      4dkankan-common-db/src/main/java/com/fdkankan/common/utils/CreateObjUtil.java
  8. 0 39
      4dkankan-common-mq/src/main/java/com/fdkankan/common/constant/ConstantFileName.java
  9. 0 7340
      4dkankan-common-mq/src/main/java/com/fdkankan/common/proto/BigSceneProto.java
  10. 0 4654
      4dkankan-common-mq/src/main/java/com/fdkankan/common/proto/Common.java
  11. 0 4345
      4dkankan-common-mq/src/main/java/com/fdkankan/common/proto/Visionmodeldata.java
  12. 0 156
      4dkankan-common-mq/src/main/java/com/fdkankan/common/proto/format/CouchDBFormat.java
  13. 0 703
      4dkankan-common-mq/src/main/java/com/fdkankan/common/proto/format/HtmlFormat.java
  14. 0 1603
      4dkankan-common-mq/src/main/java/com/fdkankan/common/proto/format/JsonFormat.java
  15. 0 602
      4dkankan-common-mq/src/main/java/com/fdkankan/common/utils/CreateObjUtil.java
  16. 0 61
      4dkankan-common-mq/src/main/java/com/fdkankan/common/utils/StreamGobbler.java
  17. 1 1
      4dkankan-common-mq/src/main/java/com/fdkankan/common/message/BaseMQMessage.java
  18. 1 1
      4dkankan-common-mq/src/main/java/com/fdkankan/common/message/BuildSceneMqMessage.java
  19. 0 49
      4dkankan-common-redis/src/main/java/com/fdkankan/common/constant/ConstantFilePath.java
  20. 0 156
      4dkankan-common-redis/src/main/java/com/fdkankan/common/proto/format/CouchDBFormat.java
  21. 0 1338
      4dkankan-common-redis/src/main/java/com/fdkankan/common/proto/format/JavaPropsFormat.java
  22. 0 1603
      4dkankan-common-redis/src/main/java/com/fdkankan/common/proto/format/JsonFormat.java
  23. 0 65
      4dkankan-common-redis/src/main/java/com/fdkankan/common/utils/Base64Converter.java
  24. 0 55
      4dkankan-common-redis/src/main/java/com/fdkankan/common/utils/ConstantCmd.java
  25. 0 61
      4dkankan-common-redis/src/main/java/com/fdkankan/common/utils/StreamGobbler.java
  26. 0 39
      4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/ConstantFileName.java
  27. 0 49
      4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/ConstantFilePath.java
  28. 0 7340
      4dkankan-common-utils/src/main/java/com/fdkankan/common/proto/BigSceneProto.java
  29. 0 4654
      4dkankan-common-utils/src/main/java/com/fdkankan/common/proto/Common.java
  30. 0 4345
      4dkankan-common-utils/src/main/java/com/fdkankan/common/proto/Visionmodeldata.java
  31. 0 156
      4dkankan-common-utils/src/main/java/com/fdkankan/common/proto/format/CouchDBFormat.java
  32. 0 703
      4dkankan-common-utils/src/main/java/com/fdkankan/common/proto/format/HtmlFormat.java
  33. 0 1338
      4dkankan-common-utils/src/main/java/com/fdkankan/common/proto/format/JavaPropsFormat.java
  34. 0 1603
      4dkankan-common-utils/src/main/java/com/fdkankan/common/proto/format/JsonFormat.java
  35. 0 1333
      4dkankan-common-utils/src/main/java/com/fdkankan/common/proto/format/XmlFormat.java
  36. 0 65
      4dkankan-common-utils/src/main/java/com/fdkankan/common/utils/Base64Converter.java
  37. 0 55
      4dkankan-common-utils/src/main/java/com/fdkankan/common/utils/ConstantCmd.java
  38. 0 602
      4dkankan-common-utils/src/main/java/com/fdkankan/common/utils/CreateObjUtil.java
  39. 0 61
      4dkankan-common-utils/src/main/java/com/fdkankan/common/utils/StreamGobbler.java
  40. 1 1
      4dkankan-common-db/src/main/java/com/fdkankan/common/constant/ConstantFileName.java
  41. 1 1
      4dkankan-common-mq/src/main/java/com/fdkankan/common/constant/ConstantFilePath.java
  42. 1 1
      4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/ConstantUrl.java
  43. 1 1
      4dkankan-common-redis/src/main/java/com/fdkankan/common/proto/BigSceneProto.java
  44. 1 1
      4dkankan-common-redis/src/main/java/com/fdkankan/common/proto/Common.java
  45. 1 1
      4dkankan-common-db/src/main/java/com/fdkankan/common/proto/Visionmodeldata.java
  46. 3 3
      4dkankan-common-db/src/main/java/com/fdkankan/common/proto/format/CouchDBFormat.java
  47. 1 1
      4dkankan-common-db/src/main/java/com/fdkankan/common/proto/format/HtmlFormat.java
  48. 1 1
      4dkankan-common-mq/src/main/java/com/fdkankan/common/proto/format/JavaPropsFormat.java
  49. 1 1
      4dkankan-common-db/src/main/java/com/fdkankan/common/proto/format/JsonFormat.java
  50. 1 1
      4dkankan-common-redis/src/main/java/com/fdkankan/common/proto/format/XmlFormat.java
  51. 1 1
      4dkankan-common-mq/src/main/java/com/fdkankan/common/utils/Base64Converter.java
  52. 1 1
      4dkankan-common-mq/src/main/java/com/fdkankan/common/utils/ConstantCmd.java
  53. 8 8
      4dkankan-common-redis/src/main/java/com/fdkankan/common/utils/CreateObjUtil.java
  54. 1 1
      4dkankan-common/src/main/java/com/fdkankan/common/util/FileUtil.java
  55. 1 1
      4dkankan-common-utils/src/main/java/com/fdkankan/common/utils/FileUtils.java
  56. 1 1
      4dkankan-common/src/main/java/com/fdkankan/common/util/StreamGobbler.java

+ 0 - 49
4dkankan-common-db/src/main/java/com/fdkankan/common/constant/ConstantFilePath.java

@@ -1,49 +0,0 @@
-package com.fdkankan.common.constant;
-
-public class ConstantFilePath {
-    public static final String BASE_PATH = "/mnt/4Dkankan";
-    //论坛上传图片后,服务器存放的地址
-    public static final String BBS_IMAGES_PATH = "/mnt/4Dkankan/bbs/upload/image/";
-    // 用户上传图片
-    public static final String USER_IMAGES_PATH = "/mnt/4Dkankan/user/";
-    // 图片暂存地址(创建二维码等)
-    public static final String TEMP_IMAGES_PATH = "/mnt/4Dkankan/temp/upload/image/";
-    // 场景
-    public static final String SCENE_PATH = "/mnt/4Dkankan/scene/";
-    // 代理商
-    public static final String AGENT_PATH = "/mnt/4Dkankan/agent/";
-    //电子发票
-    public static final String INVOICE_PATH = "/mnt/4Dkankan/invoice/";
-    // 场景二维码
-    public static final String SCENE_QR_CODE_PATH = "/mnt/4Dkankan/sceneQRcode/";
-    // excel
-    public static final String EXCEL_PATH = "/mnt/4Dkankan/excel/";
-    //    public static final String EXCEL_PATH = "F:\\excel\\";
-    // medias
-    public static final String MEDIAS_PATH = "/mnt/4Dkankan/medias/";
-    // logo
-    public static final String LOGO_PATH = "/mnt/4Dkankan/logo/";
-    // login qr code
-    public static final String LOGIN_QR_CODE_PATH = "/mnt/4Dkankan/login/qrcode/";
-
-    public static final String WEIXIN_CERT = "/mnt/home/ubuntu/user/apiclient_cert.p12";
-
-    public static final String PREFIX = "/home/user";
-    public static final String CREATE_MODEL_PATH = PREFIX + "/photo_data/model/";
-    //大场景
-    public static final String CREATE_BIG_SCENE_PATH = PREFIX + "/photo_data/bigscene/";
-    //生成模型的路径
-    public static final String BUILD_MODEL_PATH = "/mnt/data/";
-    //生成模型的路径
-    public static String BUILD_MODEL_LASER_PATH ="/mnt-laser/data/";
-
-    //支付二维码图片存放路径
-    public static final String ALI_QRCODE_FOLDER = "/mnt/4Dkankan/alicode/";
-    public static final String WEIXIN_QRCODE_FOLDER = "/mnt/4Dkankan/weixincode/";
-
-    public static final String OSS_PREFIX = "home/";
-
-    public void setHardDiskLaser(String value){
-        ConstantFilePath.BUILD_MODEL_LASER_PATH = value;
-    }
-}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 7340
4dkankan-common-db/src/main/java/com/fdkankan/common/proto/BigSceneProto.java


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 4654
4dkankan-common-db/src/main/java/com/fdkankan/common/proto/Common.java


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1333
4dkankan-common-db/src/main/java/com/fdkankan/common/proto/format/XmlFormat.java


+ 0 - 65
4dkankan-common-db/src/main/java/com/fdkankan/common/utils/Base64Converter.java

@@ -1,65 +0,0 @@
-package com.fdkankan.common.utils;
-
-import java.io.UnsupportedEncodingException;
-import java.util.Base64;
-
-public class Base64Converter {
-
-    public final static Base64.Encoder encoder = Base64.getEncoder();
-    final static Base64.Decoder decoder = Base64.getDecoder();
-
-    /**
-     * 给字符串加密
-     * @param text
-     * @return
-     */
-    public static String encode(String text) {
-        byte[] textByte = new byte[0];
-        try {
-            textByte = text.getBytes("UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-        String encodedText = encoder.encodeToString(textByte);
-        return encodedText;
-    }
-
-    /**
-     * 给字符串加密
-     * @param textByte
-     * @return
-     */
-    public static String encode(byte[] textByte) {
-        return encoder.encodeToString(textByte);
-    }
-
-    /**
-     * 将加密后的字符串进行解密
-     * @param encodedText
-     * @return
-     */
-    public static String decode(String encodedText) {
-        String text = null;
-        try {
-            text = new String(decoder.decode(encodedText), "UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-        return text;
-    }
-
-    /**
-     * 根据逻辑截取加密后的密码
-     * @param text
-     * @return
-     */
-    public static String subText(String text){
-        //去掉前8位字符串
-        text = text.substring(8);
-        //去掉后8位字符串
-        text = text.substring(0, text.length() - 8);
-        //最后两个字符串换到前面,并且去掉剩下的后8位字符串
-        String result = text.substring(text.length() - 2) + text.substring(0, text.length() - 10);
-        return result;
-    }
-}

+ 0 - 55
4dkankan-common-db/src/main/java/com/fdkankan/common/utils/ConstantCmd.java

@@ -1,55 +0,0 @@
-package com.fdkankan.common.utils;
-
-public class ConstantCmd {
-
-	//生成模型的命令
-	public static final String BUILD_MODEL_COMMAND = "bash /home/ubuntu/bin/Launcher.sh ";
-
-	//生成模型的命令
-	public static final String BUILD_MODEL_COMMAND2 = "bash /opt/ossutil/sshoss.sh ";
-
-	public static final String BUILD_MODEL_OLD_COMMAND = "bash /home/ubuntu/bin_old/Launcher.sh ";
-	public static final String BUILD_MODEL_SFM_COMMAND = "bash /home/ubuntu/run_sfm.sh ";
-
-	public static final String OBJ_TO_TXT = "bash /home/ubuntu/bin_old/obj2txt.sh ";
-
-	public static final String REBUILD_MODEL_FLLOR = "bash /home/ubuntu/bin/Panoramix_Floorplan.sh ";
-	//切图命令
-	public static final String CUT_IMG_COMMAND = "bash /home/ubuntu/OpenSfM/bin/run_cube.sh ";
-	//调整图片的命令
-	public static final String ADJUST_IMG_COMMAND = "/home/ubuntu/OpenSfM/bin/run_skybox ";
-	  
-	  
-	  
-	//转台拼图命令
-	public static final String BUILD_PANORAMA = "AutopanoGiga /home/ubuntu/data/";
-	//六目,拼图,计算,切图(二代)
-	public static final String BUILD_FOR_SIX = "bash /home/ubuntu/run_all_m6.sh ";
-
-	//合并音频
-	public static final String MERGE_VIDEO = "bash /monchickey/ffmpeg/bin/ff_synthesis.sh ";
-
-	//生成一段静音音频
-	public static final String CREATE_MUTE_VIDEO = "bash /monchickey/ffmpeg/bin/ff_mtue.sh ";
-
-	//将mp4文件转换成flv
-	public static final String MP4_TO_FLV = "bash /monchickey/ffmpeg/bin/ff_mp4TOflv.sh ";
-
-	//删除/mnt/data/下的数据脚本
-	public static final String DELETE_FILE = "bash /monchickey/ffmpeg/bin/delete.sh ";
-
-	public static final String OSS_UTIL_CP ="bash /opt/ossutil/oss.sh ";
-
-	public static final String OSS_FILE_CP = "bash /opt/ossutil/file.sh ";
-
-	public static final String MATTERPRO_CUT_IMG = "node /opt/4dkankan_scene/index.js ";
-
-	//激光相机 extra迁移
-	public static final String CP_JG_EXTRA = "bash /opt/ossutil/laser-copy.sh ";
-
-	public static final String CP_JG_ALL = "bash /opt/ossutil/laser-cp-r.sh ";
-
-	// 修改户型图json文件
-	public static final String TRANSLATE_HOUST_FLOOR = "/opt/Robin/JsonRead.out ";
-
-}

+ 0 - 602
4dkankan-common-db/src/main/java/com/fdkankan/common/utils/CreateObjUtil.java

@@ -1,602 +0,0 @@
-package com.fdkankan.common.utils;
-
-import com.fdkankan.common.constant.ConstantFileName;
-import com.fdkankan.common.constant.ConstantFilePath;
-import com.fdkankan.common.proto.BigSceneProto;
-import com.fdkankan.common.proto.Common;
-import com.fdkankan.common.proto.Visionmodeldata;
-import com.fdkankan.common.proto.format.JsonFormat;
-import com.google.protobuf.TextFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.util.StopWatch;
-
-import java.io.*;
-import java.util.HashMap;
-import java.util.Map;
-
-public class CreateObjUtil {
-
-	private static Logger log = LoggerFactory.getLogger(CreateObjUtil.class);
-
-	public void saveuploadImgs(String folderName) throws IOException, Exception
-	{
-		log.info("开始计算");
-		String command = "bash /home/ubuntu/photoscan-pro/build_model.sh "+folderName;
-		callshell(command);
-		boolean flag = false;
-		String sPath =  ConstantFilePath.CREATE_MODEL_PATH+folderName+File.separator+"mesh"+File.separator+"mesh.obj";
-		while(!flag)
-		{
-			flag = isModel(sPath,folderName);
-		}
-		log.info("计算完毕");
-	}
-	
-	public void saveuploadImgs2(String folderName) throws IOException, Exception
-	{
-		log.info("开始计算");
-		String command = "bash /home/ubuntu/photoscan-pro/build_bigscene.sh "+folderName;
-		callshell(command);
-		boolean flag = false;
-		String sPath = ConstantFilePath.CREATE_BIG_SCENE_PATH+folderName+File.separator+"mesh"+File.separator+"mesh.obj";
-		while(!flag)
-		{
-			flag = isModel(sPath,folderName);
-		}
-		log.info("计算完毕");
-		log.info("obj和camera转换成大场景要的格式");
-		convertobjTotxt( folderName);
-		
-	}
-
-	//开始建模
-	public static void unRar(String rarPath,String dataPath) throws Exception{
-		log.info("解压rar开始");
-		String command = "unrar e " + rarPath + " " + dataPath;
-		callshell(command);
-		log.info("解压rar完毕:" + command);
-	}
-
-	public static void unZip(String zipPath,String dataPath) throws Exception{
-		log.info("解压zip开始");
-		String command = "unzip -O GBK/GB18030CP936 " + zipPath + " -d " + dataPath;
-		callshell(command);
-		log.info("解压zip完毕:" + command);
-	}
-
-	//开始建模
-	public static void build3dModel(String folderName,String isModel) throws Exception{
-		log.info("开始建模");
-		String command = ConstantCmd.BUILD_MODEL_COMMAND+folderName;
-		callshell(command);
-		log.info("计算完毕:" + command);
-	}
-
-	//开始建模
-	public static void build3dModel2(String folderName,String isModel) throws Exception{
-		log.info("开始建模");
-		String command = ConstantCmd.BUILD_MODEL_COMMAND2+folderName;
-		callshell(command);
-		log.info("计算完毕:" + command);
-	}
-
-	//开始建模
-	public static void build3dModelOld(String folderName,String isModel) throws Exception{
-		log.info("开始v2建模");
-		String command = ConstantCmd.BUILD_MODEL_OLD_COMMAND+folderName;
-		callshell(command);
-		log.info("计算v2完毕:" + command);
-	}
-
-	//开始建模
-	public static void translateHoustfloorJSONFile(String filePath,String outputPath) throws Exception{
-		log.info("开始转换houst_floor.json");
-		String command = ConstantCmd.TRANSLATE_HOUST_FLOOR + filePath + " " + outputPath;
-		callshell(command);
-		log.info("转换houst_floor.json 结束");
-	}
-
-	//激光相机复制资源
-	public static void cpfile(String filepathOld,String filepathNew) throws Exception{
-		log.info("开始复制");
-		String command = ConstantCmd.CP_JG_EXTRA+ " " + filepathOld + " " + filepathNew;
-		callshell(command);
-		log.info("复制完毕:" + command);
-	}
-
-
-	//激光相机复制资源laser下的全部资源
-	public static void cplaserfile(String filepathOld,String filepathNew) throws Exception{
-		log.info("开始复制");
-		String command = ConstantCmd.CP_JG_ALL+ " " + filepathOld + " " + filepathNew;
-		callshell(command);
-		log.info("复制完毕:" + command);
-	}
-	
-	//开始建模
-	public void build3dModelSFM(String folderName,String isModel) throws Exception{
-		log.info("开始建模");
-		String command = ConstantCmd.BUILD_MODEL_SFM_COMMAND+folderName+" "+isModel;
-		callshell(command);
-		log.info("计算完毕");
-	}
-
-	//obj文件转换问txt
-	public static void objToTxt(String folderName,String isModel) throws Exception{
-		log.info("obj2txt开始转换");
-		String command = ConstantCmd.OBJ_TO_TXT+folderName;
-		callshell(command);
-		log.info("转换完毕:" + command);
-	}
-
-	public void rebuildModelFllor(String folderName, String isModel) {
-		try{
-			log.info("开始建模");
-			String command = ConstantCmd.REBUILD_MODEL_FLLOR+folderName+" "+isModel;
-			callshell(command);
-			log.info("计算完毕");
-		}
-		catch(Exception e)
-		{
-			e.printStackTrace();
-		}
-	}
-
-	//切图
-	public void cutImgs(String[] imgNames ,String folderName)
-	{
-		try{
-			log.info("开始切图");
-			for(int i=0;i<imgNames.length;++i)
-			{
-				String imgName=imgNames[i].replace(".jpg", "");
-				String command = ConstantCmd.CUT_IMG_COMMAND+folderName+" "+imgName;
-				callshell(command);
-			}
-			log.info("切图完毕");
-		}
-		catch(Exception e)
-		{
-			e.printStackTrace();
-		}
-	}
-	
-	//调整切图
-	public void adjustImgs(String folderName)
-	{
-		try{
-			String command = ConstantCmd.ADJUST_IMG_COMMAND + folderName;
-			log.info("开始调整图片");
-			callshell(command);
-			log.info("调整图片完毕");
-		}
-		catch(Exception e)
-		{
-			e.printStackTrace();
-		}
-	}
-	
-	//obj和camera转换成大场景要的格式
-	public void convertobjTotxt(String folderName) throws Exception
-	{
-		//obj
-		String command = "/home/ubuntu/photoscan-pro/main/mesh/mesh "+folderName;
-		callshell(command);
-		//camera
-		command = "/home/ubuntu/photoscan-pro/main/read_camera/read_camera "+folderName;
-		callshell(command);
-		
-		String prefix = ConstantFilePath.CREATE_BIG_SCENE_PATH+folderName+File.separator+"data"+File.separator;
-		String srcpath = prefix +"mesh.txt";
-		String despath = prefix +"dacf7dfa24ae47fab8fcebfe4dc41ab9_50k.dam";
-				
-		convertTxtToDam( srcpath, despath);
-		//dam转换成lzma
-		command = "lzma /home/ubuntu/photo_data/bigscene/"+folderName+"/data/dacf7dfa24ae47fab8fcebfe4dc41ab9_50k.dam";
-		callshell(command);
-		
-		srcpath = prefix +"vision.txt";
-		despath = prefix +"vision.modeldata";
-		convertTxtToVisionmodeldata( srcpath, despath);
-	}
-
-	public static void convertDamToLzma(String folderName)throws Exception
-	{
-		try
-		{
-			String command = "lzma "+ folderName+File.separator+ ConstantFileName.modelUUID+"_50k.dam";
-			log.info("开始转换lzma");
-			callshell(command);
-			log.info("转换lzma完毕");
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-			e.printStackTrace(new PrintWriter(trace));
-			log.error(trace.toString());
-		}
-
-	}
-
-	public static void convertDamToLzma2(String folderName)throws Exception
-	{
-		try
-		{
-			String command = "lzma "+ folderName+File.separator+ ConstantFileName.modelUUID+"_50k2.dam";
-			log.info("开始转换lzma");
-			callshell(command);
-			log.info("转换lzma完毕");
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-			e.printStackTrace(new PrintWriter(trace));
-			log.error(trace.toString());
-		}
-
-	}
-	
-	public static void convertTxtToDam(String srcpath,String despath)throws Exception
-	{
-			BigSceneProto.binary_mesh.Builder builder= BigSceneProto.binary_mesh.newBuilder();
-			InputStream inputStream = new FileInputStream(srcpath);
-			InputStreamReader reader = new InputStreamReader(inputStream, "ASCII");
-			TextFormat.merge(reader, builder);
-			byte[] buf= builder.build().toByteArray();
-			
-			 //把序列化后的数据写入本地磁盘  
-	        ByteArrayInputStream stream = new ByteArrayInputStream(buf);  
-	        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(despath));//设置输出路径  
-	        BufferedInputStream bis = new BufferedInputStream(stream);  
-	        int b = -1;  
-	        while ((b = bis.read()) != -1) {  
-	            bos.write(b);  
-	        }  
-	        bis.close();  
-	        bos.close();
-	}
-	
-	public static void convertVisionmodeldataToTxt(String srcpath,String despath)throws Exception
-	{
-		try
-		{
-			File file = new File(srcpath); 
-			FileInputStream fis=new FileInputStream(file);
-
-			Visionmodeldata.NavigationInfo data_NavigationInfo = Visionmodeldata.NavigationInfo.parseFrom(fis);
-	
-			//PrintStream out = new PrintStream(despath); 
-			String jsonFormat1 = JsonFormat.printToString(data_NavigationInfo);
-			ByteArrayInputStream stream = new ByteArrayInputStream(jsonFormat1.getBytes());  
-	        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(despath));//设置输出路径  
-	        BufferedInputStream bis = new BufferedInputStream(stream);  
-	        int b = -1;  
-	        while ((b = bis.read()) != -1) {  
-	           bos.write(b);  
-	        }  
-			//out.close();
-	        bis.close();  
-	        bos.close(); 
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-	        e.printStackTrace(new PrintWriter(trace));
-	        log.error(trace.toString());
-		}
-	}
-	
-	public static void convertTxtToVisionmodeldata(String srcpath,String despath)throws Exception
-	{
-		try
-		{
-			Visionmodeldata.NavigationInfo.Builder builder = Visionmodeldata.NavigationInfo.newBuilder();
-			String jsonFormat = readTxtFileToJson(srcpath);
-			JsonFormat.merge(jsonFormat, builder);
-			byte[] buf= builder.build().toByteArray();
-			
-			 //把序列化后的数据写入本地磁盘  
-	        ByteArrayInputStream stream = new ByteArrayInputStream(buf);  
-	        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(despath));//设置输出路径  
-	        BufferedInputStream bis = new BufferedInputStream(stream);  
-	        int b = -1;  
-	        while ((b = bis.read()) != -1) {  
-	           bos.write(b);  
-	        }  
-	        bis.close();  
-	        bos.close(); 
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-	        e.printStackTrace(new PrintWriter(trace));
-	        log.error(trace.toString());
-		}
-	}
-
-	public static void convertVisionmodeldataToTxtCommon(String srcpath,String despath)throws Exception
-	{
-		try
-		{
-			File file = new File(srcpath);
-			FileInputStream fis=new FileInputStream(file);
-
-			Common.NavigationInfo data_NavigationInfo = Common.NavigationInfo.parseFrom(fis);
-
-			//PrintStream out = new PrintStream(despath);
-			String jsonFormat1 = JsonFormat.printToString(data_NavigationInfo);
-			ByteArrayInputStream stream = new ByteArrayInputStream(jsonFormat1.getBytes());
-			BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(despath));//设置输出路径
-			BufferedInputStream bis = new BufferedInputStream(stream);
-			int b = -1;
-			while ((b = bis.read()) != -1) {
-				bos.write(b);
-			}
-			//out.close();
-			bis.close();
-			bos.close();
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-			e.printStackTrace(new PrintWriter(trace));
-			log.error(trace.toString());
-		}
-	}
-
-	public static void convertTxtToVisionmodeldataCommon(String srcpath,String despath)throws Exception
-	{
-		try
-		{
-			Common.NavigationInfo.Builder builder = Common.NavigationInfo.newBuilder();
-			String jsonFormat = readTxtFileToJson(srcpath);
-			JsonFormat.merge(jsonFormat, builder);
-			byte[] buf= builder.build().toByteArray();
-
-			//把序列化后的数据写入本地磁盘
-			ByteArrayInputStream stream = new ByteArrayInputStream(buf);
-			BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(despath));//设置输出路径
-			BufferedInputStream bis = new BufferedInputStream(stream);
-			int b = -1;
-			while ((b = bis.read()) != -1) {
-				bos.write(b);
-			}
-			bis.close();
-			bos.close();
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-			e.printStackTrace(new PrintWriter(trace));
-			log.error(trace.toString());
-		}
-	}
-	
-	public static void callshell(String command)
-	{ 
-        try {
-			 StopWatch stopWatch = new StopWatch();
-			 stopWatch.start();
-			 Process process = Runtime.getRuntime().exec(command);
-        	 StreamGobbler errorGobbler = new StreamGobbler(process.getErrorStream(), "ERROR");
-             errorGobbler.start();  
-             StreamGobbler outGobbler = new StreamGobbler(process.getInputStream(), "STDOUT");  
-             outGobbler.start();  
-             process.waitFor();
-			log.info("脚本{}执行完毕,用时:{}",command,stopWatch.toString());
-        } catch (Exception e) {  
-            e.printStackTrace();  
-        }  
-	}
-	
-	public static int doWaitFor(Process process) {
-		  InputStream in = null;
-		  InputStream err = null;
-		  int exitValue = -1; // returned to caller when p is finished
-		  try {
-		    in = process.getInputStream();
-		    err = process.getErrorStream();
-		    boolean finished = false; // Set to true when p is finished
-		    while (!finished) {
-		      try {
-		        while (in.available() > 0) {
-		          // Print the output of our system call
-		          Character c = new Character((char) in.read());
-		          System.out.print(c);
-		        }
-		        while (err.available() > 0) {
-		          // Print the output of our system call
-		          Character c = new Character((char) err.read());
-		          System.out.print(c);
-		        }
-		        // Ask the process for its exitValue. If the process
-		        // is not finished, an IllegalThreadStateException
-		        // is thrown. If it is finished, we fall through and
-		        // the variable finished is set to true.
-		        exitValue = process.exitValue();
-		        finished = true;
-		      } catch (IllegalThreadStateException e) {
-		        // Process is not finished yet;
-		        // Sleep a little to save on CPU cycles
-		        Thread.currentThread().sleep(500);
-		      }
-		    }
-		  } catch (Exception e) {
-		    e.printStackTrace();
-		  } finally {
-		    try {
-		      if (in != null) {
-		        in.close();
-		      }
-		    } catch (IOException e) {
-		      e.printStackTrace();
-		    }
-		    if (err != null) {
-		      try {
-		        err.close();
-		      } catch (IOException e) {
-		        e.printStackTrace();
-		      }
-		    }
-		  }
-		  return exitValue;
-		}
-
-	
-	private boolean isModel(String sPath,String folderName)
-	{
-		boolean flag = false;  
-		File file = new File(sPath);  
-	    if (file.isFile() && file.exists()) {  
-	        flag = true;  
-	    }  
-	    log.info("等待...");
-	    return flag;  
-	}
-	
-	public static String readTxtFileToJson(String filePath){
-        try { 
-                String encoding="UTF-8"; 
-                File file=new File(filePath); 
-                if(file.isFile() && file.exists()){ 
-                    InputStreamReader read = new InputStreamReader( 
-                    new FileInputStream(file),encoding);
-                    BufferedReader bufferedReader = new BufferedReader(read); 
-                    String lineTxt = null; 
-                    String result="";
-                    while((lineTxt = bufferedReader.readLine()) != null){ 
-                    	result+=lineTxt;
-                        //log.info(lineTxt); 
-                    } 
-                    read.close(); 
-                    return result;
-        }else{ 
-            return null;
-        } 
-        } catch (Exception e) { 
-            e.printStackTrace(); 
-            return null;
-        } 
-      
-    }
-	
-	public Map<String,String> getAllFile(String dPath,String prefix)
-	{
-		File dirFile = new File(dPath);
-	    if (!dirFile.isDirectory()) {
-        }
-	    Map<String,String> map = new HashMap<String,String>();
-	    File[] files = dirFile.listFiles();
-	    for (int i = 0; i < files.length; i++) {
-            if (files[i].isFile()) {
-            	String path = files[i].getPath();
-            	map.put(path, prefix+path.substring(path.lastIndexOf("/")+1));
-            }
-        }
-	    return map;
-	}
-	
-	public Map<String,String> getchildFile(String dPath,String prefix,String childname)
-	{
-		File dirFile = new File(dPath+File.separator+childname);
-	    if (!dirFile.isDirectory()) {
-	    	return null;
-        }
-	    Map<String,String> map = new HashMap<String,String>();
-	    File[] files = dirFile.listFiles();
-	    for (int i = 0; i < files.length; i++) {
-            if (files[i].isFile()) {
-            	String path = files[i].getPath();
-            	map.put(path, prefix+childname+path.substring(path.lastIndexOf("/")));
-            }
-        }
-	    return map;
-	}
-	
-	//转台拼图
-	public void buildPanoramicImgs(String folderName)throws Exception
-	{
-		String command = ConstantCmd.BUILD_PANORAMA + folderName;
-		log.info("开始拼全景图");
-		callshell(command);
-		log.info("全景图拼接完毕");
-	}
-	
-	//六目拼图、切图,计算
-	public void buildForSix(String folderName)throws Exception
-	{
-		String command = ConstantCmd.BUILD_FOR_SIX + folderName;
-		log.info("开始处理数据(六目)");
-		callshell(command);
-		log.info("数据处理完毕(六目)");
-	}
-
-	public static void createSoftConnection(String source, String target) {
-		String command = "ln -s " + source + " " + target;
-		log.info("开始创建文件夹软连接");
-		callshell(command);
-		log.info("数据处理完毕(六目):" + command);
-	}
-
-	//合并音频
-	public static void mergeVideo(String oldVideo , String newVideo, String targetVideo) throws Exception{
-		String command = ConstantCmd.MERGE_VIDEO + " " + oldVideo + " " + newVideo + " " + targetVideo + " -y";
-		log.info("开始合并视频");
-		callshell(command);
-		log.info("合并视频完毕:" + command);
-	}
-
-	//生成一段静音音频
-	public static void createMuteViode(double time , String targetVideo) throws Exception{
-		String command = ConstantCmd.CREATE_MUTE_VIDEO + " " + time + " " + targetVideo + " -y";
-		log.info("开始生成一段静音音频");
-		callshell(command);
-		log.info("生成一段静音音频完毕:" + command);
-	}
-
-	//mp4文件转换成flv文件
-	public static void mp4ToFlv(String oldVideo, String newVideo) throws Exception{
-		String command = ConstantCmd.MP4_TO_FLV + " " + oldVideo + " " + newVideo;
-		log.info("mp4文件转换成flv文件");
-		callshell(command);
-		log.info("mp4文件转换成flv文件完毕:" + command);
-	}
-
-	//删除/mnt/data/下的数据
-	public static void deleteFile(String filePath) throws Exception{
-		String command = ConstantCmd.DELETE_FILE + " " + filePath;
-		log.info("删除/mnt/data/下的数据");
-		callshell(command);
-		log.info("删除/mnt/data/下的数据完毕:" + command);
-	}
-
-	public static void ossUtilCp(String fileUrl , String path) throws Exception{
-		String command = ConstantCmd.OSS_UTIL_CP + " " + fileUrl + " " + path;
-		Long start = System.currentTimeMillis();
-		log.info("开始oss下载文件:" + command);
-		callshell(command);
-		log.info("oss下载文件完成,时间为:" + (System.currentTimeMillis() - start));
-	}
-
-	public static void ossFileCp(String fileUrl , String path) throws Exception{
-		String command = ConstantCmd.OSS_FILE_CP + " " + fileUrl + " " + path;
-		Long start = System.currentTimeMillis();
-		log.info("开始s3文件下载文件:" + command);
-		callshell(command);
-		log.info("s3文件下载文件完成,时间为:" + (System.currentTimeMillis() - start));
-	}
-
-	/**
-	 * matterpro场景获取阿里云的切图数据
-	 * @param path
-	 * @throws Exception
-     */
-	public static void matterproCutImg(String num , String path) throws Exception{
-		String command = ConstantCmd.MATTERPRO_CUT_IMG + " -s " + num + " -d " + path;
-		Long start = System.currentTimeMillis();
-		log.info("开始matterpro获取阿里云图片方法:" + command);
-		callshell(command);
-		log.info("matterpro获取阿里云图片方法完成,时间为:" + (System.currentTimeMillis() - start));
-	}
-}

+ 0 - 39
4dkankan-common-mq/src/main/java/com/fdkankan/common/constant/ConstantFileName.java

@@ -1,39 +0,0 @@
-package com.fdkankan.common.constant;
-
-public class ConstantFileName {
-    //背景音乐
-    public static final String BACKGROUND_MUSIC = "bg.mp3";
-    //编辑页面,第二代
-    public static final String MODEL_DATAFILE = "modeldata.json";
-    public static final String HOT_DATAFILE = "hot.json";
-    public static final String MEDIA_DATAFILE = "mediaInfo.json";
-    public static final String SCREEN_CRP_DATAFILE = "screenCap";
-    //导览(一代)
-    public static final String GUIDE_DATAFILE = "tour.json";
-
-    //文件夹名称
-    public static final String GUIDE_MEDIA_FOLDER = "guide";
-    public static final String HOT_MEDIA_FOLDER = "hot";
-    public static final String OTHER_MEDIA_FOLDER = "other";
-
-    //论坛过滤文档
-    public static final String BBS_SENSITIVE = "SensitiveWord.txt";
-    public static final String LOGO_NAME = "logo.jpg";
-
-    //app部分
-    public static final String APP_FOLDER = "appupload";
-
-    public static final String FLOOR_LOGO_PIC_NAME = "floorLogoImg.png";
-
-    public static final String TOUR_LIST = "tourList.json";
-    public static final String VOICE_NAME = "201810";
-    public static final String WECHAT_VOICE_NAME = "wechat";
-    public static final String APP_VOICE_NAME = "app";
-
-    public static final String TOURLIST_FOLDER = "tour";
-    //public static final String TEMPFILES = "tempFiles";
-
-    public static final String modelUUID = "dacf7dfa24ae47fab8fcebfe4dc41ab9";
-
-    public static final String BUCKET_NAME = "4dkankan";
-}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 7340
4dkankan-common-mq/src/main/java/com/fdkankan/common/proto/BigSceneProto.java


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 4654
4dkankan-common-mq/src/main/java/com/fdkankan/common/proto/Common.java


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 4345
4dkankan-common-mq/src/main/java/com/fdkankan/common/proto/Visionmodeldata.java


+ 0 - 156
4dkankan-common-mq/src/main/java/com/fdkankan/common/proto/format/CouchDBFormat.java

@@ -1,156 +0,0 @@
-package com.fdkankan.common.proto.format;
-
-
-import com.google.protobuf.ExtensionRegistry;
-import com.google.protobuf.Message;
-import com.google.protobuf.UnknownFieldSet;
-
-import java.io.IOException;
-
-/**
- * Created by IntelliJ IDEA.
- * User: aantonov
- * Date: Mar 16, 2010
- * Time: 4:06:05 PM
- * To change this template use File | Settings | File Templates.
- */
-public class CouchDBFormat extends JsonFormat {
-
-    /**
-     * Outputs a textual representation of the Protocol Message supplied into the parameter output.
-     * (This representation is the new version of the classic "ProtocolPrinter" output from the
-     * original Protocol Buffer system)
-     */
-    public static void print(Message message, Appendable output) throws IOException {
-        CouchDBGenerator generator = new CouchDBGenerator(output);
-        generator.print("{");
-        print(message, generator);
-        generator.print("}");
-    }
-
-    /**
-     * Outputs a textual representation of {@code fields} to {@code output}.
-     */
-    public static void print(UnknownFieldSet fields, Appendable output) throws IOException {
-        CouchDBGenerator generator = new CouchDBGenerator(output);
-        generator.print("{");
-        printUnknownFields(fields, generator);
-        generator.print("}");
-    }
-
-    /**
-     * Like {@code print()}, but writes directly to a {@code String} and returns it.
-     */
-    public static String printToString(Message message) {
-        try {
-            StringBuilder text = new StringBuilder();
-            print(message, text);
-            return text.toString();
-        } catch (IOException e) {
-            throw new RuntimeException("Writing to a StringBuilder threw an IOException (should never happen).",
-                                       e);
-        }
-    }
-
-    /**
-     * Like {@code print()}, but writes directly to a {@code String} and returns it.
-     */
-    public static String printToString(UnknownFieldSet fields) {
-        try {
-            StringBuilder text = new StringBuilder();
-            print(fields, text);
-            return text.toString();
-        } catch (IOException e) {
-            throw new RuntimeException("Writing to a StringBuilder threw an IOException (should never happen).",
-                                       e);
-        }
-    }
-
-    /**
-     * Parse a text-format message from {@code input} and merge the contents into {@code builder}.
-     */
-    public static void merge(Readable input, Message.Builder builder) throws IOException {
-        merge(input, ExtensionRegistry.getEmptyRegistry(), builder);
-    }
-
-    /**
-     * Parse a text-format message from {@code input} and merge the contents into {@code builder}.
-     */
-    public static void merge(CharSequence input, Message.Builder builder) throws ParseException {
-        merge(input, ExtensionRegistry.getEmptyRegistry(), builder);
-    }
-
-    /**
-     * Parse a text-format message from {@code input} and merge the contents into {@code builder}.
-     * Extensions will be recognized if they are registered in {@code extensionRegistry}.
-     */
-    public static void merge(Readable input,
-                             ExtensionRegistry extensionRegistry,
-                             Message.Builder builder) throws IOException {
-        // Read the entire input to a String then parse that.
-
-        // If StreamTokenizer were not quite so crippled, or if there were a kind
-        // of Reader that could read in chunks that match some particular regex,
-        // or if we wanted to write a custom Reader to tokenize our stream, then
-        // we would not have to read to one big String. Alas, none of these is
-        // the case. Oh well.
-
-        merge(JsonFormat.toStringBuilder(input), extensionRegistry, builder);
-    }
-
-    /**
-     * Parse a text-format message from {@code input} and merge the contents into {@code builder}.
-     * Extensions will be recognized if they are registered in {@code extensionRegistry}.
-     */
-    public static void merge(CharSequence input,
-                             ExtensionRegistry extensionRegistry,
-                             Message.Builder builder) throws ParseException {
-        Tokenizer tokenizer = new Tokenizer(input);
-
-        // Based on the state machine @ http://json.org/
-
-        tokenizer.consume("{"); // Needs to happen when the object starts.
-        while (!tokenizer.tryConsume("}")) { // Continue till the object is done
-            JsonFormat.mergeField(tokenizer, extensionRegistry, builder);
-        }
-    }
-
-    protected static class Tokenizer extends JsonFormat.Tokenizer {
-
-        /**
-         * Construct a tokenizer that parses tokens from the given text.
-         */
-        public Tokenizer(CharSequence text) {
-            super(text);
-        }
-
-        @Override
-        public String consumeIdentifier() throws ParseException {
-            String id = super.consumeIdentifier();
-            if ("_id".equals(id)) {
-                return "id";
-            } else if ("_rev".equals(id)) {
-                return "rev";
-            }
-            return id;
-        }
-    }
-
-    protected static class CouchDBGenerator extends JsonGenerator {
-
-        public CouchDBGenerator(Appendable output) {
-            super(output);
-        }
-
-        @Override
-        public void print(CharSequence text) throws IOException {
-            if ("id".equals(text)) {
-                super.print("_id");
-            } else if ("rev".equals(text)) {
-                super.print("_rev");
-            } else {
-                super.print(text);
-            }
-        }
-    }
-}

+ 0 - 703
4dkankan-common-mq/src/main/java/com/fdkankan/common/proto/format/HtmlFormat.java

@@ -1,703 +0,0 @@
-package com.fdkankan.common.proto.format;
-/* 
-    Copyright (c) 2009, Orbitz World Wide
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without modification, 
-    are permitted provided that the following conditions are met:
-
-        * Redistributions of source code must retain the above copyright notice, 
-          this list of conditions and the following disclaimer.
-        * Redistributions in binary form must reproduce the above copyright notice, 
-          this list of conditions and the following disclaimer in the documentation 
-          and/or other materials provided with the distribution.
-        * Neither the name of the Orbitz World Wide nor the names of its contributors 
-          may be used to endorse or promote products derived from this software 
-          without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-import com.google.protobuf.ByteString;
-import com.google.protobuf.Descriptors.EnumValueDescriptor;
-import com.google.protobuf.Descriptors.FieldDescriptor;
-import com.google.protobuf.Message;
-import com.google.protobuf.UnknownFieldSet;
-
-import java.io.IOException;
-import java.math.BigInteger;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-/**
- * Provide ascii html formatting support for proto2 instances.
- * <p>
- * (c) 2009-10 Orbitz World Wide. All Rights Reserved.
- * 
- * @author eliran.bivas@gmail.com Eliran Bivas
- * @version $HtmlFormat.java Mar 12, 2009 4:00:33 PM$
- */
-public final class HtmlFormat {
-
-    private static final String META_CONTENT = "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />";
-    private static final String MAIN_DIV_STYLE = "color: black; font-size: 14px; font-family: sans-serif; font-weight: bolder; margin-bottom: 10px;";
-    private static final String FIELD_NAME_STYLE = "font-weight: bold; color: #669966;font-size: 14px; font-family: sans-serif;";
-    private static final String FIELD_VALUE_STYLE = "color: #3300FF;font-size: 13px; font-family: sans-serif;";
-
-    /**
-     * Outputs a textual representation of the Protocol Message supplied into the parameter output.
-     * (This representation is the new version of the classic "ProtocolPrinter" output from the
-     * original Protocol Buffer system)
-     */
-    public static void print(Message message, Appendable output) throws IOException {
-        HtmlGenerator generator = new HtmlGenerator(output);
-        printTitle(message, generator);
-        print(message, generator);
-        generator.print("</body></html>");
-    }
-
-    private static void printTitle(final Message message, final HtmlGenerator generator) throws IOException {
-        generator.print("<html><head>");
-        generator.print(META_CONTENT);
-        generator.print("<title>");
-        generator.print(message.getDescriptorForType().getFullName());
-        generator.print("</title></head><body>");
-        generator.print("<div style=\"");
-        generator.print(MAIN_DIV_STYLE);
-        generator.print("\">message : ");
-        generator.print(message.getDescriptorForType().getFullName());
-        generator.print("</div>");
-    }
-
-    /**
-     * Outputs a textual representation of {@code fields} to {@code output}.
-     */
-    public static void print(UnknownFieldSet fields, Appendable output) throws IOException {
-        HtmlGenerator generator = new HtmlGenerator(output);
-        generator.print("<html>");
-        generator.print(META_CONTENT);
-        generator.print("</head><body>");
-        printUnknownFields(fields, generator);
-        generator.print("</body></html>");
-    }
-
-    /**
-     * Like {@code print()}, but writes directly to a {@code String} and returns it.
-     */
-    public static String printToString(Message message) {
-        try {
-            StringBuilder text = new StringBuilder();
-            print(message, text);
-            return text.toString();
-        } catch (IOException e) {
-            throw new RuntimeException("Writing to a StringBuilder threw an IOException (should never happen).",
-                                       e);
-        }
-    }
-
-    /**
-     * Like {@code print()}, but writes directly to a {@code String} and returns it.
-     */
-    public static String printToString(UnknownFieldSet fields) {
-        try {
-            StringBuilder text = new StringBuilder();
-            print(fields, text);
-            return text.toString();
-        } catch (IOException e) {
-            throw new RuntimeException("Writing to a StringBuilder threw an IOException (should never happen).",
-                                       e);
-        }
-    }
-
-    private static void print(Message message, HtmlGenerator generator) throws IOException {
-
-        for (Map.Entry<FieldDescriptor, Object> field : message.getAllFields().entrySet()) {
-            printField(field.getKey(), field.getValue(), generator);
-        }
-        printUnknownFields(message.getUnknownFields(), generator);
-    }
-
-    public static void printField(FieldDescriptor field, Object value, HtmlGenerator generator) throws IOException {
-
-        if (field.isRepeated()) {
-            // Repeated field. Print each element.
-            for (Object element : (List<?>) value) {
-                printSingleField(field, element, generator);
-            }
-        } else {
-            printSingleField(field, value, generator);
-        }
-    }
-
-    private static void printSingleField(FieldDescriptor field,
-                                         Object value,
-                                         HtmlGenerator generator) throws IOException {
-        if (field.isExtension()) {
-            generator.print("[<span style=\"");
-            generator.print(FIELD_NAME_STYLE);
-            generator.print("\">");
-            // We special-case MessageSet elements for compatibility with proto1.
-            if (field.getContainingType().getOptions().getMessageSetWireFormat()
-                            && (field.getType() == FieldDescriptor.Type.MESSAGE) && (field.isOptional())
-                            // object equality
-                            && (field.getExtensionScope() == field.getMessageType())) {
-                generator.print(field.getMessageType().getFullName());
-            } else {
-                generator.print(field.getFullName());
-            }
-            generator.print("</span>]");
-        } else {
-            generator.print("<span style=\"");
-            generator.print(FIELD_NAME_STYLE);
-            generator.print("\">");
-            if (field.getType() == FieldDescriptor.Type.GROUP) {
-                // Groups must be serialized with their original capitalization.
-                generator.print(field.getMessageType().getName());
-            } else {
-                generator.print(field.getName());
-            }
-            generator.print("</span>");
-        }
-
-        if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) {
-            generator.print(" <span style=\"color: red;\">{</span><br/>");
-            generator.indent();
-        } else {
-            generator.print(": ");
-        }
-
-        printFieldValue(field, value, generator);
-
-        if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) {
-            generator.outdent();
-            generator.print("<span style=\"color: red;\">}</span>");
-        }
-        generator.print("<br/>");
-    }
-
-    private static void printFieldValue(FieldDescriptor field, Object value, HtmlGenerator generator) throws IOException {
-        generator.print("<span style=\"");
-        generator.print(FIELD_VALUE_STYLE);
-        generator.print("\">");
-        switch (field.getType()) {
-            case INT32:
-            case INT64:
-            case SINT32:
-            case SINT64:
-            case SFIXED32:
-            case SFIXED64:
-            case FLOAT:
-            case DOUBLE:
-            case BOOL:
-                // Good old toString() does what we want for these types.
-                generator.print(value.toString());
-                break;
-
-            case UINT32:
-            case FIXED32:
-                generator.print(unsignedToString((Integer) value));
-                break;
-
-            case UINT64:
-            case FIXED64:
-                generator.print(unsignedToString((Long) value));
-                break;
-
-            case STRING:
-                generator.print("\"");
-                generator.print(value.toString());
-                generator.print("\"");
-                break;
-
-            case BYTES: {
-                generator.print("\"");
-                generator.print(escapeBytes((ByteString) value));
-                generator.print("\"");
-                break;
-            }
-
-            case ENUM: {
-                generator.print(((EnumValueDescriptor) value).getName());
-                break;
-            }
-
-            case MESSAGE:
-            case GROUP:
-                print((Message) value, generator);
-                break;
-        }
-        generator.print("</span>");
-    }
-
-    private static void printUnknownFields(UnknownFieldSet unknownFields, HtmlGenerator generator) throws IOException {
-        for (Map.Entry<Integer, UnknownFieldSet.Field> entry : unknownFields.asMap().entrySet()) {
-            UnknownFieldSet.Field field = entry.getValue();
-
-            for (long value : field.getVarintList()) {
-                generator.print(entry.getKey().toString());
-                generator.print(": ");
-                generator.print(unsignedToString(value));
-                generator.print("<br/>");
-            }
-            for (int value : field.getFixed32List()) {
-                generator.print(entry.getKey().toString());
-                generator.print(": ");
-                generator.print(String.format((Locale) null, "0x%08x", value));
-                generator.print("<br/>");
-            }
-            for (long value : field.getFixed64List()) {
-                generator.print(entry.getKey().toString());
-                generator.print(": ");
-                generator.print(String.format((Locale) null, "0x%016x", value));
-                generator.print("<br/>");
-            }
-            for (ByteString value : field.getLengthDelimitedList()) {
-                generator.print(entry.getKey().toString());
-                generator.print(": \"");
-                generator.print(escapeBytes(value));
-                generator.print("\"<br/>");
-            }
-            for (UnknownFieldSet value : field.getGroupList()) {
-                generator.print(entry.getKey().toString());
-                generator.print(" <span style=\"color: red;\">{</span><br/>");
-                generator.indent();
-                printUnknownFields(value, generator);
-                generator.outdent();
-                generator.print("<span style=\"color: red;\">}</span><br/>");
-            }
-        }
-    }
-
-    /**
-     * Convert an unsigned 32-bit integer to a string.
-     */
-    private static String unsignedToString(int value) {
-        if (value >= 0) {
-            return Integer.toString(value);
-        } else {
-            return Long.toString((value) & 0x00000000FFFFFFFFL);
-        }
-    }
-
-    /**
-     * Convert an unsigned 64-bit integer to a string.
-     */
-    private static String unsignedToString(long value) {
-        if (value >= 0) {
-            return Long.toString(value);
-        } else {
-            // Pull off the most-significant bit so that BigInteger doesn't think
-            // the number is negative, then set it again using setBit().
-            return BigInteger.valueOf(value & 0x7FFFFFFFFFFFFFFFL).setBit(63).toString();
-        }
-    }
-
-    /**
-     * An inner class for writing text to the output stream.
-     */
-    static private final class HtmlGenerator {
-
-        Appendable output;
-        boolean atStartOfLine = true;
-
-        public HtmlGenerator(Appendable output) {
-            this.output = output;
-        }
-
-        /**
-         * Indent text by two spaces. After calling Indent(), two spaces will be inserted at the
-         * beginning of each line of text. Indent() may be called multiple times to produce deeper
-         * indents.
-         * 
-         * @throws IOException
-         */
-        public void indent() throws IOException {
-            print("<div style=\"margin-left: 25px\">");
-        }
-
-        /**
-         * Reduces the current indent level by two spaces, or crashes if the indent level is zero.
-         * 
-         * @throws IOException
-         */
-        public void outdent() throws IOException {
-            print("</div>");
-        }
-
-        /**
-         * Print text to the output stream.
-         */
-        public void print(CharSequence text) throws IOException {
-            int size = text.length();
-            int pos = 0;
-
-            for (int i = 0; i < size; i++) {
-                if (text.charAt(i) == '\n') {
-                    write("<br/>", i - pos + 1);
-                    pos = i + 1;
-                    atStartOfLine = true;
-                }
-            }
-            write(text.subSequence(pos, size), size - pos);
-        }
-
-        private void write(CharSequence data, int size) throws IOException {
-            if (size == 0) {
-                return;
-            }
-            if (atStartOfLine) {
-                atStartOfLine = false;
-            }
-            output.append(data);
-        }
-    }
-
-    // =================================================================
-    // Utility functions
-    //
-    // Some of these methods are package-private because Descriptors.java uses
-    // them.
-
-    /**
-     * Escapes bytes in the format used in protocol buffer text format, which is the same as the
-     * format used for C string literals. All bytes that are not printable 7-bit ASCII characters
-     * are escaped, as well as backslash, single-quote, and double-quote characters. Characters for
-     * which no defined short-hand escape sequence is defined will be escaped using 3-digit octal
-     * sequences.
-     */
-    static String escapeBytes(ByteString input) {
-        StringBuilder builder = new StringBuilder(input.size());
-        for (int i = 0; i < input.size(); i++) {
-            byte b = input.byteAt(i);
-            switch (b) {
-                // Java does not recognize \a or \v, apparently.
-                case 0x07:
-                    builder.append("\\a");
-                    break;
-                case '\b':
-                    builder.append("\\b");
-                    break;
-                case '\f':
-                    builder.append("\\f");
-                    break;
-                case '\n':
-                    builder.append("\\n");
-                    break;
-                case '\r':
-                    builder.append("\\r");
-                    break;
-                case '\t':
-                    builder.append("\\t");
-                    break;
-                case 0x0b:
-                    builder.append("\\v");
-                    break;
-                case '\\':
-                    builder.append("\\\\");
-                    break;
-                case '\'':
-                    builder.append("\\\'");
-                    break;
-                case '"':
-                    builder.append("\\\"");
-                    break;
-                default:
-                    if (b >= 0x20) {
-                        builder.append((char) b);
-                    } else {
-                        builder.append('\\');
-                        builder.append((char) ('0' + ((b >>> 6) & 3)));
-                        builder.append((char) ('0' + ((b >>> 3) & 7)));
-                        builder.append((char) ('0' + (b & 7)));
-                    }
-                    break;
-            }
-        }
-        return builder.toString();
-    }
-
-    /**
-     * Un-escape a byte sequence as escaped using
-     * {@link #escapeBytes(com.googlecode.protobuf.format.ByteString)}. Two-digit hex escapes (starting with
-     * "\x") are also recognized.
-     */
-    static ByteString unescapeBytes(CharSequence input) throws InvalidEscapeSequence {
-        byte[] result = new byte[input.length()];
-        int pos = 0;
-        for (int i = 0; i < input.length(); i++) {
-            char c = input.charAt(i);
-            if (c == '\\') {
-                if (i + 1 < input.length()) {
-                    ++i;
-                    c = input.charAt(i);
-                    if (isOctal(c)) {
-                        // Octal escape.
-                        int code = digitValue(c);
-                        if ((i + 1 < input.length()) && isOctal(input.charAt(i + 1))) {
-                            ++i;
-                            code = code * 8 + digitValue(input.charAt(i));
-                        }
-                        if ((i + 1 < input.length()) && isOctal(input.charAt(i + 1))) {
-                            ++i;
-                            code = code * 8 + digitValue(input.charAt(i));
-                        }
-                        result[pos++] = (byte) code;
-                    } else {
-                        switch (c) {
-                            case 'a':
-                                result[pos++] = 0x07;
-                                break;
-                            case 'b':
-                                result[pos++] = '\b';
-                                break;
-                            case 'f':
-                                result[pos++] = '\f';
-                                break;
-                            case 'n':
-                                result[pos++] = '\n';
-                                break;
-                            case 'r':
-                                result[pos++] = '\r';
-                                break;
-                            case 't':
-                                result[pos++] = '\t';
-                                break;
-                            case 'v':
-                                result[pos++] = 0x0b;
-                                break;
-                            case '\\':
-                                result[pos++] = '\\';
-                                break;
-                            case '\'':
-                                result[pos++] = '\'';
-                                break;
-                            case '"':
-                                result[pos++] = '\"';
-                                break;
-
-                            case 'x':
-                                // hex escape
-                                int code = 0;
-                                if ((i + 1 < input.length()) && isHex(input.charAt(i + 1))) {
-                                    ++i;
-                                    code = digitValue(input.charAt(i));
-                                } else {
-                                    throw new InvalidEscapeSequence("Invalid escape sequence: '\\x' with no digits");
-                                }
-                                if ((i + 1 < input.length()) && isHex(input.charAt(i + 1))) {
-                                    ++i;
-                                    code = code * 16 + digitValue(input.charAt(i));
-                                }
-                                result[pos++] = (byte) code;
-                                break;
-
-                            default:
-                                throw new InvalidEscapeSequence("Invalid escape sequence: '\\" + c
-                                                                + "'");
-                        }
-                    }
-                } else {
-                    throw new InvalidEscapeSequence("Invalid escape sequence: '\\' at end of string.");
-                }
-            } else {
-                result[pos++] = (byte) c;
-            }
-        }
-
-        return ByteString.copyFrom(result, 0, pos);
-    }
-
-    /**
-     * Thrown by {@link JsonFormat#unescapeBytes} and {@link JsonFormat#unescapeText} when an
-     * invalid escape sequence is seen.
-     */
-    static class InvalidEscapeSequence extends IOException {
-
-        private static final long serialVersionUID = 1L;
-
-        public InvalidEscapeSequence(String description) {
-            super(description);
-        }
-    }
-
-    /**
-     * Like {@link #escapeBytes(com.googlecode.protobuf.format.ByteString)}, but escapes a text string.
-     * Non-ASCII characters are first encoded as UTF-8, then each byte is escaped individually as a
-     * 3-digit octal escape. Yes, it's weird.
-     */
-    static String escapeText(String input) {
-        return escapeBytes(ByteString.copyFromUtf8(input));
-    }
-
-    /**
-     * Un-escape a text string as escaped using {@link #escapeText(String)}. Two-digit hex escapes
-     * (starting with "\x") are also recognized.
-     */
-    static String unescapeText(String input) throws InvalidEscapeSequence {
-        return unescapeBytes(input).toStringUtf8();
-    }
-
-    /**
-     * Is this an octal digit?
-     */
-    private static boolean isOctal(char c) {
-        return ('0' <= c) && (c <= '7');
-    }
-
-    /**
-     * Is this a hex digit?
-     */
-    private static boolean isHex(char c) {
-        return (('0' <= c) && (c <= '9')) || (('a' <= c) && (c <= 'f'))
-        || (('A' <= c) && (c <= 'F'));
-    }
-
-    /**
-     * Interpret a character as a digit (in any base up to 36) and return the numeric value. This is
-     * like {@code Character.digit()} but we don't accept non-ASCII digits.
-     */
-    private static int digitValue(char c) {
-        if (('0' <= c) && (c <= '9')) {
-            return c - '0';
-        } else if (('a' <= c) && (c <= 'z')) {
-            return c - 'a' + 10;
-        } else {
-            return c - 'A' + 10;
-        }
-    }
-
-    /**
-     * Parse a 32-bit signed integer from the text. Unlike the Java standard {@code
-     * Integer.parseInt()}, this function recognizes the prefixes "0x" and "0" to signify
-     * hexidecimal and octal numbers, respectively.
-     */
-    static int parseInt32(String text) throws NumberFormatException {
-        return (int) parseInteger(text, true, false);
-    }
-
-    /**
-     * Parse a 32-bit unsigned integer from the text. Unlike the Java standard {@code
-     * Integer.parseInt()}, this function recognizes the prefixes "0x" and "0" to signify
-     * hexidecimal and octal numbers, respectively. The result is coerced to a (signed) {@code int}
-     * when returned since Java has no unsigned integer type.
-     */
-    static int parseUInt32(String text) throws NumberFormatException {
-        return (int) parseInteger(text, false, false);
-    }
-
-    /**
-     * Parse a 64-bit signed integer from the text. Unlike the Java standard {@code
-     * Integer.parseInt()}, this function recognizes the prefixes "0x" and "0" to signify
-     * hexidecimal and octal numbers, respectively.
-     */
-    static long parseInt64(String text) throws NumberFormatException {
-        return parseInteger(text, true, true);
-    }
-
-    /**
-     * Parse a 64-bit unsigned integer from the text. Unlike the Java standard {@code
-     * Integer.parseInt()}, this function recognizes the prefixes "0x" and "0" to signify
-     * hexidecimal and octal numbers, respectively. The result is coerced to a (signed) {@code long}
-     * when returned since Java has no unsigned long type.
-     */
-    static long parseUInt64(String text) throws NumberFormatException {
-        return parseInteger(text, false, true);
-    }
-
-    private static long parseInteger(String text, boolean isSigned, boolean isLong) throws NumberFormatException {
-        int pos = 0;
-
-        boolean negative = false;
-        if (text.startsWith("-", pos)) {
-            if (!isSigned) {
-                throw new NumberFormatException("Number must be positive: " + text);
-            }
-            ++pos;
-            negative = true;
-        }
-
-        int radix = 10;
-        if (text.startsWith("0x", pos)) {
-            pos += 2;
-            radix = 16;
-        } else if (text.startsWith("0", pos)) {
-            radix = 8;
-        }
-
-        String numberText = text.substring(pos);
-
-        long result = 0;
-        if (numberText.length() < 16) {
-            // Can safely assume no overflow.
-            result = Long.parseLong(numberText, radix);
-            if (negative) {
-                result = -result;
-            }
-
-            // Check bounds.
-            // No need to check for 64-bit numbers since they'd have to be 16 chars
-            // or longer to overflow.
-            if (!isLong) {
-                if (isSigned) {
-                    if ((result > Integer.MAX_VALUE) || (result < Integer.MIN_VALUE)) {
-                        throw new NumberFormatException("Number out of range for 32-bit signed integer: "
-                                                        + text);
-                    }
-                } else {
-                    if ((result >= (1L << 32)) || (result < 0)) {
-                        throw new NumberFormatException("Number out of range for 32-bit unsigned integer: "
-                                                        + text);
-                    }
-                }
-            }
-        } else {
-            BigInteger bigValue = new BigInteger(numberText, radix);
-            if (negative) {
-                bigValue = bigValue.negate();
-            }
-
-            // Check bounds.
-            if (!isLong) {
-                if (isSigned) {
-                    if (bigValue.bitLength() > 31) {
-                        throw new NumberFormatException("Number out of range for 32-bit signed integer: "
-                                                        + text);
-                    }
-                } else {
-                    if (bigValue.bitLength() > 32) {
-                        throw new NumberFormatException("Number out of range for 32-bit unsigned integer: "
-                                                        + text);
-                    }
-                }
-            } else {
-                if (isSigned) {
-                    if (bigValue.bitLength() > 63) {
-                        throw new NumberFormatException("Number out of range for 64-bit signed integer: "
-                                                        + text);
-                    }
-                } else {
-                    if (bigValue.bitLength() > 64) {
-                        throw new NumberFormatException("Number out of range for 64-bit unsigned integer: "
-                                                        + text);
-                    }
-                }
-            }
-
-            result = bigValue.longValue();
-        }
-
-        return result;
-    }
-}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1603
4dkankan-common-mq/src/main/java/com/fdkankan/common/proto/format/JsonFormat.java


+ 0 - 602
4dkankan-common-mq/src/main/java/com/fdkankan/common/utils/CreateObjUtil.java

@@ -1,602 +0,0 @@
-package com.fdkankan.common.utils;
-
-import com.fdkankan.common.constant.ConstantFileName;
-import com.fdkankan.common.constant.ConstantFilePath;
-import com.fdkankan.common.proto.BigSceneProto;
-import com.fdkankan.common.proto.Common;
-import com.fdkankan.common.proto.Visionmodeldata;
-import com.fdkankan.common.proto.format.JsonFormat;
-import com.google.protobuf.TextFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.util.StopWatch;
-
-import java.io.*;
-import java.util.HashMap;
-import java.util.Map;
-
-public class CreateObjUtil {
-
-	private static Logger log = LoggerFactory.getLogger(CreateObjUtil.class);
-
-	public void saveuploadImgs(String folderName) throws IOException, Exception
-	{
-		log.info("开始计算");
-		String command = "bash /home/ubuntu/photoscan-pro/build_model.sh "+folderName;
-		callshell(command);
-		boolean flag = false;
-		String sPath =  ConstantFilePath.CREATE_MODEL_PATH+folderName+File.separator+"mesh"+File.separator+"mesh.obj";
-		while(!flag)
-		{
-			flag = isModel(sPath,folderName);
-		}
-		log.info("计算完毕");
-	}
-	
-	public void saveuploadImgs2(String folderName) throws IOException, Exception
-	{
-		log.info("开始计算");
-		String command = "bash /home/ubuntu/photoscan-pro/build_bigscene.sh "+folderName;
-		callshell(command);
-		boolean flag = false;
-		String sPath = ConstantFilePath.CREATE_BIG_SCENE_PATH+folderName+File.separator+"mesh"+File.separator+"mesh.obj";
-		while(!flag)
-		{
-			flag = isModel(sPath,folderName);
-		}
-		log.info("计算完毕");
-		log.info("obj和camera转换成大场景要的格式");
-		convertobjTotxt( folderName);
-		
-	}
-
-	//开始建模
-	public static void unRar(String rarPath,String dataPath) throws Exception{
-		log.info("解压rar开始");
-		String command = "unrar e " + rarPath + " " + dataPath;
-		callshell(command);
-		log.info("解压rar完毕:" + command);
-	}
-
-	public static void unZip(String zipPath,String dataPath) throws Exception{
-		log.info("解压zip开始");
-		String command = "unzip -O GBK/GB18030CP936 " + zipPath + " -d " + dataPath;
-		callshell(command);
-		log.info("解压zip完毕:" + command);
-	}
-
-	//开始建模
-	public static void build3dModel(String folderName,String isModel) throws Exception{
-		log.info("开始建模");
-		String command = ConstantCmd.BUILD_MODEL_COMMAND+folderName;
-		callshell(command);
-		log.info("计算完毕:" + command);
-	}
-
-	//开始建模
-	public static void build3dModel2(String folderName,String isModel) throws Exception{
-		log.info("开始建模");
-		String command = ConstantCmd.BUILD_MODEL_COMMAND2+folderName;
-		callshell(command);
-		log.info("计算完毕:" + command);
-	}
-
-	//开始建模
-	public static void build3dModelOld(String folderName,String isModel) throws Exception{
-		log.info("开始v2建模");
-		String command = ConstantCmd.BUILD_MODEL_OLD_COMMAND+folderName;
-		callshell(command);
-		log.info("计算v2完毕:" + command);
-	}
-
-	//开始建模
-	public static void translateHoustfloorJSONFile(String filePath,String outputPath) throws Exception{
-		log.info("开始转换houst_floor.json");
-		String command = ConstantCmd.TRANSLATE_HOUST_FLOOR + filePath + " " + outputPath;
-		callshell(command);
-		log.info("转换houst_floor.json 结束");
-	}
-
-	//激光相机复制资源
-	public static void cpfile(String filepathOld,String filepathNew) throws Exception{
-		log.info("开始复制");
-		String command = ConstantCmd.CP_JG_EXTRA+ " " + filepathOld + " " + filepathNew;
-		callshell(command);
-		log.info("复制完毕:" + command);
-	}
-
-
-	//激光相机复制资源laser下的全部资源
-	public static void cplaserfile(String filepathOld,String filepathNew) throws Exception{
-		log.info("开始复制");
-		String command = ConstantCmd.CP_JG_ALL+ " " + filepathOld + " " + filepathNew;
-		callshell(command);
-		log.info("复制完毕:" + command);
-	}
-	
-	//开始建模
-	public void build3dModelSFM(String folderName,String isModel) throws Exception{
-		log.info("开始建模");
-		String command = ConstantCmd.BUILD_MODEL_SFM_COMMAND+folderName+" "+isModel;
-		callshell(command);
-		log.info("计算完毕");
-	}
-
-	//obj文件转换问txt
-	public static void objToTxt(String folderName,String isModel) throws Exception{
-		log.info("obj2txt开始转换");
-		String command = ConstantCmd.OBJ_TO_TXT+folderName;
-		callshell(command);
-		log.info("转换完毕:" + command);
-	}
-
-	public void rebuildModelFllor(String folderName, String isModel) {
-		try{
-			log.info("开始建模");
-			String command = ConstantCmd.REBUILD_MODEL_FLLOR+folderName+" "+isModel;
-			callshell(command);
-			log.info("计算完毕");
-		}
-		catch(Exception e)
-		{
-			e.printStackTrace();
-		}
-	}
-
-	//切图
-	public void cutImgs(String[] imgNames ,String folderName)
-	{
-		try{
-			log.info("开始切图");
-			for(int i=0;i<imgNames.length;++i)
-			{
-				String imgName=imgNames[i].replace(".jpg", "");
-				String command = ConstantCmd.CUT_IMG_COMMAND+folderName+" "+imgName;
-				callshell(command);
-			}
-			log.info("切图完毕");
-		}
-		catch(Exception e)
-		{
-			e.printStackTrace();
-		}
-	}
-	
-	//调整切图
-	public void adjustImgs(String folderName)
-	{
-		try{
-			String command = ConstantCmd.ADJUST_IMG_COMMAND + folderName;
-			log.info("开始调整图片");
-			callshell(command);
-			log.info("调整图片完毕");
-		}
-		catch(Exception e)
-		{
-			e.printStackTrace();
-		}
-	}
-	
-	//obj和camera转换成大场景要的格式
-	public void convertobjTotxt(String folderName) throws Exception
-	{
-		//obj
-		String command = "/home/ubuntu/photoscan-pro/main/mesh/mesh "+folderName;
-		callshell(command);
-		//camera
-		command = "/home/ubuntu/photoscan-pro/main/read_camera/read_camera "+folderName;
-		callshell(command);
-		
-		String prefix = ConstantFilePath.CREATE_BIG_SCENE_PATH+folderName+File.separator+"data"+File.separator;
-		String srcpath = prefix +"mesh.txt";
-		String despath = prefix +"dacf7dfa24ae47fab8fcebfe4dc41ab9_50k.dam";
-				
-		convertTxtToDam( srcpath, despath);
-		//dam转换成lzma
-		command = "lzma /home/ubuntu/photo_data/bigscene/"+folderName+"/data/dacf7dfa24ae47fab8fcebfe4dc41ab9_50k.dam";
-		callshell(command);
-		
-		srcpath = prefix +"vision.txt";
-		despath = prefix +"vision.modeldata";
-		convertTxtToVisionmodeldata( srcpath, despath);
-	}
-
-	public static void convertDamToLzma(String folderName)throws Exception
-	{
-		try
-		{
-			String command = "lzma "+ folderName+File.separator+ ConstantFileName.modelUUID+"_50k.dam";
-			log.info("开始转换lzma");
-			callshell(command);
-			log.info("转换lzma完毕");
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-			e.printStackTrace(new PrintWriter(trace));
-			log.error(trace.toString());
-		}
-
-	}
-
-	public static void convertDamToLzma2(String folderName)throws Exception
-	{
-		try
-		{
-			String command = "lzma "+ folderName+File.separator+ ConstantFileName.modelUUID+"_50k2.dam";
-			log.info("开始转换lzma");
-			callshell(command);
-			log.info("转换lzma完毕");
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-			e.printStackTrace(new PrintWriter(trace));
-			log.error(trace.toString());
-		}
-
-	}
-	
-	public static void convertTxtToDam(String srcpath,String despath)throws Exception
-	{
-			BigSceneProto.binary_mesh.Builder builder= BigSceneProto.binary_mesh.newBuilder();
-			InputStream inputStream = new FileInputStream(srcpath);
-			InputStreamReader reader = new InputStreamReader(inputStream, "ASCII");
-			TextFormat.merge(reader, builder);
-			byte[] buf= builder.build().toByteArray();
-			
-			 //把序列化后的数据写入本地磁盘  
-	        ByteArrayInputStream stream = new ByteArrayInputStream(buf);  
-	        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(despath));//设置输出路径  
-	        BufferedInputStream bis = new BufferedInputStream(stream);  
-	        int b = -1;  
-	        while ((b = bis.read()) != -1) {  
-	            bos.write(b);  
-	        }  
-	        bis.close();  
-	        bos.close();
-	}
-	
-	public static void convertVisionmodeldataToTxt(String srcpath,String despath)throws Exception
-	{
-		try
-		{
-			File file = new File(srcpath); 
-			FileInputStream fis=new FileInputStream(file);
-
-			Visionmodeldata.NavigationInfo data_NavigationInfo = Visionmodeldata.NavigationInfo.parseFrom(fis);
-	
-			//PrintStream out = new PrintStream(despath); 
-			String jsonFormat1 = JsonFormat.printToString(data_NavigationInfo);
-			ByteArrayInputStream stream = new ByteArrayInputStream(jsonFormat1.getBytes());  
-	        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(despath));//设置输出路径  
-	        BufferedInputStream bis = new BufferedInputStream(stream);  
-	        int b = -1;  
-	        while ((b = bis.read()) != -1) {  
-	           bos.write(b);  
-	        }  
-			//out.close();
-	        bis.close();  
-	        bos.close(); 
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-	        e.printStackTrace(new PrintWriter(trace));
-	        log.error(trace.toString());
-		}
-	}
-	
-	public static void convertTxtToVisionmodeldata(String srcpath,String despath)throws Exception
-	{
-		try
-		{
-			Visionmodeldata.NavigationInfo.Builder builder = Visionmodeldata.NavigationInfo.newBuilder();
-			String jsonFormat = readTxtFileToJson(srcpath);
-			JsonFormat.merge(jsonFormat, builder);
-			byte[] buf= builder.build().toByteArray();
-			
-			 //把序列化后的数据写入本地磁盘  
-	        ByteArrayInputStream stream = new ByteArrayInputStream(buf);  
-	        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(despath));//设置输出路径  
-	        BufferedInputStream bis = new BufferedInputStream(stream);  
-	        int b = -1;  
-	        while ((b = bis.read()) != -1) {  
-	           bos.write(b);  
-	        }  
-	        bis.close();  
-	        bos.close(); 
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-	        e.printStackTrace(new PrintWriter(trace));
-	        log.error(trace.toString());
-		}
-	}
-
-	public static void convertVisionmodeldataToTxtCommon(String srcpath,String despath)throws Exception
-	{
-		try
-		{
-			File file = new File(srcpath);
-			FileInputStream fis=new FileInputStream(file);
-
-			Common.NavigationInfo data_NavigationInfo = Common.NavigationInfo.parseFrom(fis);
-
-			//PrintStream out = new PrintStream(despath);
-			String jsonFormat1 = JsonFormat.printToString(data_NavigationInfo);
-			ByteArrayInputStream stream = new ByteArrayInputStream(jsonFormat1.getBytes());
-			BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(despath));//设置输出路径
-			BufferedInputStream bis = new BufferedInputStream(stream);
-			int b = -1;
-			while ((b = bis.read()) != -1) {
-				bos.write(b);
-			}
-			//out.close();
-			bis.close();
-			bos.close();
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-			e.printStackTrace(new PrintWriter(trace));
-			log.error(trace.toString());
-		}
-	}
-
-	public static void convertTxtToVisionmodeldataCommon(String srcpath,String despath)throws Exception
-	{
-		try
-		{
-			Common.NavigationInfo.Builder builder = Common.NavigationInfo.newBuilder();
-			String jsonFormat = readTxtFileToJson(srcpath);
-			JsonFormat.merge(jsonFormat, builder);
-			byte[] buf= builder.build().toByteArray();
-
-			//把序列化后的数据写入本地磁盘
-			ByteArrayInputStream stream = new ByteArrayInputStream(buf);
-			BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(despath));//设置输出路径
-			BufferedInputStream bis = new BufferedInputStream(stream);
-			int b = -1;
-			while ((b = bis.read()) != -1) {
-				bos.write(b);
-			}
-			bis.close();
-			bos.close();
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-			e.printStackTrace(new PrintWriter(trace));
-			log.error(trace.toString());
-		}
-	}
-	
-	public static void callshell(String command)
-	{ 
-        try {
-			 StopWatch stopWatch = new StopWatch();
-			 stopWatch.start();
-			 Process process = Runtime.getRuntime().exec(command);
-        	 StreamGobbler errorGobbler = new StreamGobbler(process.getErrorStream(), "ERROR");
-             errorGobbler.start();  
-             StreamGobbler outGobbler = new StreamGobbler(process.getInputStream(), "STDOUT");  
-             outGobbler.start();  
-             process.waitFor();
-			log.info("脚本{}执行完毕,用时:{}",command,stopWatch.toString());
-        } catch (Exception e) {  
-            e.printStackTrace();  
-        }  
-	}
-	
-	public static int doWaitFor(Process process) {
-		  InputStream in = null;
-		  InputStream err = null;
-		  int exitValue = -1; // returned to caller when p is finished
-		  try {
-		    in = process.getInputStream();
-		    err = process.getErrorStream();
-		    boolean finished = false; // Set to true when p is finished
-		    while (!finished) {
-		      try {
-		        while (in.available() > 0) {
-		          // Print the output of our system call
-		          Character c = new Character((char) in.read());
-		          System.out.print(c);
-		        }
-		        while (err.available() > 0) {
-		          // Print the output of our system call
-		          Character c = new Character((char) err.read());
-		          System.out.print(c);
-		        }
-		        // Ask the process for its exitValue. If the process
-		        // is not finished, an IllegalThreadStateException
-		        // is thrown. If it is finished, we fall through and
-		        // the variable finished is set to true.
-		        exitValue = process.exitValue();
-		        finished = true;
-		      } catch (IllegalThreadStateException e) {
-		        // Process is not finished yet;
-		        // Sleep a little to save on CPU cycles
-		        Thread.currentThread().sleep(500);
-		      }
-		    }
-		  } catch (Exception e) {
-		    e.printStackTrace();
-		  } finally {
-		    try {
-		      if (in != null) {
-		        in.close();
-		      }
-		    } catch (IOException e) {
-		      e.printStackTrace();
-		    }
-		    if (err != null) {
-		      try {
-		        err.close();
-		      } catch (IOException e) {
-		        e.printStackTrace();
-		      }
-		    }
-		  }
-		  return exitValue;
-		}
-
-	
-	private boolean isModel(String sPath,String folderName)
-	{
-		boolean flag = false;  
-		File file = new File(sPath);  
-	    if (file.isFile() && file.exists()) {  
-	        flag = true;  
-	    }  
-	    log.info("等待...");
-	    return flag;  
-	}
-	
-	public static String readTxtFileToJson(String filePath){
-        try { 
-                String encoding="UTF-8"; 
-                File file=new File(filePath); 
-                if(file.isFile() && file.exists()){ 
-                    InputStreamReader read = new InputStreamReader( 
-                    new FileInputStream(file),encoding);
-                    BufferedReader bufferedReader = new BufferedReader(read); 
-                    String lineTxt = null; 
-                    String result="";
-                    while((lineTxt = bufferedReader.readLine()) != null){ 
-                    	result+=lineTxt;
-                        //log.info(lineTxt); 
-                    } 
-                    read.close(); 
-                    return result;
-        }else{ 
-            return null;
-        } 
-        } catch (Exception e) { 
-            e.printStackTrace(); 
-            return null;
-        } 
-      
-    }
-	
-	public Map<String,String> getAllFile(String dPath,String prefix)
-	{
-		File dirFile = new File(dPath);
-	    if (!dirFile.isDirectory()) {
-        }
-	    Map<String,String> map = new HashMap<String,String>();
-	    File[] files = dirFile.listFiles();
-	    for (int i = 0; i < files.length; i++) {
-            if (files[i].isFile()) {
-            	String path = files[i].getPath();
-            	map.put(path, prefix+path.substring(path.lastIndexOf("/")+1));
-            }
-        }
-	    return map;
-	}
-	
-	public Map<String,String> getchildFile(String dPath,String prefix,String childname)
-	{
-		File dirFile = new File(dPath+File.separator+childname);
-	    if (!dirFile.isDirectory()) {
-	    	return null;
-        }
-	    Map<String,String> map = new HashMap<String,String>();
-	    File[] files = dirFile.listFiles();
-	    for (int i = 0; i < files.length; i++) {
-            if (files[i].isFile()) {
-            	String path = files[i].getPath();
-            	map.put(path, prefix+childname+path.substring(path.lastIndexOf("/")));
-            }
-        }
-	    return map;
-	}
-	
-	//转台拼图
-	public void buildPanoramicImgs(String folderName)throws Exception
-	{
-		String command = ConstantCmd.BUILD_PANORAMA + folderName;
-		log.info("开始拼全景图");
-		callshell(command);
-		log.info("全景图拼接完毕");
-	}
-	
-	//六目拼图、切图,计算
-	public void buildForSix(String folderName)throws Exception
-	{
-		String command = ConstantCmd.BUILD_FOR_SIX + folderName;
-		log.info("开始处理数据(六目)");
-		callshell(command);
-		log.info("数据处理完毕(六目)");
-	}
-
-	public static void createSoftConnection(String source, String target) {
-		String command = "ln -s " + source + " " + target;
-		log.info("开始创建文件夹软连接");
-		callshell(command);
-		log.info("数据处理完毕(六目):" + command);
-	}
-
-	//合并音频
-	public static void mergeVideo(String oldVideo , String newVideo, String targetVideo) throws Exception{
-		String command = ConstantCmd.MERGE_VIDEO + " " + oldVideo + " " + newVideo + " " + targetVideo + " -y";
-		log.info("开始合并视频");
-		callshell(command);
-		log.info("合并视频完毕:" + command);
-	}
-
-	//生成一段静音音频
-	public static void createMuteViode(double time , String targetVideo) throws Exception{
-		String command = ConstantCmd.CREATE_MUTE_VIDEO + " " + time + " " + targetVideo + " -y";
-		log.info("开始生成一段静音音频");
-		callshell(command);
-		log.info("生成一段静音音频完毕:" + command);
-	}
-
-	//mp4文件转换成flv文件
-	public static void mp4ToFlv(String oldVideo, String newVideo) throws Exception{
-		String command = ConstantCmd.MP4_TO_FLV + " " + oldVideo + " " + newVideo;
-		log.info("mp4文件转换成flv文件");
-		callshell(command);
-		log.info("mp4文件转换成flv文件完毕:" + command);
-	}
-
-	//删除/mnt/data/下的数据
-	public static void deleteFile(String filePath) throws Exception{
-		String command = ConstantCmd.DELETE_FILE + " " + filePath;
-		log.info("删除/mnt/data/下的数据");
-		callshell(command);
-		log.info("删除/mnt/data/下的数据完毕:" + command);
-	}
-
-	public static void ossUtilCp(String fileUrl , String path) throws Exception{
-		String command = ConstantCmd.OSS_UTIL_CP + " " + fileUrl + " " + path;
-		Long start = System.currentTimeMillis();
-		log.info("开始oss下载文件:" + command);
-		callshell(command);
-		log.info("oss下载文件完成,时间为:" + (System.currentTimeMillis() - start));
-	}
-
-	public static void ossFileCp(String fileUrl , String path) throws Exception{
-		String command = ConstantCmd.OSS_FILE_CP + " " + fileUrl + " " + path;
-		Long start = System.currentTimeMillis();
-		log.info("开始s3文件下载文件:" + command);
-		callshell(command);
-		log.info("s3文件下载文件完成,时间为:" + (System.currentTimeMillis() - start));
-	}
-
-	/**
-	 * matterpro场景获取阿里云的切图数据
-	 * @param path
-	 * @throws Exception
-     */
-	public static void matterproCutImg(String num , String path) throws Exception{
-		String command = ConstantCmd.MATTERPRO_CUT_IMG + " -s " + num + " -d " + path;
-		Long start = System.currentTimeMillis();
-		log.info("开始matterpro获取阿里云图片方法:" + command);
-		callshell(command);
-		log.info("matterpro获取阿里云图片方法完成,时间为:" + (System.currentTimeMillis() - start));
-	}
-}

+ 0 - 61
4dkankan-common-mq/src/main/java/com/fdkankan/common/utils/StreamGobbler.java

@@ -1,61 +0,0 @@
-package com.fdkankan.common.utils;
-
-import java.io.*;
-
-public class StreamGobbler extends Thread {
-
-	InputStream is;  
-    String type;  
-    OutputStream os;  
-
-    public StreamGobbler(InputStream is, String type) {  
-        this(is, type, null);  
-    }  
-
-    StreamGobbler(InputStream is, String type, OutputStream redirect) {  
-        this.is = is;  
-        this.type = type;  
-        this.os = redirect;  
-    }  
-
-    public void run() {  
-        InputStreamReader isr = null;  
-        BufferedReader br = null;  
-        PrintWriter pw = null;  
-        try {  
-            if (os != null)  
-                pw = new PrintWriter(os);  
-
-            isr = new InputStreamReader(is);  
-            br = new BufferedReader(isr);  
-            String line=null;  
-            while ( (line = br.readLine()) != null) {  
-                if (pw != null)  
-                    pw.println(line);  
-                System.out.println(type + ">" + line);      
-            }  
-
-            if (pw != null)  
-                pw.flush();  
-        } catch (IOException ioe) {  
-            ioe.printStackTrace();    
-        } finally{  
-            try {  
-            	if(pw!=null)
-            	{
-            		 pw.close();  
-            	}
-            	if(br!=null)
-            	{
-            		br.close();  
-            	}
-            	if(isr!=null)
-            	{
-            		isr.close();  
-            	}
-            } catch (IOException e) {  
-                e.printStackTrace();  
-            }  
-        }  
-    }  
-}

+ 1 - 1
4dkankan-common-mq/src/main/java/com/fdkankan/common/message/BaseMQMessage.java

@@ -1,4 +1,4 @@
-package com.fdkankan.common.message;
+package com.fdkankan.mq.message;
 
 public class BaseMQMessage {
     /**

+ 1 - 1
4dkankan-common-mq/src/main/java/com/fdkankan/common/message/BuildSceneMqMessage.java

@@ -1,4 +1,4 @@
-package com.fdkankan.common.message;
+package com.fdkankan.mq.message;
 
 public class BuildSceneMqMessage extends BaseMQMessage {
 

+ 0 - 49
4dkankan-common-redis/src/main/java/com/fdkankan/common/constant/ConstantFilePath.java

@@ -1,49 +0,0 @@
-package com.fdkankan.common.constant;
-
-public class ConstantFilePath {
-    public static final String BASE_PATH = "/mnt/4Dkankan";
-    //论坛上传图片后,服务器存放的地址
-    public static final String BBS_IMAGES_PATH = "/mnt/4Dkankan/bbs/upload/image/";
-    // 用户上传图片
-    public static final String USER_IMAGES_PATH = "/mnt/4Dkankan/user/";
-    // 图片暂存地址(创建二维码等)
-    public static final String TEMP_IMAGES_PATH = "/mnt/4Dkankan/temp/upload/image/";
-    // 场景
-    public static final String SCENE_PATH = "/mnt/4Dkankan/scene/";
-    // 代理商
-    public static final String AGENT_PATH = "/mnt/4Dkankan/agent/";
-    //电子发票
-    public static final String INVOICE_PATH = "/mnt/4Dkankan/invoice/";
-    // 场景二维码
-    public static final String SCENE_QR_CODE_PATH = "/mnt/4Dkankan/sceneQRcode/";
-    // excel
-    public static final String EXCEL_PATH = "/mnt/4Dkankan/excel/";
-    //    public static final String EXCEL_PATH = "F:\\excel\\";
-    // medias
-    public static final String MEDIAS_PATH = "/mnt/4Dkankan/medias/";
-    // logo
-    public static final String LOGO_PATH = "/mnt/4Dkankan/logo/";
-    // login qr code
-    public static final String LOGIN_QR_CODE_PATH = "/mnt/4Dkankan/login/qrcode/";
-
-    public static final String WEIXIN_CERT = "/mnt/home/ubuntu/user/apiclient_cert.p12";
-
-    public static final String PREFIX = "/home/user";
-    public static final String CREATE_MODEL_PATH = PREFIX + "/photo_data/model/";
-    //大场景
-    public static final String CREATE_BIG_SCENE_PATH = PREFIX + "/photo_data/bigscene/";
-    //生成模型的路径
-    public static final String BUILD_MODEL_PATH = "/mnt/data/";
-    //生成模型的路径
-    public static String BUILD_MODEL_LASER_PATH ="/mnt-laser/data/";
-
-    //支付二维码图片存放路径
-    public static final String ALI_QRCODE_FOLDER = "/mnt/4Dkankan/alicode/";
-    public static final String WEIXIN_QRCODE_FOLDER = "/mnt/4Dkankan/weixincode/";
-
-    public static final String OSS_PREFIX = "home/";
-
-    public void setHardDiskLaser(String value){
-        ConstantFilePath.BUILD_MODEL_LASER_PATH = value;
-    }
-}

+ 0 - 156
4dkankan-common-redis/src/main/java/com/fdkankan/common/proto/format/CouchDBFormat.java

@@ -1,156 +0,0 @@
-package com.fdkankan.common.proto.format;
-
-
-import com.google.protobuf.ExtensionRegistry;
-import com.google.protobuf.Message;
-import com.google.protobuf.UnknownFieldSet;
-
-import java.io.IOException;
-
-/**
- * Created by IntelliJ IDEA.
- * User: aantonov
- * Date: Mar 16, 2010
- * Time: 4:06:05 PM
- * To change this template use File | Settings | File Templates.
- */
-public class CouchDBFormat extends JsonFormat {
-
-    /**
-     * Outputs a textual representation of the Protocol Message supplied into the parameter output.
-     * (This representation is the new version of the classic "ProtocolPrinter" output from the
-     * original Protocol Buffer system)
-     */
-    public static void print(Message message, Appendable output) throws IOException {
-        CouchDBGenerator generator = new CouchDBGenerator(output);
-        generator.print("{");
-        print(message, generator);
-        generator.print("}");
-    }
-
-    /**
-     * Outputs a textual representation of {@code fields} to {@code output}.
-     */
-    public static void print(UnknownFieldSet fields, Appendable output) throws IOException {
-        CouchDBGenerator generator = new CouchDBGenerator(output);
-        generator.print("{");
-        printUnknownFields(fields, generator);
-        generator.print("}");
-    }
-
-    /**
-     * Like {@code print()}, but writes directly to a {@code String} and returns it.
-     */
-    public static String printToString(Message message) {
-        try {
-            StringBuilder text = new StringBuilder();
-            print(message, text);
-            return text.toString();
-        } catch (IOException e) {
-            throw new RuntimeException("Writing to a StringBuilder threw an IOException (should never happen).",
-                                       e);
-        }
-    }
-
-    /**
-     * Like {@code print()}, but writes directly to a {@code String} and returns it.
-     */
-    public static String printToString(UnknownFieldSet fields) {
-        try {
-            StringBuilder text = new StringBuilder();
-            print(fields, text);
-            return text.toString();
-        } catch (IOException e) {
-            throw new RuntimeException("Writing to a StringBuilder threw an IOException (should never happen).",
-                                       e);
-        }
-    }
-
-    /**
-     * Parse a text-format message from {@code input} and merge the contents into {@code builder}.
-     */
-    public static void merge(Readable input, Message.Builder builder) throws IOException {
-        merge(input, ExtensionRegistry.getEmptyRegistry(), builder);
-    }
-
-    /**
-     * Parse a text-format message from {@code input} and merge the contents into {@code builder}.
-     */
-    public static void merge(CharSequence input, Message.Builder builder) throws ParseException {
-        merge(input, ExtensionRegistry.getEmptyRegistry(), builder);
-    }
-
-    /**
-     * Parse a text-format message from {@code input} and merge the contents into {@code builder}.
-     * Extensions will be recognized if they are registered in {@code extensionRegistry}.
-     */
-    public static void merge(Readable input,
-                             ExtensionRegistry extensionRegistry,
-                             Message.Builder builder) throws IOException {
-        // Read the entire input to a String then parse that.
-
-        // If StreamTokenizer were not quite so crippled, or if there were a kind
-        // of Reader that could read in chunks that match some particular regex,
-        // or if we wanted to write a custom Reader to tokenize our stream, then
-        // we would not have to read to one big String. Alas, none of these is
-        // the case. Oh well.
-
-        merge(JsonFormat.toStringBuilder(input), extensionRegistry, builder);
-    }
-
-    /**
-     * Parse a text-format message from {@code input} and merge the contents into {@code builder}.
-     * Extensions will be recognized if they are registered in {@code extensionRegistry}.
-     */
-    public static void merge(CharSequence input,
-                             ExtensionRegistry extensionRegistry,
-                             Message.Builder builder) throws ParseException {
-        Tokenizer tokenizer = new Tokenizer(input);
-
-        // Based on the state machine @ http://json.org/
-
-        tokenizer.consume("{"); // Needs to happen when the object starts.
-        while (!tokenizer.tryConsume("}")) { // Continue till the object is done
-            JsonFormat.mergeField(tokenizer, extensionRegistry, builder);
-        }
-    }
-
-    protected static class Tokenizer extends JsonFormat.Tokenizer {
-
-        /**
-         * Construct a tokenizer that parses tokens from the given text.
-         */
-        public Tokenizer(CharSequence text) {
-            super(text);
-        }
-
-        @Override
-        public String consumeIdentifier() throws ParseException {
-            String id = super.consumeIdentifier();
-            if ("_id".equals(id)) {
-                return "id";
-            } else if ("_rev".equals(id)) {
-                return "rev";
-            }
-            return id;
-        }
-    }
-
-    protected static class CouchDBGenerator extends JsonGenerator {
-
-        public CouchDBGenerator(Appendable output) {
-            super(output);
-        }
-
-        @Override
-        public void print(CharSequence text) throws IOException {
-            if ("id".equals(text)) {
-                super.print("_id");
-            } else if ("rev".equals(text)) {
-                super.print("_rev");
-            } else {
-                super.print(text);
-            }
-        }
-    }
-}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1338
4dkankan-common-redis/src/main/java/com/fdkankan/common/proto/format/JavaPropsFormat.java


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1603
4dkankan-common-redis/src/main/java/com/fdkankan/common/proto/format/JsonFormat.java


+ 0 - 65
4dkankan-common-redis/src/main/java/com/fdkankan/common/utils/Base64Converter.java

@@ -1,65 +0,0 @@
-package com.fdkankan.common.utils;
-
-import java.io.UnsupportedEncodingException;
-import java.util.Base64;
-
-public class Base64Converter {
-
-    public final static Base64.Encoder encoder = Base64.getEncoder();
-    final static Base64.Decoder decoder = Base64.getDecoder();
-
-    /**
-     * 给字符串加密
-     * @param text
-     * @return
-     */
-    public static String encode(String text) {
-        byte[] textByte = new byte[0];
-        try {
-            textByte = text.getBytes("UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-        String encodedText = encoder.encodeToString(textByte);
-        return encodedText;
-    }
-
-    /**
-     * 给字符串加密
-     * @param textByte
-     * @return
-     */
-    public static String encode(byte[] textByte) {
-        return encoder.encodeToString(textByte);
-    }
-
-    /**
-     * 将加密后的字符串进行解密
-     * @param encodedText
-     * @return
-     */
-    public static String decode(String encodedText) {
-        String text = null;
-        try {
-            text = new String(decoder.decode(encodedText), "UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-        return text;
-    }
-
-    /**
-     * 根据逻辑截取加密后的密码
-     * @param text
-     * @return
-     */
-    public static String subText(String text){
-        //去掉前8位字符串
-        text = text.substring(8);
-        //去掉后8位字符串
-        text = text.substring(0, text.length() - 8);
-        //最后两个字符串换到前面,并且去掉剩下的后8位字符串
-        String result = text.substring(text.length() - 2) + text.substring(0, text.length() - 10);
-        return result;
-    }
-}

+ 0 - 55
4dkankan-common-redis/src/main/java/com/fdkankan/common/utils/ConstantCmd.java

@@ -1,55 +0,0 @@
-package com.fdkankan.common.utils;
-
-public class ConstantCmd {
-
-	//生成模型的命令
-	public static final String BUILD_MODEL_COMMAND = "bash /home/ubuntu/bin/Launcher.sh ";
-
-	//生成模型的命令
-	public static final String BUILD_MODEL_COMMAND2 = "bash /opt/ossutil/sshoss.sh ";
-
-	public static final String BUILD_MODEL_OLD_COMMAND = "bash /home/ubuntu/bin_old/Launcher.sh ";
-	public static final String BUILD_MODEL_SFM_COMMAND = "bash /home/ubuntu/run_sfm.sh ";
-
-	public static final String OBJ_TO_TXT = "bash /home/ubuntu/bin_old/obj2txt.sh ";
-
-	public static final String REBUILD_MODEL_FLLOR = "bash /home/ubuntu/bin/Panoramix_Floorplan.sh ";
-	//切图命令
-	public static final String CUT_IMG_COMMAND = "bash /home/ubuntu/OpenSfM/bin/run_cube.sh ";
-	//调整图片的命令
-	public static final String ADJUST_IMG_COMMAND = "/home/ubuntu/OpenSfM/bin/run_skybox ";
-	  
-	  
-	  
-	//转台拼图命令
-	public static final String BUILD_PANORAMA = "AutopanoGiga /home/ubuntu/data/";
-	//六目,拼图,计算,切图(二代)
-	public static final String BUILD_FOR_SIX = "bash /home/ubuntu/run_all_m6.sh ";
-
-	//合并音频
-	public static final String MERGE_VIDEO = "bash /monchickey/ffmpeg/bin/ff_synthesis.sh ";
-
-	//生成一段静音音频
-	public static final String CREATE_MUTE_VIDEO = "bash /monchickey/ffmpeg/bin/ff_mtue.sh ";
-
-	//将mp4文件转换成flv
-	public static final String MP4_TO_FLV = "bash /monchickey/ffmpeg/bin/ff_mp4TOflv.sh ";
-
-	//删除/mnt/data/下的数据脚本
-	public static final String DELETE_FILE = "bash /monchickey/ffmpeg/bin/delete.sh ";
-
-	public static final String OSS_UTIL_CP ="bash /opt/ossutil/oss.sh ";
-
-	public static final String OSS_FILE_CP = "bash /opt/ossutil/file.sh ";
-
-	public static final String MATTERPRO_CUT_IMG = "node /opt/4dkankan_scene/index.js ";
-
-	//激光相机 extra迁移
-	public static final String CP_JG_EXTRA = "bash /opt/ossutil/laser-copy.sh ";
-
-	public static final String CP_JG_ALL = "bash /opt/ossutil/laser-cp-r.sh ";
-
-	// 修改户型图json文件
-	public static final String TRANSLATE_HOUST_FLOOR = "/opt/Robin/JsonRead.out ";
-
-}

+ 0 - 61
4dkankan-common-redis/src/main/java/com/fdkankan/common/utils/StreamGobbler.java

@@ -1,61 +0,0 @@
-package com.fdkankan.common.utils;
-
-import java.io.*;
-
-public class StreamGobbler extends Thread {
-
-	InputStream is;  
-    String type;  
-    OutputStream os;  
-
-    public StreamGobbler(InputStream is, String type) {  
-        this(is, type, null);  
-    }  
-
-    StreamGobbler(InputStream is, String type, OutputStream redirect) {  
-        this.is = is;  
-        this.type = type;  
-        this.os = redirect;  
-    }  
-
-    public void run() {  
-        InputStreamReader isr = null;  
-        BufferedReader br = null;  
-        PrintWriter pw = null;  
-        try {  
-            if (os != null)  
-                pw = new PrintWriter(os);  
-
-            isr = new InputStreamReader(is);  
-            br = new BufferedReader(isr);  
-            String line=null;  
-            while ( (line = br.readLine()) != null) {  
-                if (pw != null)  
-                    pw.println(line);  
-                System.out.println(type + ">" + line);      
-            }  
-
-            if (pw != null)  
-                pw.flush();  
-        } catch (IOException ioe) {  
-            ioe.printStackTrace();    
-        } finally{  
-            try {  
-            	if(pw!=null)
-            	{
-            		 pw.close();  
-            	}
-            	if(br!=null)
-            	{
-            		br.close();  
-            	}
-            	if(isr!=null)
-            	{
-            		isr.close();  
-            	}
-            } catch (IOException e) {  
-                e.printStackTrace();  
-            }  
-        }  
-    }  
-}

+ 0 - 39
4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/ConstantFileName.java

@@ -1,39 +0,0 @@
-package com.fdkankan.common.constant;
-
-public class ConstantFileName {
-    //背景音乐
-    public static final String BACKGROUND_MUSIC = "bg.mp3";
-    //编辑页面,第二代
-    public static final String MODEL_DATAFILE = "modeldata.json";
-    public static final String HOT_DATAFILE = "hot.json";
-    public static final String MEDIA_DATAFILE = "mediaInfo.json";
-    public static final String SCREEN_CRP_DATAFILE = "screenCap";
-    //导览(一代)
-    public static final String GUIDE_DATAFILE = "tour.json";
-
-    //文件夹名称
-    public static final String GUIDE_MEDIA_FOLDER = "guide";
-    public static final String HOT_MEDIA_FOLDER = "hot";
-    public static final String OTHER_MEDIA_FOLDER = "other";
-
-    //论坛过滤文档
-    public static final String BBS_SENSITIVE = "SensitiveWord.txt";
-    public static final String LOGO_NAME = "logo.jpg";
-
-    //app部分
-    public static final String APP_FOLDER = "appupload";
-
-    public static final String FLOOR_LOGO_PIC_NAME = "floorLogoImg.png";
-
-    public static final String TOUR_LIST = "tourList.json";
-    public static final String VOICE_NAME = "201810";
-    public static final String WECHAT_VOICE_NAME = "wechat";
-    public static final String APP_VOICE_NAME = "app";
-
-    public static final String TOURLIST_FOLDER = "tour";
-    //public static final String TEMPFILES = "tempFiles";
-
-    public static final String modelUUID = "dacf7dfa24ae47fab8fcebfe4dc41ab9";
-
-    public static final String BUCKET_NAME = "4dkankan";
-}

+ 0 - 49
4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/ConstantFilePath.java

@@ -1,49 +0,0 @@
-package com.fdkankan.common.constant;
-
-public class ConstantFilePath {
-    public static final String BASE_PATH = "/mnt/4Dkankan";
-    //论坛上传图片后,服务器存放的地址
-    public static final String BBS_IMAGES_PATH = "/mnt/4Dkankan/bbs/upload/image/";
-    // 用户上传图片
-    public static final String USER_IMAGES_PATH = "/mnt/4Dkankan/user/";
-    // 图片暂存地址(创建二维码等)
-    public static final String TEMP_IMAGES_PATH = "/mnt/4Dkankan/temp/upload/image/";
-    // 场景
-    public static final String SCENE_PATH = "/mnt/4Dkankan/scene/";
-    // 代理商
-    public static final String AGENT_PATH = "/mnt/4Dkankan/agent/";
-    //电子发票
-    public static final String INVOICE_PATH = "/mnt/4Dkankan/invoice/";
-    // 场景二维码
-    public static final String SCENE_QR_CODE_PATH = "/mnt/4Dkankan/sceneQRcode/";
-    // excel
-    public static final String EXCEL_PATH = "/mnt/4Dkankan/excel/";
-    //    public static final String EXCEL_PATH = "F:\\excel\\";
-    // medias
-    public static final String MEDIAS_PATH = "/mnt/4Dkankan/medias/";
-    // logo
-    public static final String LOGO_PATH = "/mnt/4Dkankan/logo/";
-    // login qr code
-    public static final String LOGIN_QR_CODE_PATH = "/mnt/4Dkankan/login/qrcode/";
-
-    public static final String WEIXIN_CERT = "/mnt/home/ubuntu/user/apiclient_cert.p12";
-
-    public static final String PREFIX = "/home/user";
-    public static final String CREATE_MODEL_PATH = PREFIX + "/photo_data/model/";
-    //大场景
-    public static final String CREATE_BIG_SCENE_PATH = PREFIX + "/photo_data/bigscene/";
-    //生成模型的路径
-    public static final String BUILD_MODEL_PATH = "/mnt/data/";
-    //生成模型的路径
-    public static String BUILD_MODEL_LASER_PATH ="/mnt-laser/data/";
-
-    //支付二维码图片存放路径
-    public static final String ALI_QRCODE_FOLDER = "/mnt/4Dkankan/alicode/";
-    public static final String WEIXIN_QRCODE_FOLDER = "/mnt/4Dkankan/weixincode/";
-
-    public static final String OSS_PREFIX = "home/";
-
-    public void setHardDiskLaser(String value){
-        ConstantFilePath.BUILD_MODEL_LASER_PATH = value;
-    }
-}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 7340
4dkankan-common-utils/src/main/java/com/fdkankan/common/proto/BigSceneProto.java


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 4654
4dkankan-common-utils/src/main/java/com/fdkankan/common/proto/Common.java


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 4345
4dkankan-common-utils/src/main/java/com/fdkankan/common/proto/Visionmodeldata.java


+ 0 - 156
4dkankan-common-utils/src/main/java/com/fdkankan/common/proto/format/CouchDBFormat.java

@@ -1,156 +0,0 @@
-package com.fdkankan.common.proto.format;
-
-
-import com.google.protobuf.ExtensionRegistry;
-import com.google.protobuf.Message;
-import com.google.protobuf.UnknownFieldSet;
-
-import java.io.IOException;
-
-/**
- * Created by IntelliJ IDEA.
- * User: aantonov
- * Date: Mar 16, 2010
- * Time: 4:06:05 PM
- * To change this template use File | Settings | File Templates.
- */
-public class CouchDBFormat extends JsonFormat {
-
-    /**
-     * Outputs a textual representation of the Protocol Message supplied into the parameter output.
-     * (This representation is the new version of the classic "ProtocolPrinter" output from the
-     * original Protocol Buffer system)
-     */
-    public static void print(Message message, Appendable output) throws IOException {
-        CouchDBGenerator generator = new CouchDBGenerator(output);
-        generator.print("{");
-        print(message, generator);
-        generator.print("}");
-    }
-
-    /**
-     * Outputs a textual representation of {@code fields} to {@code output}.
-     */
-    public static void print(UnknownFieldSet fields, Appendable output) throws IOException {
-        CouchDBGenerator generator = new CouchDBGenerator(output);
-        generator.print("{");
-        printUnknownFields(fields, generator);
-        generator.print("}");
-    }
-
-    /**
-     * Like {@code print()}, but writes directly to a {@code String} and returns it.
-     */
-    public static String printToString(Message message) {
-        try {
-            StringBuilder text = new StringBuilder();
-            print(message, text);
-            return text.toString();
-        } catch (IOException e) {
-            throw new RuntimeException("Writing to a StringBuilder threw an IOException (should never happen).",
-                                       e);
-        }
-    }
-
-    /**
-     * Like {@code print()}, but writes directly to a {@code String} and returns it.
-     */
-    public static String printToString(UnknownFieldSet fields) {
-        try {
-            StringBuilder text = new StringBuilder();
-            print(fields, text);
-            return text.toString();
-        } catch (IOException e) {
-            throw new RuntimeException("Writing to a StringBuilder threw an IOException (should never happen).",
-                                       e);
-        }
-    }
-
-    /**
-     * Parse a text-format message from {@code input} and merge the contents into {@code builder}.
-     */
-    public static void merge(Readable input, Message.Builder builder) throws IOException {
-        merge(input, ExtensionRegistry.getEmptyRegistry(), builder);
-    }
-
-    /**
-     * Parse a text-format message from {@code input} and merge the contents into {@code builder}.
-     */
-    public static void merge(CharSequence input, Message.Builder builder) throws ParseException {
-        merge(input, ExtensionRegistry.getEmptyRegistry(), builder);
-    }
-
-    /**
-     * Parse a text-format message from {@code input} and merge the contents into {@code builder}.
-     * Extensions will be recognized if they are registered in {@code extensionRegistry}.
-     */
-    public static void merge(Readable input,
-                             ExtensionRegistry extensionRegistry,
-                             Message.Builder builder) throws IOException {
-        // Read the entire input to a String then parse that.
-
-        // If StreamTokenizer were not quite so crippled, or if there were a kind
-        // of Reader that could read in chunks that match some particular regex,
-        // or if we wanted to write a custom Reader to tokenize our stream, then
-        // we would not have to read to one big String. Alas, none of these is
-        // the case. Oh well.
-
-        merge(JsonFormat.toStringBuilder(input), extensionRegistry, builder);
-    }
-
-    /**
-     * Parse a text-format message from {@code input} and merge the contents into {@code builder}.
-     * Extensions will be recognized if they are registered in {@code extensionRegistry}.
-     */
-    public static void merge(CharSequence input,
-                             ExtensionRegistry extensionRegistry,
-                             Message.Builder builder) throws ParseException {
-        Tokenizer tokenizer = new Tokenizer(input);
-
-        // Based on the state machine @ http://json.org/
-
-        tokenizer.consume("{"); // Needs to happen when the object starts.
-        while (!tokenizer.tryConsume("}")) { // Continue till the object is done
-            JsonFormat.mergeField(tokenizer, extensionRegistry, builder);
-        }
-    }
-
-    protected static class Tokenizer extends JsonFormat.Tokenizer {
-
-        /**
-         * Construct a tokenizer that parses tokens from the given text.
-         */
-        public Tokenizer(CharSequence text) {
-            super(text);
-        }
-
-        @Override
-        public String consumeIdentifier() throws ParseException {
-            String id = super.consumeIdentifier();
-            if ("_id".equals(id)) {
-                return "id";
-            } else if ("_rev".equals(id)) {
-                return "rev";
-            }
-            return id;
-        }
-    }
-
-    protected static class CouchDBGenerator extends JsonGenerator {
-
-        public CouchDBGenerator(Appendable output) {
-            super(output);
-        }
-
-        @Override
-        public void print(CharSequence text) throws IOException {
-            if ("id".equals(text)) {
-                super.print("_id");
-            } else if ("rev".equals(text)) {
-                super.print("_rev");
-            } else {
-                super.print(text);
-            }
-        }
-    }
-}

+ 0 - 703
4dkankan-common-utils/src/main/java/com/fdkankan/common/proto/format/HtmlFormat.java

@@ -1,703 +0,0 @@
-package com.fdkankan.common.proto.format;
-/* 
-    Copyright (c) 2009, Orbitz World Wide
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without modification, 
-    are permitted provided that the following conditions are met:
-
-        * Redistributions of source code must retain the above copyright notice, 
-          this list of conditions and the following disclaimer.
-        * Redistributions in binary form must reproduce the above copyright notice, 
-          this list of conditions and the following disclaimer in the documentation 
-          and/or other materials provided with the distribution.
-        * Neither the name of the Orbitz World Wide nor the names of its contributors 
-          may be used to endorse or promote products derived from this software 
-          without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-import com.google.protobuf.ByteString;
-import com.google.protobuf.Descriptors.EnumValueDescriptor;
-import com.google.protobuf.Descriptors.FieldDescriptor;
-import com.google.protobuf.Message;
-import com.google.protobuf.UnknownFieldSet;
-
-import java.io.IOException;
-import java.math.BigInteger;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-/**
- * Provide ascii html formatting support for proto2 instances.
- * <p>
- * (c) 2009-10 Orbitz World Wide. All Rights Reserved.
- * 
- * @author eliran.bivas@gmail.com Eliran Bivas
- * @version $HtmlFormat.java Mar 12, 2009 4:00:33 PM$
- */
-public final class HtmlFormat {
-
-    private static final String META_CONTENT = "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />";
-    private static final String MAIN_DIV_STYLE = "color: black; font-size: 14px; font-family: sans-serif; font-weight: bolder; margin-bottom: 10px;";
-    private static final String FIELD_NAME_STYLE = "font-weight: bold; color: #669966;font-size: 14px; font-family: sans-serif;";
-    private static final String FIELD_VALUE_STYLE = "color: #3300FF;font-size: 13px; font-family: sans-serif;";
-
-    /**
-     * Outputs a textual representation of the Protocol Message supplied into the parameter output.
-     * (This representation is the new version of the classic "ProtocolPrinter" output from the
-     * original Protocol Buffer system)
-     */
-    public static void print(Message message, Appendable output) throws IOException {
-        HtmlGenerator generator = new HtmlGenerator(output);
-        printTitle(message, generator);
-        print(message, generator);
-        generator.print("</body></html>");
-    }
-
-    private static void printTitle(final Message message, final HtmlGenerator generator) throws IOException {
-        generator.print("<html><head>");
-        generator.print(META_CONTENT);
-        generator.print("<title>");
-        generator.print(message.getDescriptorForType().getFullName());
-        generator.print("</title></head><body>");
-        generator.print("<div style=\"");
-        generator.print(MAIN_DIV_STYLE);
-        generator.print("\">message : ");
-        generator.print(message.getDescriptorForType().getFullName());
-        generator.print("</div>");
-    }
-
-    /**
-     * Outputs a textual representation of {@code fields} to {@code output}.
-     */
-    public static void print(UnknownFieldSet fields, Appendable output) throws IOException {
-        HtmlGenerator generator = new HtmlGenerator(output);
-        generator.print("<html>");
-        generator.print(META_CONTENT);
-        generator.print("</head><body>");
-        printUnknownFields(fields, generator);
-        generator.print("</body></html>");
-    }
-
-    /**
-     * Like {@code print()}, but writes directly to a {@code String} and returns it.
-     */
-    public static String printToString(Message message) {
-        try {
-            StringBuilder text = new StringBuilder();
-            print(message, text);
-            return text.toString();
-        } catch (IOException e) {
-            throw new RuntimeException("Writing to a StringBuilder threw an IOException (should never happen).",
-                                       e);
-        }
-    }
-
-    /**
-     * Like {@code print()}, but writes directly to a {@code String} and returns it.
-     */
-    public static String printToString(UnknownFieldSet fields) {
-        try {
-            StringBuilder text = new StringBuilder();
-            print(fields, text);
-            return text.toString();
-        } catch (IOException e) {
-            throw new RuntimeException("Writing to a StringBuilder threw an IOException (should never happen).",
-                                       e);
-        }
-    }
-
-    private static void print(Message message, HtmlGenerator generator) throws IOException {
-
-        for (Map.Entry<FieldDescriptor, Object> field : message.getAllFields().entrySet()) {
-            printField(field.getKey(), field.getValue(), generator);
-        }
-        printUnknownFields(message.getUnknownFields(), generator);
-    }
-
-    public static void printField(FieldDescriptor field, Object value, HtmlGenerator generator) throws IOException {
-
-        if (field.isRepeated()) {
-            // Repeated field. Print each element.
-            for (Object element : (List<?>) value) {
-                printSingleField(field, element, generator);
-            }
-        } else {
-            printSingleField(field, value, generator);
-        }
-    }
-
-    private static void printSingleField(FieldDescriptor field,
-                                         Object value,
-                                         HtmlGenerator generator) throws IOException {
-        if (field.isExtension()) {
-            generator.print("[<span style=\"");
-            generator.print(FIELD_NAME_STYLE);
-            generator.print("\">");
-            // We special-case MessageSet elements for compatibility with proto1.
-            if (field.getContainingType().getOptions().getMessageSetWireFormat()
-                            && (field.getType() == FieldDescriptor.Type.MESSAGE) && (field.isOptional())
-                            // object equality
-                            && (field.getExtensionScope() == field.getMessageType())) {
-                generator.print(field.getMessageType().getFullName());
-            } else {
-                generator.print(field.getFullName());
-            }
-            generator.print("</span>]");
-        } else {
-            generator.print("<span style=\"");
-            generator.print(FIELD_NAME_STYLE);
-            generator.print("\">");
-            if (field.getType() == FieldDescriptor.Type.GROUP) {
-                // Groups must be serialized with their original capitalization.
-                generator.print(field.getMessageType().getName());
-            } else {
-                generator.print(field.getName());
-            }
-            generator.print("</span>");
-        }
-
-        if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) {
-            generator.print(" <span style=\"color: red;\">{</span><br/>");
-            generator.indent();
-        } else {
-            generator.print(": ");
-        }
-
-        printFieldValue(field, value, generator);
-
-        if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) {
-            generator.outdent();
-            generator.print("<span style=\"color: red;\">}</span>");
-        }
-        generator.print("<br/>");
-    }
-
-    private static void printFieldValue(FieldDescriptor field, Object value, HtmlGenerator generator) throws IOException {
-        generator.print("<span style=\"");
-        generator.print(FIELD_VALUE_STYLE);
-        generator.print("\">");
-        switch (field.getType()) {
-            case INT32:
-            case INT64:
-            case SINT32:
-            case SINT64:
-            case SFIXED32:
-            case SFIXED64:
-            case FLOAT:
-            case DOUBLE:
-            case BOOL:
-                // Good old toString() does what we want for these types.
-                generator.print(value.toString());
-                break;
-
-            case UINT32:
-            case FIXED32:
-                generator.print(unsignedToString((Integer) value));
-                break;
-
-            case UINT64:
-            case FIXED64:
-                generator.print(unsignedToString((Long) value));
-                break;
-
-            case STRING:
-                generator.print("\"");
-                generator.print(value.toString());
-                generator.print("\"");
-                break;
-
-            case BYTES: {
-                generator.print("\"");
-                generator.print(escapeBytes((ByteString) value));
-                generator.print("\"");
-                break;
-            }
-
-            case ENUM: {
-                generator.print(((EnumValueDescriptor) value).getName());
-                break;
-            }
-
-            case MESSAGE:
-            case GROUP:
-                print((Message) value, generator);
-                break;
-        }
-        generator.print("</span>");
-    }
-
-    private static void printUnknownFields(UnknownFieldSet unknownFields, HtmlGenerator generator) throws IOException {
-        for (Map.Entry<Integer, UnknownFieldSet.Field> entry : unknownFields.asMap().entrySet()) {
-            UnknownFieldSet.Field field = entry.getValue();
-
-            for (long value : field.getVarintList()) {
-                generator.print(entry.getKey().toString());
-                generator.print(": ");
-                generator.print(unsignedToString(value));
-                generator.print("<br/>");
-            }
-            for (int value : field.getFixed32List()) {
-                generator.print(entry.getKey().toString());
-                generator.print(": ");
-                generator.print(String.format((Locale) null, "0x%08x", value));
-                generator.print("<br/>");
-            }
-            for (long value : field.getFixed64List()) {
-                generator.print(entry.getKey().toString());
-                generator.print(": ");
-                generator.print(String.format((Locale) null, "0x%016x", value));
-                generator.print("<br/>");
-            }
-            for (ByteString value : field.getLengthDelimitedList()) {
-                generator.print(entry.getKey().toString());
-                generator.print(": \"");
-                generator.print(escapeBytes(value));
-                generator.print("\"<br/>");
-            }
-            for (UnknownFieldSet value : field.getGroupList()) {
-                generator.print(entry.getKey().toString());
-                generator.print(" <span style=\"color: red;\">{</span><br/>");
-                generator.indent();
-                printUnknownFields(value, generator);
-                generator.outdent();
-                generator.print("<span style=\"color: red;\">}</span><br/>");
-            }
-        }
-    }
-
-    /**
-     * Convert an unsigned 32-bit integer to a string.
-     */
-    private static String unsignedToString(int value) {
-        if (value >= 0) {
-            return Integer.toString(value);
-        } else {
-            return Long.toString((value) & 0x00000000FFFFFFFFL);
-        }
-    }
-
-    /**
-     * Convert an unsigned 64-bit integer to a string.
-     */
-    private static String unsignedToString(long value) {
-        if (value >= 0) {
-            return Long.toString(value);
-        } else {
-            // Pull off the most-significant bit so that BigInteger doesn't think
-            // the number is negative, then set it again using setBit().
-            return BigInteger.valueOf(value & 0x7FFFFFFFFFFFFFFFL).setBit(63).toString();
-        }
-    }
-
-    /**
-     * An inner class for writing text to the output stream.
-     */
-    static private final class HtmlGenerator {
-
-        Appendable output;
-        boolean atStartOfLine = true;
-
-        public HtmlGenerator(Appendable output) {
-            this.output = output;
-        }
-
-        /**
-         * Indent text by two spaces. After calling Indent(), two spaces will be inserted at the
-         * beginning of each line of text. Indent() may be called multiple times to produce deeper
-         * indents.
-         * 
-         * @throws IOException
-         */
-        public void indent() throws IOException {
-            print("<div style=\"margin-left: 25px\">");
-        }
-
-        /**
-         * Reduces the current indent level by two spaces, or crashes if the indent level is zero.
-         * 
-         * @throws IOException
-         */
-        public void outdent() throws IOException {
-            print("</div>");
-        }
-
-        /**
-         * Print text to the output stream.
-         */
-        public void print(CharSequence text) throws IOException {
-            int size = text.length();
-            int pos = 0;
-
-            for (int i = 0; i < size; i++) {
-                if (text.charAt(i) == '\n') {
-                    write("<br/>", i - pos + 1);
-                    pos = i + 1;
-                    atStartOfLine = true;
-                }
-            }
-            write(text.subSequence(pos, size), size - pos);
-        }
-
-        private void write(CharSequence data, int size) throws IOException {
-            if (size == 0) {
-                return;
-            }
-            if (atStartOfLine) {
-                atStartOfLine = false;
-            }
-            output.append(data);
-        }
-    }
-
-    // =================================================================
-    // Utility functions
-    //
-    // Some of these methods are package-private because Descriptors.java uses
-    // them.
-
-    /**
-     * Escapes bytes in the format used in protocol buffer text format, which is the same as the
-     * format used for C string literals. All bytes that are not printable 7-bit ASCII characters
-     * are escaped, as well as backslash, single-quote, and double-quote characters. Characters for
-     * which no defined short-hand escape sequence is defined will be escaped using 3-digit octal
-     * sequences.
-     */
-    static String escapeBytes(ByteString input) {
-        StringBuilder builder = new StringBuilder(input.size());
-        for (int i = 0; i < input.size(); i++) {
-            byte b = input.byteAt(i);
-            switch (b) {
-                // Java does not recognize \a or \v, apparently.
-                case 0x07:
-                    builder.append("\\a");
-                    break;
-                case '\b':
-                    builder.append("\\b");
-                    break;
-                case '\f':
-                    builder.append("\\f");
-                    break;
-                case '\n':
-                    builder.append("\\n");
-                    break;
-                case '\r':
-                    builder.append("\\r");
-                    break;
-                case '\t':
-                    builder.append("\\t");
-                    break;
-                case 0x0b:
-                    builder.append("\\v");
-                    break;
-                case '\\':
-                    builder.append("\\\\");
-                    break;
-                case '\'':
-                    builder.append("\\\'");
-                    break;
-                case '"':
-                    builder.append("\\\"");
-                    break;
-                default:
-                    if (b >= 0x20) {
-                        builder.append((char) b);
-                    } else {
-                        builder.append('\\');
-                        builder.append((char) ('0' + ((b >>> 6) & 3)));
-                        builder.append((char) ('0' + ((b >>> 3) & 7)));
-                        builder.append((char) ('0' + (b & 7)));
-                    }
-                    break;
-            }
-        }
-        return builder.toString();
-    }
-
-    /**
-     * Un-escape a byte sequence as escaped using
-     * {@link #escapeBytes(com.googlecode.protobuf.format.ByteString)}. Two-digit hex escapes (starting with
-     * "\x") are also recognized.
-     */
-    static ByteString unescapeBytes(CharSequence input) throws InvalidEscapeSequence {
-        byte[] result = new byte[input.length()];
-        int pos = 0;
-        for (int i = 0; i < input.length(); i++) {
-            char c = input.charAt(i);
-            if (c == '\\') {
-                if (i + 1 < input.length()) {
-                    ++i;
-                    c = input.charAt(i);
-                    if (isOctal(c)) {
-                        // Octal escape.
-                        int code = digitValue(c);
-                        if ((i + 1 < input.length()) && isOctal(input.charAt(i + 1))) {
-                            ++i;
-                            code = code * 8 + digitValue(input.charAt(i));
-                        }
-                        if ((i + 1 < input.length()) && isOctal(input.charAt(i + 1))) {
-                            ++i;
-                            code = code * 8 + digitValue(input.charAt(i));
-                        }
-                        result[pos++] = (byte) code;
-                    } else {
-                        switch (c) {
-                            case 'a':
-                                result[pos++] = 0x07;
-                                break;
-                            case 'b':
-                                result[pos++] = '\b';
-                                break;
-                            case 'f':
-                                result[pos++] = '\f';
-                                break;
-                            case 'n':
-                                result[pos++] = '\n';
-                                break;
-                            case 'r':
-                                result[pos++] = '\r';
-                                break;
-                            case 't':
-                                result[pos++] = '\t';
-                                break;
-                            case 'v':
-                                result[pos++] = 0x0b;
-                                break;
-                            case '\\':
-                                result[pos++] = '\\';
-                                break;
-                            case '\'':
-                                result[pos++] = '\'';
-                                break;
-                            case '"':
-                                result[pos++] = '\"';
-                                break;
-
-                            case 'x':
-                                // hex escape
-                                int code = 0;
-                                if ((i + 1 < input.length()) && isHex(input.charAt(i + 1))) {
-                                    ++i;
-                                    code = digitValue(input.charAt(i));
-                                } else {
-                                    throw new InvalidEscapeSequence("Invalid escape sequence: '\\x' with no digits");
-                                }
-                                if ((i + 1 < input.length()) && isHex(input.charAt(i + 1))) {
-                                    ++i;
-                                    code = code * 16 + digitValue(input.charAt(i));
-                                }
-                                result[pos++] = (byte) code;
-                                break;
-
-                            default:
-                                throw new InvalidEscapeSequence("Invalid escape sequence: '\\" + c
-                                                                + "'");
-                        }
-                    }
-                } else {
-                    throw new InvalidEscapeSequence("Invalid escape sequence: '\\' at end of string.");
-                }
-            } else {
-                result[pos++] = (byte) c;
-            }
-        }
-
-        return ByteString.copyFrom(result, 0, pos);
-    }
-
-    /**
-     * Thrown by {@link JsonFormat#unescapeBytes} and {@link JsonFormat#unescapeText} when an
-     * invalid escape sequence is seen.
-     */
-    static class InvalidEscapeSequence extends IOException {
-
-        private static final long serialVersionUID = 1L;
-
-        public InvalidEscapeSequence(String description) {
-            super(description);
-        }
-    }
-
-    /**
-     * Like {@link #escapeBytes(com.googlecode.protobuf.format.ByteString)}, but escapes a text string.
-     * Non-ASCII characters are first encoded as UTF-8, then each byte is escaped individually as a
-     * 3-digit octal escape. Yes, it's weird.
-     */
-    static String escapeText(String input) {
-        return escapeBytes(ByteString.copyFromUtf8(input));
-    }
-
-    /**
-     * Un-escape a text string as escaped using {@link #escapeText(String)}. Two-digit hex escapes
-     * (starting with "\x") are also recognized.
-     */
-    static String unescapeText(String input) throws InvalidEscapeSequence {
-        return unescapeBytes(input).toStringUtf8();
-    }
-
-    /**
-     * Is this an octal digit?
-     */
-    private static boolean isOctal(char c) {
-        return ('0' <= c) && (c <= '7');
-    }
-
-    /**
-     * Is this a hex digit?
-     */
-    private static boolean isHex(char c) {
-        return (('0' <= c) && (c <= '9')) || (('a' <= c) && (c <= 'f'))
-        || (('A' <= c) && (c <= 'F'));
-    }
-
-    /**
-     * Interpret a character as a digit (in any base up to 36) and return the numeric value. This is
-     * like {@code Character.digit()} but we don't accept non-ASCII digits.
-     */
-    private static int digitValue(char c) {
-        if (('0' <= c) && (c <= '9')) {
-            return c - '0';
-        } else if (('a' <= c) && (c <= 'z')) {
-            return c - 'a' + 10;
-        } else {
-            return c - 'A' + 10;
-        }
-    }
-
-    /**
-     * Parse a 32-bit signed integer from the text. Unlike the Java standard {@code
-     * Integer.parseInt()}, this function recognizes the prefixes "0x" and "0" to signify
-     * hexidecimal and octal numbers, respectively.
-     */
-    static int parseInt32(String text) throws NumberFormatException {
-        return (int) parseInteger(text, true, false);
-    }
-
-    /**
-     * Parse a 32-bit unsigned integer from the text. Unlike the Java standard {@code
-     * Integer.parseInt()}, this function recognizes the prefixes "0x" and "0" to signify
-     * hexidecimal and octal numbers, respectively. The result is coerced to a (signed) {@code int}
-     * when returned since Java has no unsigned integer type.
-     */
-    static int parseUInt32(String text) throws NumberFormatException {
-        return (int) parseInteger(text, false, false);
-    }
-
-    /**
-     * Parse a 64-bit signed integer from the text. Unlike the Java standard {@code
-     * Integer.parseInt()}, this function recognizes the prefixes "0x" and "0" to signify
-     * hexidecimal and octal numbers, respectively.
-     */
-    static long parseInt64(String text) throws NumberFormatException {
-        return parseInteger(text, true, true);
-    }
-
-    /**
-     * Parse a 64-bit unsigned integer from the text. Unlike the Java standard {@code
-     * Integer.parseInt()}, this function recognizes the prefixes "0x" and "0" to signify
-     * hexidecimal and octal numbers, respectively. The result is coerced to a (signed) {@code long}
-     * when returned since Java has no unsigned long type.
-     */
-    static long parseUInt64(String text) throws NumberFormatException {
-        return parseInteger(text, false, true);
-    }
-
-    private static long parseInteger(String text, boolean isSigned, boolean isLong) throws NumberFormatException {
-        int pos = 0;
-
-        boolean negative = false;
-        if (text.startsWith("-", pos)) {
-            if (!isSigned) {
-                throw new NumberFormatException("Number must be positive: " + text);
-            }
-            ++pos;
-            negative = true;
-        }
-
-        int radix = 10;
-        if (text.startsWith("0x", pos)) {
-            pos += 2;
-            radix = 16;
-        } else if (text.startsWith("0", pos)) {
-            radix = 8;
-        }
-
-        String numberText = text.substring(pos);
-
-        long result = 0;
-        if (numberText.length() < 16) {
-            // Can safely assume no overflow.
-            result = Long.parseLong(numberText, radix);
-            if (negative) {
-                result = -result;
-            }
-
-            // Check bounds.
-            // No need to check for 64-bit numbers since they'd have to be 16 chars
-            // or longer to overflow.
-            if (!isLong) {
-                if (isSigned) {
-                    if ((result > Integer.MAX_VALUE) || (result < Integer.MIN_VALUE)) {
-                        throw new NumberFormatException("Number out of range for 32-bit signed integer: "
-                                                        + text);
-                    }
-                } else {
-                    if ((result >= (1L << 32)) || (result < 0)) {
-                        throw new NumberFormatException("Number out of range for 32-bit unsigned integer: "
-                                                        + text);
-                    }
-                }
-            }
-        } else {
-            BigInteger bigValue = new BigInteger(numberText, radix);
-            if (negative) {
-                bigValue = bigValue.negate();
-            }
-
-            // Check bounds.
-            if (!isLong) {
-                if (isSigned) {
-                    if (bigValue.bitLength() > 31) {
-                        throw new NumberFormatException("Number out of range for 32-bit signed integer: "
-                                                        + text);
-                    }
-                } else {
-                    if (bigValue.bitLength() > 32) {
-                        throw new NumberFormatException("Number out of range for 32-bit unsigned integer: "
-                                                        + text);
-                    }
-                }
-            } else {
-                if (isSigned) {
-                    if (bigValue.bitLength() > 63) {
-                        throw new NumberFormatException("Number out of range for 64-bit signed integer: "
-                                                        + text);
-                    }
-                } else {
-                    if (bigValue.bitLength() > 64) {
-                        throw new NumberFormatException("Number out of range for 64-bit unsigned integer: "
-                                                        + text);
-                    }
-                }
-            }
-
-            result = bigValue.longValue();
-        }
-
-        return result;
-    }
-}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1338
4dkankan-common-utils/src/main/java/com/fdkankan/common/proto/format/JavaPropsFormat.java


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1603
4dkankan-common-utils/src/main/java/com/fdkankan/common/proto/format/JsonFormat.java


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1333
4dkankan-common-utils/src/main/java/com/fdkankan/common/proto/format/XmlFormat.java


+ 0 - 65
4dkankan-common-utils/src/main/java/com/fdkankan/common/utils/Base64Converter.java

@@ -1,65 +0,0 @@
-package com.fdkankan.common.utils;
-
-import java.io.UnsupportedEncodingException;
-import java.util.Base64;
-
-public class Base64Converter {
-
-    public final static Base64.Encoder encoder = Base64.getEncoder();
-    final static Base64.Decoder decoder = Base64.getDecoder();
-
-    /**
-     * 给字符串加密
-     * @param text
-     * @return
-     */
-    public static String encode(String text) {
-        byte[] textByte = new byte[0];
-        try {
-            textByte = text.getBytes("UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-        String encodedText = encoder.encodeToString(textByte);
-        return encodedText;
-    }
-
-    /**
-     * 给字符串加密
-     * @param textByte
-     * @return
-     */
-    public static String encode(byte[] textByte) {
-        return encoder.encodeToString(textByte);
-    }
-
-    /**
-     * 将加密后的字符串进行解密
-     * @param encodedText
-     * @return
-     */
-    public static String decode(String encodedText) {
-        String text = null;
-        try {
-            text = new String(decoder.decode(encodedText), "UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-        return text;
-    }
-
-    /**
-     * 根据逻辑截取加密后的密码
-     * @param text
-     * @return
-     */
-    public static String subText(String text){
-        //去掉前8位字符串
-        text = text.substring(8);
-        //去掉后8位字符串
-        text = text.substring(0, text.length() - 8);
-        //最后两个字符串换到前面,并且去掉剩下的后8位字符串
-        String result = text.substring(text.length() - 2) + text.substring(0, text.length() - 10);
-        return result;
-    }
-}

+ 0 - 55
4dkankan-common-utils/src/main/java/com/fdkankan/common/utils/ConstantCmd.java

@@ -1,55 +0,0 @@
-package com.fdkankan.common.utils;
-
-public class ConstantCmd {
-
-	//生成模型的命令
-	public static final String BUILD_MODEL_COMMAND = "bash /home/ubuntu/bin/Launcher.sh ";
-
-	//生成模型的命令
-	public static final String BUILD_MODEL_COMMAND2 = "bash /opt/ossutil/sshoss.sh ";
-
-	public static final String BUILD_MODEL_OLD_COMMAND = "bash /home/ubuntu/bin_old/Launcher.sh ";
-	public static final String BUILD_MODEL_SFM_COMMAND = "bash /home/ubuntu/run_sfm.sh ";
-
-	public static final String OBJ_TO_TXT = "bash /home/ubuntu/bin_old/obj2txt.sh ";
-
-	public static final String REBUILD_MODEL_FLLOR = "bash /home/ubuntu/bin/Panoramix_Floorplan.sh ";
-	//切图命令
-	public static final String CUT_IMG_COMMAND = "bash /home/ubuntu/OpenSfM/bin/run_cube.sh ";
-	//调整图片的命令
-	public static final String ADJUST_IMG_COMMAND = "/home/ubuntu/OpenSfM/bin/run_skybox ";
-	  
-	  
-	  
-	//转台拼图命令
-	public static final String BUILD_PANORAMA = "AutopanoGiga /home/ubuntu/data/";
-	//六目,拼图,计算,切图(二代)
-	public static final String BUILD_FOR_SIX = "bash /home/ubuntu/run_all_m6.sh ";
-
-	//合并音频
-	public static final String MERGE_VIDEO = "bash /monchickey/ffmpeg/bin/ff_synthesis.sh ";
-
-	//生成一段静音音频
-	public static final String CREATE_MUTE_VIDEO = "bash /monchickey/ffmpeg/bin/ff_mtue.sh ";
-
-	//将mp4文件转换成flv
-	public static final String MP4_TO_FLV = "bash /monchickey/ffmpeg/bin/ff_mp4TOflv.sh ";
-
-	//删除/mnt/data/下的数据脚本
-	public static final String DELETE_FILE = "bash /monchickey/ffmpeg/bin/delete.sh ";
-
-	public static final String OSS_UTIL_CP ="bash /opt/ossutil/oss.sh ";
-
-	public static final String OSS_FILE_CP = "bash /opt/ossutil/file.sh ";
-
-	public static final String MATTERPRO_CUT_IMG = "node /opt/4dkankan_scene/index.js ";
-
-	//激光相机 extra迁移
-	public static final String CP_JG_EXTRA = "bash /opt/ossutil/laser-copy.sh ";
-
-	public static final String CP_JG_ALL = "bash /opt/ossutil/laser-cp-r.sh ";
-
-	// 修改户型图json文件
-	public static final String TRANSLATE_HOUST_FLOOR = "/opt/Robin/JsonRead.out ";
-
-}

+ 0 - 602
4dkankan-common-utils/src/main/java/com/fdkankan/common/utils/CreateObjUtil.java

@@ -1,602 +0,0 @@
-package com.fdkankan.common.utils;
-
-import com.fdkankan.common.constant.ConstantFileName;
-import com.fdkankan.common.constant.ConstantFilePath;
-import com.fdkankan.common.proto.BigSceneProto;
-import com.fdkankan.common.proto.Common;
-import com.fdkankan.common.proto.Visionmodeldata;
-import com.fdkankan.common.proto.format.JsonFormat;
-import com.google.protobuf.TextFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.util.StopWatch;
-
-import java.io.*;
-import java.util.HashMap;
-import java.util.Map;
-
-public class CreateObjUtil {
-
-	private static Logger log = LoggerFactory.getLogger(CreateObjUtil.class);
-
-	public void saveuploadImgs(String folderName) throws IOException, Exception
-	{
-		log.info("开始计算");
-		String command = "bash /home/ubuntu/photoscan-pro/build_model.sh "+folderName;
-		callshell(command);
-		boolean flag = false;
-		String sPath =  ConstantFilePath.CREATE_MODEL_PATH+folderName+File.separator+"mesh"+File.separator+"mesh.obj";
-		while(!flag)
-		{
-			flag = isModel(sPath,folderName);
-		}
-		log.info("计算完毕");
-	}
-	
-	public void saveuploadImgs2(String folderName) throws IOException, Exception
-	{
-		log.info("开始计算");
-		String command = "bash /home/ubuntu/photoscan-pro/build_bigscene.sh "+folderName;
-		callshell(command);
-		boolean flag = false;
-		String sPath = ConstantFilePath.CREATE_BIG_SCENE_PATH+folderName+File.separator+"mesh"+File.separator+"mesh.obj";
-		while(!flag)
-		{
-			flag = isModel(sPath,folderName);
-		}
-		log.info("计算完毕");
-		log.info("obj和camera转换成大场景要的格式");
-		convertobjTotxt( folderName);
-		
-	}
-
-	//开始建模
-	public static void unRar(String rarPath,String dataPath) throws Exception{
-		log.info("解压rar开始");
-		String command = "unrar e " + rarPath + " " + dataPath;
-		callshell(command);
-		log.info("解压rar完毕:" + command);
-	}
-
-	public static void unZip(String zipPath,String dataPath) throws Exception{
-		log.info("解压zip开始");
-		String command = "unzip -O GBK/GB18030CP936 " + zipPath + " -d " + dataPath;
-		callshell(command);
-		log.info("解压zip完毕:" + command);
-	}
-
-	//开始建模
-	public static void build3dModel(String folderName,String isModel) throws Exception{
-		log.info("开始建模");
-		String command = ConstantCmd.BUILD_MODEL_COMMAND+folderName;
-		callshell(command);
-		log.info("计算完毕:" + command);
-	}
-
-	//开始建模
-	public static void build3dModel2(String folderName,String isModel) throws Exception{
-		log.info("开始建模");
-		String command = ConstantCmd.BUILD_MODEL_COMMAND2+folderName;
-		callshell(command);
-		log.info("计算完毕:" + command);
-	}
-
-	//开始建模
-	public static void build3dModelOld(String folderName,String isModel) throws Exception{
-		log.info("开始v2建模");
-		String command = ConstantCmd.BUILD_MODEL_OLD_COMMAND+folderName;
-		callshell(command);
-		log.info("计算v2完毕:" + command);
-	}
-
-	//开始建模
-	public static void translateHoustfloorJSONFile(String filePath,String outputPath) throws Exception{
-		log.info("开始转换houst_floor.json");
-		String command = ConstantCmd.TRANSLATE_HOUST_FLOOR + filePath + " " + outputPath;
-		callshell(command);
-		log.info("转换houst_floor.json 结束");
-	}
-
-	//激光相机复制资源
-	public static void cpfile(String filepathOld,String filepathNew) throws Exception{
-		log.info("开始复制");
-		String command = ConstantCmd.CP_JG_EXTRA+ " " + filepathOld + " " + filepathNew;
-		callshell(command);
-		log.info("复制完毕:" + command);
-	}
-
-
-	//激光相机复制资源laser下的全部资源
-	public static void cplaserfile(String filepathOld,String filepathNew) throws Exception{
-		log.info("开始复制");
-		String command = ConstantCmd.CP_JG_ALL+ " " + filepathOld + " " + filepathNew;
-		callshell(command);
-		log.info("复制完毕:" + command);
-	}
-	
-	//开始建模
-	public void build3dModelSFM(String folderName,String isModel) throws Exception{
-		log.info("开始建模");
-		String command = ConstantCmd.BUILD_MODEL_SFM_COMMAND+folderName+" "+isModel;
-		callshell(command);
-		log.info("计算完毕");
-	}
-
-	//obj文件转换问txt
-	public static void objToTxt(String folderName,String isModel) throws Exception{
-		log.info("obj2txt开始转换");
-		String command = ConstantCmd.OBJ_TO_TXT+folderName;
-		callshell(command);
-		log.info("转换完毕:" + command);
-	}
-
-	public void rebuildModelFllor(String folderName, String isModel) {
-		try{
-			log.info("开始建模");
-			String command = ConstantCmd.REBUILD_MODEL_FLLOR+folderName+" "+isModel;
-			callshell(command);
-			log.info("计算完毕");
-		}
-		catch(Exception e)
-		{
-			e.printStackTrace();
-		}
-	}
-
-	//切图
-	public void cutImgs(String[] imgNames ,String folderName)
-	{
-		try{
-			log.info("开始切图");
-			for(int i=0;i<imgNames.length;++i)
-			{
-				String imgName=imgNames[i].replace(".jpg", "");
-				String command = ConstantCmd.CUT_IMG_COMMAND+folderName+" "+imgName;
-				callshell(command);
-			}
-			log.info("切图完毕");
-		}
-		catch(Exception e)
-		{
-			e.printStackTrace();
-		}
-	}
-	
-	//调整切图
-	public void adjustImgs(String folderName)
-	{
-		try{
-			String command = ConstantCmd.ADJUST_IMG_COMMAND + folderName;
-			log.info("开始调整图片");
-			callshell(command);
-			log.info("调整图片完毕");
-		}
-		catch(Exception e)
-		{
-			e.printStackTrace();
-		}
-	}
-	
-	//obj和camera转换成大场景要的格式
-	public void convertobjTotxt(String folderName) throws Exception
-	{
-		//obj
-		String command = "/home/ubuntu/photoscan-pro/main/mesh/mesh "+folderName;
-		callshell(command);
-		//camera
-		command = "/home/ubuntu/photoscan-pro/main/read_camera/read_camera "+folderName;
-		callshell(command);
-		
-		String prefix = ConstantFilePath.CREATE_BIG_SCENE_PATH+folderName+File.separator+"data"+File.separator;
-		String srcpath = prefix +"mesh.txt";
-		String despath = prefix +"dacf7dfa24ae47fab8fcebfe4dc41ab9_50k.dam";
-				
-		convertTxtToDam( srcpath, despath);
-		//dam转换成lzma
-		command = "lzma /home/ubuntu/photo_data/bigscene/"+folderName+"/data/dacf7dfa24ae47fab8fcebfe4dc41ab9_50k.dam";
-		callshell(command);
-		
-		srcpath = prefix +"vision.txt";
-		despath = prefix +"vision.modeldata";
-		convertTxtToVisionmodeldata( srcpath, despath);
-	}
-
-	public static void convertDamToLzma(String folderName)throws Exception
-	{
-		try
-		{
-			String command = "lzma "+ folderName+File.separator+ ConstantFileName.modelUUID+"_50k.dam";
-			log.info("开始转换lzma");
-			callshell(command);
-			log.info("转换lzma完毕");
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-			e.printStackTrace(new PrintWriter(trace));
-			log.error(trace.toString());
-		}
-
-	}
-
-	public static void convertDamToLzma2(String folderName)throws Exception
-	{
-		try
-		{
-			String command = "lzma "+ folderName+File.separator+ ConstantFileName.modelUUID+"_50k2.dam";
-			log.info("开始转换lzma");
-			callshell(command);
-			log.info("转换lzma完毕");
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-			e.printStackTrace(new PrintWriter(trace));
-			log.error(trace.toString());
-		}
-
-	}
-	
-	public static void convertTxtToDam(String srcpath,String despath)throws Exception
-	{
-			BigSceneProto.binary_mesh.Builder builder= BigSceneProto.binary_mesh.newBuilder();
-			InputStream inputStream = new FileInputStream(srcpath);
-			InputStreamReader reader = new InputStreamReader(inputStream, "ASCII");
-			TextFormat.merge(reader, builder);
-			byte[] buf= builder.build().toByteArray();
-			
-			 //把序列化后的数据写入本地磁盘  
-	        ByteArrayInputStream stream = new ByteArrayInputStream(buf);  
-	        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(despath));//设置输出路径  
-	        BufferedInputStream bis = new BufferedInputStream(stream);  
-	        int b = -1;  
-	        while ((b = bis.read()) != -1) {  
-	            bos.write(b);  
-	        }  
-	        bis.close();  
-	        bos.close();
-	}
-	
-	public static void convertVisionmodeldataToTxt(String srcpath,String despath)throws Exception
-	{
-		try
-		{
-			File file = new File(srcpath); 
-			FileInputStream fis=new FileInputStream(file);
-
-			Visionmodeldata.NavigationInfo data_NavigationInfo = Visionmodeldata.NavigationInfo.parseFrom(fis);
-	
-			//PrintStream out = new PrintStream(despath); 
-			String jsonFormat1 = JsonFormat.printToString(data_NavigationInfo);
-			ByteArrayInputStream stream = new ByteArrayInputStream(jsonFormat1.getBytes());  
-	        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(despath));//设置输出路径  
-	        BufferedInputStream bis = new BufferedInputStream(stream);  
-	        int b = -1;  
-	        while ((b = bis.read()) != -1) {  
-	           bos.write(b);  
-	        }  
-			//out.close();
-	        bis.close();  
-	        bos.close(); 
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-	        e.printStackTrace(new PrintWriter(trace));
-	        log.error(trace.toString());
-		}
-	}
-	
-	public static void convertTxtToVisionmodeldata(String srcpath,String despath)throws Exception
-	{
-		try
-		{
-			Visionmodeldata.NavigationInfo.Builder builder = Visionmodeldata.NavigationInfo.newBuilder();
-			String jsonFormat = readTxtFileToJson(srcpath);
-			JsonFormat.merge(jsonFormat, builder);
-			byte[] buf= builder.build().toByteArray();
-			
-			 //把序列化后的数据写入本地磁盘  
-	        ByteArrayInputStream stream = new ByteArrayInputStream(buf);  
-	        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(despath));//设置输出路径  
-	        BufferedInputStream bis = new BufferedInputStream(stream);  
-	        int b = -1;  
-	        while ((b = bis.read()) != -1) {  
-	           bos.write(b);  
-	        }  
-	        bis.close();  
-	        bos.close(); 
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-	        e.printStackTrace(new PrintWriter(trace));
-	        log.error(trace.toString());
-		}
-	}
-
-	public static void convertVisionmodeldataToTxtCommon(String srcpath,String despath)throws Exception
-	{
-		try
-		{
-			File file = new File(srcpath);
-			FileInputStream fis=new FileInputStream(file);
-
-			Common.NavigationInfo data_NavigationInfo = Common.NavigationInfo.parseFrom(fis);
-
-			//PrintStream out = new PrintStream(despath);
-			String jsonFormat1 = JsonFormat.printToString(data_NavigationInfo);
-			ByteArrayInputStream stream = new ByteArrayInputStream(jsonFormat1.getBytes());
-			BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(despath));//设置输出路径
-			BufferedInputStream bis = new BufferedInputStream(stream);
-			int b = -1;
-			while ((b = bis.read()) != -1) {
-				bos.write(b);
-			}
-			//out.close();
-			bis.close();
-			bos.close();
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-			e.printStackTrace(new PrintWriter(trace));
-			log.error(trace.toString());
-		}
-	}
-
-	public static void convertTxtToVisionmodeldataCommon(String srcpath,String despath)throws Exception
-	{
-		try
-		{
-			Common.NavigationInfo.Builder builder = Common.NavigationInfo.newBuilder();
-			String jsonFormat = readTxtFileToJson(srcpath);
-			JsonFormat.merge(jsonFormat, builder);
-			byte[] buf= builder.build().toByteArray();
-
-			//把序列化后的数据写入本地磁盘
-			ByteArrayInputStream stream = new ByteArrayInputStream(buf);
-			BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(despath));//设置输出路径
-			BufferedInputStream bis = new BufferedInputStream(stream);
-			int b = -1;
-			while ((b = bis.read()) != -1) {
-				bos.write(b);
-			}
-			bis.close();
-			bos.close();
-		}
-		catch(Exception e)
-		{
-			StringWriter trace=new StringWriter();
-			e.printStackTrace(new PrintWriter(trace));
-			log.error(trace.toString());
-		}
-	}
-	
-	public static void callshell(String command)
-	{ 
-        try {
-			 StopWatch stopWatch = new StopWatch();
-			 stopWatch.start();
-			 Process process = Runtime.getRuntime().exec(command);
-        	 StreamGobbler errorGobbler = new StreamGobbler(process.getErrorStream(), "ERROR");
-             errorGobbler.start();  
-             StreamGobbler outGobbler = new StreamGobbler(process.getInputStream(), "STDOUT");  
-             outGobbler.start();  
-             process.waitFor();
-			log.info("脚本{}执行完毕,用时:{}",command,stopWatch.toString());
-        } catch (Exception e) {  
-            e.printStackTrace();  
-        }  
-	}
-	
-	public static int doWaitFor(Process process) {
-		  InputStream in = null;
-		  InputStream err = null;
-		  int exitValue = -1; // returned to caller when p is finished
-		  try {
-		    in = process.getInputStream();
-		    err = process.getErrorStream();
-		    boolean finished = false; // Set to true when p is finished
-		    while (!finished) {
-		      try {
-		        while (in.available() > 0) {
-		          // Print the output of our system call
-		          Character c = new Character((char) in.read());
-		          System.out.print(c);
-		        }
-		        while (err.available() > 0) {
-		          // Print the output of our system call
-		          Character c = new Character((char) err.read());
-		          System.out.print(c);
-		        }
-		        // Ask the process for its exitValue. If the process
-		        // is not finished, an IllegalThreadStateException
-		        // is thrown. If it is finished, we fall through and
-		        // the variable finished is set to true.
-		        exitValue = process.exitValue();
-		        finished = true;
-		      } catch (IllegalThreadStateException e) {
-		        // Process is not finished yet;
-		        // Sleep a little to save on CPU cycles
-		        Thread.currentThread().sleep(500);
-		      }
-		    }
-		  } catch (Exception e) {
-		    e.printStackTrace();
-		  } finally {
-		    try {
-		      if (in != null) {
-		        in.close();
-		      }
-		    } catch (IOException e) {
-		      e.printStackTrace();
-		    }
-		    if (err != null) {
-		      try {
-		        err.close();
-		      } catch (IOException e) {
-		        e.printStackTrace();
-		      }
-		    }
-		  }
-		  return exitValue;
-		}
-
-	
-	private boolean isModel(String sPath,String folderName)
-	{
-		boolean flag = false;  
-		File file = new File(sPath);  
-	    if (file.isFile() && file.exists()) {  
-	        flag = true;  
-	    }  
-	    log.info("等待...");
-	    return flag;  
-	}
-	
-	public static String readTxtFileToJson(String filePath){
-        try { 
-                String encoding="UTF-8"; 
-                File file=new File(filePath); 
-                if(file.isFile() && file.exists()){ 
-                    InputStreamReader read = new InputStreamReader( 
-                    new FileInputStream(file),encoding);
-                    BufferedReader bufferedReader = new BufferedReader(read); 
-                    String lineTxt = null; 
-                    String result="";
-                    while((lineTxt = bufferedReader.readLine()) != null){ 
-                    	result+=lineTxt;
-                        //log.info(lineTxt); 
-                    } 
-                    read.close(); 
-                    return result;
-        }else{ 
-            return null;
-        } 
-        } catch (Exception e) { 
-            e.printStackTrace(); 
-            return null;
-        } 
-      
-    }
-	
-	public Map<String,String> getAllFile(String dPath,String prefix)
-	{
-		File dirFile = new File(dPath);
-	    if (!dirFile.isDirectory()) {
-        }
-	    Map<String,String> map = new HashMap<String,String>();
-	    File[] files = dirFile.listFiles();
-	    for (int i = 0; i < files.length; i++) {
-            if (files[i].isFile()) {
-            	String path = files[i].getPath();
-            	map.put(path, prefix+path.substring(path.lastIndexOf("/")+1));
-            }
-        }
-	    return map;
-	}
-	
-	public Map<String,String> getchildFile(String dPath,String prefix,String childname)
-	{
-		File dirFile = new File(dPath+File.separator+childname);
-	    if (!dirFile.isDirectory()) {
-	    	return null;
-        }
-	    Map<String,String> map = new HashMap<String,String>();
-	    File[] files = dirFile.listFiles();
-	    for (int i = 0; i < files.length; i++) {
-            if (files[i].isFile()) {
-            	String path = files[i].getPath();
-            	map.put(path, prefix+childname+path.substring(path.lastIndexOf("/")));
-            }
-        }
-	    return map;
-	}
-	
-	//转台拼图
-	public void buildPanoramicImgs(String folderName)throws Exception
-	{
-		String command = ConstantCmd.BUILD_PANORAMA + folderName;
-		log.info("开始拼全景图");
-		callshell(command);
-		log.info("全景图拼接完毕");
-	}
-	
-	//六目拼图、切图,计算
-	public void buildForSix(String folderName)throws Exception
-	{
-		String command = ConstantCmd.BUILD_FOR_SIX + folderName;
-		log.info("开始处理数据(六目)");
-		callshell(command);
-		log.info("数据处理完毕(六目)");
-	}
-
-	public static void createSoftConnection(String source, String target) {
-		String command = "ln -s " + source + " " + target;
-		log.info("开始创建文件夹软连接");
-		callshell(command);
-		log.info("数据处理完毕(六目):" + command);
-	}
-
-	//合并音频
-	public static void mergeVideo(String oldVideo , String newVideo, String targetVideo) throws Exception{
-		String command = ConstantCmd.MERGE_VIDEO + " " + oldVideo + " " + newVideo + " " + targetVideo + " -y";
-		log.info("开始合并视频");
-		callshell(command);
-		log.info("合并视频完毕:" + command);
-	}
-
-	//生成一段静音音频
-	public static void createMuteViode(double time , String targetVideo) throws Exception{
-		String command = ConstantCmd.CREATE_MUTE_VIDEO + " " + time + " " + targetVideo + " -y";
-		log.info("开始生成一段静音音频");
-		callshell(command);
-		log.info("生成一段静音音频完毕:" + command);
-	}
-
-	//mp4文件转换成flv文件
-	public static void mp4ToFlv(String oldVideo, String newVideo) throws Exception{
-		String command = ConstantCmd.MP4_TO_FLV + " " + oldVideo + " " + newVideo;
-		log.info("mp4文件转换成flv文件");
-		callshell(command);
-		log.info("mp4文件转换成flv文件完毕:" + command);
-	}
-
-	//删除/mnt/data/下的数据
-	public static void deleteFile(String filePath) throws Exception{
-		String command = ConstantCmd.DELETE_FILE + " " + filePath;
-		log.info("删除/mnt/data/下的数据");
-		callshell(command);
-		log.info("删除/mnt/data/下的数据完毕:" + command);
-	}
-
-	public static void ossUtilCp(String fileUrl , String path) throws Exception{
-		String command = ConstantCmd.OSS_UTIL_CP + " " + fileUrl + " " + path;
-		Long start = System.currentTimeMillis();
-		log.info("开始oss下载文件:" + command);
-		callshell(command);
-		log.info("oss下载文件完成,时间为:" + (System.currentTimeMillis() - start));
-	}
-
-	public static void ossFileCp(String fileUrl , String path) throws Exception{
-		String command = ConstantCmd.OSS_FILE_CP + " " + fileUrl + " " + path;
-		Long start = System.currentTimeMillis();
-		log.info("开始s3文件下载文件:" + command);
-		callshell(command);
-		log.info("s3文件下载文件完成,时间为:" + (System.currentTimeMillis() - start));
-	}
-
-	/**
-	 * matterpro场景获取阿里云的切图数据
-	 * @param path
-	 * @throws Exception
-     */
-	public static void matterproCutImg(String num , String path) throws Exception{
-		String command = ConstantCmd.MATTERPRO_CUT_IMG + " -s " + num + " -d " + path;
-		Long start = System.currentTimeMillis();
-		log.info("开始matterpro获取阿里云图片方法:" + command);
-		callshell(command);
-		log.info("matterpro获取阿里云图片方法完成,时间为:" + (System.currentTimeMillis() - start));
-	}
-}

+ 0 - 61
4dkankan-common-utils/src/main/java/com/fdkankan/common/utils/StreamGobbler.java

@@ -1,61 +0,0 @@
-package com.fdkankan.common.utils;
-
-import java.io.*;
-
-public class StreamGobbler extends Thread {
-
-	InputStream is;  
-    String type;  
-    OutputStream os;  
-
-    public StreamGobbler(InputStream is, String type) {  
-        this(is, type, null);  
-    }  
-
-    StreamGobbler(InputStream is, String type, OutputStream redirect) {  
-        this.is = is;  
-        this.type = type;  
-        this.os = redirect;  
-    }  
-
-    public void run() {  
-        InputStreamReader isr = null;  
-        BufferedReader br = null;  
-        PrintWriter pw = null;  
-        try {  
-            if (os != null)  
-                pw = new PrintWriter(os);  
-
-            isr = new InputStreamReader(is);  
-            br = new BufferedReader(isr);  
-            String line=null;  
-            while ( (line = br.readLine()) != null) {  
-                if (pw != null)  
-                    pw.println(line);  
-                System.out.println(type + ">" + line);      
-            }  
-
-            if (pw != null)  
-                pw.flush();  
-        } catch (IOException ioe) {  
-            ioe.printStackTrace();    
-        } finally{  
-            try {  
-            	if(pw!=null)
-            	{
-            		 pw.close();  
-            	}
-            	if(br!=null)
-            	{
-            		br.close();  
-            	}
-            	if(isr!=null)
-            	{
-            		isr.close();  
-            	}
-            } catch (IOException e) {  
-                e.printStackTrace();  
-            }  
-        }  
-    }  
-}

+ 1 - 1
4dkankan-common-db/src/main/java/com/fdkankan/common/constant/ConstantFileName.java

@@ -1,4 +1,4 @@
-package com.fdkankan.common.constant;
+package com.fdkankan.utils.constant;
 
 public class ConstantFileName {
     //背景音乐

+ 1 - 1
4dkankan-common-mq/src/main/java/com/fdkankan/common/constant/ConstantFilePath.java

@@ -1,4 +1,4 @@
-package com.fdkankan.common.constant;
+package com.fdkankan.utils.constant;
 
 public class ConstantFilePath {
     public static final String BASE_PATH = "/mnt/4Dkankan";

+ 1 - 1
4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/ConstantUrl.java

@@ -1,4 +1,4 @@
-package com.fdkankan.common.constant;
+package com.fdkankan.utils.constant;
 
 public class ConstantUrl {
 

+ 1 - 1
4dkankan-common-redis/src/main/java/com/fdkankan/common/proto/BigSceneProto.java

@@ -1,4 +1,4 @@
-package com.fdkankan.common.proto;
+package com.fdkankan.utils.proto;
 
 public final class BigSceneProto {
   private BigSceneProto() {}

+ 1 - 1
4dkankan-common-redis/src/main/java/com/fdkankan/common/proto/Common.java

@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // source: Common.proto
 
-package com.fdkankan.common.proto;
+package com.fdkankan.utils.proto;
 
 public final class Common {
   private Common() {}

+ 1 - 1
4dkankan-common-db/src/main/java/com/fdkankan/common/proto/Visionmodeldata.java

@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // source: visionmodeldata.proto
 
-package com.fdkankan.common.proto;
+package com.fdkankan.utils.proto;
 
 public final class Visionmodeldata {
   private Visionmodeldata() {}

+ 3 - 3
4dkankan-common-db/src/main/java/com/fdkankan/common/proto/format/CouchDBFormat.java

@@ -1,4 +1,4 @@
-package com.fdkankan.common.proto.format;
+package com.fdkankan.utils.proto.format;
 
 
 import com.google.protobuf.ExtensionRegistry;
@@ -95,7 +95,7 @@ public class CouchDBFormat extends JsonFormat {
         // we would not have to read to one big String. Alas, none of these is
         // the case. Oh well.
 
-        merge(JsonFormat.toStringBuilder(input), extensionRegistry, builder);
+        merge(toStringBuilder(input), extensionRegistry, builder);
     }
 
     /**
@@ -111,7 +111,7 @@ public class CouchDBFormat extends JsonFormat {
 
         tokenizer.consume("{"); // Needs to happen when the object starts.
         while (!tokenizer.tryConsume("}")) { // Continue till the object is done
-            JsonFormat.mergeField(tokenizer, extensionRegistry, builder);
+            mergeField(tokenizer, extensionRegistry, builder);
         }
     }
 

+ 1 - 1
4dkankan-common-db/src/main/java/com/fdkankan/common/proto/format/HtmlFormat.java

@@ -1,4 +1,4 @@
-package com.fdkankan.common.proto.format;
+package com.fdkankan.utils.proto.format;
 /* 
     Copyright (c) 2009, Orbitz World Wide
     All rights reserved.

+ 1 - 1
4dkankan-common-mq/src/main/java/com/fdkankan/common/proto/format/JavaPropsFormat.java

@@ -1,4 +1,4 @@
-package com.fdkankan.common.proto.format;
+package com.fdkankan.utils.proto.format;
 
 import com.google.protobuf.*;
 

+ 1 - 1
4dkankan-common-db/src/main/java/com/fdkankan/common/proto/format/JsonFormat.java

@@ -1,4 +1,4 @@
-package com.fdkankan.common.proto.format;
+package com.fdkankan.utils.proto.format;
 /* 
 	Copyright (c) 2009, Orbitz World Wide
 	All rights reserved.

+ 1 - 1
4dkankan-common-redis/src/main/java/com/fdkankan/common/proto/format/XmlFormat.java

@@ -1,4 +1,4 @@
-package com.fdkankan.common.proto.format;
+package com.fdkankan.utils.proto.format;
 /* 
     Copyright (c) 2009, Orbitz World Wide
     All rights reserved.

+ 1 - 1
4dkankan-common-mq/src/main/java/com/fdkankan/common/utils/Base64Converter.java

@@ -1,4 +1,4 @@
-package com.fdkankan.common.utils;
+package com.fdkankan.utils.utils;
 
 import java.io.UnsupportedEncodingException;
 import java.util.Base64;

+ 1 - 1
4dkankan-common-mq/src/main/java/com/fdkankan/common/utils/ConstantCmd.java

@@ -1,4 +1,4 @@
-package com.fdkankan.common.utils;
+package com.fdkankan.utils.utils;
 
 public class ConstantCmd {
 

+ 8 - 8
4dkankan-common-redis/src/main/java/com/fdkankan/common/utils/CreateObjUtil.java

@@ -1,11 +1,11 @@
-package com.fdkankan.common.utils;
-
-import com.fdkankan.common.constant.ConstantFileName;
-import com.fdkankan.common.constant.ConstantFilePath;
-import com.fdkankan.common.proto.BigSceneProto;
-import com.fdkankan.common.proto.Common;
-import com.fdkankan.common.proto.Visionmodeldata;
-import com.fdkankan.common.proto.format.JsonFormat;
+package com.fdkankan.utils.utils;
+
+import com.fdkankan.utils.constant.ConstantFileName;
+import com.fdkankan.utils.constant.ConstantFilePath;
+import com.fdkankan.utils.proto.BigSceneProto;
+import com.fdkankan.utils.proto.Common;
+import com.fdkankan.utils.proto.Visionmodeldata;
+import com.fdkankan.utils.proto.format.JsonFormat;
 import com.google.protobuf.TextFormat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

+ 1 - 1
4dkankan-common/src/main/java/com/fdkankan/common/util/FileUtil.java

@@ -1,4 +1,4 @@
-package com.fdkankan.common.util;
+package com.fdkankan.utils.utils;
 
 import java.io.*;
 import java.nio.ByteBuffer;

+ 1 - 1
4dkankan-common-utils/src/main/java/com/fdkankan/common/utils/FileUtils.java

@@ -1,4 +1,4 @@
-package com.fdkankan.common.utils;
+package com.fdkankan.utils.utils;
 
 import com.alibaba.fastjson.JSONObject;
 import it.sauronsoftware.jave.*;

+ 1 - 1
4dkankan-common/src/main/java/com/fdkankan/common/util/StreamGobbler.java

@@ -1,4 +1,4 @@
-package com.fdkankan.common.util;
+package com.fdkankan.utils.utils;
 
 import java.io.*;