dsx il y a 2 ans
Parent
commit
3e5581c9d4
19 fichiers modifiés avec 1730 ajouts et 1010 suppressions
  1. 5 9
      src/main/java/com/fdkankan/contro/controller/SceneFileController.java
  2. 232 0
      src/main/java/com/fdkankan/contro/entity/ScenePro.java
  3. 282 0
      src/main/java/com/fdkankan/contro/entity/SceneProEdit.java
  4. 18 0
      src/main/java/com/fdkankan/contro/mapper/IIncrementTypeMapper.java
  5. 18 0
      src/main/java/com/fdkankan/contro/mapper/ISceneProEditMapper.java
  6. 18 0
      src/main/java/com/fdkankan/contro/mapper/ISceneProMapper.java
  7. 24 0
      src/main/java/com/fdkankan/contro/mapper/IUserIncrementMapper.java
  8. 5 5
      src/main/java/com/fdkankan/contro/mq/service/impl/BuildObjServiceImpl.java
  9. 14 0
      src/main/java/com/fdkankan/contro/mq/service/impl/BuildSceneServiceImpl.java
  10. 599 599
      src/main/java/com/fdkankan/contro/mq/service/impl/BuildV3SceneServiceImpl.java
  11. 18 0
      src/main/java/com/fdkankan/contro/service/IIncrementTypeService.java
  12. 17 0
      src/main/java/com/fdkankan/contro/service/ISceneProEditService.java
  13. 21 0
      src/main/java/com/fdkankan/contro/service/IUserIncrementService.java
  14. 74 75
      src/main/java/com/fdkankan/contro/service/impl/BuildSceneDTServiceImpl.java
  15. 36 38
      src/main/java/com/fdkankan/contro/service/impl/CommonServiceImpl.java
  16. 20 0
      src/main/java/com/fdkankan/contro/service/impl/IncrementTypeServiceImpl.java
  17. 4 10
      src/main/java/com/fdkankan/contro/service/impl/Scene3dNumServiceImpl.java
  18. 292 274
      src/main/java/com/fdkankan/contro/service/impl/SceneFileBuildServiceImpl.java
  19. 33 0
      src/main/java/com/fdkankan/contro/service/impl/SceneProEditServiceImpl.java

+ 5 - 9
src/main/java/com/fdkankan/contro/controller/SceneFileController.java

@@ -47,9 +47,6 @@ import java.util.Map;
 public class SceneFileController{
 
     @Autowired
-    private FYunFileServiceInterface fYunFileService;
-
-    @Autowired
     private ISceneFileBuildService sceneFileBuildService;
 
     @Autowired
@@ -135,11 +132,11 @@ public class SceneFileController{
     }
 
 
-    @GetMapping("copyDataAndBuild")
-    public ResultData copyDataAndBuild(@RequestParam(value = "dataSource") String dataSource,@RequestParam(value = "sceneVer") String sceneVer,
-                                       @RequestParam(value = "sourceBucket") String sourceBucket) throws Exception {
-        return sceneFileBuildService.copyDataAndBuild(sourceBucket,dataSource ,sceneVer);
-    }
+//    @GetMapping("copyDataAndBuild")
+//    public ResultData copyDataAndBuild(@RequestParam(value = "dataSource") String dataSource,@RequestParam(value = "sceneVer") String sceneVer,
+//                                       @RequestParam(value = "sourceBucket") String sourceBucket) throws Exception {
+//        return sceneFileBuildService.copyDataAndBuild(sourceBucket,dataSource ,sceneVer);
+//    }
 
     /**
      * 单个文件上传
@@ -168,7 +165,6 @@ public class SceneFileController{
 
     /**
      * 本地上传相机原始资源压缩包,通知计算
-     * @param params
      * @return
      * @throws Exception
      */

+ 232 - 0
src/main/java/com/fdkankan/contro/entity/ScenePro.java

@@ -0,0 +1,232 @@
+package com.fdkankan.contro.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * pro场景表
+ * </p>
+ *
+ * @author 
+ * @since 2022-07-04
+ */
+@Getter
+@Setter
+@TableName("t_scene_pro")
+public class ScenePro implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 场景名称
+     */
+    @TableField("scene_name")
+    private String sceneName;
+
+    /**
+     * 场景描述
+     */
+    @TableField("scene_dec")
+    private String sceneDec;
+
+    /**
+     * 场景的链接地址
+     */
+    @TableField("web_site")
+    private String webSite;
+
+    /**
+     * 场景缩略图
+     */
+    @TableField("thumb")
+    private String thumb;
+
+    /**
+     * 创建时间
+     */
+    @TableField("create_time")
+    private Date createTime;
+
+    /**
+     * 0表示未建好,1表示建好,-1表示出错,-2表示不要在官网上显示
+     */
+    @TableField("status")
+    private Integer status;
+
+    /**
+     * 原始的大场景数据(七牛)
+     */
+    @TableField("data_source")
+    private String dataSource;
+
+    /**
+     * 用户表t_user的id
+     */
+    @TableField("user_id")
+    private Long userId;
+
+    /**
+     * 0表示未付款,1表示付款了,-1表示欠费,-2表示容量不足
+     */
+    @TableField("pay_status")
+    private Integer payStatus;
+
+    /**
+     * 相机主表t_camera的id
+     */
+    @TableField("camera_id")
+    private Long cameraId;
+
+    /**
+     * 手机id
+     */
+    @TableField("phone_id")
+    private String phoneId;
+
+    /**
+     * 场景logo
+     */
+    @TableField("scene_logo")
+    private String sceneLogo;
+
+    /**
+     * 大场景序号
+     */
+    @TableField("num")
+    private String num;
+
+    /**
+     * 0表示其他,1表示文博,2表示地产,3表示电商,4表示餐饮,5表示家居,99一件换装虚拟房源
+     */
+    @TableField("scene_type")
+    private Integer sceneType;
+
+    /**
+     * 1表示推荐,0表示正常
+     */
+    @TableField("recommend")
+    private Integer recommend;
+
+    /**
+     * 浏览次数
+     */
+    @TableField("view_count")
+    private Integer viewCount;
+
+    /**
+     * 拍摄数量 ps:点位数量
+     */
+    @TableField("shoot_count")
+    private Integer shootCount;
+
+    /**
+     * 所有资源文件名
+     */
+    @TableField("files_name")
+    private String filesName;
+
+    /**
+     * 点位视频
+     */
+    @TableField("videos")
+    private String videos;
+
+    /**
+     * 要gps定位
+     */
+    @TableField("gps")
+    private String gps;
+
+    /**
+     * 方案:1是双目,2是转台,3是六目,4是八目,10获取4k图,11获取2k,12获取1k
+     */
+    @TableField("scene_scheme")
+    private Integer sceneScheme;
+
+    /**
+     * 记录的状态,A: 生效,I: 禁用
+     */
+    @TableLogic(value = "A", delval = "I")
+    @TableField("rec_status")
+    private String recStatus;
+
+    /**
+     * 更新时间
+     */
+    @TableField("update_time")
+    private Date updateTime;
+
+    /**
+     * 算法类型
+     */
+    @TableField("algorithm")
+    private String algorithm;
+
+    /**
+     * 服务器的服务商
+     */
+    @TableField("ecs")
+    private String ecs;
+
+    /**
+     * 使用容量
+     */
+    @TableField("space")
+    private Long space;
+
+    /**
+     * 固件版本
+     */
+    @TableField("firmware_version")
+    private String firmwareVersion;
+
+    /**
+     * 调用V2还是V3的算法
+     */
+    @TableField("build_type")
+    private String buildType;
+
+    /**
+     * 计算时间(秒为单位)
+     */
+    @TableField("compute_time")
+    private Long computeTime;
+
+    /**
+     * 场景来源,相机拍摄10以内表示,1表示八目,2双目,3转台,4 激光  其他来源10以上,11:一键换装,12:123看房,13文通虚拟场景,14上传的matterport场景
+     */
+    @TableField("scene_source")
+    private Integer sceneSource;
+
+    /**
+     * 大场景序号(随心装场景码)
+     */
+    @TableField("vrnum")
+    private String vrnum;
+
+    @TableField("unicode")
+    private String unicode;
+
+    @TableField("mosaics")
+    private String mosaics;
+
+    /**
+     * 是否已升级v4(0-否,1-是)
+     */
+    @TableField("is_upgrade")
+    private Integer isUpgrade;
+
+    /**
+     * 是否生成过OBJ
+     */
+    @TableField("is_obj")
+    private Integer isObj;
+}

+ 282 - 0
src/main/java/com/fdkankan/contro/entity/SceneProEdit.java

@@ -0,0 +1,282 @@
+package com.fdkankan.contro.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * pro场景编辑数据表
+ * </p>
+ *
+ * @author 
+ * @since 2022-07-04
+ */
+@Getter
+@Setter
+@TableName("t_scene_pro_edit")
+public class SceneProEdit implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * pro场景id
+     */
+    @TableField("pro_id")
+    private Long proId;
+
+    /**
+     * 创建时间
+     */
+    @TableField("create_time")
+    private Date createTime;
+
+    /**
+     * 大场景的密钥
+     */
+    @TableField("scene_key")
+    private String sceneKey;
+
+    /**
+     * 展示页面密码,0不需要,1需要
+     */
+    @TableField("need_key")
+    private Integer needKey;
+
+    /**
+     * 版本
+     */
+    @TableField("version")
+    private Integer version;
+
+    /**
+     * 表示缩略图是否存在
+     */
+    @TableField("thumb_status")
+    private Integer thumbStatus;
+
+    /**
+     * 地面点位标志
+     */
+    @TableField("marker_logo")
+    private String markerLogo;
+
+    /**
+     * 0表示默认,1表示自己上传
+     */
+    @TableField("floor_logo")
+    private String floorLogo;
+
+    /**
+     * 标记大小
+     */
+    @TableField("floor_logo_size")
+    private Integer floorLogoSize;
+
+    /**
+     * 要上传的热点的id集合,用逗号隔开
+     */
+    @TableField("hots_ids")
+    private String hotsIds;
+
+    /**
+     * 表示初始点信息
+     */
+    @TableField("entry")
+    private String entry;
+
+    /**
+     * 背景音乐名称
+     */
+    @TableField("bg_music")
+    private String bgMusic;
+
+    /**
+     * 记录的状态,A: 生效,I: 禁用
+     */
+    @TableLogic(value = "A", delval = "I")
+    @TableField("rec_status")
+    private String recStatus;
+
+    /**
+     * 更新时间
+     */
+    @TableField("update_time")
+    private Date updateTime;
+
+    /**
+     * 普通录屏文件地址
+     */
+    @TableField("screencap_voice_src")
+    private String screencapVoiceSrc;
+
+    /**
+     * 录音文件地址
+     */
+    @TableField("screencap_voice_sound")
+    private String screencapVoiceSound;
+
+    /**
+     * 同步录音地址
+     */
+    @TableField("screencap_voice_soundsync")
+    private String screencapVoiceSoundsync;
+
+    /**
+     * 选择的类型,sound为screencapVoiceSound,file为screencapVoiceSrc,soundsync为screencap_voice_soundsync
+     */
+    @TableField("screencap_voice_type")
+    private String screencapVoiceType;
+
+    /**
+     * 录屏文件地址
+     */
+    @TableField("play_data")
+    private String playData;
+
+    /**
+     * 重新建模的版本
+     */
+    @TableField("floor_edit_ver")
+    private Integer floorEditVer;
+
+    /**
+     * 正式发布重新建模的版本
+     */
+    @TableField("floor_publish_ver")
+    private Integer floorPublishVer;
+
+    /**
+     * 录屏图片存放文件
+     */
+    @TableField("screencap_thumb")
+    private String screencapThumb;
+
+    /**
+     * 分享的logo和生成二维码的logo
+     */
+    @TableField("share_logo")
+    private String shareLogo;
+
+    /**
+     * 小地图浏览
+     */
+    @TableField("map_visi")
+    private Integer mapVisi;
+
+    /**
+     * 自动导览
+     */
+    @TableField("tour_visi")
+    private Integer tourVisi;
+
+    /**
+     * vr模式
+     */
+    @TableField("vr_visi")
+    private Integer vrVisi;
+
+    /**
+     * 展示页面是否显示标尺
+     */
+    @TableField("ruler_visi")
+    private Integer rulerVisi;
+
+    /**
+     * 展示页面cad图在平面图是否显示
+     */
+    @TableField("cad_img_visi")
+    private Integer cadImgVisi;
+
+    /**
+     * cad平面图
+     */
+    @TableField("floor_plan_png")
+    private String floorPlanPng;
+
+    /**
+     * cad平面图参数
+     */
+    @TableField("cad_info")
+    private String cadInfo;
+
+    @TableField("pano_visi")
+    private Integer panoVisi;
+
+    @TableField("m2d_visi")
+    private Integer m2dVisi;
+
+    @TableField("m3d_visi")
+    private Integer m3dVisi;
+
+    @TableField("measure_visi")
+    private Integer measureVisi;
+
+    /**
+     * 肖安需求,场景于场景之间的关联
+     */
+    @TableField("link_scene")
+    private String linkScene;
+
+    @TableField("overlay")
+    private String overlay;
+
+    /**
+     * 是否显示底部logo,1显示,0不显示
+     */
+    @TableField("show_logo_bottom")
+    private Integer showLogoBottom;
+
+    /**
+     * 全景图版本号
+     */
+    @TableField("images_version")
+    private Integer imagesVersion;
+
+    /**
+     * 上传的背景音乐
+     */
+    @TableField("bg_music_name")
+    private String bgMusicName;
+
+    @TableField("jump_scene")
+    private Boolean jumpScene;
+
+    /**
+     * 旋转角度
+     */
+    @TableField("floor_plan_angle")
+    private String floorPlanAngle;
+
+    /**
+     * 场景下载次数
+     */
+    @TableField("download_num")
+    private Integer downloadNum;
+
+    /**
+     * 绿幕抠图json数据
+     */
+    @TableField("videos_user")
+    private String videosUser;
+
+    /**
+     * 大场景序号(随心装场景码)
+     */
+    @TableField("vr_num")
+    private String vrNum;
+
+    /**
+     * 随心装封面图
+     */
+    @TableField("vr_thumb")
+    private String vrThumb;
+
+
+}

+ 18 - 0
src/main/java/com/fdkankan/contro/mapper/IIncrementTypeMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.contro.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fdkankan.contro.entity.IncrementType;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * 会员权益类型 Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2022-08-01
+ */
+@Mapper
+public interface IIncrementTypeMapper extends BaseMapper<IncrementType> {
+
+}

+ 18 - 0
src/main/java/com/fdkankan/contro/mapper/ISceneProEditMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.contro.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fdkankan.contro.entity.SceneProEdit;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * pro场景编辑数据表 Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2022-07-12
+ */
+@Mapper
+public interface ISceneProEditMapper extends BaseMapper<SceneProEdit> {
+
+}

+ 18 - 0
src/main/java/com/fdkankan/contro/mapper/ISceneProMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.contro.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fdkankan.contro.entity.ScenePro;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * pro场景表 Mapper 接口
+ * </p>
+ *
+ * @author dengsixing
+ * @since 2021-12-23
+ */
+@Mapper
+public interface ISceneProMapper extends BaseMapper<ScenePro> {
+
+}

+ 24 - 0
src/main/java/com/fdkankan/contro/mapper/IUserIncrementMapper.java

@@ -0,0 +1,24 @@
+package com.fdkankan.contro.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fdkankan.contro.entity.UserIncrement;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 用户增值权益表 Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2021-12-24
+ */
+@Mapper
+public interface IUserIncrementMapper extends BaseMapper<UserIncrement> {
+
+    @Select("SELECT * FROM t_user_increment x LEFT JOIN t_camera c ON x.camera_id = c.id and c.rec_status = 'A' WHERE c.child_name = #{childName} AND x.rec_status = 'A' ")
+    List<UserIncrement> getByChildName(@Param("childName")String childName);
+}

+ 5 - 5
src/main/java/com/fdkankan/contro/mq/service/impl/BuildObjServiceImpl.java

@@ -82,8 +82,8 @@ public class BuildObjServiceImpl implements IBuildSceneService {
     @Autowired
     private FdkkV4Service fdkkV4Service;
 
-    @Autowired
-    private IBuildSceneDTService buildSceneDTService;
+//    @Autowired
+//    private IBuildSceneDTService buildSceneDTService;
 
     @Autowired
     private ISceneProEditService sceneProEditService;
@@ -151,7 +151,7 @@ public class BuildObjServiceImpl implements IBuildSceneService {
 
         }catch (Exception e){
             log.error("生成OBJ场景资源准备异常,num=" + num, e);
-            buildSceneDTService.handBaseFail("生成OBJ场景资源准备异常", message.getPath(), message.getSceneNum(), "计算控制服务器");
+//            buildSceneDTService.handBaseFail("生成OBJ场景资源准备异常", message.getPath(), message.getSceneNum(), "计算控制服务器");
             throw e;
         }finally {
             fdkkLaserService.pushBuildStatusToLaserSystem(num, laserObjFilePath + "/laserData/mesh", success ? CommonOperStatus.SUCCESS.code() : CommonOperStatus.FAILD.code());
@@ -189,7 +189,7 @@ public class BuildObjServiceImpl implements IBuildSceneService {
             if (!message.getBuildSuccess()) {
                 log.error("生成OBJ场景计算失败!");
                 // 发送钉钉消息,计算失败
-                buildSceneDTService.handModelFail("生成OBJ场景计算失败!", message.getPath(), message.getBuildContext().get("sceneNum").toString(), message.getHostName());
+//                buildSceneDTService.handModelFail("生成OBJ场景计算失败!", message.getPath(), message.getBuildContext().get("sceneNum").toString(), message.getHostName());
                 return;
             }
 
@@ -306,7 +306,7 @@ public class BuildObjServiceImpl implements IBuildSceneService {
 
         }catch (Exception e){
             log.error("生成OBJ场景计算结果处理异常,num=" + projectNum, e);
-            buildSceneDTService.handBaseFail("生成OBJ场景计算结果处理异常", message.getPath(), projectNum, "计算控制服务器");
+//            buildSceneDTService.handBaseFail("生成OBJ场景计算结果处理异常", message.getPath(), projectNum, "计算控制服务器");
             throw e;
         }finally {
             fdkkLaserService.pushBuildStatusToLaserSystem(projectNum, laserObjFilePath + "/laserData/mesh", success ? CommonOperStatus.SUCCESS.code() : CommonOperStatus.FAILD.code());

+ 14 - 0
src/main/java/com/fdkankan/contro/mq/service/impl/BuildSceneServiceImpl.java

@@ -119,6 +119,20 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
     private ISceneEditInfoExtService sceneEditInfoExtService;
 
     @Autowired
+    private IUserIncrementService userIncrementService;
+
+    @Autowired
+    private IFdkkLaserService fdkkLaserService;
+
+
+//    @Autowired
+//    private IBuildSceneDTService buildSceneDTService;
+
+
+    @Autowired
+    private IIncrementTypeService incrementTypeService;
+
+    @Autowired
     private ICompanyService companyService;
     @Autowired
     private ISceneAsynOperLogService sceneAsynOperLogService;

Fichier diff supprimé car celui-ci est trop grand
+ 599 - 599
src/main/java/com/fdkankan/contro/mq/service/impl/BuildV3SceneServiceImpl.java


+ 18 - 0
src/main/java/com/fdkankan/contro/service/IIncrementTypeService.java

@@ -0,0 +1,18 @@
+package com.fdkankan.contro.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fdkankan.contro.entity.IncrementType;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 会员权益类型 服务类
+ * </p>
+ *
+ * @author 
+ * @since 2022-08-01
+ */
+public interface IIncrementTypeService extends IService<IncrementType> {
+
+}

+ 17 - 0
src/main/java/com/fdkankan/contro/service/ISceneProEditService.java

@@ -0,0 +1,17 @@
+package com.fdkankan.contro.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fdkankan.contro.entity.SceneProEdit;
+
+/**
+ * <p>
+ * pro场景编辑数据表 服务类
+ * </p>
+ *
+ * @author 
+ * @since 2022-07-12
+ */
+public interface ISceneProEditService extends IService<SceneProEdit> {
+
+    SceneProEdit getByProId(Long proId);
+}

+ 21 - 0
src/main/java/com/fdkankan/contro/service/IUserIncrementService.java

@@ -0,0 +1,21 @@
+package com.fdkankan.contro.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fdkankan.contro.entity.UserIncrement;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 用户增值权益表 服务类
+ * </p>
+ *
+ * @author 
+ * @since 2021-12-24
+ */
+public interface IUserIncrementService extends IService<UserIncrement> {
+
+    UserIncrement getByCameraId(Long cameraId);
+
+    List<UserIncrement> getByChildName(String childName);
+}

+ 74 - 75
src/main/java/com/fdkankan/contro/service/impl/BuildSceneDTServiceImpl.java

@@ -1,75 +1,74 @@
-package com.fdkankan.contro.service.impl;
-
-import cn.hutool.core.util.StrUtil;
-import com.fdkankan.contro.service.IBuildSceneDTService;
-import com.fdkankan.dingtalk.DingTalkSendUtils;
-import com.fdkankan.fyun.config.FYunFileConfig;
-import com.taobao.api.ApiException;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-
-import java.io.UnsupportedEncodingException;
-import java.security.InvalidKeyException;
-import java.security.NoSuchAlgorithmException;
-import java.util.concurrent.CompletableFuture;
-
-/**
- * <p>
- * TODO
- * </p>
- *
- * @author dengsixing
- * @since 2022/4/20
- **/
-@Slf4j
-@Service
-public class BuildSceneDTServiceImpl implements IBuildSceneDTService {
-
-    public static final String DINGTALK_MSG_PATTERN = "**环境**: %s\n\n" +
-        "**服务器名称**: %s\n\n" +
-        "**失败原因**: %s\n\n" +
-        "**num**: %s\n\n" +
-        "**server-path**: %s\n\n";
-
-    public static final String contentExt = "**algorithm-log**: [%sbuild_log/%s/console.log](%sbuild_log/%s/console.log)";
-
-    @Autowired
-    private DingTalkSendUtils dingTalkSendUtils;
-
-    @Autowired
-    private FYunFileConfig fYunFileConfig;
-
-    @Value("${main.url}")
-    private String mainUrl;
-
-    @Override
-    public void handModelFail(String reason, String serverPath, String num, String hostName) {
-        CompletableFuture.runAsync(() -> {
-            try {
-                log.info("开始发送钉钉消息");
-                String logPath = String.format(contentExt,fYunFileConfig.getHost(),num,fYunFileConfig.getHost(),num);
-                log.info("发送钉钉消息,content:{}", logPath);
-                String content = String.format(this.DINGTALK_MSG_PATTERN, this.mainUrl, hostName, reason, num, serverPath) + logPath;
-                log.info("发送钉钉消息,content:{}", content);
-                dingTalkSendUtils.sendActioncardMsgToDingRobot(content,"场景计算失败");
-            } catch (ApiException | UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException apiException) {
-                log.error("发送钉钉消息失败", apiException);
-            }
-        });
-    }
-
-    @Override
-    public void handBaseFail(String reason, String serverPath, String num, String hostName) {
-        CompletableFuture.runAsync(() -> {
-            try {
-                String content = String.format(this.DINGTALK_MSG_PATTERN, this.mainUrl, hostName, reason, num, serverPath);
-                log.info("发送钉钉消息,content:{}", content);
-                dingTalkSendUtils.sendActioncardMsgToDingRobot(content,"场景计算失败");
-            } catch (ApiException | UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException apiException) {
-                log.error("发送钉钉消息失败", apiException);
-            }
-        });
-    }
-}
+//package com.fdkankan.contro.service.impl;
+//
+//import com.fdkankan.contro.service.IBuildSceneDTService;
+//import com.fdkankan.dingtalk.DingTalkSendUtils;
+//import com.fdkankan.fyun.config.FYunFileConfig;
+//import com.taobao.api.ApiException;
+//import lombok.extern.slf4j.Slf4j;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.beans.factory.annotation.Value;
+//import org.springframework.stereotype.Service;
+//
+//import java.io.UnsupportedEncodingException;
+//import java.security.InvalidKeyException;
+//import java.security.NoSuchAlgorithmException;
+//import java.util.concurrent.CompletableFuture;
+//
+///**
+// * <p>
+// * TODO
+// * </p>
+// *
+// * @author dengsixing
+// * @since 2022/4/20
+// **/
+//@Slf4j
+//@Service
+//public class BuildSceneDTServiceImpl implements IBuildSceneDTService {
+//
+//    public static final String DINGTALK_MSG_PATTERN = "**环境**: %s\n\n" +
+//        "**服务器名称**: %s\n\n" +
+//        "**失败原因**: %s\n\n" +
+//        "**num**: %s\n\n" +
+//        "**server-path**: %s\n\n";
+//
+//    public static final String contentExt = "**algorithm-log**: [%sbuild_log/%s/console.log](%sbuild_log/%s/console.log)";
+//
+//    @Autowired
+//    private DingTalkSendUtils dingTalkSendUtils;
+//
+//    @Autowired
+//    private FYunFileConfig fYunFileConfig;
+//
+//    @Value("${main.url}")
+//    private String mainUrl;
+//
+//    @Override
+//    public void handModelFail(String reason, String serverPath, String num, String hostName) {
+//        CompletableFuture.runAsync(() -> {
+//            try {
+//                log.info("开始发送钉钉消息");
+//                String logPath = String.format(contentExt,fYunFileConfig.getHost(),num,fYunFileConfig.getHost(),num);
+//                log.info("发送钉钉消息,content:{}", logPath);
+//                String content = String.format(this.DINGTALK_MSG_PATTERN, this.mainUrl, hostName, reason, num, serverPath) + logPath;
+//                log.info("发送钉钉消息,content:{}", content);
+//                dingTalkSendUtils.sendActioncardMsgToDingRobot(content,"场景计算失败");
+//            } catch (ApiException | UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException apiException) {
+//                log.error("发送钉钉消息失败", apiException);
+//            }
+//        });
+//    }
+//
+//    @Override
+//    public void handBaseFail(String reason, String serverPath, String num, String hostName) {
+//        CompletableFuture.runAsync(() -> {
+//            try {
+//                String content = String.format(this.DINGTALK_MSG_PATTERN, this.mainUrl, hostName, reason, num, serverPath);
+//                log.info("发送钉钉消息,content:{}", content);
+//                dingTalkSendUtils.sendActioncardMsgToDingRobot(content,"场景计算失败");
+//            } catch (ApiException | UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException apiException) {
+//                log.error("发送钉钉消息失败", apiException);
+//            }
+//        });
+//    }
+//}

+ 36 - 38
src/main/java/com/fdkankan/contro/service/impl/CommonServiceImpl.java

@@ -50,8 +50,6 @@ public class CommonServiceImpl implements ICommonService {
 
 
     @Autowired
-    private FYunFileServiceInterface fYunFileServiceInterface;
-    @Autowired
     private IScenePlusService scenePlusService;
     @Autowired
     private IScenePlusExtService scenePlusExtService;
@@ -82,14 +80,14 @@ public class CommonServiceImpl implements ICommonService {
         String ossResultPath = String.format(UploadFilePath.scene_result_data_path, num);
 
         //删除旧的文件目录
-        fYunFileServiceInterface.deleteFolder(ossResultPath);
+        fYunFileService.deleteFolder(ossResultPath);
 
         //上传caches/images
         String localCachesImagePath = dataSource + "/caches/images/";
         String ossCachesImagePath = ossResultPath + "caches/images/";
         //先清除旧的全景图
         if(FileUtil.exist(localCachesImagePath)){
-            fYunFileServiceInterface.uploadFileByCommand(localCachesImagePath, ossCachesImagePath);
+            fYunFileService.uploadFileByCommand(localCachesImagePath, ossCachesImagePath);
         }
 
         //上传project.json
@@ -111,7 +109,7 @@ public class CommonServiceImpl implements ICommonService {
         String cadPicPathFormat = floorplanCadPath + "/floor-cad-%s.%s";
         String floorCadPath = dataSource + "/results/floorplan_cad";
         //清除原有旧的cad图
-        fYunFileServiceInterface.deleteFolder(floorplanCadPath);
+        fYunFileService.deleteFolder(floorplanCadPath);
         List<String> floorCadList = FileUtils.getFileList(floorCadPath);
         if(CollUtil.isNotEmpty(floorCadList)){
             floorCadList.stream().forEach(str->{
@@ -127,22 +125,22 @@ public class CommonServiceImpl implements ICommonService {
         String localReconstruction = dataSource + "/caches/reconstruction/";
         String ossReconstruction = ossResultPath + "caches/reconstruction/";
         if(FileUtil.exist(localReconstruction)){
-            fYunFileServiceInterface.uploadFileByCommand(localReconstruction, ossReconstruction);
+            fYunFileService.uploadFileByCommand(localReconstruction, ossReconstruction);
         }
         String localDepthmap = dataSource + "/caches/depthmap/";
         String ossDepthmap = ossResultPath + "caches/depthmap/";
         if(FileUtil.exist(localDepthmap)){
-            fYunFileServiceInterface.uploadFileByCommand(localDepthmap, ossDepthmap);
+            fYunFileService.uploadFileByCommand(localDepthmap, ossDepthmap);
         }
         String localDepthmapAsc = dataSource + "/caches/depthmap_csc/";
         String ossDepthmapAsc = ossResultPath + "caches/depthmap_csc/";
         if(FileUtil.exist(localDepthmapAsc)){
-            fYunFileServiceInterface.uploadFileByCommand(localDepthmapAsc, ossDepthmapAsc);
+            fYunFileService.uploadFileByCommand(localDepthmapAsc, ossDepthmapAsc);
         }
         String localPanoramaJson =  dataSource + "/caches/panorama.json";
         String ossPanoramaJson =  ossResultPath + "caches/panorama.json";
         if(FileUtil.exist(localPanoramaJson)){
-            fYunFileServiceInterface.uploadFile(localPanoramaJson, ossPanoramaJson);
+            fYunFileService.uploadFile(localPanoramaJson, ossPanoramaJson);
         }
 //        String localLaserPly = dataSource + "/results/laserData/laser.ply";
 //        String ossLaserPly =  ossResultPath + "results/laserData/laser.ply";
@@ -152,30 +150,30 @@ public class CommonServiceImpl implements ICommonService {
         String localFloorGroupFixJson = dataSource + "/caches/floor_group_fix.json";
         String ossFloorGroupFixJson = ossResultPath + "caches/floor_group_fix.json";
         if(FileUtil.exist(localFloorGroupFixJson)){
-            fYunFileServiceInterface.uploadFile(localFloorGroupFixJson, ossFloorGroupFixJson);
+            fYunFileService.uploadFile(localFloorGroupFixJson, ossFloorGroupFixJson);
         }
 
         String localDepthmapVis = dataSource + "/caches/depthmap_vis";
         String ossDepthmapVis = ossResultPath + "caches/depthmap_vis";
         if(FileUtil.exist(localDepthmapVis)){
-            fYunFileServiceInterface.uploadFileByCommand(localDepthmapVis, ossDepthmapVis);
+            fYunFileService.uploadFileByCommand(localDepthmapVis, ossDepthmapVis);
         }
 
         String localIntensity = dataSource + "/caches/intensity";
         String ossIntensity = ossResultPath + "caches/intensity";
         if(FileUtil.exist(localIntensity)){
-            fYunFileServiceInterface.uploadFileByCommand(localIntensity, ossIntensity);
+            fYunFileService.uploadFileByCommand(localIntensity, ossIntensity);
         }
 
         //上传点位校准相关文件
         String localExtras = dataSource + "/extras";
         String ossExtras = ossResultPath + "extras";
         if(FileUtil.exist(localExtras)){
-            fYunFileServiceInterface.uploadFileByCommand(localExtras, ossExtras);
+            fYunFileService.uploadFileByCommand(localExtras, ossExtras);
         }
 
         //开始上传
-        fYunFileServiceInterface.uploadMulFiles(uploadMap);
+        fYunFileService.uploadMulFiles(uploadMap);
     }
 
     @Override
@@ -202,7 +200,7 @@ public class CommonServiceImpl implements ICommonService {
             throw new Exception("生成floorplan.json失败,cadPath:" + floorPlanCardFilePath);
         }
         String hourseTypeJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "floorplan.json";
-        fYunFileServiceInterface.uploadFile(json.toJSONString().getBytes(), hourseTypeJsonPath);
+        fYunFileService.uploadFile(json.toJSONString().getBytes(), hourseTypeJsonPath);
     }
 
     @Override
@@ -264,28 +262,28 @@ public class CommonServiceImpl implements ICommonService {
     @Override
     public int getPayStatus(Long cameraId, Long space){
         //查询权益统计容量的方式
-        String unit = SpaceType.GB.code();
-        CameraDetail cameraDetail = cameraDetailService.getByCameraId(cameraId);
-        if(StrUtil.isNotEmpty(cameraDetail.getUnit())){
-            unit = cameraDetail.getUnit();
-        }
-        Long limit = this.getSpaceLimit(cameraDetail);
-
-        if(SpaceType.SP.code().equals(unit)){//如果按空间方式统计,则space置为1
-            space = 1L;
-        }
-
-        //更新相机使用用量
-        cameraDetailService.updateCameraDetailByCameraIdAndSpace(cameraId, space);
-
-        if(limit == -1){
-            return PayStatus.PAY.code();
-        }
-
-        Long usedSpace = cameraService.getUsedSpace(cameraId, unit);
-        if(usedSpace + space > limit){
-            return PayStatus.NO_CAPACITY.code();
-        }
+//        String unit = SpaceType.GB.code();
+//        CameraDetail cameraDetail = cameraDetailService.getByCameraId(cameraId);
+//        if(StrUtil.isNotEmpty(cameraDetail.getUnit())){
+//            unit = cameraDetail.getUnit();
+//        }
+//        Long limit = this.getSpaceLimit(cameraDetail);
+//
+//        if(SpaceType.SP.code().equals(unit)){//如果按空间方式统计,则space置为1
+//            space = 1L;
+//        }
+//
+//        //更新相机使用用量
+//        cameraDetailService.updateCameraDetailByCameraIdAndSpace(cameraId, space);
+//
+//        if(limit == -1){
+//            return PayStatus.PAY.code();
+//        }
+//
+//        Long usedSpace = cameraService.getUsedSpace(cameraId, unit);
+//        if(usedSpace + space > limit){
+//            return PayStatus.NO_CAPACITY.code();
+//        }
 
         return PayStatus.PAY.code();
     }
@@ -301,7 +299,7 @@ public class CommonServiceImpl implements ICommonService {
         statusJson.put("payStatus", PayStatus.NOT_PAY.code());
         statusJson.put("recStatus", 'A');
         FileUtils.writeFile(localDataPath + "status.json", statusJson.toString());
-        fYunFileServiceInterface.uploadFile(localDataPath + "status.json", uploadPath + "status.json");
+        fYunFileService.uploadFile(localDataPath + "status.json", uploadPath + "status.json");
     }
 
     @Override

+ 20 - 0
src/main/java/com/fdkankan/contro/service/impl/IncrementTypeServiceImpl.java

@@ -0,0 +1,20 @@
+package com.fdkankan.contro.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fdkankan.contro.entity.IncrementType;
+import com.fdkankan.contro.mapper.IIncrementTypeMapper;
+import com.fdkankan.contro.service.IIncrementTypeService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 会员权益类型 服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2022-08-01
+ */
+@Service
+public class IncrementTypeServiceImpl extends ServiceImpl<IIncrementTypeMapper, IncrementType> implements IIncrementTypeService {
+
+}

+ 4 - 10
src/main/java/com/fdkankan/contro/service/impl/Scene3dNumServiceImpl.java

@@ -1,18 +1,14 @@
 package com.fdkankan.contro.service.impl;
 
 import cn.hutool.core.collection.CollUtil;
-import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fdkankan.common.constant.CommonStatus;
-import com.fdkankan.common.constant.ErrorCode;
-import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.util.RandomUtil;
 import com.fdkankan.contro.entity.Scene3dNum;
 import com.fdkankan.contro.enums.CameraTypeEnum;
 import com.fdkankan.contro.mapper.IScene3dNumMapper;
 import com.fdkankan.contro.service.IScene3dNumService;
-import com.fdkankan.dingtalk.DingTalkSendUtils;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.constant.RedisLockKey;
 import com.fdkankan.redis.util.RedisLockUtil;
@@ -22,13 +18,11 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.stereotype.Service;
-import org.springframework.util.CollectionUtils;
 
 import java.util.HashSet;
 import java.util.List;
 import java.util.Objects;
 import java.util.Set;
-import java.util.concurrent.CompletableFuture;
 import java.util.stream.Collectors;
 
 /**
@@ -65,8 +59,8 @@ public class Scene3dNumServiceImpl extends ServiceImpl<IScene3dNumMapper, Scene3
     @Value("${main.url}")
     private String mainUrl;
 
-    @Autowired
-    private DingTalkSendUtils dingTalkSendUtils;
+//    @Autowired
+//    private DingTalkSendUtils dingTalkSendUtils;
 
     @Override
     public String generateSceneNum(Integer cameraType) throws Exception {
@@ -83,7 +77,7 @@ public class Scene3dNumServiceImpl extends ServiceImpl<IScene3dNumMapper, Scene3
         sceneNum = redisUtil.lLeftPop(RedisKey.FDKANKAN_SCENE_NUMS);
         if(Objects.isNull(sceneNum)){
             String content = String.format(this.DINGTALK_MSG_PATTERN, mainUrl, "场景码穷尽告警", "场景计算获取场景码失败");
-            dingTalkSendUtils.sendActioncardMsgToDingRobot(content, "场景码穷尽告警");
+//            dingTalkSendUtils.sendActioncardMsgToDingRobot(content, "场景码穷尽告警");
             throw new Exception("场景计算获取场景码失败");
         }
         return addPrefix(sceneNum,cameraType);
@@ -109,7 +103,7 @@ public class Scene3dNumServiceImpl extends ServiceImpl<IScene3dNumMapper, Scene3
             List<String> nums = this.findSceneNum(cachePageSize);
             if(CollUtil.isEmpty(nums) || nums.size() < cachePageSize){
                 String content = String.format(this.DINGTALK_MSG_PATTERN, mainUrl, "场景码穷尽告警", "场景码表中未使用状态少于" + cachePageSize);
-                dingTalkSendUtils.sendActioncardMsgToDingRobot(content, "场景码穷尽告警");
+//                dingTalkSendUtils.sendActioncardMsgToDingRobot(content, "场景码穷尽告警");
             }
             if(CollUtil.isNotEmpty(nums)){
                 redisUtil.lRightPushAll(RedisKey.FDKANKAN_SCENE_NUMS, nums);

+ 292 - 274
src/main/java/com/fdkankan/contro/service/impl/SceneFileBuildServiceImpl.java

@@ -7,6 +7,8 @@ import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.thread.ThreadUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.core.util.ZipUtil;
+import cn.hutool.extra.qrcode.QrCodeUtil;
+import cn.hutool.extra.qrcode.QrConfig;
 import cn.hutool.http.HttpUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
@@ -25,7 +27,6 @@ import com.fdkankan.contro.common.Result;
 import com.fdkankan.contro.constant.RedisConstants;
 import com.fdkankan.contro.entity.*;
 import com.fdkankan.contro.mapper.ISceneFileBuildMapper;
-import com.fdkankan.contro.service.ICommonService;
 import com.fdkankan.contro.service.*;
 import com.fdkankan.contro.vo.ResponseSceneFile;
 import com.fdkankan.contro.vo.ScenePlusVO;
@@ -33,21 +34,21 @@ import com.fdkankan.contro.vo.SendCallAlgorithmParam;
 import com.fdkankan.fyun.config.FYunFileConfig;
 import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.fyun.local.constant.LocalConstants;
+import com.fdkankan.image.MatrixToImageWriterUtil;
 import com.fdkankan.model.constants.ConstantFilePath;
 import com.fdkankan.model.constants.UploadFilePath;
 import com.fdkankan.rabbitmq.bean.BuildSceneCallMessage;
 import com.fdkankan.rabbitmq.util.RabbitMqProducer;
-import com.fdkankan.redis.util.RedisLockUtil;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.util.RedisLockUtil;
 import com.fdkankan.redis.util.RedisUtil;
-import com.fdkankan.web.response.Result;
 import com.fdkankan.web.response.ResultData;
 import com.fdkankan.web.util.RSAEncrypt;
 import lombok.extern.slf4j.Slf4j;
 import net.lingala.zip4j.core.ZipFile;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.lang3.StringUtils;
+import org.joda.time.DateTime;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
@@ -56,8 +57,8 @@ import org.springframework.stereotype.Service;
 import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
 import org.springframework.util.ObjectUtils;
-import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.client.RestTemplate;
+import org.springframework.web.multipart.MultipartFile;
 
 import java.io.File;
 import java.io.IOException;
@@ -65,10 +66,6 @@ import java.nio.charset.StandardCharsets;
 import java.util.*;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ExecutorService;
-import java.util.*;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ExecutorService;
-import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -177,9 +174,6 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
     @Autowired
     private ICompanyService companyService;
 
-    @Autowired
-    private RedisLockUtil redisLockUtil;
-
     private RestTemplate restTemplate = new RestTemplate();
 
     @Autowired
@@ -203,6 +197,15 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
     @Autowired
     private ISceneColdStorageService sceneColdStorageService;
 
+    @Autowired
+    private ISceneProService sceneProService;
+
+    @Autowired
+    private ISceneProEditService sceneProEditService;
+
+    @Autowired
+    private IFdkkLaserService fdkkLaserService;
+
     @Override
     public SceneFileBuild findByFileId(String fileId) {
 
@@ -359,7 +362,6 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         int rebuild = CommonStatus.YES.code();
         if (ObjectUtils.isEmpty(scenePlus)) {
 
-
             //清除超容量场景记录
             exceedSpaceSceneService.repeal(camera.getId(), fileId, unicode);
 
@@ -407,11 +409,11 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
             log.info("上传icon成功....");
         }
 
-        return buildScenePost(dataSource, jsonObject, buildType, cameraType, sceneNum, cameraDetail, rebuild,icon);
+        return buildScenePost(dataSource, jsonObject, buildType, cameraType, sceneNum, camera, cameraDetail, rebuild,icon);
     }
 
     private ScenePlusVO buildScenePost(String dataSource, JSONObject jsonObject, String buildType, long cameraType,
-                                       String sceneNum, CameraDetail cameraDetail, int rebuild,String icon) throws Exception {
+                                       String sceneNum, Camera camera, CameraDetail cameraDetail, int rebuild,String icon) throws Exception {
         String imgViewPath = String.format(UploadFilePath.IMG_VIEW_PATH, sceneNum);
 
         String userName = null;
@@ -442,6 +444,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
             fYunFileService.uploadFile(ConstantFilePath.LOGO_PATH + "logo-main-en.png", imgViewPath + "logo-main-en.png");
         }
         String algorithm = jsonObject.getString("location") != null && "1".equals(jsonObject.getString("location")) ? "sfm" : "slam";
+        String unicode = jsonObject.getString("creator") + "_" + jsonObject.getString("uuidtime");
 
         ScenePlusVO scenePlusVO = this.createScenePlus(sceneNum, camera.getId(), camera.getChildName(), jsonObject.getString("creator"),
                 jsonObject.getString("pwd"), unicode,cameraType, dataSource, icon,  cameraDetail.getUserId(), userName,algorithm,
@@ -1006,6 +1009,150 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         return scenePlusVO;
     }
 
+    public ScenePlusVO createScenePro(String projectNum, Long cameraId, String cameraName, String phoneId, String sceneKey,
+                                      String unicode, Long cameraType, String fileId, String pic, Long userId, String userName,
+                                      String algorithm, Integer sceneShootCount, String sceneName,String sceneDec,
+                                      Integer sceneType, String gps,Integer resolution, String firmwareVersion, String buildType
+    )throws Exception{
+
+
+        ScenePro scene = sceneProService.getByNum(projectNum);
+        SceneProEdit sceneEdit = sceneProEditService.getByProId(scene.getId());
+
+        scene.setCameraId(cameraId);
+        scene.setPhoneId(phoneId);
+        scene.setNum(projectNum);
+        scene.setSpace(0L);
+
+        if (pic != null && pic.length() > 5) {
+            scene.setThumb(pic);
+        } else {
+            scene.setThumb(ConstantUrl.DEFAULT_SCENE_PIC);
+        }
+        scene.setThumb(scene.getThumb().concat("?t=") + System.currentTimeMillis());
+
+        if (!ObjectUtils.isEmpty(userName)) {
+            scene.setUserId(userId);
+        }
+
+        if (sceneShootCount == null) {
+            scene.setShootCount(0);
+        } else {
+            scene.setShootCount(sceneShootCount);
+        }
+        if (sceneName != null) {
+            scene.setSceneName(sceneName);
+        }
+        if (sceneDec != null) {
+            scene.setSceneDec("<p>" + new String(sceneDec.getBytes("UTF-8")) + "</p>");
+        }
+
+        if (sceneType != null) {
+            scene.setSceneType(sceneType);
+        }
+
+        if (gps != null && !gps.trim().equals("")) {
+            scene.setGps(gps);
+        }
+
+        scene.setAlgorithm(algorithm);
+        if(!org.springframework.util.StringUtils.isEmpty(firmwareVersion)){
+            scene.setFirmwareVersion(firmwareVersion);
+        }
+        scene.setBuildType(buildType);
+        log.info("场景记录添加到数据库:"+projectNum);
+
+        scene.setStatus(0);
+        scene.setPayStatus(0);
+        scene.setRecStatus("A");
+        scene.setCreateTime(new Date());
+        if (sceneName != null) {
+            scene.setSceneName(sceneName);
+        }
+        if (sceneType != null) {
+            scene.setSceneType(sceneType);
+        }
+        sceneProService.updateById(scene);
+
+        sceneEdit.setNeedKey(0);
+        if (cameraType.longValue() != 14 && !ObjectUtils.isEmpty(sceneKey)) {
+            sceneEdit.setNeedKey(1);
+            sceneEdit.setSceneKey(sceneKey);
+        }
+        sceneEdit.setProId(scene.getId());
+        sceneEdit.setMapVisi(1);
+        sceneEdit.setTourVisi(1);
+        sceneEdit.setVrVisi(1);
+        sceneEdit.setCadImgVisi(1);
+        sceneEdit.setPanoVisi(1);
+        sceneEdit.setOverlay(null);
+        sceneEdit.setM2dVisi(1);
+        sceneEdit.setPlayData(null);
+        sceneEdit.setFloorLogo("0");
+        sceneEdit.setM3dVisi(1);
+        sceneEdit.setJumpScene(false);
+        sceneEdit.setMeasureVisi(0);
+        sceneEdit.setFloorLogoSize(100);
+        sceneEdit.setUpdateTime(new Date());
+        sceneEdit.setRecStatus("A");
+        sceneEdit.setFloorPublishVer(sceneEdit.getFloorEditVer() + 1);
+        sceneEdit.setFloorEditVer(sceneEdit.getFloorEditVer() + 1);
+        sceneEdit.setVersion(sceneEdit.getVersion() + 1);
+        sceneEdit.setImagesVersion(sceneEdit.getImagesVersion() + 1);
+
+        sceneProEditService.updateById(sceneEdit);
+
+
+        JSONObject scenejson = JSONObject.parseObject(JSONObject.toJSONString(scene));
+        scenejson.put("thumbImg", 0);
+        scenejson.put("version", sceneEdit.getVersion());
+        scenejson.put("floorLogo", 0);
+        if(!ObjectUtils.isEmpty(sceneKey)){
+            scenejson.put("sceneKey", sceneKey);
+            scenejson.put("public", 1);
+        }else{
+            scenejson.put("sceneKey", "");
+            scenejson.put("public", 0);
+        }
+        if(cameraType.longValue() < 4 || cameraType.longValue() == 5 || cameraType.longValue() == 6){
+            scenejson.put("visions", 1);
+        }else {
+            scenejson.put("visions", 2);
+        }
+        scenejson.put("createTime", new DateTime(new Date()).toString("yyyy-MM-dd HH:mm"));
+
+        scenejson.put("floorPublishVer", sceneEdit.getFloorPublishVer());
+        scenejson.put("floorEditVer", sceneEdit.getFloorEditVer());
+        scenejson.put("rulerVisi", sceneEdit.getRulerVisi());
+        scenejson.put("entry", null);
+
+        if(!org.springframework.util.StringUtils.isEmpty(sceneEdit.getHotsIds())){
+            scenejson.put("hots", 1);
+        }
+
+        File file = new File(ConstantFilePath.SCENE_PATH+"data/data"+projectNum);
+        if(!file.exists()||!file.isDirectory())
+        {
+            file.mkdirs();
+        }
+        FileUtils.writeFile(ConstantFilePath.SCENE_PATH+"data/data"+projectNum+File.separator+"scene.json", scenejson.toString());
+
+        //生成二维码
+        MatrixToImageWriterUtil.createQRCode(scene.getWebSite(), ConstantFilePath.BASE_PATH + File.separator + "sceneQRcode/"+projectNum+".png",false, null);
+        MatrixToImageWriterUtil.createQRCode(scene.getWebSite() + "&lang=en", ConstantFilePath.BASE_PATH + File.separator + "sceneQRcode/"+projectNum+"_en.png",false, null);
+        log.info("二维码生成完成");
+
+        ScenePlusVO scenePlusVO = new ScenePlusVO();
+        scenePlusVO.setSceneStatus(scene.getStatus());
+        scenePlusVO.setThumb(scene.getThumb());
+        scenePlusVO.setPayStatus(scene.getPayStatus());
+        scenePlusVO.setId(scene.getId());
+        scenePlusVO.setNum(scene.getNum());
+        scenePlusVO.setWebSite(scene.getWebSite());
+        scenePlusVO.setDataSource(scene.getDataSource());
+        return scenePlusVO;
+    }
+
     public BuildSceneCallMessage getBuildSceneMqMessage(String projectNum,
                                                         Long cameraType, String algorithm, Integer resolution,
                                                         String buildType, String dataSource) {
@@ -1064,7 +1211,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
 
         if(Objects.nonNull(scenePro) && (Objects.isNull(scenePro.getIsUpgrade())
                 || scenePro.getIsUpgrade() != CommonStatus.YES.code().intValue())){
-            return rebuildV3Scene(scenePro,num,force);
+//            return rebuildV3Scene(scenePro,num,force);
         }
 
         if(Objects.isNull(scenePlus)){
@@ -1183,56 +1330,56 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
 
     }
 
-    public ResultData rebuildV3Scene(ScenePro scenePro,String num,Boolean force) throws IOException {
-
-                    JSONObject configJson = JSONObject.parseObject(FileUtils.readFile(configJsonPath));
-                    String folderName = configJson.getString("id");
-                    String customUserId = configJson.getString("customUserId");
-                    if(StrUtil.isBlank(folderName) || StrUtil.isBlank(snCode)){
-                        throw new RuntimeException("config.json 文件有误!");
-                    }
-
-                    // 检测是否有生成
-                    String fileId = getFileIdByFolderName(folderName);
-                    String subFolder = snCode.concat(File.separator).concat(fileId).concat(File.separator).concat(folderName);
-                    // 解压获取dataSource 并上传资源到OSS
-                    String dataSource = ConstantFilePath.BUILD_MODEL_PATH.concat(subFolder);
-                    log.info("dataSource 为:{}", dataSource);
-
-                    scenePre.setFileId(fileId);
-                    scenePre.setStatus(1);
-                    scenePre.setUpdateTime(new Date());
-                    scenePreService.updateById(scenePre);
-                    log.info("异步开始上传文件");
-                    // 上传oaas
-                    fYunFileService.uploadFileByCommand(dataPath, ConstantFilePath.OSS_PREFIX.concat(subFolder));
-
-                    //删除本地压缩包,防止补拍上传文件不一致
-                    FileUtil.del(parentPath);
-
-                    scenePre.setOssPath(ConstantFilePath.OSS_PREFIX.concat(subFolder));
-                    scenePre.setStatus(2);
-                    scenePre.setUpdateTime(new Date());
-                    scenePreService.updateById(scenePre);
-                    log.info("文件上传成功,开始通知计算");
-                    // 通知计算
-                    this.copyDataAndBuild(null, dataSource, "V4", null, customUserId);
-                    log.info("通知计算成功");
-
-                    scenePre.setStatus(3);
-                    scenePre.setUpdateTime(new Date());
-                    scenePreService.updateById(scenePre);
-                } catch (Exception e) {
-                    log.error("上传失败", e);
-                    scenePre.setStatus(CommonSuccessStatus.FAIL.code());
-                    scenePreService.updateById(scenePre);
-                }
-            }, executor);
-        }finally {
-            executor.shutdown();
-        }
-        return ResultData.ok();
-    }
+//    public ResultData rebuildV3Scene(ScenePro scenePro,String num,Boolean force) throws IOException {
+//
+//                    JSONObject configJson = JSONObject.parseObject(FileUtils.readFile(configJsonPath));
+//                    String folderName = configJson.getString("id");
+//                    String customUserId = configJson.getString("customUserId");
+//                    if(StrUtil.isBlank(folderName) || StrUtil.isBlank(snCode)){
+//                        throw new RuntimeException("config.json 文件有误!");
+//                    }
+//
+//                    // 检测是否有生成
+//                    String fileId = getFileIdByFolderName(folderName);
+//                    String subFolder = snCode.concat(File.separator).concat(fileId).concat(File.separator).concat(folderName);
+//                    // 解压获取dataSource 并上传资源到OSS
+//                    String dataSource = ConstantFilePath.BUILD_MODEL_PATH.concat(subFolder);
+//                    log.info("dataSource 为:{}", dataSource);
+//
+//                    scenePre.setFileId(fileId);
+//                    scenePre.setStatus(1);
+//                    scenePre.setUpdateTime(new Date());
+//                    scenePreService.updateById(scenePre);
+//                    log.info("异步开始上传文件");
+//                    // 上传oaas
+//                    fYunFileService.uploadFileByCommand(dataPath, ConstantFilePath.OSS_PREFIX.concat(subFolder));
+//
+//                    //删除本地压缩包,防止补拍上传文件不一致
+//                    FileUtil.del(parentPath);
+//
+//                    scenePre.setOssPath(ConstantFilePath.OSS_PREFIX.concat(subFolder));
+//                    scenePre.setStatus(2);
+//                    scenePre.setUpdateTime(new Date());
+//                    scenePreService.updateById(scenePre);
+//                    log.info("文件上传成功,开始通知计算");
+//                    // 通知计算
+//                    this.copyDataAndBuild(null, dataSource, "V4", null, customUserId);
+//                    log.info("通知计算成功");
+//
+//                    scenePre.setStatus(3);
+//                    scenePre.setUpdateTime(new Date());
+//                    scenePreService.updateById(scenePre);
+//                } catch (Exception e) {
+//                    log.error("上传失败", e);
+//                    scenePre.setStatus(CommonSuccessStatus.FAIL.code());
+//                    scenePreService.updateById(scenePre);
+//                }
+//            }, executor);
+//        }finally {
+//            executor.shutdown();
+//        }
+//        return ResultData.ok();
+//    }
 
     private String getFileIdByFolderName(String folderName) {
         // 检测是否有生成
@@ -1415,135 +1562,6 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         return scenePlusVO;
     }
 
-    @Override
-    public ResultData copyDataAndBuild(String sourceBucet,String dataSource, String sceneVer) throws Exception {
-        if(!SceneVersionType.V3.code().equals(sceneVer)
-                && !SceneVersionType.V4.code().equals(sceneVer)){
-            throw new BusinessException(ErrorCode.PARAM_FORMAT_ERROR.code(),"版本有误,请填写 V3 或者 V4");
-        }
-
-        String fYunPath = ConstantFilePath.OSS_PREFIX + dataSource.replace(ConstantFilePath.BUILD_MODEL_PATH, "")
-                .replace(ConstantFilePath.BUILD_MODEL_LASER_PATH, "");
-//        if(!ObjectUtils.isEmpty(sourceBucet)){
-//            fYunFileService.copyFileBetweenBucket(sourceBucet,fYunPath,fYunFileConfig.getBucket(),fYunPath);
-//        }
-        // 下载data.fdage
-        JSONObject fdageData = JSONObject.parseObject(fYunFileService.getFileContent(fYunPath + "/data.fdage"));
-        if(ObjectUtils.isEmpty(fdageData)){
-            throw new BusinessException(ErrorCode.SYSTEM_ERROR.code(),"4dage 文件不存在");
-        }
-        String cameraName = fdageData.getJSONObject("cam").getString("uuid");
-        Camera cameraEntity = cameraService.getByChildName(cameraName);
-        if(cameraEntity ==  null){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_6003);
-        }
-
-        CameraDetail detailEntity = cameraDetailService.getByCameraId(cameraEntity.getId());
-        if(detailEntity ==  null){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_6003);
-        }
-
-        // 拷贝资源至新的资源路径
-        String[] newDataPath = dataSource.split("/");
-        newDataPath[4] = newDataPath[4] + "_" + System.currentTimeMillis();
-        String time = DateExtUtil.format(Calendar.getInstance().getTime(), DateExtUtil.dateStyle11);
-        newDataPath[5] = newDataPath[5].split("_")[0] + "_" + time;
-        String newDataSource = Arrays.stream(newDataPath).collect(Collectors.joining("/"));
-
-        String newFYunPath = ConstantFilePath.OSS_PREFIX + newDataSource.replace(ConstantFilePath.BUILD_MODEL_PATH, "")
-                .replace(ConstantFilePath.BUILD_MODEL_LASER_PATH, "");
-
-        List<ScenePro> pros = sceneProService.list(new LambdaQueryWrapper<ScenePro>().eq(ScenePro::getDataSource, newDataSource));
-        if (CollUtil.isNotEmpty(pros)) {
-            return ResultData.error(ErrorCode.PARAM_ERROR.code(),newDataSource + "已存在,请勿重复添加!");
-        }
-        List<ScenePlusExt> plusExts = scenePlusExtService.list(new LambdaQueryWrapper<ScenePlusExt>().eq(ScenePlusExt::getDataSource, newDataSource));
-        if (CollUtil.isNotEmpty(plusExts)) {
-            return ResultData.error(ErrorCode.PARAM_ERROR.code(),newDataSource + "已存在,请勿重复添加!");
-        }
-        List<String> newFyunFileList = fYunFileService.listRemoteFiles(newFYunPath);
-        if(CollUtil.isNotEmpty(newFyunFileList)){
-            return ResultData.error(ErrorCode.PARAM_ERROR.code(),newFYunPath + "已存在,请勿重复添加!");
-        }
-
-        String sceneNum = scene3dNumService.generateSceneNum(detailEntity.getType());
-
-        //写入日志表
-        SceneCopyDistinctEnv sceneCopyDistinctEnv = new SceneCopyDistinctEnv();
-        sceneCopyDistinctEnv.setNum(sceneNum);
-        sceneCopyDistinctEnv.setSrcDataSource(dataSource);
-        sceneCopyDistinctEnv.setTargetDataSource(newDataSource);
-        sceneCopyDistinctEnvService.save(sceneCopyDistinctEnv);
-
-        ExecutorService executor = ThreadUtil.newSingleExecutor();
-        try {
-            CompletableFuture.runAsync(() -> {
-                try {
-                    fYunFileService.copyFileBetweenBucket(sourceBucet, fYunPath, fYunFileConfig.getBucket(), newFYunPath);
-
-                    fdageData.put("uuidtime",time);
-                    fYunFileService.uploadFile(fdageData.toJSONString().getBytes(),newFYunPath+"/data.fdage");
-
-                    Long cameraType = 11L;
-                    //判断是否转台相机
-                    if (detailEntity.getType() == 9) {
-                        cameraType = 13L;
-                    }
-
-                    if (detailEntity.getType() == 10) {
-                        cameraType = 14L;
-                    }
-
-                    String icon = null;
-                    String imgViewPath = null;
-                    switch (sceneVer) {
-                        case "V3":
-                            imgViewPath = String.format(ConstantFilePath.IMAGE_PATH_FORMAT, sceneNum);
-                            if(fdageData.containsKey("icon") && StringUtils.isNotEmpty(fdageData.getString("icon"))){
-                                String ossPath = ConstantFilePath.OSS_PREFIX + newDataSource.replace(ConstantFilePath.BUILD_MODEL_PATH, "")
-                                        .replace(ConstantFilePath.BUILD_MODEL_LASER_PATH, "");
-                                fYunFileService.copyFileInBucket(ossPath + File.separator + fdageData.getString("icon"),imgViewPath + fdageData.getString("icon"));
-                                icon = fYunFileConfig.getHost() + imgViewPath + fdageData.getString("icon");
-                            }
-                            buildV3Scene2(newDataSource,fdageData,cameraType,sceneNum,cameraEntity,detailEntity,icon);
-                            break;
-                        case "V4":
-                            imgViewPath = String.format(UploadFilePath.IMG_VIEW_PATH, sceneNum);
-                            if(fdageData.containsKey("icon") && StringUtils.isNotEmpty(fdageData.getString("icon"))){
-                                String ossPath = ConstantFilePath.OSS_PREFIX + newDataSource.replace(ConstantFilePath.BUILD_MODEL_PATH, "")
-                                        .replace(ConstantFilePath.BUILD_MODEL_LASER_PATH, "");
-                                fYunFileService.copyFileInBucket(ossPath + File.separator + fdageData.getString("icon"),imgViewPath + fdageData.getString("icon"));
-                                icon = fYunFileConfig.getHost() + imgViewPath + fdageData.getString("icon");
-                            }
-                            buildScenePost(newDataSource, fdageData, "V3", cameraType, sceneNum, detailEntity, 0, icon);
-                            if (cameraType == 14) {
-                                // 通知激光系统
-                                ScenePlus scenePlus = scenePlusService.getScenePlusByNum(sceneNum);
-                                String userName = null;
-                                if (!ObjectUtils.isEmpty(detailEntity.getUserId())) {
-                                    userName = userService.getSSOUserByUserId(detailEntity.getUserId()).getUserName();
-                                }
-                                fdkkLaserService.saveScene(scenePlus, fdageData.getString("pwd"), cameraEntity, userName, false);
-                            }
-                            break;
-                    }
-
-                }catch (Exception e){
-                    log.error("复制场景异常", e);
-                }
-            }, executor).whenComplete((reslut, e) -> {
-                log.info("复制场景souceDataSource:{},newDataSource:{}结束-{}",dataSource,newDataSource, new Date());
-            });
-        }catch (Exception e){
-            log.error("线程错误:{}",e);
-        }finally {
-            executor.shutdown();
-        }
-        Map<String,Object> result = new HashMap<>();
-        result.put("code",sceneNum);
-        result.put("newDataSource",newDataSource);
-        return ResultData.ok(result);
-    }
 
     private void buildV3Scene2(String dataSource,JSONObject jsonObject,long cameraType,String sceneNum,Camera cameraEntity,CameraDetail detailEntity,String icon) throws Exception {
 
@@ -1826,8 +1844,8 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         return ResultData.ok();
     }
 
-@Override
-public ResultData uploadFile(MultipartFile file, String params) throws Exception {
+    @Override
+    public ResultData uploadFile(MultipartFile file, String params) throws Exception {
 
         log.info("upload-params: "+params);
         if (StringUtils.isEmpty(params)){
@@ -1982,8 +2000,8 @@ public ResultData uploadFile(MultipartFile file, String params) throws Exception
         return result;
         }
 
-@Override
-public ResultData sendCallAlgorithm(SendCallAlgorithmParam param) throws Exception {
+    @Override
+    public ResultData sendCallAlgorithm(SendCallAlgorithmParam param) throws Exception {
         log.info("sendCallAlgorithm 参数为:{}", JSONObject.toJSONString(param));
 
         String filePath = param.getFilepath();
@@ -2002,12 +2020,12 @@ public ResultData sendCallAlgorithm(SendCallAlgorithmParam param) throws Excepti
         SendCallAlgorithmDetail detail = param.getDetails();
         String uploadType = detail.getUploadType();
         if(StrUtil.isNotEmpty(uploadType) && "log".equals(uploadType)){
-        return ResultData.ok();
+            return ResultData.ok();
         }
         Integer fileChunkSum = detail.getFileChunkSum();
         String uuid = detail.getUuid();
         if(Objects.isNull(fileChunkSum) || StrUtil.isBlank(uuid)){
-        throw new BusinessException(ErrorCode.PARAM_REQUIRED.code(), "details参数中fileChunkSum和uuid不能为空");
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED.code(), "details参数中fileChunkSum和uuid不能为空");
         }
 
         String snCode = uuid.split("_")[0];
@@ -2017,27 +2035,27 @@ public ResultData sendCallAlgorithm(SendCallAlgorithmParam param) throws Excepti
 //        }
         Camera camera = cameraService.getByChildName(snCode);
         if(Objects.isNull(camera)){
-        throw new BusinessException(ErrorCode.CAMERA_BIND_NO_EXIST.code(), "相机未入库");
+            throw new BusinessException(ErrorCode.CAMERA_BIND_NO_EXIST.code(), "相机未入库");
         }
 
         String localFilePath = parentPath.concat(File.separator).concat(uuid).concat(".zip");
         try {
-        String extName = FileUtil.extName(filePath);
-        String subFilePath = parentPath.concat(File.separator).concat(uuid).concat(".").concat(extName);
-        FileUtil.mkParentDirs(localFilePath);
-        HttpUtil.downloadFile(filePath, subFilePath);
+            String extName = FileUtil.extName(filePath);
+            String subFilePath = parentPath.concat(File.separator).concat(uuid).concat(".").concat(extName);
+            FileUtil.mkParentDirs(localFilePath);
+            HttpUtil.downloadFile(filePath, subFilePath);
         }catch (Exception e){
-        throw new BusinessException(ErrorCode.FAILURE_CODE_5063.code(), "原始资源压缩包下载失败");
+            throw new BusinessException(ErrorCode.FAILURE_CODE_5063.code(), "原始资源压缩包下载失败");
         }
 
         //检测压缩包分卷是否与detail中的总数一样
         List<String> fileNames = FileUtil.listFileNames(parentPath);
         if(fileNames.size() != fileChunkSum){
-        return ResultData.ok("压缩包分卷不完整,请继续上传剩余的分卷");
+            return ResultData.ok("压缩包分卷不完整,请继续上传剩余的分卷");
         }
 
         if(!FileUtil.exist(localFilePath)){
-        throw new BusinessException(ErrorCode.FAILURE_CODE_5063.code(), "zip压缩包不存在");
+            throw new BusinessException(ErrorCode.FAILURE_CODE_5063.code(), "zip压缩包不存在");
         }
 
         ScenePre scenePre = new ScenePre();
@@ -2050,81 +2068,81 @@ public ResultData sendCallAlgorithm(SendCallAlgorithmParam param) throws Excepti
         // 异步解压资源文件上传
         ExecutorService executor = ThreadUtil.newSingleExecutor();
         try {
-        CompletableFuture.runAsync(() -> {
-        try {
-        log.info("开始异步解压文件");
-        ZipFile zipFile = new ZipFile(new File(localFilePath));
-        if (zipFile.isEncrypted()) {
-        zipFile.setPassword(zipPassword);
-        zipFile.extractAll(parentPath);
-        } else {
-        ZipUtil.unzip(localFilePath, parentPath);
-        }
+            CompletableFuture.runAsync(() -> {
+                try {
+                    log.info("开始异步解压文件");
+                    ZipFile zipFile = new ZipFile(new File(localFilePath));
+                    if (zipFile.isEncrypted()) {
+                        zipFile.setPassword(zipPassword);
+                        zipFile.extractAll(parentPath);
+                    } else {
+                        ZipUtil.unzip(localFilePath, parentPath);
+                    }
 
-        List<String> filePathList = FileUtils.list(new File(parentPath));
-        String configJsonPath = null;
-        for (String item : filePathList) {
-        if(!item.contains("config.json")){
-        continue;
-        }
-        configJsonPath = item;
-        }
-        String dataPath = FileUtil.getParent(configJsonPath, 1);
+                    List<String> filePathList = FileUtils.list(new File(parentPath));
+                    String configJsonPath = null;
+                    for (String item : filePathList) {
+                        if(!item.contains("config.json")){
+                            continue;
+                        }
+                        configJsonPath = item;
+                    }
+                    String dataPath = FileUtil.getParent(configJsonPath, 1);
 
-        // 读取本地文件并校验文件
-        // 读取config.json
-        log.info("config.json路径:{}", configJsonPath);
-        if(!FileUtil.exist(configJsonPath)){
-        throw new RuntimeException("config.json 文件有误!");
-        }
+                    // 读取本地文件并校验文件
+                    // 读取config.json
+                    log.info("config.json路径:{}", configJsonPath);
+                    if(!FileUtil.exist(configJsonPath)){
+                        throw new RuntimeException("config.json 文件有误!");
+                    }
 
-        JSONObject configJson = JSONObject.parseObject(FileUtils.readFile(configJsonPath));
-        String folderName = configJson.getString("id");
-        String customUserId = configJson.getString("customUserId");
-        if(StrUtil.isBlank(folderName) || StrUtil.isBlank(snCode)){
-        throw new RuntimeException("config.json 文件有误!");
-        }
+                    JSONObject configJson = JSONObject.parseObject(FileUtils.readFile(configJsonPath));
+                    String folderName = configJson.getString("id");
+                    String customUserId = configJson.getString("customUserId");
+                    if(StrUtil.isBlank(folderName) || StrUtil.isBlank(snCode)){
+                        throw new RuntimeException("config.json 文件有误!");
+                    }
 
-        // 检测是否有生成
-        String fileId = getFileIdByFolderName(folderName);
-        String subFolder = snCode.concat(File.separator).concat(fileId).concat(File.separator).concat(folderName);
-        // 解压获取dataSource 并上传资源到OSS
-        String dataSource = ConstantFilePath.BUILD_MODEL_PATH.concat(subFolder);
-        log.info("dataSource 为:{}", dataSource);
-
-        scenePre.setFileId(fileId);
-        scenePre.setStatus(1);
-        scenePre.setUpdateTime(new Date());
-        scenePreService.updateById(scenePre);
-        log.info("异步开始上传文件");
-        // 上传oaas
-        fYunFileService.uploadFileByCommand(dataPath, ConstantFilePath.OSS_PREFIX.concat(subFolder));
+                    // 检测是否有生成
+                    String fileId = getFileIdByFolderName(folderName);
+                    String subFolder = snCode.concat(File.separator).concat(fileId).concat(File.separator).concat(folderName);
+                    // 解压获取dataSource 并上传资源到OSS
+                    String dataSource = ConstantFilePath.BUILD_MODEL_PATH.concat(subFolder);
+                    log.info("dataSource 为:{}", dataSource);
 
-        //删除本地压缩包,防止补拍上传文件不一致
-        FileUtil.del(parentPath);
+                    scenePre.setFileId(fileId);
+                    scenePre.setStatus(1);
+                    scenePre.setUpdateTime(new Date());
+                    scenePreService.updateById(scenePre);
+                    log.info("异步开始上传文件");
+                    // 上传oaas
+                    fYunFileService.uploadFileByCommand(dataPath, ConstantFilePath.OSS_PREFIX.concat(subFolder));
 
-        scenePre.setOssPath(ConstantFilePath.OSS_PREFIX.concat(subFolder));
-        scenePre.setStatus(2);
-        scenePre.setUpdateTime(new Date());
-        scenePreService.updateById(scenePre);
-        log.info("文件上传成功,开始通知计算");
-        // 通知计算
-        this.copyDataAndBuild(null, dataSource, "V4", null, customUserId);
-        log.info("通知计算成功");
+                    //删除本地压缩包,防止补拍上传文件不一致
+                    FileUtil.del(parentPath);
 
-        scenePre.setStatus(3);
-        scenePre.setUpdateTime(new Date());
-        scenePreService.updateById(scenePre);
-        } catch (Exception e) {
-        log.error("上传失败", e);
-        scenePre.setStatus(CommonSuccessStatus.FAIL.code());
-        scenePreService.updateById(scenePre);
-        }
-        }, executor);
+                    scenePre.setOssPath(ConstantFilePath.OSS_PREFIX.concat(subFolder));
+                    scenePre.setStatus(2);
+                    scenePre.setUpdateTime(new Date());
+                    scenePreService.updateById(scenePre);
+                    log.info("文件上传成功,开始通知计算");
+                    // 通知计算
+                    this.copyDataAndBuild(null, dataSource, "V4", null, customUserId);
+                    log.info("通知计算成功");
+
+                    scenePre.setStatus(3);
+                    scenePre.setUpdateTime(new Date());
+                    scenePreService.updateById(scenePre);
+                } catch (Exception e) {
+                    log.error("上传失败", e);
+                    scenePre.setStatus(CommonSuccessStatus.FAIL.code());
+                    scenePreService.updateById(scenePre);
+                }
+            }, executor);
         }finally {
-        executor.shutdown();
+            executor.shutdown();
         }
         return ResultData.ok();
-        }
+    }
 
 }

+ 33 - 0
src/main/java/com/fdkankan/contro/service/impl/SceneProEditServiceImpl.java

@@ -0,0 +1,33 @@
+package com.fdkankan.contro.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fdkankan.contro.entity.SceneProEdit;
+import com.fdkankan.contro.mapper.ISceneProEditMapper;
+import com.fdkankan.contro.service.ISceneProEditService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * pro场景编辑数据表 服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2022-07-12
+ */
+@Service
+public class SceneProEditServiceImpl extends ServiceImpl<ISceneProEditMapper, SceneProEdit> implements ISceneProEditService {
+
+    @Override
+    public SceneProEdit getByProId(Long proId) {
+        LambdaQueryWrapper<SceneProEdit> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(SceneProEdit::getProId,proId);
+        List<SceneProEdit> list = this.list(wrapper);
+        if(list != null && list.size() >0){
+            return list.get(0);
+        }
+        return null;
+    }
+}