dengsixing 6 kuukautta sitten
vanhempi
commit
6ef708f6ae
34 muutettua tiedostoa jossa 3127 lisäystä ja 17266 poistoa
  1. 1 53
      src/main/java/com/fdkankan/SceneApplication.java
  2. 4 0
      src/main/java/com/fdkankan/common/constant/ConstantCmd.java
  3. 5 1
      src/main/java/com/fdkankan/common/constant/ConstantFileName.java
  4. 19 26
      src/main/java/com/fdkankan/common/constant/ConstantFilePath.java
  5. 0 11
      src/main/java/com/fdkankan/common/constant/ErrorCode.java
  6. 4 4
      src/main/java/com/fdkankan/common/constant/UploadFilePath.java
  7. 2 2
      src/main/java/com/fdkankan/common/exception/BusinessException.java
  8. 0 7340
      src/main/java/com/fdkankan/common/proto/BigSceneProto.java
  9. 0 4345
      src/main/java/com/fdkankan/common/proto/Visionmodeldata.java
  10. 0 1603
      src/main/java/com/fdkankan/common/proto/format/JsonFormat.java
  11. 3 3
      src/main/java/com/fdkankan/common/util/BASE64DecodedMultipartFile.java
  12. 20 12
      src/main/java/com/fdkankan/common/util/FdfsUtil.java
  13. 130 126
      src/main/java/com/fdkankan/model/proto/BigSceneProto.java
  14. 66 65
      src/main/java/com/fdkankan/model/proto/Common.java
  15. 65 64
      src/main/java/com/fdkankan/model/proto/Visionmodeldata.java
  16. 0 703
      src/main/java/com/fdkankan/model/proto/format/HtmlFormat.java
  17. 1338 1338
      src/main/java/com/fdkankan/model/proto/format/JavaPropsFormat.java
  18. 14 10
      src/main/java/com/fdkankan/model/proto/format/JsonFormat.java
  19. 1333 1333
      src/main/java/com/fdkankan/model/proto/format/XmlFormat.java
  20. 8 70
      src/main/java/com/fdkankan/model/utils/ConvertUtils.java
  21. 6 4
      src/main/java/com/fdkankan/redis/util/RedisClient.java
  22. 1 5
      src/main/java/com/fdkankan/scene/Interceptor/CheckTokenAspect.java
  23. 1 5
      src/main/java/com/fdkankan/scene/Interceptor/InitEditInfoAspect.java
  24. 27 20
      src/main/java/com/fdkankan/scene/Interceptor/ViewLogAspect.java
  25. 1 1
      src/main/java/com/fdkankan/scene/bean/ResultData.java
  26. 5 3
      src/main/java/com/fdkankan/scene/service/impl/BoxModelServiceImpl.java
  27. 5 3
      src/main/java/com/fdkankan/scene/service/impl/CutModelServiceImpl.java
  28. 5 3
      src/main/java/com/fdkankan/scene/service/impl/SceneDrawServiceImpl.java
  29. 9 6
      src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoExtServiceImpl.java
  30. 18 9
      src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoServiceImpl.java
  31. 0 32
      src/main/java/com/fdkankan/scene/service/impl/SceneEditServiceImpl.java
  32. 35 23
      src/main/java/com/fdkankan/scene/service/impl/SceneProServiceImpl.java
  33. 0 41
      src/main/java/com/fdkankan/scene/service/impl/SceneServiceImpl.java
  34. 2 2
      src/main/java/com/fdkankan/scene/service/impl/SceneUploadServiceImpl.java

+ 1 - 53
src/main/java/com/fdkankan/SceneApplication.java

@@ -1,29 +1,15 @@
 package com.fdkankan;
 package com.fdkankan;
 
 
-import cn.hutool.core.collection.CollUtil;
-import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.dtflys.forest.springboot.annotation.ForestScan;
 import com.dtflys.forest.springboot.annotation.ForestScan;
-import com.fdkankan.redis.constant.RedisKey;
-import com.fdkankan.redis.util.RedisClient;
-import com.fdkankan.scene.entity.Scene;
-import com.fdkankan.scene.entity.SceneConvertLog;
-import com.fdkankan.scene.service.SceneConvertLogService;
-import com.fdkankan.scene.service.SceneService;
 import com.yomahub.tlog.core.enhance.bytes.AspectLogEnhance;
 import com.yomahub.tlog.core.enhance.bytes.AspectLogEnhance;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.mybatis.spring.annotation.MapperScan;
 import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.CommandLineRunner;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.EnableScheduling;
 
 
-import javax.annotation.Resource;
-import java.util.List;
-
 @SpringBootApplication
 @SpringBootApplication
 @EnableDiscoveryClient
 @EnableDiscoveryClient
 @EnableFeignClients
 @EnableFeignClients
@@ -31,14 +17,7 @@ import java.util.List;
 @MapperScan("com.fdkankan.**.mapper")
 @MapperScan("com.fdkankan.**.mapper")
 @ForestScan("com.fdkankan.scene.httpclient")
 @ForestScan("com.fdkankan.scene.httpclient")
 @Slf4j
 @Slf4j
-public class SceneApplication implements CommandLineRunner {
-
-    @Autowired
-    private SceneService sceneService;
-    @Autowired
-    private SceneConvertLogService sceneConvertLogService;
-    @Resource
-    private RedisClient redisClient;
+public class SceneApplication{
 
 
     static {
     static {
         AspectLogEnhance.enhance();
         AspectLogEnhance.enhance();
@@ -48,35 +27,4 @@ public class SceneApplication implements CommandLineRunner {
         SpringApplication.run(SceneApplication.class, args);
         SpringApplication.run(SceneApplication.class, args);
     }
     }
 
 
-    @Override
-    public void run(String... args) throws Exception {
-
-//        String initscene = redisClient.get("initscene");
-//        if(StrUtil.isNotEmpty(initscene)){
-//            return;
-//        }
-//        redisClient.add("initscene", "111");
-//
-//        log.info("初始化站址编码和时间任务开始");
-//        List<Scene> list = sceneService.list(new LambdaQueryWrapper<Scene>().select(Scene::getId, Scene::getNum).isNull(Scene::getStationcode));
-//        list.stream().forEach(s->{
-//            String num = s.getNum();
-//            try {
-//                List<SceneConvertLog> logs = sceneConvertLogService.list(new LambdaQueryWrapper<SceneConvertLog>()
-//                        .eq(SceneConvertLog::getEntityId, num)
-//                        .eq(SceneConvertLog::getStatus, 1)
-//                        .orderByDesc(SceneConvertLog::getCreateTime));
-//                if(CollUtil.isNotEmpty(logs)){
-//                    SceneConvertLog sceneConvertLog = logs.get(0);
-//                    s.setStationcode(sceneConvertLog.getStationCode());
-//                    s.setAlgorithmTime(sceneConvertLog.getCreateTime());
-//                    sceneService.updateById(s);
-//                }
-//            }catch (Exception e){
-//                log.error("填充场景站址编码和时间失败, num:{}", num, e);
-//            }
-//        });
-//        log.info("初始化站址编码和时间任务结束");
-//        redisClient.del("initscene");
-    }
 }
 }

+ 4 - 0
src/main/java/com/fdkankan/common/constant/ConstantCmd.java

@@ -2,6 +2,10 @@ package com.fdkankan.common.constant;
 
 
 public class ConstantCmd {
 public class ConstantCmd {
 
 
+	private ConstantCmd(){
+		throw new UnsupportedOperationException();
+	}
+
 	//生成模型的命令
 	//生成模型的命令
 	public static final String BUILD_MODEL_COMMAND = "sudo bash /home/ubuntu/bin/Launcher.sh ";
 	public static final String BUILD_MODEL_COMMAND = "sudo bash /home/ubuntu/bin/Launcher.sh ";
 
 

+ 5 - 1
src/main/java/com/fdkankan/common/constant/ConstantFileName.java

@@ -1,6 +1,11 @@
 package com.fdkankan.common.constant;
 package com.fdkankan.common.constant;
 
 
 public class ConstantFileName {
 public class ConstantFileName {
+
+    private ConstantFileName(){
+        throw new UnsupportedOperationException();
+    }
+
     //背景音乐
     //背景音乐
     public static final String BACKGROUND_MUSIC = "bg.mp3";
     public static final String BACKGROUND_MUSIC = "bg.mp3";
     //编辑页面,第二代
     //编辑页面,第二代
@@ -31,7 +36,6 @@ public class ConstantFileName {
     public static final String APP_VOICE_NAME = "app";
     public static final String APP_VOICE_NAME = "app";
 
 
     public static final String TOURLIST_FOLDER = "tour";
     public static final String TOURLIST_FOLDER = "tour";
-    //public static final String TEMPFILES = "tempFiles";
 
 
     public static final String modelUUID = "dacf7dfa24ae47fab8fcebfe4dc41ab9";
     public static final String modelUUID = "dacf7dfa24ae47fab8fcebfe4dc41ab9";
 
 

+ 19 - 26
src/main/java/com/fdkankan/common/constant/ConstantFilePath.java

@@ -20,7 +20,6 @@ public class ConstantFilePath {
     public static final String SCENE_QR_CODE_PATH = "/mnt/4Dkankan/sceneQRcode/";
     public static final String SCENE_QR_CODE_PATH = "/mnt/4Dkankan/sceneQRcode/";
     // excel
     // excel
     public static final String EXCEL_PATH = "/mnt/4Dkankan/excel/";
     public static final String EXCEL_PATH = "/mnt/4Dkankan/excel/";
-    //    public static final String EXCEL_PATH = "F:\\excel\\";
     // medias
     // medias
     public static final String MEDIAS_PATH = "/mnt/4Dkankan/medias/";
     public static final String MEDIAS_PATH = "/mnt/4Dkankan/medias/";
     // logo
     // logo
@@ -36,8 +35,6 @@ public class ConstantFilePath {
     public static final String CREATE_BIG_SCENE_PATH = PREFIX + "/photo_data/bigscene/";
     public static final String CREATE_BIG_SCENE_PATH = PREFIX + "/photo_data/bigscene/";
     //生成模型的路径
     //生成模型的路径
     public static final String BUILD_MODEL_PATH = "/mnt/data/";
     public static final String BUILD_MODEL_PATH = "/mnt/data/";
-    //生成模型的路径
-    public static String BUILD_MODEL_LASER_PATH ="/mnt/data/";
 
 
     //支付二维码图片存放路径
     //支付二维码图片存放路径
     public static final String ALI_QRCODE_FOLDER = "/mnt/4Dkankan/alicode/";
     public static final String ALI_QRCODE_FOLDER = "/mnt/4Dkankan/alicode/";
@@ -45,25 +42,33 @@ public class ConstantFilePath {
 
 
     public static final String OSS_PREFIX = "home/";
     public static final String OSS_PREFIX = "home/";
 
 
+    public static final String DATA_PATH_FORMAT = "data/data%s/";
+
+    public static final String IMAGE_PATH_FORMAT = "images/images%s/";
+
+    public static final String VIEW_USER_FORMAT = "%s/user/";
+
+    public static final String VIEW_DATA_FORMAT = "%s/data/";
+
     /**
     /**
      * 场景数据文件路径
      * 场景数据文件路径
      */
      */
-    public static final String DATABUFFER_FORMAT = SCENE_PATH + "data/data%s/";
+    public static final String DATABUFFER_FORMAT = SCENE_PATH + DATA_PATH_FORMAT;
 
 
     /**
     /**
      * 场景数据文件路径
      * 场景数据文件路径
      */
      */
-    public static final String IMAGESBUFFER_FORMAT = SCENE_PATH + "images/images%s/";
+    public static final String IMAGESBUFFER_FORMAT = SCENE_PATH + IMAGE_PATH_FORMAT;
 
 
     /**
     /**
      * 漫游文件路径
      * 漫游文件路径
      */
      */
-    public static final String TOURLIST_PATH_FORMAT = SCENE_PATH + "data/data%s/" + ConstantFileName.TOUR_LIST;
+    public static final String TOURLIST_PATH_FORMAT = SCENE_PATH + DATA_PATH_FORMAT + ConstantFileName.TOUR_LIST;
 
 
     /**
     /**
      * 漫游文件路径
      * 漫游文件路径
      */
      */
-    public static final String TOURLIST_FOLDER_PATH_FORMAT = SCENE_PATH + "data/data%s/" + ConstantFileName.TOURLIST_FOLDER;
+    public static final String TOURLIST_FOLDER_PATH_FORMAT = DATABUFFER_FORMAT + ConstantFileName.TOURLIST_FOLDER;
 
 
     /**
     /**
      * scenejson文件本地路径
      * scenejson文件本地路径
@@ -73,13 +78,10 @@ public class ConstantFilePath {
     /**
     /**
      * scenejson文件本地路径 V4
      * scenejson文件本地路径 V4
      */
      */
-    public static final String SCENE_JSON_V4_PATH = SCENE_V4_PATH + "data/data%s/" + ConstantFileName.SCENE_JSON;
+    public static final String SCENE_JSON_V4_PATH = SCENE_V4_PATH + DATA_PATH_FORMAT + ConstantFileName.SCENE_JSON;
 
 
     public static final String MEDIAINFO_PATH_FORMAT = DATABUFFER_FORMAT + ConstantFileName.MEDIA_DATAFILE;
     public static final String MEDIAINFO_PATH_FORMAT = DATABUFFER_FORMAT + ConstantFileName.MEDIA_DATAFILE;
 
 
-    public void setHardDiskLaser(String value){
-        ConstantFilePath.BUILD_MODEL_LASER_PATH = value;
-    }
 
 
     /**
     /**
      * 场景编辑数据目录
      * 场景编辑数据目录
@@ -89,12 +91,12 @@ public class ConstantFilePath {
     /**
     /**
      * 场景编辑用户上传数据目录
      * 场景编辑用户上传数据目录
      */
      */
-    public static final String SCENE_EDIT_DATA_USER = SCENE_EDIT_DATA + "%s/user/";
+    public static final String SCENE_EDIT_DATA_USER = SCENE_EDIT_DATA + VIEW_USER_FORMAT;
 
 
     /**
     /**
      * 场景编辑数据data目录
      * 场景编辑数据data目录
      */
      */
-    public static final String SCENE_EDIT_DATA_DATA = SCENE_EDIT_DATA + "%s/data/";
+    public static final String SCENE_EDIT_DATA_DATA = SCENE_EDIT_DATA + VIEW_DATA_FORMAT;
 
 
     /**
     /**
      * 场景发布数据目录
      * 场景发布数据目录
@@ -104,27 +106,25 @@ public class ConstantFilePath {
     /**
     /**
      * 场景发布用户上传数据目录
      * 场景发布用户上传数据目录
      */
      */
-    public static final String SCENE_VIEW_DATA_USER = SCENE_VIEW_DATA + "%s/user/";
+    public static final String SCENE_VIEW_DATA_USER = SCENE_VIEW_DATA + VIEW_USER_FORMAT;
 
 
     /**
     /**
      * 场景发布数据data目录
      * 场景发布数据data目录
      */
      */
-    public static final String SCENE_VIEW_DATA_DATA= SCENE_VIEW_DATA + "%s/data/";
+    public static final String SCENE_VIEW_DATA_DATA= SCENE_VIEW_DATA + VIEW_DATA_FORMAT;
 
 
     /**
     /**
      * 场景发布scene.json路径
      * 场景发布scene.json路径
      */
      */
     public static final String SCENE_VIEW_DATA_DATA_SCENEJSON= SCENE_VIEW_DATA + "%s/data/scene.json";
     public static final String SCENE_VIEW_DATA_DATA_SCENEJSON= SCENE_VIEW_DATA + "%s/data/scene.json";
 
 
-    public static final String DATA_PATH_FORMAT = "data/data%s/";
-    public static final String IMAGE_PATH_FORMAT = "images/images%s/";
     public static final String VIDEO_PATH_FORMAT = "video/video%s/";
     public static final String VIDEO_PATH_FORMAT = "video/video%s/";
 
 
     public static final String SCENE_CACHE_IMAGES = SCENE_PATH + "%s/caches/images/";
     public static final String SCENE_CACHE_IMAGES = SCENE_PATH + "%s/caches/images/";
 
 
     public static final String SCENE_CACHE = SCENE_PATH + "%s/caches/";
     public static final String SCENE_CACHE = SCENE_PATH + "%s/caches/";
 
 
-    public static final String SCENE_DATA_PATH_V4 = SCENE_V4_PATH + "%s/data/";
+    public static final String SCENE_DATA_PATH_V4 = SCENE_V4_PATH + VIEW_DATA_FORMAT;
 
 
     public static final String SCENE_IMAGES_PATH_V4 = SCENE_V4_PATH + "%s/images/";
     public static final String SCENE_IMAGES_PATH_V4 = SCENE_V4_PATH + "%s/images/";
 
 
@@ -132,7 +132,7 @@ public class ConstantFilePath {
 
 
     public static final String SCENE_VOICES_PATH_V4 = SCENE_V4_PATH + "%s/voice/";
     public static final String SCENE_VOICES_PATH_V4 = SCENE_V4_PATH + "%s/voice/";
 
 
-    public static final String SCENE_USER_PATH_V4 = SCENE_V4_PATH + "%s/user/";
+    public static final String SCENE_USER_PATH_V4 = SCENE_V4_PATH + VIEW_USER_FORMAT;
 
 
     public static final String SCENE_TMP_PATH_V4 = SCENE_V4_PATH + "%s/tmp/";
     public static final String SCENE_TMP_PATH_V4 = SCENE_V4_PATH + "%s/tmp/";
 
 
@@ -146,11 +146,4 @@ public class ConstantFilePath {
      */
      */
     public static final String OPENAPI_DOWNLOAD_PATH = SCENE_V4_PATH + "%s/openApi/download/";
     public static final String OPENAPI_DOWNLOAD_PATH = SCENE_V4_PATH + "%s/openApi/download/";
 
 
-
-
-
-    public static void main(String[] args) {
-
-        System.out.println(String.format(ConstantFilePath.SCENE_PATH_FORMAT, "123"));
-    }
 }
 }

+ 0 - 11
src/main/java/com/fdkankan/common/constant/ErrorCode.java

@@ -16,12 +16,9 @@ public enum ErrorCode {
     AUTH_FAIL(4000, "鉴权失败!"),
     AUTH_FAIL(4000, "鉴权失败!"),
     NON_TOKEN(4001, "无token,请重新登录"),
     NON_TOKEN(4001, "无token,请重新登录"),
     TOKEN_ILLEGAL(4002, "token不合法"),
     TOKEN_ILLEGAL(4002, "token不合法"),
-    TOKEN_NOT_FOUND(4003, "用户未登录"),
     APP_ID_ILLEGAL(4004 , "非法的APP ID"),
     APP_ID_ILLEGAL(4004 , "非法的APP ID"),
     USER_NOT_EXIST(4005,"用户不存在"),
     USER_NOT_EXIST(4005,"用户不存在"),
     PASSWORD_ERROR(4006,"账号密码错误"),
     PASSWORD_ERROR(4006,"账号密码错误"),
-    MISSING_REQUIRED_PARAMETERS(4007,"缺少必要参数"),
-    USER_NOT_LOGIN(4008, "用户未登录"),
     NOT_RECORD(4009, "暂无记录"),
     NOT_RECORD(4009, "暂无记录"),
     USERNAME_PASSWORD_REQUIRE(4010, "账号密码不能为空"),
     USERNAME_PASSWORD_REQUIRE(4010, "账号密码不能为空"),
     ERROR_MSG(40010, "操作失败"),
     ERROR_MSG(40010, "操作失败"),
@@ -37,8 +34,6 @@ public enum ErrorCode {
     V_CODE_ERROR(40019, "验证码错误"),
     V_CODE_ERROR(40019, "验证码错误"),
     NICKNAME_ERROR(40020, "昵称包含敏感词"),
     NICKNAME_ERROR(40020, "昵称包含敏感词"),
     V_CODE_TIME_NOT_OUT(40021, "60秒内不能重复获取验证码"),
     V_CODE_TIME_NOT_OUT(40021, "60秒内不能重复获取验证码"),
-    PHONE_CODE_TO_MANY(40022, "手机验证码获取验证码次数过多,请明天再试"),
-    EMAIL_EXIST(40023, "手机验证码获取验证码次数过多,请明天再试"),
     CAMERA_BIND_NO_EXIST(40024, "绑定的相机不存在"),
     CAMERA_BIND_NO_EXIST(40024, "绑定的相机不存在"),
     VALUE_NOT_EXIST(40025, "当前增值权益不存在"),
     VALUE_NOT_EXIST(40025, "当前增值权益不存在"),
     CAMERA_NOT_OWN(40026, "不能将相机分配给自己"),
     CAMERA_NOT_OWN(40026, "不能将相机分配给自己"),
@@ -46,13 +41,8 @@ public enum ErrorCode {
     FILE_NOT_EXIST(40027, "需要上传或使用的文件不存在"),
     FILE_NOT_EXIST(40027, "需要上传或使用的文件不存在"),
     NOT_PERMISSION(40027, "登录失败,账号无权访问"),
     NOT_PERMISSION(40027, "登录失败,账号无权访问"),
 
 
-
-
-
-    FAILURE_CODE_3001(3001, "缺少必要参数"),
     FAILURE_CODE_3002(3002, "访问异常!"),
     FAILURE_CODE_3002(3002, "访问异常!"),
     FAILURE_CODE_3003(3003, "非法访问!"),
     FAILURE_CODE_3003(3003, "非法访问!"),
-    FAILURE_CODE_3004(3004, "用户未登录"),
     FAILURE_CODE_3005(3005, "验证码已过期"),
     FAILURE_CODE_3005(3005, "验证码已过期"),
     FAILURE_CODE_3006(3006, "验证码错误"),
     FAILURE_CODE_3006(3006, "验证码错误"),
     FAILURE_CODE_3007(3007, "昵称已存在"),
     FAILURE_CODE_3007(3007, "昵称已存在"),
@@ -71,7 +61,6 @@ public enum ErrorCode {
     FAILURE_CODE_3020(3020, "邮箱地址已存在"),
     FAILURE_CODE_3020(3020, "邮箱地址已存在"),
     FAILURE_CODE_3021(3021, "账号不存在,请核对后重新输入。"),
     FAILURE_CODE_3021(3021, "账号不存在,请核对后重新输入。"),
     FAILURE_CODE_3022(3022, "该场景已添加协作者,请先取消协作后再添加"),
     FAILURE_CODE_3022(3022, "该场景已添加协作者,请先取消协作后再添加"),
-    FAILURE_CODE_3023(3023, "手机验证码获取验证码次数过多,请明天再试"),
     FAILURE_CODE_3024(3024, "不能将场景协作给自己"),
     FAILURE_CODE_3024(3024, "不能将场景协作给自己"),
     FAILURE_CODE_3025(3025, "不能将相机分配给自己"),
     FAILURE_CODE_3025(3025, "不能将相机分配给自己"),
     FAILURE_CODE_3026(3026, "有部分场景已存在协作者,请先取消协作后再添加"),
     FAILURE_CODE_3026(3026, "有部分场景已存在协作者,请先取消协作后再添加"),

+ 4 - 4
src/main/java/com/fdkankan/common/constant/UploadFilePath.java

@@ -2,16 +2,16 @@ package com.fdkankan.common.constant;
 
 
 public class UploadFilePath {
 public class UploadFilePath {
 
 
+    private UploadFilePath(){
+        throw new UnsupportedOperationException();
+    }
+
     /**
     /**
      * oss.场景码目录
      * oss.场景码目录
      */
      */
     public static final String EDIT_PATH =  "scene_edit_data/%s/";
     public static final String EDIT_PATH =  "scene_edit_data/%s/";
     public static final String VIEW_PATH =  "scene_view_data/%s/";
     public static final String VIEW_PATH =  "scene_view_data/%s/";
 
 
-    /**
-     * oss.用户上传文件
-     */
-//    public static final String USER_EDIT_PATH =  "scene_edit_data/%s/user/";
     public static final String USER_VIEW_PATH =  "scene_view_data/%s/user/";
     public static final String USER_VIEW_PATH =  "scene_view_data/%s/user/";
     /**
     /**
      * 场景数据
      * 场景数据

+ 2 - 2
src/main/java/com/fdkankan/common/exception/BusinessException.java

@@ -8,8 +8,8 @@ import lombok.Data;
  */
  */
 @Data
 @Data
 public class BusinessException extends RuntimeException {
 public class BusinessException extends RuntimeException {
-    private int code;
-    private String message;
+    public final int code;
+    public final String message;
 
 
     public BusinessException(ErrorCode errorCode){
     public BusinessException(ErrorCode errorCode){
         this.code = errorCode.code();
         this.code = errorCode.code();

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 7340
src/main/java/com/fdkankan/common/proto/BigSceneProto.java


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 4345
src/main/java/com/fdkankan/common/proto/Visionmodeldata.java


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 1603
src/main/java/com/fdkankan/common/proto/format/JsonFormat.java


+ 3 - 3
src/main/java/com/fdkankan/common/util/BASE64DecodedMultipartFile.java

@@ -4,6 +4,7 @@ import org.springframework.web.multipart.MultipartFile;
 import sun.misc.BASE64Decoder;
 import sun.misc.BASE64Decoder;
 
 
 import java.io.*;
 import java.io.*;
+import java.util.UUID;
 
 
 public class BASE64DecodedMultipartFile implements MultipartFile {
 public class BASE64DecodedMultipartFile implements MultipartFile {
     private final byte[] imgContent;
     private final byte[] imgContent;
@@ -17,13 +18,13 @@ public class BASE64DecodedMultipartFile implements MultipartFile {
     @Override
     @Override
     public String getName() {
     public String getName() {
         // TODO - implementation depends on your requirements
         // TODO - implementation depends on your requirements
-        return System.currentTimeMillis() + Math.random() + "." + header.split("/")[1];
+        return System.currentTimeMillis() + "-" + UUID.randomUUID().toString().replace("-", "") + "." + header.split("/")[1];
     }
     }
 
 
     @Override
     @Override
     public String getOriginalFilename() {
     public String getOriginalFilename() {
         // TODO - implementation depends on your requirements
         // TODO - implementation depends on your requirements
-        return System.currentTimeMillis() + (int)Math.random() * 10000 + "." + header.split("/")[1];
+        return System.currentTimeMillis() + "-" + UUID.randomUUID().toString().replace("-", "") + "." + header.split("/")[1];
     }
     }
 
 
     @Override
     @Override
@@ -79,5 +80,4 @@ public class BASE64DecodedMultipartFile implements MultipartFile {
             return null;
             return null;
         }
         }
     }
     }
-
 }
 }

+ 20 - 12
src/main/java/com/fdkankan/common/util/FdfsUtil.java

@@ -19,6 +19,14 @@ import java.util.Map;
 @Slf4j
 @Slf4j
 public class FdfsUtil {
 public class FdfsUtil {
 
 
+    private final static String timestamp_key = "timestamp";
+
+    private final static String nonce_key = "nonce";
+
+    private final static String sysCode_key = "sysCode";
+
+    private final static String success_status = "000000";
+
     @Value("${fdfs.address}")
     @Value("${fdfs.address}")
     private String address;
     private String address;
 
 
@@ -33,16 +41,16 @@ public class FdfsUtil {
 
 
     public String getSignature(String nonce, String timestamp){
     public String getSignature(String nonce, String timestamp){
         Map<String, String> headers = new HashMap<>();
         Map<String, String> headers = new HashMap<>();
-        headers.put("timestamp", timestamp);
-        headers.put("nonce", nonce);
-        headers.put("sysCode", sysCode);
+        headers.put(timestamp_key, timestamp);
+        headers.put(nonce_key, nonce);
+        headers.put(sysCode_key, sysCode);
         HttpRequest httpRequest = HttpRequest.post(address.concat(api_getSignature)).addHeaders(headers).timeout(5000);
         HttpRequest httpRequest = HttpRequest.post(address.concat(api_getSignature)).addHeaders(headers).timeout(5000);
         HttpResponse res = httpRequest.execute();
         HttpResponse res = httpRequest.execute();
         String resBody = res.body();
         String resBody = res.body();
         res.close();
         res.close();
         TietaResBean<String> tietaResBean = JSON.parseObject(resBody, TietaResBean.class);
         TietaResBean<String> tietaResBean = JSON.parseObject(resBody, TietaResBean.class);
         String code = tietaResBean.getCode();
         String code = tietaResBean.getCode();
-        if(!"000000".equals(code)){
+        if(!success_status.equals(code)){
             throw new RuntimeException("获取签名失败, code:" + code);
             throw new RuntimeException("获取签名失败, code:" + code);
         }
         }
         return tietaResBean.getData();
         return tietaResBean.getData();
@@ -51,9 +59,9 @@ public class FdfsUtil {
     public Map<String, String> uploadFile(String nonce, String timestamp, String signature, String filePath){
     public Map<String, String> uploadFile(String nonce, String timestamp, String signature, String filePath){
 
 
         Map<String, String> headers = new HashMap<>();
         Map<String, String> headers = new HashMap<>();
-        headers.put("timestamp", timestamp);
-        headers.put("nonce", nonce);
-        headers.put("sysCode", sysCode);
+        headers.put(timestamp_key, timestamp);
+        headers.put(nonce_key, nonce);
+        headers.put(sysCode_key, sysCode);
         headers.put("signature", signature);
         headers.put("signature", signature);
 
 
         Map<String, Object> test = new HashMap<>();
         Map<String, Object> test = new HashMap<>();
@@ -67,7 +75,7 @@ public class FdfsUtil {
         res.close();
         res.close();
         TietaResBean<Map<String, String>> tietaResBean = JSON.parseObject(resBody, TietaResBean.class);
         TietaResBean<Map<String, String>> tietaResBean = JSON.parseObject(resBody, TietaResBean.class);
         String code = tietaResBean.getCode();
         String code = tietaResBean.getCode();
-        if(!"000000".equals(code)){
+        if(!success_status.equals(code)){
             throw new RuntimeException("上传文件失败, code:" + code);
             throw new RuntimeException("上传文件失败, code:" + code);
         }
         }
         return tietaResBean.getData();
         return tietaResBean.getData();
@@ -97,9 +105,9 @@ public class FdfsUtil {
     public static void main(String[] args) {
     public static void main(String[] args) {
         String timestamp = String.valueOf(new Date().getTime());
         String timestamp = String.valueOf(new Date().getTime());
         Map<String, String> headers = new HashMap<>();
         Map<String, String> headers = new HashMap<>();
-        headers.put("timestamp", timestamp);
-        headers.put("nonce", "123123");
-        headers.put("sysCode", "CT00017");
+        headers.put(timestamp_key, timestamp);
+        headers.put(nonce_key, "123123");
+        headers.put(sysCode_key, "CT00017");
         headers.put("signature", "3044022062501c9896a919d81d00216379a84c7d89b2d7315a22f89aee2ce7c1185f656c02206d4694fb685247a289e1c0d11e7492311ef66354c64cd2234fa593e02a635074");
         headers.put("signature", "3044022062501c9896a919d81d00216379a84c7d89b2d7315a22f89aee2ce7c1185f656c02206d4694fb685247a289e1c0d11e7492311ef66354c64cd2234fa593e02a635074");
 
 
         Map<String, Object> test = new HashMap<>();
         Map<String, Object> test = new HashMap<>();
@@ -112,7 +120,7 @@ public class FdfsUtil {
         res.close();
         res.close();
         TietaResBean<Map<String, String>> tietaResBean = JSON.parseObject(resBody, TietaResBean.class);
         TietaResBean<Map<String, String>> tietaResBean = JSON.parseObject(resBody, TietaResBean.class);
         String code = tietaResBean.getCode();
         String code = tietaResBean.getCode();
-        if(!"000000".equals(code)){
+        if(!success_status.equals(code)){
             throw new RuntimeException("上传文件失败, code:" + code);
             throw new RuntimeException("上传文件失败, code:" + code);
         }
         }
         Map<String, String> data = tietaResBean.getData();
         Map<String, String> data = tietaResBean.getData();

+ 130 - 126
src/main/java/com/fdkankan/model/proto/BigSceneProto.java

@@ -4,6 +4,7 @@ public final class BigSceneProto {
   private BigSceneProto() {}
   private BigSceneProto() {}
   public static void registerAllExtensions(
   public static void registerAllExtensions(
       com.google.protobuf.ExtensionRegistry registry) {
       com.google.protobuf.ExtensionRegistry registry) {
+    throw new UnsupportedOperationException();
   }
   }
   public interface binary_meshOrBuilder extends
   public interface binary_meshOrBuilder extends
       // @@protoc_insertion_point(interface_extends:tutorial.binary_mesh)
       // @@protoc_insertion_point(interface_extends:tutorial.binary_mesh)
@@ -25,8 +26,8 @@ public final class BigSceneProto {
     /**
     /**
      * <code>repeated .tutorial.chunk_simple chunk = 1;</code>
      * <code>repeated .tutorial.chunk_simple chunk = 1;</code>
      */
      */
-    java.util.List<? extends chunk_simpleOrBuilder>
-        getChunkOrBuilderList();
+//    java.util.List<? extends chunk_simpleOrBuilder>
+//        getChunkOrBuilderList();
     /**
     /**
      * <code>repeated .tutorial.chunk_simple chunk = 1;</code>
      * <code>repeated .tutorial.chunk_simple chunk = 1;</code>
      */
      */
@@ -49,8 +50,8 @@ public final class BigSceneProto {
     /**
     /**
      * <code>repeated .tutorial.chunk_quantized quantized_chunk = 2;</code>
      * <code>repeated .tutorial.chunk_quantized quantized_chunk = 2;</code>
      */
      */
-    java.util.List<? extends chunk_quantizedOrBuilder>
-        getQuantizedChunkOrBuilderList();
+//    java.util.List<? extends chunk_quantizedOrBuilder>
+//        getQuantizedChunkOrBuilderList();
     /**
     /**
      * <code>repeated .tutorial.chunk_quantized quantized_chunk = 2;</code>
      * <code>repeated .tutorial.chunk_quantized quantized_chunk = 2;</code>
      */
      */
@@ -102,13 +103,6 @@ public final class BigSceneProto {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 10: {
             case 10: {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
                 chunk_ = new java.util.ArrayList<chunk_simple>();
                 chunk_ = new java.util.ArrayList<chunk_simple>();
@@ -125,6 +119,13 @@ public final class BigSceneProto {
               quantizedChunk_.add(input.readMessage(chunk_quantized.PARSER, extensionRegistry));
               quantizedChunk_.add(input.readMessage(chunk_quantized.PARSER, extensionRegistry));
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -181,10 +182,10 @@ public final class BigSceneProto {
     /**
     /**
      * <code>repeated .tutorial.chunk_simple chunk = 1;</code>
      * <code>repeated .tutorial.chunk_simple chunk = 1;</code>
      */
      */
-    public java.util.List<? extends chunk_simpleOrBuilder>
-        getChunkOrBuilderList() {
-      return chunk_;
-    }
+//    public java.util.List<? extends chunk_simpleOrBuilder>
+//        getChunkOrBuilderList() {
+//      return chunk_;
+//    }
     /**
     /**
      * <code>repeated .tutorial.chunk_simple chunk = 1;</code>
      * <code>repeated .tutorial.chunk_simple chunk = 1;</code>
      */
      */
@@ -216,10 +217,10 @@ public final class BigSceneProto {
     /**
     /**
      * <code>repeated .tutorial.chunk_quantized quantized_chunk = 2;</code>
      * <code>repeated .tutorial.chunk_quantized quantized_chunk = 2;</code>
      */
      */
-    public java.util.List<? extends chunk_quantizedOrBuilder>
-        getQuantizedChunkOrBuilderList() {
-      return quantizedChunk_;
-    }
+//    public java.util.List<? extends chunk_quantizedOrBuilder>
+//        getQuantizedChunkOrBuilderList() {
+//      return quantizedChunk_;
+//    }
     /**
     /**
      * <code>repeated .tutorial.chunk_quantized quantized_chunk = 2;</code>
      * <code>repeated .tutorial.chunk_quantized quantized_chunk = 2;</code>
      */
      */
@@ -414,9 +415,9 @@ public final class BigSceneProto {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -745,14 +746,14 @@ public final class BigSceneProto {
       /**
       /**
        * <code>repeated .tutorial.chunk_simple chunk = 1;</code>
        * <code>repeated .tutorial.chunk_simple chunk = 1;</code>
        */
        */
-      public java.util.List<? extends chunk_simpleOrBuilder>
-           getChunkOrBuilderList() {
-        if (chunkBuilder_ != null) {
-          return chunkBuilder_.getMessageOrBuilderList();
-        } else {
-          return java.util.Collections.unmodifiableList(chunk_);
-        }
-      }
+//      public java.util.List<? extends chunk_simpleOrBuilder>
+//           getChunkOrBuilderList() {
+//        if (chunkBuilder_ != null) {
+//          return chunkBuilder_.getMessageOrBuilderList();
+//        } else {
+//          return java.util.Collections.unmodifiableList(chunk_);
+//        }
+//      }
       /**
       /**
        * <code>repeated .tutorial.chunk_simple chunk = 1;</code>
        * <code>repeated .tutorial.chunk_simple chunk = 1;</code>
        */
        */
@@ -985,14 +986,14 @@ public final class BigSceneProto {
       /**
       /**
        * <code>repeated .tutorial.chunk_quantized quantized_chunk = 2;</code>
        * <code>repeated .tutorial.chunk_quantized quantized_chunk = 2;</code>
        */
        */
-      public java.util.List<? extends chunk_quantizedOrBuilder>
-           getQuantizedChunkOrBuilderList() {
-        if (quantizedChunkBuilder_ != null) {
-          return quantizedChunkBuilder_.getMessageOrBuilderList();
-        } else {
-          return java.util.Collections.unmodifiableList(quantizedChunk_);
-        }
-      }
+//      public java.util.List<? extends chunk_quantizedOrBuilder>
+//           getQuantizedChunkOrBuilderList() {
+//        if (quantizedChunkBuilder_ != null) {
+//          return quantizedChunkBuilder_.getMessageOrBuilderList();
+//        } else {
+//          return java.util.Collections.unmodifiableList(quantizedChunk_);
+//        }
+//      }
       /**
       /**
        * <code>repeated .tutorial.chunk_quantized quantized_chunk = 2;</code>
        * <code>repeated .tutorial.chunk_quantized quantized_chunk = 2;</code>
        */
        */
@@ -1144,13 +1145,6 @@ public final class BigSceneProto {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 13: {
             case 13: {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
                 xyz_ = new java.util.ArrayList<Float>();
                 xyz_ = new java.util.ArrayList<Float>();
@@ -1193,6 +1187,13 @@ public final class BigSceneProto {
               input.popLimit(limit);
               input.popLimit(limit);
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -1498,9 +1499,9 @@ public final class BigSceneProto {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -1871,13 +1872,6 @@ public final class BigSceneProto {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 8: {
             case 8: {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
                 faces_ = new java.util.ArrayList<Integer>();
                 faces_ = new java.util.ArrayList<Integer>();
@@ -1899,6 +1893,13 @@ public final class BigSceneProto {
               input.popLimit(limit);
               input.popLimit(limit);
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -2148,9 +2149,9 @@ public final class BigSceneProto {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -2442,13 +2443,6 @@ public final class BigSceneProto {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 10: {
             case 10: {
               vertices_simple.Builder subBuilder = null;
               vertices_simple.Builder subBuilder = null;
               if (((bitField0_ & 0x00000001) == 0x00000001)) {
               if (((bitField0_ & 0x00000001) == 0x00000001)) {
@@ -2487,6 +2481,13 @@ public final class BigSceneProto {
               materialName_ = bs;
               materialName_ = bs;
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -2852,9 +2853,9 @@ public final class BigSceneProto {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -3469,13 +3470,6 @@ public final class BigSceneProto {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 13: {
             case 13: {
               bitField0_ |= 0x00000001;
               bitField0_ |= 0x00000001;
               quantization_ = input.readFloat();
               quantization_ = input.readFloat();
@@ -3565,6 +3559,13 @@ public final class BigSceneProto {
               input.popLimit(limit);
               input.popLimit(limit);
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -3965,9 +3966,9 @@ public final class BigSceneProto {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -4505,13 +4506,6 @@ public final class BigSceneProto {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 10: {
             case 10: {
               com.google.protobuf.ByteString bs = input.readBytes();
               com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000001;
               bitField0_ |= 0x00000001;
@@ -4565,6 +4559,13 @@ public final class BigSceneProto {
               input.popLimit(limit);
               input.popLimit(limit);
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -4926,9 +4927,9 @@ public final class BigSceneProto {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -5369,13 +5370,6 @@ public final class BigSceneProto {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 8: {
             case 8: {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
                 faces_ = new java.util.ArrayList<Integer>();
                 faces_ = new java.util.ArrayList<Integer>();
@@ -5397,6 +5391,13 @@ public final class BigSceneProto {
               input.popLimit(limit);
               input.popLimit(limit);
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -5646,9 +5647,9 @@ public final class BigSceneProto {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -5893,8 +5894,8 @@ public final class BigSceneProto {
     /**
     /**
      * <code>repeated .tutorial.uv_quantized uvs = 4;</code>
      * <code>repeated .tutorial.uv_quantized uvs = 4;</code>
      */
      */
-    java.util.List<? extends uv_quantizedOrBuilder>
-        getUvsOrBuilderList();
+//    java.util.List<? extends uv_quantizedOrBuilder>
+//        getUvsOrBuilderList();
     /**
     /**
      * <code>repeated .tutorial.uv_quantized uvs = 4;</code>
      * <code>repeated .tutorial.uv_quantized uvs = 4;</code>
      */
      */
@@ -5959,13 +5960,6 @@ public final class BigSceneProto {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 10: {
             case 10: {
               com.google.protobuf.ByteString bs = input.readBytes();
               com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000001;
               bitField0_ |= 0x00000001;
@@ -6012,6 +6006,13 @@ public final class BigSceneProto {
               bitField0_ |= 0x00000008;
               bitField0_ |= 0x00000008;
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -6171,10 +6172,10 @@ public final class BigSceneProto {
     /**
     /**
      * <code>repeated .tutorial.uv_quantized uvs = 4;</code>
      * <code>repeated .tutorial.uv_quantized uvs = 4;</code>
      */
      */
-    public java.util.List<? extends uv_quantizedOrBuilder>
-        getUvsOrBuilderList() {
-      return uvs_;
-    }
+//    public java.util.List<? extends uv_quantizedOrBuilder>
+//        getUvsOrBuilderList() {
+//      return uvs_;
+//    }
     /**
     /**
      * <code>repeated .tutorial.uv_quantized uvs = 4;</code>
      * <code>repeated .tutorial.uv_quantized uvs = 4;</code>
      */
      */
@@ -6425,9 +6426,9 @@ public final class BigSceneProto {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -7031,14 +7032,14 @@ public final class BigSceneProto {
       /**
       /**
        * <code>repeated .tutorial.uv_quantized uvs = 4;</code>
        * <code>repeated .tutorial.uv_quantized uvs = 4;</code>
        */
        */
-      public java.util.List<? extends uv_quantizedOrBuilder>
-           getUvsOrBuilderList() {
-        if (uvsBuilder_ != null) {
-          return uvsBuilder_.getMessageOrBuilderList();
-        } else {
-          return java.util.Collections.unmodifiableList(uvs_);
-        }
-      }
+//      public java.util.List<? extends uv_quantizedOrBuilder>
+//           getUvsOrBuilderList() {
+//        if (uvsBuilder_ != null) {
+//          return uvsBuilder_.getMessageOrBuilderList();
+//        } else {
+//          return java.util.Collections.unmodifiableList(uvs_);
+//        }
+//      }
       /**
       /**
        * <code>repeated .tutorial.uv_quantized uvs = 4;</code>
        * <code>repeated .tutorial.uv_quantized uvs = 4;</code>
        */
        */
@@ -7250,6 +7251,9 @@ public final class BigSceneProto {
   }
   }
   private static com.google.protobuf.Descriptors.FileDescriptor
   private static com.google.protobuf.Descriptors.FileDescriptor
       descriptor;
       descriptor;
+
+  private static String FACES_KEY = "Faces";
+
   static {
   static {
     String[] descriptorData = {
     String[] descriptorData = {
       "\n\016bigscene.proto\022\010tutorial\"h\n\013binary_mes" +
       "\n\016bigscene.proto\022\010tutorial\"h\n\013binary_mes" +
@@ -7303,13 +7307,13 @@ public final class BigSceneProto {
     internal_static_tutorial_faces_simple_fieldAccessorTable = new
     internal_static_tutorial_faces_simple_fieldAccessorTable = new
       com.google.protobuf.GeneratedMessage.FieldAccessorTable(
       com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_tutorial_faces_simple_descriptor,
         internal_static_tutorial_faces_simple_descriptor,
-        new String[] { "Faces", });
+        new String[] { FACES_KEY, });
     internal_static_tutorial_chunk_simple_descriptor =
     internal_static_tutorial_chunk_simple_descriptor =
       getDescriptor().getMessageTypes().get(3);
       getDescriptor().getMessageTypes().get(3);
     internal_static_tutorial_chunk_simple_fieldAccessorTable = new
     internal_static_tutorial_chunk_simple_fieldAccessorTable = new
       com.google.protobuf.GeneratedMessage.FieldAccessorTable(
       com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_tutorial_chunk_simple_descriptor,
         internal_static_tutorial_chunk_simple_descriptor,
-        new String[] { "Vertices", "Faces", "ChunkName", "MaterialName", });
+        new String[] { "Vertices", FACES_KEY, "ChunkName", "MaterialName", });
     internal_static_tutorial_vertices_quantized_descriptor =
     internal_static_tutorial_vertices_quantized_descriptor =
       getDescriptor().getMessageTypes().get(4);
       getDescriptor().getMessageTypes().get(4);
     internal_static_tutorial_vertices_quantized_fieldAccessorTable = new
     internal_static_tutorial_vertices_quantized_fieldAccessorTable = new
@@ -7327,13 +7331,13 @@ public final class BigSceneProto {
     internal_static_tutorial_faces_compressed_fieldAccessorTable = new
     internal_static_tutorial_faces_compressed_fieldAccessorTable = new
       com.google.protobuf.GeneratedMessage.FieldAccessorTable(
       com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_tutorial_faces_compressed_descriptor,
         internal_static_tutorial_faces_compressed_descriptor,
-        new String[] { "Faces", });
+        new String[] { FACES_KEY, });
     internal_static_tutorial_chunk_quantized_descriptor =
     internal_static_tutorial_chunk_quantized_descriptor =
       getDescriptor().getMessageTypes().get(7);
       getDescriptor().getMessageTypes().get(7);
     internal_static_tutorial_chunk_quantized_fieldAccessorTable = new
     internal_static_tutorial_chunk_quantized_fieldAccessorTable = new
       com.google.protobuf.GeneratedMessage.FieldAccessorTable(
       com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_tutorial_chunk_quantized_descriptor,
         internal_static_tutorial_chunk_quantized_descriptor,
-        new String[] { "ChunkName", "MaterialName", "Vertices", "Uvs", "Faces", });
+        new String[] { "ChunkName", "MaterialName", "Vertices", "Uvs", FACES_KEY, });
   }
   }
 
 
   // @@protoc_insertion_point(outer_class_scope)
   // @@protoc_insertion_point(outer_class_scope)

+ 66 - 65
src/main/java/com/fdkankan/model/proto/Common.java

@@ -5,9 +5,10 @@ package com.fdkankan.model.proto;
 
 
 public final class Common {
 public final class Common {
   private Common() {}
   private Common() {}
-  
+
   public static void registerAllExtensions(
   public static void registerAllExtensions(
       com.google.protobuf.ExtensionRegistry registry) {
       com.google.protobuf.ExtensionRegistry registry) {
+    throw new UnsupportedOperationException();
   }
   }
   public interface Affine3fOrBuilder extends
   public interface Affine3fOrBuilder extends
       // @@protoc_insertion_point(interface_extends:tutorial.Affine3f)
       // @@protoc_insertion_point(interface_extends:tutorial.Affine3f)
@@ -84,13 +85,6 @@ public final class Common {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 10: {
             case 10: {
               Quaternionf.Builder subBuilder = null;
               Quaternionf.Builder subBuilder = null;
               if (((bitField0_ & 0x00000001) == 0x00000001)) {
               if (((bitField0_ & 0x00000001) == 0x00000001)) {
@@ -117,6 +111,13 @@ public final class Common {
               bitField0_ |= 0x00000002;
               bitField0_ |= 0x00000002;
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -373,9 +374,9 @@ public final class Common {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -791,13 +792,6 @@ public final class Common {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 13: {
             case 13: {
               bitField0_ |= 0x00000001;
               bitField0_ |= 0x00000001;
               w_ = input.readFloat();
               w_ = input.readFloat();
@@ -818,6 +812,13 @@ public final class Common {
               z_ = input.readFloat();
               z_ = input.readFloat();
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -1102,9 +1103,9 @@ public final class Common {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -1413,13 +1414,6 @@ public final class Common {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 13: {
             case 13: {
               bitField0_ |= 0x00000001;
               bitField0_ |= 0x00000001;
               x_ = input.readFloat();
               x_ = input.readFloat();
@@ -1435,6 +1429,13 @@ public final class Common {
               z_ = input.readFloat();
               z_ = input.readFloat();
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -1694,9 +1695,9 @@ public final class Common {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -2144,13 +2145,6 @@ public final class Common {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 10: {
             case 10: {
               bitField0_ |= 0x00000001;
               bitField0_ |= 0x00000001;
               uuid_ = input.readBytes();
               uuid_ = input.readBytes();
@@ -2276,6 +2270,13 @@ public final class Common {
               input.popLimit(limit);
               input.popLimit(limit);
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -2864,9 +2865,9 @@ public final class Common {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -3893,8 +3894,8 @@ public final class Common {
     /**
     /**
      * <code>repeated .tutorial.SweepLocation sweepLocations = 1;</code>
      * <code>repeated .tutorial.SweepLocation sweepLocations = 1;</code>
      */
      */
-    java.util.List<? extends SweepLocationOrBuilder>
-        getSweepLocationsOrBuilderList();
+//    java.util.List<? extends SweepLocationOrBuilder>
+//        getSweepLocationsOrBuilderList();
     /**
     /**
      * <code>repeated .tutorial.SweepLocation sweepLocations = 1;</code>
      * <code>repeated .tutorial.SweepLocation sweepLocations = 1;</code>
      */
      */
@@ -3950,13 +3951,6 @@ public final class Common {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 10: {
             case 10: {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
                 sweepLocations_ = new java.util.ArrayList<SweepLocation>();
                 sweepLocations_ = new java.util.ArrayList<SweepLocation>();
@@ -3965,6 +3959,13 @@ public final class Common {
               sweepLocations_.add(input.readMessage(SweepLocation.PARSER, extensionRegistry));
               sweepLocations_.add(input.readMessage(SweepLocation.PARSER, extensionRegistry));
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -4018,10 +4019,10 @@ public final class Common {
     /**
     /**
      * <code>repeated .tutorial.SweepLocation sweepLocations = 1;</code>
      * <code>repeated .tutorial.SweepLocation sweepLocations = 1;</code>
      */
      */
-    public java.util.List<? extends SweepLocationOrBuilder>
-        getSweepLocationsOrBuilderList() {
-      return sweepLocations_;
-    }
+//    public java.util.List<? extends SweepLocationOrBuilder>
+//        getSweepLocationsOrBuilderList() {
+//      return sweepLocations_;
+//    }
     /**
     /**
      * <code>repeated .tutorial.SweepLocation sweepLocations = 1;</code>
      * <code>repeated .tutorial.SweepLocation sweepLocations = 1;</code>
      */
      */
@@ -4205,9 +4206,9 @@ public final class Common {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -4501,14 +4502,14 @@ public final class Common {
       /**
       /**
        * <code>repeated .tutorial.SweepLocation sweepLocations = 1;</code>
        * <code>repeated .tutorial.SweepLocation sweepLocations = 1;</code>
        */
        */
-      public java.util.List<? extends SweepLocationOrBuilder>
-           getSweepLocationsOrBuilderList() {
-        if (sweepLocationsBuilder_ != null) {
-          return sweepLocationsBuilder_.getMessageOrBuilderList();
-        } else {
-          return java.util.Collections.unmodifiableList(sweepLocations_);
-        }
-      }
+//      public java.util.List<? extends SweepLocationOrBuilder>
+//           getSweepLocationsOrBuilderList() {
+//        if (sweepLocationsBuilder_ != null) {
+//          return sweepLocationsBuilder_.getMessageOrBuilderList();
+//        } else {
+//          return java.util.Collections.unmodifiableList(sweepLocations_);
+//        }
+//      }
       /**
       /**
        * <code>repeated .tutorial.SweepLocation sweepLocations = 1;</code>
        * <code>repeated .tutorial.SweepLocation sweepLocations = 1;</code>
        */
        */

+ 65 - 64
src/main/java/com/fdkankan/model/proto/Visionmodeldata.java

@@ -7,6 +7,7 @@ public final class Visionmodeldata {
   private Visionmodeldata() {}
   private Visionmodeldata() {}
   public static void registerAllExtensions(
   public static void registerAllExtensions(
       com.google.protobuf.ExtensionRegistry registry) {
       com.google.protobuf.ExtensionRegistry registry) {
+    throw new UnsupportedOperationException();
   }
   }
   public interface Affine3fOrBuilder extends
   public interface Affine3fOrBuilder extends
       // @@protoc_insertion_point(interface_extends:com.example.tutorial.Affine3f)
       // @@protoc_insertion_point(interface_extends:com.example.tutorial.Affine3f)
@@ -83,13 +84,6 @@ public final class Visionmodeldata {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 10: {
             case 10: {
               Quaternionf.Builder subBuilder = null;
               Quaternionf.Builder subBuilder = null;
               if (((bitField0_ & 0x00000001) == 0x00000001)) {
               if (((bitField0_ & 0x00000001) == 0x00000001)) {
@@ -116,6 +110,13 @@ public final class Visionmodeldata {
               bitField0_ |= 0x00000002;
               bitField0_ |= 0x00000002;
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -372,9 +373,9 @@ public final class Visionmodeldata {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -790,13 +791,6 @@ public final class Visionmodeldata {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 13: {
             case 13: {
               bitField0_ |= 0x00000001;
               bitField0_ |= 0x00000001;
               w_ = input.readFloat();
               w_ = input.readFloat();
@@ -817,6 +811,13 @@ public final class Visionmodeldata {
               z_ = input.readFloat();
               z_ = input.readFloat();
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -1101,9 +1102,9 @@ public final class Visionmodeldata {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -1412,13 +1413,6 @@ public final class Visionmodeldata {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 13: {
             case 13: {
               bitField0_ |= 0x00000001;
               bitField0_ |= 0x00000001;
               x_ = input.readFloat();
               x_ = input.readFloat();
@@ -1434,6 +1428,13 @@ public final class Visionmodeldata {
               z_ = input.readFloat();
               z_ = input.readFloat();
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -1693,9 +1694,9 @@ public final class Visionmodeldata {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -2094,13 +2095,6 @@ public final class Visionmodeldata {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 10: {
             case 10: {
               bitField0_ |= 0x00000001;
               bitField0_ |= 0x00000001;
               uuid_ = input.readBytes();
               uuid_ = input.readBytes();
@@ -2205,6 +2199,13 @@ public final class Visionmodeldata {
               input.popLimit(limit);
               input.popLimit(limit);
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -2720,9 +2721,9 @@ public final class Visionmodeldata {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -3584,8 +3585,8 @@ public final class Visionmodeldata {
     /**
     /**
      * <code>repeated .com.example.tutorial.SweepLocation sweepLocations = 1;</code>
      * <code>repeated .com.example.tutorial.SweepLocation sweepLocations = 1;</code>
      */
      */
-    java.util.List<? extends SweepLocationOrBuilder>
-        getSweepLocationsOrBuilderList();
+//    java.util.List<? extends SweepLocationOrBuilder>
+//        getSweepLocationsOrBuilderList();
     /**
     /**
      * <code>repeated .com.example.tutorial.SweepLocation sweepLocations = 1;</code>
      * <code>repeated .com.example.tutorial.SweepLocation sweepLocations = 1;</code>
      */
      */
@@ -3641,13 +3642,6 @@ public final class Visionmodeldata {
             case 0:
             case 0:
               done = true;
               done = true;
               break;
               break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
             case 10: {
             case 10: {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
                 sweepLocations_ = new java.util.ArrayList<SweepLocation>();
                 sweepLocations_ = new java.util.ArrayList<SweepLocation>();
@@ -3656,6 +3650,13 @@ public final class Visionmodeldata {
               sweepLocations_.add(input.readMessage(SweepLocation.PARSER, extensionRegistry));
               sweepLocations_.add(input.readMessage(SweepLocation.PARSER, extensionRegistry));
               break;
               break;
             }
             }
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                      extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
           }
           }
         }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -3709,10 +3710,10 @@ public final class Visionmodeldata {
     /**
     /**
      * <code>repeated .com.example.tutorial.SweepLocation sweepLocations = 1;</code>
      * <code>repeated .com.example.tutorial.SweepLocation sweepLocations = 1;</code>
      */
      */
-    public java.util.List<? extends SweepLocationOrBuilder>
-        getSweepLocationsOrBuilderList() {
-      return sweepLocations_;
-    }
+//    public java.util.List<? extends SweepLocationOrBuilder>
+//        getSweepLocationsOrBuilderList() {
+//      return sweepLocations_;
+//    }
     /**
     /**
      * <code>repeated .com.example.tutorial.SweepLocation sweepLocations = 1;</code>
      * <code>repeated .com.example.tutorial.SweepLocation sweepLocations = 1;</code>
      */
      */
@@ -3896,9 +3897,9 @@ public final class Visionmodeldata {
         return this;
         return this;
       }
       }
 
 
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
+//      public Builder clone() {
+//        return create().mergeFrom(buildPartial());
+//      }
 
 
       public com.google.protobuf.Descriptors.Descriptor
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
           getDescriptorForType() {
@@ -4192,14 +4193,14 @@ public final class Visionmodeldata {
       /**
       /**
        * <code>repeated .com.example.tutorial.SweepLocation sweepLocations = 1;</code>
        * <code>repeated .com.example.tutorial.SweepLocation sweepLocations = 1;</code>
        */
        */
-      public java.util.List<? extends SweepLocationOrBuilder>
-           getSweepLocationsOrBuilderList() {
-        if (sweepLocationsBuilder_ != null) {
-          return sweepLocationsBuilder_.getMessageOrBuilderList();
-        } else {
-          return java.util.Collections.unmodifiableList(sweepLocations_);
-        }
-      }
+//      public java.util.List<? extends SweepLocationOrBuilder>
+//           getSweepLocationsOrBuilderList() {
+//        if (sweepLocationsBuilder_ != null) {
+//          return sweepLocationsBuilder_.getMessageOrBuilderList();
+//        } else {
+//          return java.util.Collections.unmodifiableList(sweepLocations_);
+//        }
+//      }
       /**
       /**
        * <code>repeated .com.example.tutorial.SweepLocation sweepLocations = 1;</code>
        * <code>repeated .com.example.tutorial.SweepLocation sweepLocations = 1;</code>
        */
        */

+ 0 - 703
src/main/java/com/fdkankan/model/proto/format/HtmlFormat.java

@@ -1,703 +0,0 @@
-package com.fdkankan.model.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;
-    }
-}

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1338 - 1338
src/main/java/com/fdkankan/model/proto/format/JavaPropsFormat.java


+ 14 - 10
src/main/java/com/fdkankan/model/proto/format/JsonFormat.java

@@ -1,18 +1,18 @@
 package com.fdkankan.model.proto.format;
 package com.fdkankan.model.proto.format;
-/* 
+/*
 	Copyright (c) 2009, Orbitz World Wide
 	Copyright (c) 2009, Orbitz World Wide
 	All rights reserved.
 	All rights reserved.
 
 
-	Redistribution and use in source and binary forms, with or without modification, 
+	Redistribution and use in source and binary forms, with or without modification,
 	are permitted provided that the following conditions are met:
 	are permitted provided that the following conditions are met:
 
 
-		* Redistributions of source code must retain the above copyright notice, 
+		* Redistributions of source code must retain the above copyright notice,
 		  this list of conditions and the following disclaimer.
 		  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 
+		* 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.
 		  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 
+		* 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.
 		  without specific prior written permission.
 
 
 	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -236,6 +236,8 @@ public class JsonFormat {
                 print((Message) value, generator);
                 print((Message) value, generator);
                 generator.print("}");
                 generator.print("}");
                 break;
                 break;
+            default:
+                break;
         }
         }
     }
     }
 
 
@@ -915,7 +917,7 @@ public class JsonFormat {
             field = type.findFieldByNumber(Integer.parseInt(name));
             field = type.findFieldByNumber(Integer.parseInt(name));
             unknown = true;
             unknown = true;
         }
         }
-        
+
         // Finally, look for extensions
         // Finally, look for extensions
         extension = extensionRegistry.findExtensionByName(name);
         extension = extensionRegistry.findExtensionByName(name);
         if (extension != null) {
         if (extension != null) {
@@ -1088,6 +1090,8 @@ public class JsonFormat {
             case MESSAGE:
             case MESSAGE:
             case GROUP:
             case GROUP:
                 throw new RuntimeException("Can't get here.");
                 throw new RuntimeException("Can't get here.");
+            default:
+                break;
         }
         }
         return value;
         return value;
     }
     }
@@ -1194,7 +1198,7 @@ public class JsonFormat {
         }
         }
         return builder.toString();
         return builder.toString();
     }
     }
-	
+
 	static String unicodeEscaped(char ch) {
 	static String unicodeEscaped(char ch) {
 		if (ch < 0x10) {
 		if (ch < 0x10) {
 			return "\\u000" + Integer.toHexString(ch);
 			return "\\u000" + Integer.toHexString(ch);
@@ -1322,7 +1326,7 @@ public class JsonFormat {
     /**
     /**
      * Implements JSON string escaping as specified <a href="http://www.ietf.org/rfc/rfc4627.txt">here</a>.
      * Implements JSON string escaping as specified <a href="http://www.ietf.org/rfc/rfc4627.txt">here</a>.
      * <ul>
      * <ul>
-     *  <li>The following characters are escaped by prefixing them with a '\' : \b,\f,\n,\r,\t,\,"</li> 
+     *  <li>The following characters are escaped by prefixing them with a '\' : \b,\f,\n,\r,\t,\,"</li>
      *  <li>Other control characters in the range 0x0000-0x001F are escaped using the \\uXXXX notation</li>
      *  <li>Other control characters in the range 0x0000-0x001F are escaped using the \\uXXXX notation</li>
      *  <li>UTF-16 surrogate pairs are encoded using the \\uXXXX\\uXXXX notation</li>
      *  <li>UTF-16 surrogate pairs are encoded using the \\uXXXX\\uXXXX notation</li>
      *  <li>any other character is printed as-is</li>
      *  <li>any other character is printed as-is</li>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1333 - 1333
src/main/java/com/fdkankan/model/proto/format/XmlFormat.java


+ 8 - 70
src/main/java/com/fdkankan/model/utils/ConvertUtils.java

@@ -13,42 +13,9 @@ import java.util.*;
 @Slf4j
 @Slf4j
 public class ConvertUtils {
 public class ConvertUtils {
 
 
-    public static void convertVisionModelDataToTxt(String srcPath, String desPath) throws Exception {
+    private final static String visibles_2 = "visibles2";
 
 
-        BufferedOutputStream bos = null;
-        BufferedInputStream bis = null;
-        try {
-            File file = new File(srcPath);
-            FileInputStream fis = new FileInputStream(file);
-
-            Visionmodeldata.NavigationInfo data_NavigationInfo = Visionmodeldata.NavigationInfo.parseFrom(fis);
-
-            String jsonFormat1 = JsonFormat.printToString(data_NavigationInfo);
-            ByteArrayInputStream stream = new ByteArrayInputStream(jsonFormat1.getBytes());
-            bos = new BufferedOutputStream(new FileOutputStream(desPath));//设置输出路径
-            bis = new BufferedInputStream(stream);
-            int b = -1;
-            while ((b = bis.read()) != -1) {
-                bos.write(b);
-            }
-            //out.close();
-            fis.close();
-            stream.close();
-            bis.close();
-            bos.close();
-        } catch (Exception e) {
-            StringWriter trace = new StringWriter();
-            e.printStackTrace(new PrintWriter(trace));
-            log.error(trace.toString());
-        } finally {
-            if (bos != null) {
-                bos.close();
-            }
-            if (bis != null) {
-                bis.close();
-            }
-        }
-    }
+    private final static String visibles_3 = "visibles3";
 
 
     public static void convertTxtToVisionModelData(String srcPath, String desPath) throws Exception {
     public static void convertTxtToVisionModelData(String srcPath, String desPath) throws Exception {
         BufferedOutputStream bos = null;
         BufferedOutputStream bos = null;
@@ -139,34 +106,6 @@ public class ConvertUtils {
 
 
     }
     }
 
 
-    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 convertVisionmodeldataToTxt(String srcpath,String despath)throws Exception
     public static void convertVisionmodeldataToTxt(String srcpath,String despath)throws Exception
     {
     {
         try
         try
@@ -220,9 +159,8 @@ public class ConvertUtils {
             }
             }
             sweepLocationObj.put("visibles", visiblesList);
             sweepLocationObj.put("visibles", visiblesList);
 
 
-            if(sweepLocationObj.containsKey("visibles2")){
-                JSONArray visibles2 =  sweepLocationObj.getJSONArray("visibles2");
-//				int[] visiblesArr2 = new int[visibles2.size()];
+            if(sweepLocationObj.containsKey(visibles_2)){
+                JSONArray visibles2 =  sweepLocationObj.getJSONArray(visibles_2);
                 List<Integer> visibles2List = new ArrayList<>();
                 List<Integer> visibles2List = new ArrayList<>();
                 for(int i = 0; i < visibles2.size(); i++){
                 for(int i = 0; i < visibles2.size(); i++){
                     Integer index = uuidIndexMap.get(visibles2.get(i));
                     Integer index = uuidIndexMap.get(visibles2.get(i));
@@ -231,11 +169,11 @@ public class ConvertUtils {
                     }
                     }
                     visibles2List.add(index);
                     visibles2List.add(index);
                 }
                 }
-                sweepLocationObj.put("visibles2", visibles2List);
+                sweepLocationObj.put(visibles_2, visibles2List);
             }
             }
 
 
-            if(sweepLocationObj.containsKey("visibles3")){
-                JSONArray visibles3 =  sweepLocationObj.getJSONArray("visibles3");
+            if(sweepLocationObj.containsKey(visibles_3)){
+                JSONArray visibles3 =  sweepLocationObj.getJSONArray(visibles_3);
 //				int[] visiblesArr3 = new int[visibles3.size()];
 //				int[] visiblesArr3 = new int[visibles3.size()];
                 List<Integer> visibles3List = new ArrayList<>();
                 List<Integer> visibles3List = new ArrayList<>();
                 for(int i = 0; i < visibles3.size(); i++){
                 for(int i = 0; i < visibles3.size(); i++){
@@ -245,7 +183,7 @@ public class ConvertUtils {
                     }
                     }
                     visibles3List.add(index);
                     visibles3List.add(index);
                 }
                 }
-                sweepLocationObj.put("visibles3", visibles3List);
+                sweepLocationObj.put(visibles_3, visibles3List);
             }
             }
 
 
         }
         }

+ 6 - 4
src/main/java/com/fdkankan/redis/util/RedisClient.java

@@ -20,6 +20,8 @@ import java.util.stream.Collectors;
 @Component
 @Component
 public class RedisClient {
 public class RedisClient {
 
 
+    public final static String values_key = "values";
+
     public final static String url_delkey = "/redis/delkey";
     public final static String url_delkey = "/redis/delkey";
 
 
     public final static String url_str_add = "/redis/string/add/";
     public final static String url_str_add = "/redis/string/add/";
@@ -101,7 +103,7 @@ public class RedisClient {
         String url = host + url_set_add;
         String url = host + url_set_add;
         Map<String, Object> params = new HashMap<>();
         Map<String, Object> params = new HashMap<>();
         params.put("key", this.genKey(key));
         params.put("key", this.genKey(key));
-        params.put("values", values);
+        params.put(values_key, values);
         JSONObject jsonObject = customHttpClient.postJson(url, params);
         JSONObject jsonObject = customHttpClient.postJson(url, params);
 //        if(Objects.isNull(jsonObject) || !"0".equals(jsonObject.getString("status"))){
 //        if(Objects.isNull(jsonObject) || !"0".equals(jsonObject.getString("status"))){
 //            throw new RuntimeException("redis add set error");
 //            throw new RuntimeException("redis add set error");
@@ -124,7 +126,7 @@ public class RedisClient {
         String url = host + url_set_srem;
         String url = host + url_set_srem;
         Map<String, Object> params = new HashMap<>();
         Map<String, Object> params = new HashMap<>();
         params.put("key", this.genKey(key));
         params.put("key", this.genKey(key));
-        params.put("values", values);
+        params.put(values_key, values);
         JSONObject jsonObject = customHttpClient.postJson(url, params);
         JSONObject jsonObject = customHttpClient.postJson(url, params);
 //        if(Objects.isNull(jsonObject) || !"0".equals(jsonObject.getString("status"))){
 //        if(Objects.isNull(jsonObject) || !"0".equals(jsonObject.getString("status"))){
 //            throw new RuntimeException("redis set srem error");
 //            throw new RuntimeException("redis set srem error");
@@ -135,7 +137,7 @@ public class RedisClient {
         String url = host + url_hash_add;
         String url = host + url_hash_add;
         Map<String, Object> params = new HashMap<>();
         Map<String, Object> params = new HashMap<>();
         params.put("key", this.genKey(key));
         params.put("key", this.genKey(key));
-        params.put("values", values);
+        params.put(values_key, values);
         JSONObject jsonObject = customHttpClient.postJson(url, params);
         JSONObject jsonObject = customHttpClient.postJson(url, params);
         log.info("hash set result:{}", jsonObject);
         log.info("hash set result:{}", jsonObject);
 //        if(Objects.isNull(jsonObject) || !"0".equals(jsonObject.getString("status"))){
 //        if(Objects.isNull(jsonObject) || !"0".equals(jsonObject.getString("status"))){
@@ -211,7 +213,7 @@ public class RedisClient {
         String url = host + url_list_lpush;
         String url = host + url_list_lpush;
         Map<String, Object> params = new HashMap<>();
         Map<String, Object> params = new HashMap<>();
         params.put("key", this.genKey(key));
         params.put("key", this.genKey(key));
-        params.put("values", values);
+        params.put(values_key, values);
         JSONObject jsonObject = customHttpClient.postJson(url, params);
         JSONObject jsonObject = customHttpClient.postJson(url, params);
 //        if(Objects.isNull(jsonObject) || !"0".equals(jsonObject.getString("status"))){
 //        if(Objects.isNull(jsonObject) || !"0".equals(jsonObject.getString("status"))){
 //            throw new RuntimeException("redis list rPushBatch error");
 //            throw new RuntimeException("redis list rPushBatch error");

+ 1 - 5
src/main/java/com/fdkankan/scene/Interceptor/CheckTokenAspect.java

@@ -53,10 +53,6 @@ public class CheckTokenAspect {
 	@Autowired
 	@Autowired
 	private SceneViewLogService sceneViewLogService;
 	private SceneViewLogService sceneViewLogService;
 
 
-	@Pointcut("@annotation(com.fdkankan.scene.annotation.CheckToken)")
-	public void CheckToken() {
-	}
-
 	/**
 	/**
 	 * 前置通知 用于判断用户协作场景是否有协作权限
 	 * 前置通知 用于判断用户协作场景是否有协作权限
 	 *
 	 *
@@ -64,7 +60,7 @@ public class CheckTokenAspect {
 	 *            切点
 	 *            切点
 	 * @throws IOException
 	 * @throws IOException
 	 */
 	 */
-	@Before("CheckToken()")
+	@Before("@annotation(com.fdkankan.scene.annotation.CheckToken)")
 	public void doBefore(JoinPoint joinPoint) throws Exception {
 	public void doBefore(JoinPoint joinPoint) throws Exception {
 		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
 		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
 
 

+ 1 - 5
src/main/java/com/fdkankan/scene/Interceptor/InitEditInfoAspect.java

@@ -52,10 +52,6 @@ public class InitEditInfoAspect {
 	@Autowired
 	@Autowired
 	private SceneConvertLogService sceneConvertLogService;
 	private SceneConvertLogService sceneConvertLogService;
 
 
-	@Pointcut("@annotation(com.fdkankan.scene.annotation.InitEditInfo)")
-	public void InitEditInfo() {
-	}
-
 	/**
 	/**
 	 * 前置通知 用于判断用户协作场景是否有协作权限
 	 * 前置通知 用于判断用户协作场景是否有协作权限
 	 *
 	 *
@@ -63,7 +59,7 @@ public class InitEditInfoAspect {
 	 *            切点
 	 *            切点
 	 * @throws IOException
 	 * @throws IOException
 	 */
 	 */
-	@Before("InitEditInfo()")
+	@Before("@annotation(com.fdkankan.scene.annotation.InitEditInfo)")
 	public void doBefore(JoinPoint joinPoint) throws Exception {
 	public void doBefore(JoinPoint joinPoint) throws Exception {
 		log.info("初始化数据开始");
 		log.info("初始化数据开始");
 		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
 		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();

+ 27 - 20
src/main/java/com/fdkankan/scene/Interceptor/ViewLogAspect.java

@@ -37,6 +37,17 @@ import java.util.Map;
 @Order(101)
 @Order(101)
 public class ViewLogAspect {
 public class ViewLogAspect {
 
 
+	private final static String TOKEN_KEY = "TOKEN";
+
+	private final static String SUCCESS_KEY = "SUCCESS";
+
+	private final static String  RESULT_STAT = "resultStat";
+
+	private final static String  ERR_DESC = "ERRDESC";
+
+	private final static String  SERVICE_ID = "SERVICEID";
+
+
 	@Value("${spring.cloud.nacos.discovery.access-key}")
 	@Value("${spring.cloud.nacos.discovery.access-key}")
 	private String accessKey;
 	private String accessKey;
 
 
@@ -53,10 +64,6 @@ public class ViewLogAspect {
 	@Autowired
 	@Autowired
 	private SceneViewLogService sceneViewLogService;
 	private SceneViewLogService sceneViewLogService;
 
 
-	@Pointcut("@annotation(com.fdkankan.scene.annotation.VrLog)")
-	public void checkCooperationPermit() {
-	}
-
 	/**
 	/**
 	 * 前置通知 用于判断用户协作场景是否有协作权限
 	 * 前置通知 用于判断用户协作场景是否有协作权限
 	 *
 	 *
@@ -64,7 +71,7 @@ public class ViewLogAspect {
 	 *            切点
 	 *            切点
 	 * @throws IOException
 	 * @throws IOException
 	 */
 	 */
-	@Before("checkCooperationPermit()")
+	@Before("@annotation(com.fdkankan.scene.annotation.VrLog)")
 	public void doBefore(JoinPoint joinPoint) throws Exception {
 	public void doBefore(JoinPoint joinPoint) throws Exception {
 		log.info("记录日志开始");
 		log.info("记录日志开始");
 		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
 		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
@@ -77,7 +84,7 @@ public class ViewLogAspect {
 		//请求4a接口获取用户信息
 		//请求4a接口获取用户信息
 		Map<String, Object> parameter = WebUtil.getParameter(joinPoint, request);
 		Map<String, Object> parameter = WebUtil.getParameter(joinPoint, request);
 		String acctId = (String) parameter.get("acctId");
 		String acctId = (String) parameter.get("acctId");
-		String token = (String) parameter.get("token");
+		String token = (String) parameter.get(TOKEN_KEY.toLowerCase());
 		String num = (String) parameter.get("num");
 		String num = (String) parameter.get("num");
         String syscode = (String) parameter.get("syscode");
         String syscode = (String) parameter.get("syscode");
 
 
@@ -86,28 +93,28 @@ public class ViewLogAspect {
 		JSONObject params = new JSONObject();
 		JSONObject params = new JSONObject();
 		params.put("SYSCODE", syscode);
 		params.put("SYSCODE", syscode);
 		params.put("ACCTID", acctId);
 		params.put("ACCTID", acctId);
-		params.put("TOKEN", token);
+		params.put(TOKEN_KEY, token);
 		String encode = ThreeDESUtil.encode(JSON.toJSONString(params), gatewayKey);
 		String encode = ThreeDESUtil.encode(JSON.toJSONString(params), gatewayKey);
 		checkProwadaTokenParam.put("args", encode);
 		checkProwadaTokenParam.put("args", encode);
 		JSONObject result = ws4AServiceClient.checkProwadaToken(checkProwadaTokenParam);
 		JSONObject result = ws4AServiceClient.checkProwadaToken(checkProwadaTokenParam);
 		log.info("场景:{},4A校验token结果:{}", num, result);
 		log.info("场景:{},4A校验token结果:{}", num, result);
-		if(!"SUCCESS".equals(result.getString("resultStat"))){
+		if(!SUCCESS_KEY.equals(result.getString(RESULT_STAT))){
 			throw new BusinessException(4000, "4A鉴权失败");
 			throw new BusinessException(4000, "4A鉴权失败");
 		}
 		}
 		String data = result.getString("data");
 		String data = result.getString("data");
 		JSONObject dataObj = JSONObject.parseObject(data);
 		JSONObject dataObj = JSONObject.parseObject(data);
 		if(!"0".equals(dataObj.getString("RSP"))){
 		if(!"0".equals(dataObj.getString("RSP"))){
-			throw new BusinessException(4000, "4A鉴权失败:" + dataObj.getString("ERRDESC"));
+			throw new BusinessException(4000, "4A鉴权失败:" + dataObj.getString(ERR_DESC));
 		}
 		}
 		String USERCODE = dataObj.getString("USERCODE");
 		String USERCODE = dataObj.getString("USERCODE");
-//		String SERVICEID = dataObj.getString("SERVICEID");
+//		String SERVICEID = dataObj.getString(SERVICE_ID);
 		String ORGCODE = dataObj.getString("ORGCODE");
 		String ORGCODE = dataObj.getString("ORGCODE");
 
 
 		//查询用户信息
 		//查询用户信息
 		JSONObject param2 = new JSONObject();
 		JSONObject param2 = new JSONObject();
-		param2.put("SERVICEID", syscode);
+		param2.put(SERVICE_ID, syscode);
 		param2.put("LOGINACCOUNT", USERCODE);
 		param2.put("LOGINACCOUNT", USERCODE);
-		param2.put("TOKEN", token);
+		param2.put(TOKEN_KEY, token);
 		encode = ThreeDESUtil.encode(JSON.toJSONString(param2), gatewayKey);
 		encode = ThreeDESUtil.encode(JSON.toJSONString(param2), gatewayKey);
 		Map<String, Object> param = new HashMap<>();
 		Map<String, Object> param = new HashMap<>();
 		param.put("args", encode);
 		param.put("args", encode);
@@ -115,33 +122,33 @@ public class ViewLogAspect {
 		result = JSON.parseObject(queryLoginUserInfoResp);
 		result = JSON.parseObject(queryLoginUserInfoResp);
 //		result = ws4AServiceClient.queryLoginUserInfo(encode);
 //		result = ws4AServiceClient.queryLoginUserInfo(encode);
 		log.info("场景:{},4A查询用户信息结果:{}", num, result);
 		log.info("场景:{},4A查询用户信息结果:{}", num, result);
-		if(!"SUCCESS".equals(result.getString("resultStat"))){
+		if(!SUCCESS_KEY.equals(result.getString(RESULT_STAT))){
 			throw new BusinessException(4000, "4A查询用户信息失败");
 			throw new BusinessException(4000, "4A查询用户信息失败");
 		}
 		}
 		data = result.getString("data");
 		data = result.getString("data");
 		dataObj = JSONObject.parseObject(data);
 		dataObj = JSONObject.parseObject(data);
 		if(!"0".equals(dataObj.getString("RSP"))){
 		if(!"0".equals(dataObj.getString("RSP"))){
-			throw new BusinessException(4000, "4A查询用户信息失败:" + dataObj.getString("ERRDESC"));
+			throw new BusinessException(4000, "4A查询用户信息失败:" + dataObj.getString(ERR_DESC));
 		}
 		}
 		String nickName = dataObj.getString("LOGINNAME");
 		String nickName = dataObj.getString("LOGINNAME");
 
 
 		JSONObject param3 = new JSONObject();
 		JSONObject param3 = new JSONObject();
-		param3.put("SERVICEID", syscode);
+		param3.put(SERVICE_ID, syscode);
 		param3.put("QUERYMODE", "3");
 		param3.put("QUERYMODE", "3");
 		param3.put("ORGCODE", ORGCODE);
 		param3.put("ORGCODE", ORGCODE);
-		param3.put("TOKEN", token);
+		param3.put(TOKEN_KEY, token);
 		encode = ThreeDESUtil.encode(JSON.toJSONString(param3), gatewayKey);
 		encode = ThreeDESUtil.encode(JSON.toJSONString(param3), gatewayKey);
 //		result = ws4AServiceClient.queryOrgs(encode);
 //		result = ws4AServiceClient.queryOrgs(encode);
 		String queryOrgsResp = HttpUtil.get(gatewayUrl + "/QUERY4A/query/queryOrgs?args=" + encode);
 		String queryOrgsResp = HttpUtil.get(gatewayUrl + "/QUERY4A/query/queryOrgs?args=" + encode);
 		result = JSON.parseObject(queryOrgsResp);
 		result = JSON.parseObject(queryOrgsResp);
 		log.info("场景:{},4A查询用户组织结果:{}", num, result);
 		log.info("场景:{},4A查询用户组织结果:{}", num, result);
-		if(!"SUCCESS".equals(result.getString("resultStat"))){
+		if(!SUCCESS_KEY.equals(result.getString(RESULT_STAT))){
 			throw new BusinessException(4000, "查询用户组织失败");
 			throw new BusinessException(4000, "查询用户组织失败");
 		}
 		}
 		data = result.getString("data");
 		data = result.getString("data");
 		dataObj = JSONObject.parseObject(data);
 		dataObj = JSONObject.parseObject(data);
 		if(!"0".equals(dataObj.getString("RSP"))){
 		if(!"0".equals(dataObj.getString("RSP"))){
-			throw new BusinessException(4000, "4A查询用户组织失败:" + dataObj.getString("ERRDESC"));
+			throw new BusinessException(4000, "4A查询用户组织失败:" + dataObj.getString(ERR_DESC));
 		}
 		}
 		JSONObject ORGS = dataObj.getJSONObject("ORGS");
 		JSONObject ORGS = dataObj.getJSONObject("ORGS");
 		JSONArray ORG = ORGS.getJSONArray("ORG");
 		JSONArray ORG = ORGS.getJSONArray("ORG");
@@ -162,9 +169,9 @@ public class ViewLogAspect {
 
 
 	public static void main(String[] args) {
 	public static void main(String[] args) {
 		JSONObject param2 = new JSONObject();
 		JSONObject param2 = new JSONObject();
-		param2.put("SERVICEID", "CHNTRMS2");
+		param2.put(SERVICE_ID, "CHNTRMS2");
 		param2.put("LOGINACCOUNT", "wx-sunql3");
 		param2.put("LOGINACCOUNT", "wx-sunql3");
-		param2.put("TOKEN", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJSRVMiLCJpc3MiOiJXUzRBIiwiZXhwIjoxNzMzMzEwNjY1LCJOQU5PU0VDT05EIjo0MjAxNTczODIzODYyMjgzOH0.sQR4qkTeRZEOQMI-Rjck35dFswoOMYHsGSuNcXH45TI");
+		param2.put(TOKEN_KEY, "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJSRVMiLCJpc3MiOiJXUzRBIiwiZXhwIjoxNzMzMzEwNjY1LCJOQU5PU0VDT05EIjo0MjAxNTczODIzODYyMjgzOH0.sQR4qkTeRZEOQMI-Rjck35dFswoOMYHsGSuNcXH45TI");
 		String encode = ThreeDESUtil.encode(JSON.toJSONString(param2), "6#dPz>3F");
 		String encode = ThreeDESUtil.encode(JSON.toJSONString(param2), "6#dPz>3F");
 		System.out.println(encode);
 		System.out.println(encode);
 	}
 	}

+ 1 - 1
src/main/java/com/fdkankan/scene/bean/ResultData.java

@@ -22,7 +22,7 @@ public class ResultData<T> implements Serializable {
     /**
     /**
      * 后端返回结果
      * 后端返回结果
      */
      */
-    private T data;
+    private transient T data;
     /**
     /**
      * 请求是否成功
      * 请求是否成功
      */
      */

+ 5 - 3
src/main/java/com/fdkankan/scene/service/impl/BoxModelServiceImpl.java

@@ -47,6 +47,8 @@ import java.util.*;
 @Service
 @Service
 public class BoxModelServiceImpl implements IBoxModelService {
 public class BoxModelServiceImpl implements IBoxModelService {
 
 
+    private final static String CREATE_TIME = "createTime";
+
     @Resource
     @Resource
     FYunFileService fYunFileService;
     FYunFileService fYunFileService;
     @Autowired
     @Autowired
@@ -217,14 +219,14 @@ public class BoxModelServiceImpl implements IBoxModelService {
             for(int i=0;i<boxModelsJson.size();++i){
             for(int i=0;i<boxModelsJson.size();++i){
                 JSONObject ele = boxModelsJson.getJSONObject(i);
                 JSONObject ele = boxModelsJson.getJSONObject(i);
                 if(ele.getString("sid").equals(sid)){
                 if(ele.getString("sid").equals(sid)){
-                    data.put("createTime", ele.getLong("createTime"));
+                    data.put(CREATE_TIME, ele.getLong(CREATE_TIME));
                     boxModelsJson.set(i, data);
                     boxModelsJson.set(i, data);
                     exist = true;
                     exist = true;
                 }
                 }
             }
             }
             //新增
             //新增
             if(!exist){
             if(!exist){
-                data.put("createTime", Calendar.getInstance().getTimeInMillis());
+                data.put(CREATE_TIME, Calendar.getInstance().getTimeInMillis());
                 boxModelsJson.add(data);
                 boxModelsJson.add(data);
             }
             }
 
 
@@ -234,7 +236,7 @@ public class BoxModelServiceImpl implements IBoxModelService {
             List<BoxModelBean> list = Lists.newArrayList();
             List<BoxModelBean> list = Lists.newArrayList();
             for (Object o : boxModelsJson) {
             for (Object o : boxModelsJson) {
                 JSONObject jsonObject = (JSONObject)o;
                 JSONObject jsonObject = (JSONObject)o;
-                list.add(BoxModelBean.builder().createTime(jsonObject.getLong("createTime")).boxModel(jsonObject).build());
+                list.add(BoxModelBean.builder().createTime(jsonObject.getLong(CREATE_TIME)).boxModel(jsonObject).build());
             }
             }
             //按创建时间倒叙排序
             //按创建时间倒叙排序
             list.sort(Comparator.comparingLong(BoxModelBean::getCreateTime).reversed());
             list.sort(Comparator.comparingLong(BoxModelBean::getCreateTime).reversed());

+ 5 - 3
src/main/java/com/fdkankan/scene/service/impl/CutModelServiceImpl.java

@@ -30,6 +30,8 @@ public class CutModelServiceImpl implements ICutModelService {
 
 
     private final String CUT_MODEL_JSON_NAME = "cutModel.json";
     private final String CUT_MODEL_JSON_NAME = "cutModel.json";
 
 
+    private final static String CREATE_TIME = "createTime";
+
     @Autowired
     @Autowired
     private SceneService scenePlusService;
     private SceneService scenePlusService;
     @Autowired
     @Autowired
@@ -77,8 +79,8 @@ public class CutModelServiceImpl implements ICutModelService {
             List<TagBean> sortList = list.stream().map(str -> {
             List<TagBean> sortList = list.stream().map(str -> {
                 JSONObject jsonObject = JSON.parseObject(str);
                 JSONObject jsonObject = JSON.parseObject(str);
                 TagBean tagBean = new TagBean();
                 TagBean tagBean = new TagBean();
-                tagBean.setCreateTime(jsonObject.getLong("createTime"));
-                jsonObject.remove("createTime");
+                tagBean.setCreateTime(jsonObject.getLong(CREATE_TIME));
+                jsonObject.remove(CREATE_TIME);
                 tagBean.setTag(jsonObject);
                 tagBean.setTag(jsonObject);
                 return tagBean;
                 return tagBean;
             }).collect(Collectors.toList());
             }).collect(Collectors.toList());
@@ -159,7 +161,7 @@ public class CutModelServiceImpl implements ICutModelService {
         Map<String, String> addOrUpdateMap = new HashMap<>();
         Map<String, String> addOrUpdateMap = new HashMap<>();
         int i = 0;
         int i = 0;
         for (JSONObject jsonObject : data) {
         for (JSONObject jsonObject : data) {
-            jsonObject.put("createTime", Calendar.getInstance().getTimeInMillis() + i++);
+            jsonObject.put(CREATE_TIME, Calendar.getInstance().getTimeInMillis() + i++);
             addOrUpdateMap.put(jsonObject.getString("sid"), JSON.toJSONString(jsonObject));
             addOrUpdateMap.put(jsonObject.getString("sid"), JSON.toJSONString(jsonObject));
         }
         }
 
 

+ 5 - 3
src/main/java/com/fdkankan/scene/service/impl/SceneDrawServiceImpl.java

@@ -31,6 +31,8 @@ public class SceneDrawServiceImpl implements ISceneDrawService {
 
 
     private final String SCENE_DRAW_JSON_NAME = "sceneDraw.json";
     private final String SCENE_DRAW_JSON_NAME = "sceneDraw.json";
 
 
+    private final static String CREATE_TIME = "createTime";
+
     @Autowired
     @Autowired
     private SceneService sceneService;
     private SceneService sceneService;
     @Autowired
     @Autowired
@@ -85,7 +87,7 @@ public class SceneDrawServiceImpl implements ISceneDrawService {
         Map<String, String> addOrUpdateMap = new HashMap<>();
         Map<String, String> addOrUpdateMap = new HashMap<>();
         int i = 0;
         int i = 0;
         for (JSONObject jsonObject : data) {
         for (JSONObject jsonObject : data) {
-            jsonObject.put("createTime", Calendar.getInstance().getTimeInMillis() + i++);
+            jsonObject.put(CREATE_TIME, Calendar.getInstance().getTimeInMillis() + i++);
             addOrUpdateMap.put(jsonObject.getString("sid"), JSON.toJSONString(jsonObject));
             addOrUpdateMap.put(jsonObject.getString("sid"), JSON.toJSONString(jsonObject));
         }
         }
 
 
@@ -117,8 +119,8 @@ public class SceneDrawServiceImpl implements ISceneDrawService {
             List<TagBean> sortList = list.stream().map(str -> {
             List<TagBean> sortList = list.stream().map(str -> {
                 JSONObject jsonObject = JSON.parseObject(str);
                 JSONObject jsonObject = JSON.parseObject(str);
                 TagBean tagBean = new TagBean();
                 TagBean tagBean = new TagBean();
-                tagBean.setCreateTime(jsonObject.getLong("createTime"));
-                jsonObject.remove("createTime");
+                tagBean.setCreateTime(jsonObject.getLong(CREATE_TIME));
+                jsonObject.remove(CREATE_TIME);
                 tagBean.setTag(jsonObject);
                 tagBean.setTag(jsonObject);
                 return tagBean;
                 return tagBean;
             }).collect(Collectors.toList());
             }).collect(Collectors.toList());

+ 9 - 6
src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoExtServiceImpl.java

@@ -47,6 +47,9 @@ import java.util.stream.Collectors;
 @DS("vr")
 @DS("vr")
 @Service
 @Service
 public class SceneEditInfoExtServiceImpl extends ServiceImpl<SceneEditInfoExtMapper, SceneEditInfoExt> implements SceneEditInfoExtService {
 public class SceneEditInfoExtServiceImpl extends ServiceImpl<SceneEditInfoExtMapper, SceneEditInfoExt> implements SceneEditInfoExtService {
+
+    private final static String CREATE_TIME = "createTime";
+
     @Autowired
     @Autowired
     private SceneService scenePlusService;
     private SceneService scenePlusService;
     @Autowired
     @Autowired
@@ -109,7 +112,7 @@ public class SceneEditInfoExtServiceImpl extends ServiceImpl<SceneEditInfoExtMap
         AtomicInteger index = new AtomicInteger();
         AtomicInteger index = new AtomicInteger();
         styles.stream().forEach(style->{
         styles.stream().forEach(style->{
             String id = style.getString("sid");
             String id = style.getString("sid");
-            style.put("createTime", time + index.getAndIncrement());
+            style.put(CREATE_TIME, time + index.getAndIncrement());
             styleMap.put(id, style.toJSONString());
             styleMap.put(id, style.toJSONString());
         });
         });
 
 
@@ -153,8 +156,8 @@ public class SceneEditInfoExtServiceImpl extends ServiceImpl<SceneEditInfoExtMap
             List<TagBean> sortList = list.stream().map(str -> {
             List<TagBean> sortList = list.stream().map(str -> {
                 JSONObject jsonObject = JSON.parseObject(str);
                 JSONObject jsonObject = JSON.parseObject(str);
                 TagBean tagBean = new TagBean();
                 TagBean tagBean = new TagBean();
-                tagBean.setCreateTime(jsonObject.getLong("createTime"));
-                jsonObject.remove("createTime");
+                tagBean.setCreateTime(jsonObject.getLong(CREATE_TIME));
+                jsonObject.remove(CREATE_TIME);
                 tagBean.setTag(jsonObject);
                 tagBean.setTag(jsonObject);
                 return tagBean;
                 return tagBean;
             }).collect(Collectors.toList());
             }).collect(Collectors.toList());
@@ -170,8 +173,8 @@ public class SceneEditInfoExtServiceImpl extends ServiceImpl<SceneEditInfoExtMap
             List<TagBean> stileSortList = sytlelist.stream().map(str -> {
             List<TagBean> stileSortList = sytlelist.stream().map(str -> {
                 JSONObject jsonObject = JSON.parseObject(str);
                 JSONObject jsonObject = JSON.parseObject(str);
                 TagBean tagBean = new TagBean();
                 TagBean tagBean = new TagBean();
-                tagBean.setCreateTime(jsonObject.getLong("createTime"));
-                jsonObject.remove("createTime");
+                tagBean.setCreateTime(jsonObject.getLong(CREATE_TIME));
+                jsonObject.remove(CREATE_TIME);
                 tagBean.setTag(jsonObject);
                 tagBean.setTag(jsonObject);
                 return tagBean;
                 return tagBean;
             }).collect(Collectors.toList());
             }).collect(Collectors.toList());
@@ -201,7 +204,7 @@ public class SceneEditInfoExtServiceImpl extends ServiceImpl<SceneEditInfoExtMap
         Map<String, String> addOrUpdateMap = new HashMap<>();
         Map<String, String> addOrUpdateMap = new HashMap<>();
         int i = 0;
         int i = 0;
         for (JSONObject jsonObject : data) {
         for (JSONObject jsonObject : data) {
-            jsonObject.put("createTime", Calendar.getInstance().getTimeInMillis() + i++);
+            jsonObject.put(CREATE_TIME, Calendar.getInstance().getTimeInMillis() + i++);
             addOrUpdateMap.put(jsonObject.getString("sid"), JSON.toJSONString(jsonObject));
             addOrUpdateMap.put(jsonObject.getString("sid"), JSON.toJSONString(jsonObject));
         }
         }
 
 

+ 18 - 9
src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoServiceImpl.java

@@ -57,6 +57,11 @@ import java.util.stream.Collectors;
 @DS("vr")
 @DS("vr")
 @Service
 @Service
 public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, SceneEditInfo> implements SceneEditInfoService {
 public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, SceneEditInfo> implements SceneEditInfoService {
+
+    private final static String SQL_ADD_VERSION = "version=version+";
+
+    private final static String CREATE_TIME = "createTime";
+
     @Value("${tieta.device-address:#{null}}")
     @Value("${tieta.device-address:#{null}}")
     private String deviceAddress;
     private String deviceAddress;
 //
 //
@@ -200,6 +205,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
                 //俊波要求这两个字段编辑页一定是1
                 //俊波要求这两个字段编辑页一定是1
                 sceneInfo.getControls().setShowDollhouse(CommonStatus.YES.code());
                 sceneInfo.getControls().setShowDollhouse(CommonStatus.YES.code());
                 sceneInfo.getControls().setShowFloorplan(CommonStatus.YES.code());
                 sceneInfo.getControls().setShowFloorplan(CommonStatus.YES.code());
+                break;
             //如果是查看页面请求,查redis
             //如果是查看页面请求,查redis
             case VIEW:
             case VIEW:
                 sceneInfo = this.getSceneInfo4Edit(param.getNum(), param.getSubgroup(), param.getUpTimeKey());
                 sceneInfo = this.getSceneInfo4Edit(param.getNum(), param.getSubgroup(), param.getUpTimeKey());
@@ -225,6 +231,9 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
 
 
                 //查询历史列表
                 //查询历史列表
                 sceneInfo.setHistoryList(sceneService.listByNumLast3(sceneInfo.getNum()));
                 sceneInfo.setHistoryList(sceneService.listByNumLast3(sceneInfo.getNum()));
+                break;
+            default:
+                break;
 
 
         }
         }
         sceneInfo.setDeviceAddress(deviceAddress);
         sceneInfo.setDeviceAddress(deviceAddress);
@@ -351,7 +360,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
         SceneEditInfo sceneEditInfoDb = this.getByScenePlusId(scenePlus.getId());
         SceneEditInfo sceneEditInfoDb = this.getByScenePlusId(scenePlus.getId());
         if(Objects.nonNull(sceneEditInfoDb)){
         if(Objects.nonNull(sceneEditInfoDb)){
             LambdaUpdateWrapper<SceneEditInfo> updateWrapper = new LambdaUpdateWrapper<SceneEditInfo>()
             LambdaUpdateWrapper<SceneEditInfo> updateWrapper = new LambdaUpdateWrapper<SceneEditInfo>()
-                    .setSql("version=version+" + 1)
+                    .setSql(SQL_ADD_VERSION + 1)
                     .eq(SceneEditInfo::getId, sceneEditInfoDb.getId());
                     .eq(SceneEditInfo::getId, sceneEditInfoDb.getId());
             if(floorPlanUser != null){
             if(floorPlanUser != null){
                 updateWrapper.set(SceneEditInfo::getFloorPlanUser, floorPlanUser);
                 updateWrapper.set(SceneEditInfo::getFloorPlanUser, floorPlanUser);
@@ -392,7 +401,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
         SceneEditInfoExt sceneEditInfoExt = null;
         SceneEditInfoExt sceneEditInfoExt = null;
         if(Objects.nonNull(sceneEditInfoDb)){
         if(Objects.nonNull(sceneEditInfoDb)){
             LambdaUpdateWrapper<SceneEditInfo> updateWrapper = new LambdaUpdateWrapper<SceneEditInfo>()
             LambdaUpdateWrapper<SceneEditInfo> updateWrapper = new LambdaUpdateWrapper<SceneEditInfo>()
-                    .setSql("version=version+" + 1)
+                    .setSql(SQL_ADD_VERSION + 1)
                     .set(SceneEditInfo::getFloorPlanUser, CommonStatus.NO.code())
                     .set(SceneEditInfo::getFloorPlanUser, CommonStatus.NO.code())
                     .eq(SceneEditInfo::getId, sceneEditInfoDb.getId());
                     .eq(SceneEditInfo::getId, sceneEditInfoDb.getId());
             this.update(updateWrapper);
             this.update(updateWrapper);
@@ -458,7 +467,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
     @Override
     @Override
     public void upgradeVersionById(Long id) {
     public void upgradeVersionById(Long id) {
         this.update(new LambdaUpdateWrapper<SceneEditInfo>()
         this.update(new LambdaUpdateWrapper<SceneEditInfo>()
-                .setSql("version=version+" + 1)
+                .setSql(SQL_ADD_VERSION + 1)
                 .eq(SceneEditInfo::getId, id));
                 .eq(SceneEditInfo::getId, id));
     }
     }
 
 
@@ -1068,10 +1077,10 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
             long timeInMillis = Calendar.getInstance().getTimeInMillis();
             long timeInMillis = Calendar.getInstance().getTimeInMillis();
             for (Object o : boxVideosJson) {
             for (Object o : boxVideosJson) {
                 JSONObject item = (JSONObject)o;
                 JSONObject item = (JSONObject)o;
-                if(Objects.nonNull(item.getLong("createTime"))){
+                if(Objects.nonNull(item.getLong(CREATE_TIME))){
                     continue;
                     continue;
                 }
                 }
-                item.put("createTime", timeInMillis - (i++));
+                item.put(CREATE_TIME, timeInMillis - (i++));
             }
             }
         }
         }
 
 
@@ -1099,7 +1108,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
                 }
                 }
             }
             }
         }else{
         }else{
-            boxVideo.put("createTime", Calendar.getInstance().getTimeInMillis());
+            boxVideo.put(CREATE_TIME, Calendar.getInstance().getTimeInMillis());
 
 
             //更新
             //更新
             boolean exist = false;
             boolean exist = false;
@@ -1228,14 +1237,14 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
             for(int i=0;i<boxPhotosJson.size();++i){
             for(int i=0;i<boxPhotosJson.size();++i){
                 JSONObject ele = boxPhotosJson.getJSONObject(i);
                 JSONObject ele = boxPhotosJson.getJSONObject(i);
                 if(ele.getString("sid").equals(sid)){
                 if(ele.getString("sid").equals(sid)){
-                    boxPhoto.put("createTime", ele.getLong("createTime"));
+                    boxPhoto.put(CREATE_TIME, ele.getLong(CREATE_TIME));
                     boxPhotosJson.set(i, boxPhoto);
                     boxPhotosJson.set(i, boxPhoto);
                     exist = true;
                     exist = true;
                 }
                 }
             }
             }
             //新增
             //新增
             if(!exist){
             if(!exist){
-                boxPhoto.put("createTime", Calendar.getInstance().getTimeInMillis());
+                boxPhoto.put(CREATE_TIME, Calendar.getInstance().getTimeInMillis());
                 boxPhotosJson.add(boxPhoto);
                 boxPhotosJson.add(boxPhoto);
             }
             }
 
 
@@ -1245,7 +1254,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
             List<BoxPhotoBean> list = Lists.newArrayList();
             List<BoxPhotoBean> list = Lists.newArrayList();
             for (Object o : boxPhotosJson) {
             for (Object o : boxPhotosJson) {
                 JSONObject jsonObject = (JSONObject)o;
                 JSONObject jsonObject = (JSONObject)o;
-                list.add(BoxPhotoBean.builder().createTime(jsonObject.getLong("createTime")).boxPhoto(jsonObject).build());
+                list.add(BoxPhotoBean.builder().createTime(jsonObject.getLong(CREATE_TIME)).boxPhoto(jsonObject).build());
             }
             }
             //按创建时间倒叙排序
             //按创建时间倒叙排序
             list.sort(Comparator.comparingLong(BoxPhotoBean::getCreateTime).reversed());
             list.sort(Comparator.comparingLong(BoxPhotoBean::getCreateTime).reversed());

+ 0 - 32
src/main/java/com/fdkankan/scene/service/impl/SceneEditServiceImpl.java

@@ -39,44 +39,12 @@ import java.util.Objects;
 @RefreshScope
 @RefreshScope
 public class SceneEditServiceImpl implements ISceneEditService {
 public class SceneEditServiceImpl implements ISceneEditService {
 
 
-//    @Value("${4dkk.manageService.basePath}")
-//    private String manageServiceUrl;
-//
-//    @Value("${4dkk.manageService.api.getServiceUpTip}")
-//    private String getServiceUpTipApi;
-//
-//    @Autowired
-//    ISceneProService sceneProService;
     @Autowired
     @Autowired
     private SceneService scenePlusService;
     private SceneService scenePlusService;
     @Autowired
     @Autowired
     private FYunFileService fYunFileService;
     private FYunFileService fYunFileService;
-//    @Autowired
-//    private ISceneUploadService sceneUploadService;
     @Autowired
     @Autowired
     private SceneEditInfoExtService sceneEditInfoExtService;
     private SceneEditInfoExtService sceneEditInfoExtService;
-//    @Autowired
-//    private ICameraDetailService cameraDetailService;
-//    @Autowired
-//    private ICameraService cameraService;
-//    @Autowired
-//    private IUserIncrementService userIncrementService;
-//    @Value("${expected.time}")
-//    private String expectedTime;
-//    @Autowired
-//    private IUserService userService;
-//    @Autowired
-//    private ISceneCooperationService sceneCooperationService;
-//    @Autowired
-//    private ISceneResourceService sceneResourceService;
-//    @Autowired
-//    private IScenePlusExtService scenePlusExtService;
-//
-//    @Value("${scene.expired.month:#{null}}")
-//    private Integer expiredMonth;
-//
-//    @Autowired
-//    private MyClient myClient;
 
 
     @Autowired
     @Autowired
     private SceneFileMappingService sceneFileMappingService;
     private SceneFileMappingService sceneFileMappingService;

+ 35 - 23
src/main/java/com/fdkankan/scene/service/impl/SceneProServiceImpl.java

@@ -53,6 +53,16 @@ import java.util.stream.Collectors;
 @Service
 @Service
 public class SceneProServiceImpl implements ISceneProService {
 public class SceneProServiceImpl implements ISceneProService {
 
 
+    private final static String CREATE_TIME = "createTime";
+
+    private final static String vision_modeldata = "vision.modeldata";
+
+    private final static String mesh_obj = "mesh.obj";
+
+    private final static String data_dir = "data/";
+
+    private final static String results_dir = "results";
+
     @Autowired
     @Autowired
     private FYunFileService fYunFileService;
     private FYunFileService fYunFileService;
     @Resource
     @Resource
@@ -118,7 +128,7 @@ public class SceneProServiceImpl implements ISceneProService {
         int i = 0;
         int i = 0;
         for (HotParamVO hotParamVO : hotDataList) {
         for (HotParamVO hotParamVO : hotDataList) {
             JSONObject jsonObject = JSON.parseObject(hotParamVO.getHotData());
             JSONObject jsonObject = JSON.parseObject(hotParamVO.getHotData());
-            jsonObject.put("createTime", Calendar.getInstance().getTimeInMillis() + i++);
+            jsonObject.put(CREATE_TIME, Calendar.getInstance().getTimeInMillis() + i++);
             addOrUpdateMap.put(hotParamVO.getSid(), jsonObject.toJSONString());
             addOrUpdateMap.put(hotParamVO.getSid(), jsonObject.toJSONString());
         }
         }
 
 
@@ -222,7 +232,7 @@ public class SceneProServiceImpl implements ISceneProService {
                 JSONObject jsonObject = JSON.parseObject(entry.getValue());
                 JSONObject jsonObject = JSON.parseObject(entry.getValue());
                 tagBeanList.add(
                 tagBeanList.add(
                     TagBean.builder()
                     TagBean.builder()
-                        .createTime(jsonObject.getLong("createTime"))
+                        .createTime(jsonObject.getLong(CREATE_TIME))
                         .tag(jsonObject).build());
                         .tag(jsonObject).build());
             });
             });
             //按创建时间倒叙排序
             //按创建时间倒叙排序
@@ -231,7 +241,7 @@ public class SceneProServiceImpl implements ISceneProService {
             //移除createTime字段
             //移除createTime字段
             tags = tagBeanList.stream().map(tagBean -> {
             tags = tagBeanList.stream().map(tagBean -> {
                 JSONObject tag = tagBean.getTag();
                 JSONObject tag = tagBean.getTag();
-                tag.remove("createTime");
+                tag.remove(CREATE_TIME);
                 return tag;
                 return tag;
             }).collect(Collectors.toList());
             }).collect(Collectors.toList());
         }
         }
@@ -283,7 +293,7 @@ public class SceneProServiceImpl implements ISceneProService {
             List<TagBean> tagBeanList = hotMap.entrySet().stream().map(entry -> {
             List<TagBean> tagBeanList = hotMap.entrySet().stream().map(entry -> {
                 JSONObject jsonObject = JSON.parseObject(entry.getValue());
                 JSONObject jsonObject = JSON.parseObject(entry.getValue());
                 return TagBean.builder()
                 return TagBean.builder()
-                        .createTime(jsonObject.getLong("createTime"))
+                        .createTime(jsonObject.getLong(CREATE_TIME))
                         .tag(jsonObject).build();
                         .tag(jsonObject).build();
             }).collect(Collectors.toList());
             }).collect(Collectors.toList());
             //按创建时间倒叙排序
             //按创建时间倒叙排序
@@ -405,9 +415,9 @@ public class SceneProServiceImpl implements ISceneProService {
         String viewImagesPath = String.format(UploadFilePath.IMG_VIEW_PATH, param.getNum());
         String viewImagesPath = String.format(UploadFilePath.IMG_VIEW_PATH, param.getNum());
 
 
         //获取点位文件并转换为txt格式
         //获取点位文件并转换为txt格式
-        String modeldataKey = viewImagesPath + "vision.modeldata";
+        String modeldataKey = viewImagesPath + vision_modeldata;
         String tempPath = FileUtil.getTmpDirPath() + UUID.randomUUID() + "/";
         String tempPath = FileUtil.getTmpDirPath() + UUID.randomUUID() + "/";
-        String localModeldataPath = fYunFileService.downloadFile(param.getNum(), param.getSubgroup(), param.getUpTimeKey(), modeldataKey, tempPath, "vision.modeldata");
+        String localModeldataPath = fYunFileService.downloadFile(param.getNum(), param.getSubgroup(), param.getUpTimeKey(), modeldataKey, tempPath, vision_modeldata);
         String localVisionTxtPath = tempPath + "vision.txt";
         String localVisionTxtPath = tempPath + "vision.txt";
         ConvertUtils.convertVisionmodeldataToTxt(localModeldataPath, localVisionTxtPath);
         ConvertUtils.convertVisionmodeldataToTxt(localModeldataPath, localVisionTxtPath);
 
 
@@ -428,11 +438,13 @@ public class SceneProServiceImpl implements ISceneProService {
                 }
                 }
             }
             }
         }
         }
-        File tempFile = File.createTempFile(UUID.randomUUID().toString(), ".json");
-        File tempFile2 = File.createTempFile(UUID.randomUUID().toString(), ".txt");
+//        File tempFile = File.createTempFile(param.getNum() + "-roam-" +  System.currentTimeMillis(), ".json");
+        File tempFile = FileUtil.createTempFile(".json", true);
+//        File tempFile2 = File.createTempFile(param.getNum() + "-roam-" +  System.currentTimeMillis(), ".txt");
+        File tempFile2 = FileUtil.createTempFile(".txt", true);
         FileUtil.writeUtf8String(json.toString(), tempFile.getAbsolutePath());
         FileUtil.writeUtf8String(json.toString(), tempFile.getAbsolutePath());
         ConvertUtils.convertTxtToVisionModelData(tempFile.getAbsolutePath(), tempFile2.getAbsolutePath());
         ConvertUtils.convertTxtToVisionModelData(tempFile.getAbsolutePath(), tempFile2.getAbsolutePath());
-        fYunFileService.uploadFile(param.getNum(), param.getSubgroup(), param.getUpTimeKey(), tempFile2.getAbsolutePath(), viewImagesPath + "vision.modeldata");
+        fYunFileService.uploadFile(param.getNum(), param.getSubgroup(), param.getUpTimeKey(), tempFile2.getAbsolutePath(), viewImagesPath + vision_modeldata);
         FileUtil.del(tempFile);
         FileUtil.del(tempFile);
         FileUtil.del(tempFile2);
         FileUtil.del(tempFile2);
 
 
@@ -518,7 +530,7 @@ public class SceneProServiceImpl implements ISceneProService {
         //下载模型文件
         //下载模型文件
         String objKey = dataViewPath+ "mesh/mesh.obj";
         String objKey = dataViewPath+ "mesh/mesh.obj";
         String mtlKey = dataViewPath + "mesh/mesh.mtl";
         String mtlKey = dataViewPath + "mesh/mesh.mtl";
-        fYunFileService.downloadFile(num, subgroup, upTime, objKey, meshPath, "mesh.obj");
+        fYunFileService.downloadFile(num, subgroup, upTime, objKey, meshPath, mesh_obj);
         fYunFileService.downloadFile(num, subgroup, upTime, objKey, mtlKey, "mesh.mtl");
         fYunFileService.downloadFile(num, subgroup, upTime, objKey, mtlKey, "mesh.mtl");
 
 
         log.info("meshPath="+meshPath);
         log.info("meshPath="+meshPath);
@@ -652,13 +664,13 @@ public class SceneProServiceImpl implements ISceneProService {
         }
         }
         file.transferTo(targetFile);
         file.transferTo(targetFile);
 
 
-        ZipUtil.unzip(zipPath + file.getOriginalFilename(), zipPath + "data/");
+        ZipUtil.unzip(zipPath + file.getOriginalFilename(), zipPath + data_dir);
 
 
         //源文件数据,判断是否有多个文件夹,有多个就提示错误,有一个就将文件夹里数据迁移到extras目录,无直接迁移到extras目录
         //源文件数据,判断是否有多个文件夹,有多个就提示错误,有一个就将文件夹里数据迁移到extras目录,无直接迁移到extras目录
         boolean flag = false;
         boolean flag = false;
         //目录名称,如果不为空,则压缩文件第一层是目录
         //目录名称,如果不为空,则压缩文件第一层是目录
         String targetName = "";
         String targetName = "";
-        File dataFile = new File(zipPath + "data/");
+        File dataFile = new File(zipPath + data_dir);
         for(File data : dataFile.listFiles()){
         for(File data : dataFile.listFiles()){
             if(data.isDirectory() && flag){
             if(data.isDirectory() && flag){
                 throw new BusinessException(ErrorCode.FAILURE_CODE_5018);
                 throw new BusinessException(ErrorCode.FAILURE_CODE_5018);
@@ -677,10 +689,10 @@ public class SceneProServiceImpl implements ISceneProService {
         String dataPath = null;
         String dataPath = null;
         if(StrUtil.isEmpty(targetName)){
         if(StrUtil.isEmpty(targetName)){
             files = dataFile.listFiles();
             files = dataFile.listFiles();
-            dataPath = zipPath + "data/";
+            dataPath = zipPath + data_dir;
         }else{
         }else{
-            files = new File(zipPath + "data/" + targetName).listFiles();
-            dataPath = zipPath + "data/" + targetName + File.separator;
+            files = new File(zipPath + data_dir + targetName).listFiles();
+            dataPath = zipPath + data_dir + targetName + File.separator;
         }
         }
 
 
         for(File data : files){
         for(File data : files){
@@ -697,7 +709,7 @@ public class SceneProServiceImpl implements ISceneProService {
                 if(objFlag){
                 if(objFlag){
                     throw new BusinessException(ErrorCode.FAILURE_CODE_5019);
                     throw new BusinessException(ErrorCode.FAILURE_CODE_5019);
                 }
                 }
-                if(!data.getName().equals("mesh.obj")){
+                if(!data.getName().equals(mesh_obj)){
                     throw new BusinessException(ErrorCode.FAILURE_CODE_5060);
                     throw new BusinessException(ErrorCode.FAILURE_CODE_5060);
                 }
                 }
                 if(!FileUtils.checkFileSizeIsLimit(data.length(), 20, "M")){
                 if(!FileUtils.checkFileSizeIsLimit(data.length(), 20, "M")){
@@ -705,7 +717,7 @@ public class SceneProServiceImpl implements ISceneProService {
                 }
                 }
 
 
                 objFlag = true;
                 objFlag = true;
-                FileUtil.copy(dataPath + data.getName(), filePath + "mesh.obj", true);
+                FileUtil.copy(dataPath + data.getName(), filePath + mesh_obj, true);
                 continue;
                 continue;
             }
             }
 
 
@@ -733,7 +745,7 @@ public class SceneProServiceImpl implements ISceneProService {
 
 
     private void uploadFileofterBuildDamModel(String path, String filePath, String sceneNum, Integer subgroup, String upTime) throws Exception {
     private void uploadFileofterBuildDamModel(String path, String filePath, String sceneNum, Integer subgroup, String upTime) throws Exception {
         //因为共享目录有延迟,这里循环检测算法是否计算完毕3次,每次隔五秒
         //因为共享目录有延迟,这里循环检测算法是否计算完毕3次,每次隔五秒
-        String uploadJsonPath = path + File.separator + "results" +File.separator+"upload.json";
+        String uploadJsonPath = path + File.separator + results_dir +File.separator+"upload.json";
         boolean exist = ComputerUtil.checkComputeCompleted(uploadJsonPath, 5, 2000);
         boolean exist = ComputerUtil.checkComputeCompleted(uploadJsonPath, 5, 2000);
         if(!exist){
         if(!exist){
             throw new BusinessException(ErrorCode.FAILURE_CODE_7013);
             throw new BusinessException(ErrorCode.FAILURE_CODE_7013);
@@ -754,19 +766,19 @@ public class SceneProServiceImpl implements ISceneProService {
             fileJson = array.getJSONObject(i);
             fileJson = array.getJSONObject(i);
             fileName = fileJson.getString("file");
             fileName = fileJson.getString("file");
             //文件不存在抛出异常
             //文件不存在抛出异常
-            if (!new File(path + File.separator + "results" + File.separator + fileName).exists()) {
-                throw new Exception(path + File.separator + "results" + File.separator + fileName + "文件不存在");
+            if (!new File(path + File.separator + results_dir + File.separator + fileName).exists()) {
+                throw new Exception(path + File.separator + results_dir + File.separator + fileName + "文件不存在");
             }
             }
 
 
             //tex文件夹
             //tex文件夹
             if (fileJson.getIntValue("clazz") == 15) {
             if (fileJson.getIntValue("clazz") == 15) {
-                map.put(path + File.separator + "results" + File.separator + fileName, imgViewPath +  "tieta_texture/" + fileName.replace("tex/", ""));
+                map.put(path + File.separator + results_dir + File.separator + fileName, imgViewPath +  "tieta_texture/" + fileName.replace("tex/", ""));
             }
             }
         }
         }
 
 
         String damKey = imgViewPath + "tieta.dam";
         String damKey = imgViewPath + "tieta.dam";
-        String damPath = path + File.separator + "results" +File.separator + "dam.txt";
-        CreateObjUtil.convertTxtToDam( path + File.separator + "results" +File.separator+"modeldata.txt", damPath);
+        String damPath = path + File.separator + results_dir +File.separator + "dam.txt";
+        CreateObjUtil.convertTxtToDam( path + File.separator + results_dir +File.separator+"modeldata.txt", damPath);
         boolean existDam = ComputerUtil.checkComputeCompleted(damPath, 5, 200);
         boolean existDam = ComputerUtil.checkComputeCompleted(damPath, 5, 200);
         if(!existDam){
         if(!existDam){
             throw new BusinessException(ErrorCode.FAILURE_CODE_7013);
             throw new BusinessException(ErrorCode.FAILURE_CODE_7013);

+ 0 - 41
src/main/java/com/fdkankan/scene/service/impl/SceneServiceImpl.java

@@ -135,47 +135,6 @@ public class SceneServiceImpl extends ServiceImpl<SceneMapper, Scene> implements
     }
     }
 
 
 
 
-    public static void main(String[] args) {
-//        JSONObject params = new JSONObject();
-//        params.put("SYSCODE", "CHNTZCGL_ZCSZHGL");
-//        params.put("ACCTID", "101269561");
-//        params.put("TOKEN", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJSRVMiLCJpc3MiOiJXUzRBIiwiZXhwIjoxNzI3MjQxMTQwLCJOQU5PU0VDT05EIjozNTk0NjI1NTg5ODQ3MDU0Nn0.MIlnrl5X00_0QgaT1N9wYRwi4WQ86dGtQlD3EsA01I0");
-//        String encode = ThreeDESUtil.encode(params.toString(), "6#dPz>3F");
-//        System.out.println(encode);
-//
-//        JSONObject params2 = new JSONObject();
-//        params2.put("SERVICEID", "CHNTZCGL_ZCSZHGL");
-//        params2.put("LOGINACCOUNT", "yangqc");
-//        params2.put("TOKEN", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJSRVMiLCJpc3MiOiJXUzRBIiwiZXhwIjoxNzI3NTc3Mzc2LCJOQU5PU0VDT05EIjozNjI4MjQ5MTc2NjM4MDAzMX0.fbTCdbjMTOD6NywkuKGtsOnQdmFI7PiU4g8mEiLQ5wQ");
-//        encode = ThreeDESUtil.encode(params2.toString(), "6#dPz>3F");
-//        System.out.println(encode);
-//
-//
-//        JSONObject params3 = new JSONObject();
-//        params3.put("SERVICEID", "CHNTZCGL_ZCSZHGL");
-//        params3.put("QUERYMODE", "3");
-//        params3.put("TOKEN", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJSRVMiLCJpc3MiOiJXUzRBIiwiZXhwIjoxNzI3MjQxMTQwLCJOQU5PU0VDT05EIjozNTk0NjI1NTg5ODQ3MDU0Nn0.MIlnrl5X00_0QgaT1N9wYRwi4WQ86dGtQlD3EsA01I0");
-//        params3.put("ORGCODE", "100035");
-//        encode = ThreeDESUtil.encode(params3.toString(), "6#dPz>3F");
-//        System.out.println(encode);
-
-//        String s1 = MD5.create().digestHex16("D:\\四维时代\\江门公安\\场景迁移\\sncode.txt");
-//        String s2 = MD5.create().digestHex16("D:\\四维时代\\江门公安\\场景迁移\\KJ-3wS2R5E57eY\\sncode.txt");
-//        System.out.println(s1);
-//        System.out.println(FileUtil.size(new File("D:\\四维时代\\江门公安\\场景迁移\\sncode.txt")));
-//        System.out.println(s2);
-//        System.out.println(FileUtil.size(new File("D:\\四维时代\\江门公安\\场景迁移\\KJ-3wS2R5E57eY\\sncode.txt")));
-
-        String s1 = MD5.create().digestHex16("D:\\四维时代\\江门公安\\场景迁移\\123.txt");
-        System.out.println(s1);
-
-        FileUtil.writeUtf8String("123123", "D:\\四维时代\\江门公安\\场景迁移\\123.txt");
-
-        String s2 = MD5.create().digestHex16("D:\\四维时代\\江门公安\\场景迁移\\123.txt");
-        System.out.println(s2);
-
-    }
-
     @Override
     @Override
     public Scene getByNum(String num, Integer subgroup, String upTime) {
     public Scene getByNum(String num, Integer subgroup, String upTime) {
         if(StrUtil.isNotEmpty(upTime)){
         if(StrUtil.isNotEmpty(upTime)){

+ 2 - 2
src/main/java/com/fdkankan/scene/service/impl/SceneUploadServiceImpl.java

@@ -103,8 +103,8 @@ public class SceneUploadServiceImpl implements ISceneUploadService {
             // 获取文件后缀
             // 获取文件后缀
             String prefix = fileName.substring(fileName.lastIndexOf("."));
             String prefix = fileName.substring(fileName.lastIndexOf("."));
 //            String path = String.format(ConstantFilePath.SCENE_TMP_PATH_V4, num).concat(UUID.randomUUID().toString()).concat(prefix);
 //            String path = String.format(ConstantFilePath.SCENE_TMP_PATH_V4, num).concat(UUID.randomUUID().toString()).concat(prefix);
-            File tempFile = File.createTempFile(UUID.randomUUID().toString() ,prefix);
-//            File tempFile = FileUtil.createTempFile(prefix, true);
+//            File tempFile = File.createTempFile(num + "-tmp-" + System.currentTimeMillis() + "-" + files.indexOf(file),prefix);
+            File tempFile = FileUtil.createTempFile(prefix, true);
             String path = tempFile.getAbsolutePath();
             String path = tempFile.getAbsolutePath();
 //            FileUtil.mkParentDirs(path);
 //            FileUtil.mkParentDirs(path);
             file.transferTo(tempFile);
             file.transferTo(tempFile);