Jelajahi Sumber

Merge branch 'release' into project-jp

# Conflicts:
#	src/main/java/com/fdkankan/contro/mq/service/impl/BuildSceneServiceImpl.java
#	src/main/java/com/fdkankan/contro/service/impl/SceneFileBuildServiceImpl.java
dsx 1 tahun lalu
induk
melakukan
581b445993

+ 66 - 0
src/main/java/com/fdkankan/contro/entity/CameraType.java

@@ -0,0 +1,66 @@
+package com.fdkankan.contro.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-11
+ */
+@Getter
+@Setter
+@TableName("t_camera_type")
+public class CameraType implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 相机类型表
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 0 旧双目相机,1思维看看pro八目相机(看看),2看看lite,5指房宝,9双目转台(看见),10激光转台(深时),11激光转台(深光)
+     */
+    @TableField("camera_type")
+    private Integer cameraType;
+
+    /**
+     * 场景码前缀
+     */
+    @TableField("scene_prefix")
+    private String scenePrefix;
+
+    /**
+     * 相机WiFiname前缀
+     */
+    @TableField("wifi_name_prefix")
+    private String wifiNamePrefix;
+
+    @TableField("rec_status")
+    @TableLogic(value = "A", delval = "I")
+    private String recStatus;
+
+    @TableField("remark")
+    private String remark;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+
+}

+ 9 - 0
src/main/java/com/fdkankan/contro/entity/ScenePlusExt.java

@@ -65,6 +65,12 @@ public class ScenePlusExt implements Serializable {
     private Long space;
 
     /**
+     * 原始文件容量
+     */
+    @TableField("orig_space")
+    private Long origSpace;
+
+    /**
      * 云服务器类型
      */
     @TableField("ecs")
@@ -145,6 +151,9 @@ public class ScenePlusExt implements Serializable {
     @TableField("yun_file_bucket")
     private String yunFileBucket;
 
+    @TableField("location")
+    private Integer location;
+
     /**
      * 创建时间
      */

+ 2 - 1
src/main/java/com/fdkankan/contro/enums/CameraTypeEnum.java

@@ -9,7 +9,8 @@ public enum CameraTypeEnum {
     FDKK_LITE(2,"KK-","4DKKLITE_","四维看看lite"),
     ZHIHOUSE_REDHOUSE(5,"KK-","4DKKLITE_","指房宝小红屋相机"),
     DOUBLE_EYE_TURN(9,"KJ-","4DKKLITE_","双目转台"),
-    LASER_TURN(10,"SS-","4DKKLA_","激光转台");
+    LASER_TURN(10,"SS-","4DKKLA_","激光转台"),
+    LASER_SG(11,"SG-","4DSG_","深光");
 
 
     private int type;

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

@@ -0,0 +1,18 @@
+package com.fdkankan.contro.mapper;
+
+import com.fdkankan.contro.entity.CameraType;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-11
+ */
+@Mapper
+public interface ICameraTypeMapper extends BaseMapper<CameraType> {
+
+}

+ 60 - 0
src/main/java/com/fdkankan/contro/mq/listener/UpdateSceneStatusListener.java

@@ -0,0 +1,60 @@
+package com.fdkankan.contro.mq.listener;
+
+import cn.hutool.core.io.FileUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.fdkankan.common.util.FileUtils;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
+import com.fdkankan.model.constants.ConstantFilePath;
+import com.fdkankan.model.constants.UploadFilePath;
+import com.rabbitmq.client.Channel;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.amqp.core.Message;
+import org.springframework.amqp.rabbit.annotation.Queue;
+import org.springframework.amqp.rabbit.annotation.RabbitListener;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.io.File;
+import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
+
+@Slf4j
+@Component
+public class UpdateSceneStatusListener {
+
+    @Autowired
+    private FYunFileServiceInterface fYunFileService;
+
+    /**
+     * 更新场景status.json状态
+     * @param channel
+     * @param message
+     * @throws Exception
+     */
+    @RabbitListener(
+            queuesToDeclare = @Queue("${queue.scene.update-scene-status}")
+    )
+    public void buildScenePreHandler(Channel channel, Message message) throws Exception {
+        String msg = new String(message.getBody(), StandardCharsets.UTF_8);
+        log.info("开始更新场景的的status.json状态,content:{}", msg);
+        HashMap<String, Object> map = JSON.parseObject(msg, HashMap.class);
+        String num = (String) map.get("num");
+        Integer status = (Integer)map.get("status");
+        String statusJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH, num).concat("status.json");
+        try {
+
+            String fileContent = fYunFileService.getFileContent(statusJsonPath);
+            JSONObject jsonObject = JSON.parseObject(fileContent);
+            jsonObject.put("status", status);
+            FileUtil.writeUtf8String(jsonObject.toJSONString(),ConstantFilePath.SCENE_PATH + "data/data" + num + File.separator + "status.json");
+            fYunFileService.uploadFile(ConstantFilePath.SCENE_PATH + "data/data" + num + File.separator + "status.json", statusJsonPath);
+        }catch (Exception e){
+            log.error("更新场景的的status.json状态, content:{}", msg, e);
+        }finally {
+            channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
+        }
+        log.info("结束更新场景的的status.json状态,content:{}", msg);
+    }
+
+}

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

@@ -29,6 +29,7 @@ import com.fdkankan.redis.util.RedisUtil;
 import lombok.extern.slf4j.Slf4j;
 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.ObjectUtils;
 
@@ -47,6 +48,7 @@ import java.util.Objects;
  **/
 @Slf4j
 @Service
+@RefreshScope
 public class BuildObjServiceImpl implements IBuildSceneService {
 
     @Value("${queue.modeling.modeling-call}")
@@ -277,7 +279,7 @@ public class BuildObjServiceImpl implements IBuildSceneService {
 
                 if(this.modelKind.equals(ModelKind.THREE_D_TILE.code())
                         && CollUtil.isNotEmpty(sdTilesSceneSourceList)
-                        && sdTilesSceneSourceList.contains(SceneSource.JG.code())){
+                        && sdTilesSceneSourceList.contains(scenePlus.getSceneSource())){
                     scenePlusExt.setModelKind(ModelKind.THREE_D_TILE.code());
                     scenePlusExtService.updateById(scenePlusExt);
 

+ 71 - 13
src/main/java/com/fdkankan/contro/mq/service/impl/BuildSceneServiceImpl.java

@@ -31,6 +31,7 @@ import com.fdkankan.model.constants.UploadFilePath;
 import com.fdkankan.model.enums.ModelTypeEnums;
 import com.fdkankan.model.utils.CreateHouseJsonUtil;
 import com.fdkankan.model.utils.CreateObjUtil;
+import com.fdkankan.model.utils.SceneUtil;
 import com.fdkankan.push.config.PushMessageConfig;
 import com.fdkankan.push.utils.PushMsgUtil;
 import com.fdkankan.rabbitmq.bean.BuildSceneCallMessage;
@@ -43,6 +44,7 @@ import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 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 java.io.File;
@@ -62,6 +64,7 @@ import java.util.stream.Collectors;
  **/
 @Slf4j
 @Service
+@RefreshScope
 public class BuildSceneServiceImpl implements IBuildSceneService {
 
     @Value("${queue.modeling.modeling-call}")
@@ -85,6 +88,12 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
     @Value("#{'${build.scene.post.not-delete-nas-nums:}'.split(',')}")
     private List<String> notDeleteNasNumList;
 
+    @Value("4dkk.laserService.bucket")
+    private String laserBucket;
+
+    @Value("${4dkk.laserService.dir}")
+    private String laserDir;
+
     @Autowired
     private RabbitMqProducer mqProducer;
 
@@ -319,7 +328,7 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
 
             if (cameraType == 14) {
                 //计算成功  激光转台相机 同步 请求
-                fdkkLaserService.syncBuildResult(scenePlus.getNum(), path, scenePlus.getCreateTime(), Calendar.getInstance().getTime());
+                fdkkLaserService.syncBuildResult(scenePlus.getNum(), path, scenePlus.getCreateTime(), Calendar.getInstance().getTime(), scenePlusExt.getShootCount());
                 sceneEditControlsService.update(new LambdaUpdateWrapper<SceneEditControls>().set(SceneEditControls::getShowMap,0)
                         .eq(SceneEditControls::getEditInfoId,sceneEditInfo.getId()));
                 sceneEditControls.setShowMap(0);
@@ -327,6 +336,10 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
                 fdkkLaserService.cloudPointBuild(sceneCode,path);
             }
 
+            //统计原始资源大小
+            scenePlusExt.setOrigSpace(FileUtil.size(new File(path.concat(File.separator).concat("capture"))));
+
+
             log.info("生成scene.json上传oss并设置缓存,num:{}", sceneCode);
             CameraDetail cameraDetail = cameraDetailService.getByCameraId(scenePlus.getCameraId());
             Company company = !ObjectUtils.isEmpty(cameraDetail.getCompanyId()) ? companyService.getById(cameraDetail.getCompanyId()) : null;
@@ -344,10 +357,22 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
             String pushToken = fdageData.getString("pushToken");
             this.pushMsgToApp(pushChannel,pushToken, cameraType, scenePlus.getTitle(), scenePlusExt.getWebSite());
 
+//            //删除计算目录
+//            if(CollUtil.isEmpty(notDeleteNasNumList) || !notDeleteNasNumList.contains(sceneCode)){
+//                CreateObjUtil.deleteFile(path.replace(ConstantFilePath.BUILD_MODEL_PATH, "/"));
+//            }
+//
+//            //更新场景主表
+//            //如果相机容量不足,需要把场景的paystatus改为容量不足状态
+//            if (cameraType != 14) {
+//                scenePlus.setPayStatus(commonService.getPayStatus(scenePlus.getCameraId(), space));
+//            }
+
             this.uploadStatusJson(scenePlus, scenePlusExt);
 
             //更新场景主表
             scenePlusService.updateById(scenePlus);
+            scenePlusExtService.updateById(scenePlusExt);
 
             //国际环境需要发邮件通知
             if("eur".equals(env)){
@@ -552,6 +577,8 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
                                 SceneEditControls sceneEditControls, ScenePlus scenePlus, ScenePlusExt scenePlusExt,Company company){
         String dataViewPath = String.format(UploadFilePath.DATA_VIEW_PATH, num);
 
+        String oldSceneJson = fYunFileService.getFileContent(dataViewPath + "scene.json");
+
         SceneJsonBean sceneJson = new SceneJsonBean();
         BeanUtil.copyProperties(sceneEditInfoExt, sceneJson);
         BeanUtil.copyProperties(sceneEditInfo, sceneJson);
@@ -567,6 +594,16 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
         sceneJson.setModelKind(scenePlusExt.getModelKind());
         sceneJson.setVideos(JSON.toJSONString(videosJson));
         sceneJson.setPayStatus(scenePlus.getPayStatus());
+        if(StrUtil.isNotEmpty(oldSceneJson)){
+            SceneJsonBean oldSceneJsonBean = JSON.parseObject(oldSceneJson, SceneJsonBean.class);
+            List<JSONObject> mosaicList = JSON.parseObject(oldSceneJson, SceneJsonBean.class).getMosaicList();
+            sceneJson.setMosaicList(mosaicList);
+            sceneJson.setFloorLogo(oldSceneJsonBean.getFloorLogo());
+            sceneJson.setFloorLogoFile(oldSceneJsonBean.getFloorLogoFile());
+            sceneJson.setBoxModels(oldSceneJsonBean.getBoxModels());
+            sceneJson.setBoxVideos(oldSceneJsonBean.getBoxVideos());
+            sceneJson.setBoxPhotos(oldSceneJsonBean.getBoxPhotos());
+        }
 
         if(!ObjectUtils.isEmpty(company)){
             String userViewPath = String.format(UploadFilePath.USER_VIEW_PATH, num);
@@ -608,10 +645,16 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
     private void uploadStatusJson(ScenePlus scenePlus, ScenePlusExt scenePlusExt){
         String num = scenePlus.getNum();
         String dataViewPath = String.format(UploadFilePath.DATA_VIEW_PATH, num);
+
+        Integer status = 1;
+        if(scenePlus.getSceneSource() == 4 || scenePlus.getSceneSource() == 5){//如果是激光场景,需要激光系统那边完全处理好之后再发mq通知更新状态
+            status = 0;
+        }
+
         // 上传status JSON.
         JSONObject statusJson = new JSONObject();
         //临时将-2改成1,app还没完全更新
-        statusJson.put("status", 1);
+        statusJson.put("status", status);
         statusJson.put("webSite", scenePlusExt.getWebSite());
         statusJson.put("sceneNum", num);
         statusJson.put("thumb", scenePlusExt.getThumb());
@@ -640,7 +683,7 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
         QrConfig qrConfig = QrConfig.create();
         qrConfig.setWidth(1024);
         qrConfig.setHeight(1024);
-        if(!ObjectUtils.isEmpty(localLogoPath)){
+        if(StrUtil.isNotEmpty(localLogoPath)){
             qrConfig.setImg(localLogoPath);
         }
         QrCodeUtil.generate(scenePlusExt.getWebSite(), qrConfig, FileUtil.file(outPathZh));
@@ -656,7 +699,7 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
 
     private void pushMsgToApp(Integer pushChannel, String pushToken, int cameraType, String sceneName, String webSite){
         log.info("推送消息,渠道是 {}, 手机token是 {}", pushChannel, pushToken);
-        if(Objects.isNull(pushChannel) && StrUtil.isBlank(pushToken)){
+        if(Objects.isNull(pushChannel) || StrUtil.isBlank(pushToken)){
             return;
         }
 
@@ -799,11 +842,6 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
 
         return videosJson;
     }
-
-    private Long calUseSpace(Map<String, String> uploadFile) {
-        return uploadFile.keySet().stream().map(File::new).filter(File::exists).mapToLong(File::length).sum();
-    }
-
     private void updateDbPlus(int sceneSource,Long space,String videosJson, Long computeTime,boolean isObj,ScenePlusExt scenePlusExt){
 
         scenePlusExt.setSpace(space);
@@ -833,20 +871,40 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
                 scenePlusExt.setSceneResolution(SceneResolution.four_K.code());
                 scenePlusExt.setSceneFrom(SceneFrom.LASER.code());
                 break;
+            case SG:
+                scenePlusExt.setSceneResolution(SceneResolution.four_K.code());
+                scenePlusExt.setSceneFrom(SceneFrom.LASER.code());
+                break;
         }
 
         String sceneKind = scenePlusExt.getSceneScheme() == 3 ? SceneKind.FACE.code():SceneKind.TILES.code();
         scenePlusExt.setSceneKind(sceneKind);
 //        scenePlusExt.setModelKind(modelKind);
 
-        String dataFdage = FileUtil.readUtf8String(scenePlusExt.getDataSource().concat("/capture/").concat("data.fdage"));
-        JSONObject jsonObject = JSON.parseObject(dataFdage);
-        int points = jsonObject.getJSONArray("points").size();
-        scenePlusExt.setShootCount(points);
+        //统计点位数量
+        scenePlusExt.setShootCount(this.getShootCount(scenePlusExt));
 
         scenePlusExtService.updateById(scenePlusExt);
     }
 
+    private Integer getShootCount(ScenePlusExt scenePlusExt){
+        String homePath = SceneUtil.getHomePath(scenePlusExt.getDataSource());
+        if(Objects.nonNull(scenePlusExt.getLocation()) && scenePlusExt.getLocation() == 5){
+            String slamDataStr = fYunFileService.getFileContent(homePath.concat("slam_data.json"));
+            JSONObject slamDataObj = JSON.parseObject(slamDataStr);
+            JSONArray viewsInfo = slamDataObj.getJSONArray("views_info");
+            if(CollUtil.isEmpty(viewsInfo)){
+                return 0;
+            }
+            return viewsInfo.stream().mapToInt(info -> {
+                return  ((JSONObject) info).getJSONArray("list_pose").size();
+            }).sum();
+        }
+
+        JSONObject dataFdageObj = JSON.parseObject(fYunFileService.getFileContent(homePath.concat("data.fdage")));
+        return dataFdageObj.getJSONArray("points").size();
+    }
+
     private Object[] updateEditInfo(ScenePlus scenePlus){
         SceneEditInfo sceneEditInfo = sceneEditInfoService.getByScenePlusId(scenePlus.getId());
         SceneEditControls sceneEditControls = null;

+ 47 - 6
src/main/java/com/fdkankan/contro/mq/service/impl/BuildV3SceneServiceImpl.java

@@ -4,11 +4,14 @@ import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.io.file.FileNameUtil;
 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 com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.fdkankan.common.constant.PayStatus;
+import com.fdkankan.common.constant.SceneScheme;
 import com.fdkankan.common.constant.SceneStatus;
 import com.fdkankan.common.util.DateExtUtil;
 import com.fdkankan.common.util.FileUtils;
@@ -23,6 +26,7 @@ import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.model.constants.ConstantFileName;
 import com.fdkankan.model.constants.ConstantFilePath;
 import com.fdkankan.model.constants.UploadFilePath;
+import com.fdkankan.model.enums.ModelTypeEnums;
 import com.fdkankan.model.utils.CreateHouseJsonUtil;
 import com.fdkankan.model.utils.CreateObjUtil;
 import com.fdkankan.push.config.PushMessageConfig;
@@ -35,6 +39,7 @@ import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 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 java.io.File;
@@ -51,6 +56,7 @@ import java.util.*;
  **/
 @Slf4j
 @Service
+@RefreshScope
 public class BuildV3SceneServiceImpl implements IBuildSceneService {
 
     @Value("${queue.modeling.modeling-call}")
@@ -106,6 +112,9 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
     @Autowired
     private ISceneColdStorageService sceneColdStorageService;
 
+    @Autowired
+    private ICompanyService companyService;
+
     @Override
     public void buildScenePre(BuildSceneCallMessage message) {
         boolean success = false;
@@ -263,7 +272,8 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
 //            uploadFiles.entrySet().stream().filter(entry-> FileNameUtil.getName(entry.getKey()).equals("floorplan_cad.json"))
 //                    .forEach(entry-> uploadHouseTypeJson(sceneCode,entry.getKey()));
 
-
+            //生成二维码
+            this.createQrcode(sceneCode);
 
             //计算成功,通知APP
             Integer pushChannel = fdageData.getInteger("pushChannel");
@@ -280,7 +290,7 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
             sceneProEdit.setFloorPublishVer(ver);
             if (cameraType == 14) {
                 //计算成功  激光转台相机 同步 请求
-                fdkkLaserService.syncBuildResult(scenePro.getNum(), scenePro.getDataSource(),scenePro.getCreateTime(), Calendar.getInstance().getTime());
+                fdkkLaserService.syncBuildResult(scenePro.getNum(), scenePro.getDataSource(),scenePro.getCreateTime(), Calendar.getInstance().getTime(), null);
                 sceneProEdit.setMapVisi(0);
             }
             sceneProEditService.updateById(sceneProEdit);
@@ -289,7 +299,7 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
             log.info("生成scene.json上传oss并设置缓存,num:{}", sceneCode);
             this.writeSceneJson(videosJson,scenePro,sceneProEdit);
 
-            CreateObjUtil.deleteFile(path.replace(ConstantFilePath.BUILD_MODEL_PATH, "/") + "/capture");
+//            CreateObjUtil.deleteFile(path.replace(ConstantFilePath.BUILD_MODEL_PATH, "/") + "/capture");
             log.info("场景计算结果处理结束,场景码:{}", sceneCode);
             // 判断是否升级V4
 //            if(fdageData.containsKey("updateV4") && fdageData.getIntValue("updateV4") == 1){
@@ -308,6 +318,32 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
         }
     }
 
+    private void createQrcode(String num){
+        ScenePro scenePro = sceneProService.getByNum(num);
+        String logoPath = null;
+        if(Objects.nonNull(scenePro.getCameraId())){
+            CameraDetail cameraDetail = cameraDetailService.getByCameraId(scenePro.getId());
+            if(Objects.nonNull(cameraDetail) && Objects.nonNull(cameraDetail.getCompanyId())){
+                Company company = companyService.getById(cameraDetail.getCompanyId());
+                if(Objects.nonNull(company) && StrUtil.isNotEmpty(company.getQrLogo())){
+                    logoPath =  ConstantFilePath.BASE_PATH + File.separator + company.getQrLogo();
+                }
+            }
+        }
+
+        //生成二维码
+        String outPathZh = ConstantFilePath.BASE_PATH + File.separator + "sceneQRcode/"+ num +".png";
+        String outPathEn = ConstantFilePath.BASE_PATH + File.separator + "sceneQRcode/"+ num +"_en.png";
+        QrConfig qrConfig = QrConfig.create();
+        qrConfig.setWidth(1024);
+        qrConfig.setHeight(1024);
+        if(StrUtil.isNotEmpty(logoPath)){
+            qrConfig.setImg(logoPath);
+        }
+        QrCodeUtil.generate(scenePro.getWebSite(), qrConfig, FileUtil.file(outPathZh));
+        QrCodeUtil.generate(scenePro.getWebSite() + "&lang=en", qrConfig, FileUtil.file(outPathEn));
+    }
+
     private void copyFiles(String path, String num) {
         if (new File(path + File.separator + "results" + File.separator + "floor.json").exists()) {
             FileUtils.copyFile(path + File.separator + "results" + File.separator + "floor.json", ConstantFilePath.SCENE_PATH + "data" + File.separator + "data" + num + File.separator + "floor.json", true);
@@ -455,7 +491,7 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
 
     private void pushMsgToApp(Integer pushChannel, String pushToken, int cameraType, String sceneName, String webSite){
         log.info("推送消息,渠道是 {}, 手机token是 {}", pushChannel, pushToken);
-        if(Objects.isNull(pushChannel) && StrUtil.isBlank(pushToken)){
+        if(Objects.isNull(pushChannel) || StrUtil.isBlank(pushToken)){
             return;
         }
 
@@ -586,7 +622,7 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
     }
 
     private ScenePro updateDbPlus(String num, Long space, String videosJson, Long computeTime,boolean isObj){
-        sceneProService.update(new LambdaUpdateWrapper<ScenePro>()
+        LambdaUpdateWrapper<ScenePro> wrapper = new LambdaUpdateWrapper<ScenePro>()
                 .eq(ScenePro::getNum, num)
                 .set(ScenePro::getStatus, SceneStatus.NO_DISPLAY.code())
                 .set(ScenePro::getUpdateTime, new Date())
@@ -595,7 +631,12 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
                 .set(ScenePro::getComputeTime, computeTime)
                 .set(ScenePro::getVideos, videosJson)
                 .set(ScenePro::getIsObj, isObj ? 1 : 0)
-                .set(ScenePro::getPayStatus, PayStatus.PAY.code()));
+                .set(ScenePro::getPayStatus, PayStatus.PAY.code());
+
+        if(ModelTypeEnums.TILE_CODE.equals(modelSceneKind)){
+            wrapper.set(ScenePro::getSceneScheme, SceneScheme.LM.code());
+        }
+        sceneProService.update(wrapper);
        return sceneProService.getByNum(num);
     }
 

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

@@ -0,0 +1,18 @@
+package com.fdkankan.contro.service;
+
+import com.fdkankan.contro.entity.CameraType;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-11
+ */
+public interface ICameraTypeService extends IService<CameraType> {
+
+    CameraType getByCamType(int camType);
+
+}

+ 3 - 2
src/main/java/com/fdkankan/contro/service/IFdkkLaserService.java

@@ -1,5 +1,6 @@
 package com.fdkankan.contro.service;
 
+import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.contro.entity.Camera;
 import com.fdkankan.contro.entity.ScenePlus;
 import com.fdkankan.contro.entity.ScenePlusExt;
@@ -16,11 +17,11 @@ import java.util.Date;
  * @since 2022/1/14
  **/
 public interface IFdkkLaserService {
-    void syncBuildResult(String sceneNum, String dataSource, Date createTime, Date algorithmTime);
+    void syncBuildResult(String sceneNum, String dataSource, Date createTime, Date algorithmTime, Integer shootCount);
 
     void pushBuildStatusToLaserSystem(String projectNum, String laserObjFilePath, Integer buildObjStatus);
 
-    void saveScene(ScenePlus scenePlus, String scenePassword, Camera cameraEntity, String userName, boolean b);
+    void saveScene(ScenePlus scenePlus, JSONObject jsonObject, Camera cameraEntity, String userName, boolean b);
 
     void saveScene(ScenePro scenePro, String scenePassword, Camera cameraEntity, String phone, boolean rebuild);
 

+ 24 - 0
src/main/java/com/fdkankan/contro/service/impl/CameraTypeServiceImpl.java

@@ -0,0 +1,24 @@
+package com.fdkankan.contro.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.fdkankan.contro.entity.CameraType;
+import com.fdkankan.contro.mapper.ICameraTypeMapper;
+import com.fdkankan.contro.service.ICameraTypeService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-11
+ */
+@Service
+public class CameraTypeServiceImpl extends ServiceImpl<ICameraTypeMapper, CameraType> implements ICameraTypeService {
+    @Override
+    public CameraType getByCamType(int camType) {
+        return this.getOne(new LambdaQueryWrapper<CameraType>().eq(CameraType::getCameraType, camType));
+    }
+}

+ 23 - 15
src/main/java/com/fdkankan/contro/service/impl/CommonServiceImpl.java

@@ -2,6 +2,8 @@ package com.fdkankan.contro.service.impl;
 
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.io.FileUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.fdkankan.common.util.FileUtils;
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -29,6 +31,12 @@ import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.stereotype.Service;
 
 import java.io.File;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.Objects;
 import java.util.*;
 
 @Slf4j
@@ -177,17 +185,6 @@ public class CommonServiceImpl implements ICommonService {
     }
 
     @Override
-    public void initUserEditData(String num, Set<String> bizs, Map<String, Map<String ,Object>> params) {
-        if(StrUtil.isEmpty(num) || CollUtil.isEmpty(bizs)){
-            return;
-        }
-        for (String biz : bizs) {
-            UserEditDataHandler handler = UserEditDataHandlerFactory.getHandler(biz);
-            handler.init(num, CollUtil.isEmpty(params) ? null : params.get(biz));
-        }
-    }
-
-    @Override
     public void uploadFloorplanJson(String num, String dataSource) throws Exception{
         String floorPlanCardFilePath = dataSource + File.separator + "results/floorplan_cad.json";
         if (!new File(floorPlanCardFilePath).exists()) {
@@ -196,11 +193,22 @@ public class CommonServiceImpl implements ICommonService {
         }
         JSONObject json = FloorPlanUserUtil.createFloorPlanUserJson(floorPlanCardFilePath);
         if(Objects.isNull(json)){
-            log.error("生成floorplan.json失败,cadPath:", floorPlanCardFilePath);
-            throw new Exception("生成floorplan.json失败,cadPath:" + floorPlanCardFilePath);
+            log.warn("生成floorplan.json失败,cadPath:{}", floorPlanCardFilePath);
+            return;
+        }
+        String floorplanJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "floorplan.json";
+        fYunFileServiceInterface.uploadFile(json.toJSONString().getBytes(), floorplanJsonPath);
+    }
+
+    @Override
+    public void initUserEditData(String num, Set<String> bizs, Map<String, Map<String ,Object>> params) {
+        if(StrUtil.isEmpty(num) || CollUtil.isEmpty(bizs)){
+            return;
+        }
+        for (String biz : bizs) {
+            UserEditDataHandler handler = UserEditDataHandlerFactory.getHandler(biz);
+            handler.init(num, CollUtil.isEmpty(params) ? null : params.get(biz));
         }
-        String hourseTypeJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "floorplan.json";
-        fYunFileServiceInterface.uploadFile(json.toJSONString().getBytes(), hourseTypeJsonPath);
     }
 
     @Override

+ 14 - 5
src/main/java/com/fdkankan/contro/service/impl/IFdkkLaserServiceImpl.java

@@ -5,6 +5,7 @@ import com.fdkankan.common.util.DateUtil;
 import com.fdkankan.common.util.FileUtils;
 import com.fdkankan.contro.entity.Camera;
 import com.fdkankan.contro.entity.ScenePlus;
+import com.fdkankan.contro.entity.ScenePlusExt;
 import com.fdkankan.contro.entity.ScenePro;
 import com.fdkankan.contro.service.IFdkkLaserService;
 import com.fdkankan.contro.service.IScenePlusService;
@@ -22,6 +23,7 @@ import java.io.IOException;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Objects;
 
 @Service
 @Slf4j
@@ -55,7 +57,7 @@ public class IFdkkLaserServiceImpl implements IFdkkLaserService {
     private FYunFileServiceInterface fYunFileService;
 
 
-    public void updateSceneStatus(String sceneCode, int sceneStatus, String path, Date createTime, Date algorithmTime) {
+    public void updateSceneStatus(String sceneCode, int sceneStatus, String path, Date createTime, Date algorithmTime, Integer shootCount) {
         Map<String, Object> params = new HashMap<>();
         params.put("sceneCode", sceneCode);
         params.put("status", sceneStatus);
@@ -65,10 +67,11 @@ public class IFdkkLaserServiceImpl implements IFdkkLaserService {
         if (!ObjectUtils.isEmpty(path)) {
             params.put("path", path);
         }
+        params.put("shootCount", shootCount);
         rabbitMqProducer.sendByWorkQueue(updateScene, params);
     }
 
-    public void syncBuildResult(String sceneNum, String dataSource,Date createTime, Date algorithmTime) {
+    public void syncBuildResult(String sceneNum, String dataSource,Date createTime, Date algorithmTime, Integer shootCount) {
         log.info("激光转台相机构建结果 同步 请求 ");
         try {
             String jgPath = dataSource;
@@ -96,7 +99,7 @@ public class IFdkkLaserServiceImpl implements IFdkkLaserService {
             FileUtils.copyDirectiory(dataSource + "/results/laserData/cover", jgPath + "/extras");
             FileUtils.copyFile(dataSource + "/results/laserData", jgPath, true);
 
-            updateSceneStatus(sceneNum, 2, jgPath + File.separator + "laserData",createTime, algorithmTime);
+            updateSceneStatus(sceneNum, 2, jgPath + File.separator + "laserData",createTime, algorithmTime, shootCount);
         } catch (Exception e) {
             log.error("激光转台相机同步失败", e);
         }
@@ -112,7 +115,7 @@ public class IFdkkLaserServiceImpl implements IFdkkLaserService {
     }
 
 
-    public void saveScene(ScenePlus scenePlus, String scenePassword, Camera cameraEntity, String phone, boolean rebuild) {
+    public void saveScene(ScenePlus scenePlus, JSONObject fdageJson, Camera cameraEntity, String phone, boolean rebuild) {
         Map<String, Object> params = new HashMap<>();
         params.put("childName", cameraEntity.getChildName());
         params.put("createTime", DateUtil.date2String(scenePlus.getCreateTime(), null));
@@ -121,13 +124,19 @@ public class IFdkkLaserServiceImpl implements IFdkkLaserService {
         params.put("snCode", cameraEntity.getSnCode());
         params.put("status", scenePlus.getSceneStatus());
         if (!rebuild) {
-            params.put("password", scenePassword);
+            if(Objects.nonNull(fdageJson)){
+                params.put("password", fdageJson.getString("pwd"));
+            }
         } else {
             params.put("status", 4);
         }
         params.put("version",getSceneVersion(scenePlus.getNum()));
         params.put("title", scenePlus.getTitle());
         params.put("userId", scenePlus.getUserId());
+        params.put("sceneSource", scenePlus.getSceneSource());
+        if(Objects.nonNull(fdageJson)){
+            params.put("location", fdageJson.getInteger("location"));
+        }
         rabbitMqProducer.sendByWorkQueue(updateScene, params);
     }
 

+ 11 - 3
src/main/java/com/fdkankan/contro/service/impl/Scene3dNumServiceImpl.java

@@ -8,9 +8,11 @@ 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.CameraType;
 import com.fdkankan.contro.entity.Scene3dNum;
 import com.fdkankan.contro.enums.CameraTypeEnum;
 import com.fdkankan.contro.mapper.IScene3dNumMapper;
+import com.fdkankan.contro.service.ICameraTypeService;
 import com.fdkankan.contro.service.IScene3dNumService;
 import com.fdkankan.dingtalk.DingTalkSendUtils;
 import com.fdkankan.redis.constant.RedisKey;
@@ -67,6 +69,8 @@ public class Scene3dNumServiceImpl extends ServiceImpl<IScene3dNumMapper, Scene3
 
     @Autowired
     private DingTalkSendUtils dingTalkSendUtils;
+    @Autowired
+    private ICameraTypeService cameraTypeService;
 
     @Override
     public String generateSceneNum(Integer cameraType) throws Exception {
@@ -123,11 +127,15 @@ public class Scene3dNumServiceImpl extends ServiceImpl<IScene3dNumMapper, Scene3
         }
     }
 
-    private  static  String addPrefix( String num,Integer cameraType){
-        if(cameraType == null){
+    private  String addPrefix(String num,Integer camType){
+        if(camType == null){
+            return num;
+        }
+        CameraType cameraType = cameraTypeService.getByCamType(camType);
+        if(Objects.isNull(cameraType)){
             return num;
         }
-        return CameraTypeEnum.getSceneNumPrefixByType(cameraType) + num;
+        return cameraType.getScenePrefix() + num;
     }
 
     @Override

+ 42 - 35
src/main/java/com/fdkankan/contro/service/impl/SceneFileBuildServiceImpl.java

@@ -22,6 +22,7 @@ import com.fdkankan.common.util.FileUtils;
 import com.fdkankan.common.util.SnowflakeIdGenerator;
 import com.fdkankan.contro.constant.RedisConstants;
 import com.fdkankan.contro.entity.*;
+import com.fdkankan.contro.enums.CameraTypeEnum;
 import com.fdkankan.contro.mapper.ISceneFileBuildMapper;
 import com.fdkankan.contro.service.ICommonService;
 import com.fdkankan.contro.service.*;
@@ -429,7 +430,8 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         String algorithm = jsonObject.getString("location") != null && "1".equals(jsonObject.getString("location")) ? "sfm" : "slam";
 
         ScenePlusVO scenePlusVO = this.createScenePlus(sceneNum, cameraDetail.getCameraId(), jsonObject.getString("creator"),
-                jsonObject.getString("pwd"),cameraType, dataSource, icon,  jsonObject.getLong("account"), userName,algorithm,
+                jsonObject.getString("pwd"),cameraType, jsonObject.getJSONObject("cam").getIntValue("type"),
+                dataSource, icon,  jsonObject.getLong("account"), userName,algorithm,jsonObject.getInteger("location"),
                 jsonObject.getJSONArray("points").size(), jsonObject.getString("name"), jsonObject.getString("info"),
                 jsonObject.getInteger("scenetype"), jsonObject.getString("gps"), rebuild,
                 jsonObject.getInteger("resolution"), firmwareVersion.toString(), sceneUrl, buildType, cameraDetail.getCooperationUser());
@@ -439,7 +441,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
                 scenePlusVO.getWebSite(),scenePlusVO.getThumb(),PayStatus.NOT_PAY.code(),
                 String.format(UploadFilePath.DATA_VIEW_PATH, sceneNum));
 
-        BuildSceneCallMessage mqMessage = getBuildSceneMqMessage(sceneNum, cameraType, algorithm, jsonObject.getInteger("resolution"), buildType,
+        BuildSceneCallMessage mqMessage = getBuildSceneMqMessage(sceneNum, cameraType, algorithm, jsonObject, buildType,
                 scenePlusVO.getDataSource());
 
         if (cameraDetail.getCompanyId() != null) {
@@ -522,7 +524,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
                 scenePlusVO.getWebSite(),scenePlusVO.getThumb(),PayStatus.NOT_PAY.code(),
                 String.format(ConstantFilePath.DATA_PATH_FORMAT, sceneNum));
 
-        BuildSceneCallMessage mqMessage = getBuildSceneMqMessage(sceneNum, cameraType, algorithm, jsonObject.getInteger("resolution"), buildType,
+        BuildSceneCallMessage mqMessage = getBuildSceneMqMessage(sceneNum, cameraType, algorithm, jsonObject, buildType,
                 scenePlusVO.getDataSource());
         if (cameraDetail.getCompanyId() != null) {
             Company company = companyService.getById(cameraDetail.getCompanyId());
@@ -640,7 +642,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
 
         // 判断是否是V3的场景
         ScenePro scenePro = sceneProService.getOne(
-            new LambdaQueryWrapper<ScenePro>().like(ScenePro::getDataSource, fileId));
+            new LambdaQueryWrapper<ScenePro>().like(ScenePro::getDataSource, "/".concat(fileId).concat("/")));
 
         boolean callV3 = callV3(scenePro, preParams, fdageJson, "api/scene/file/uploadSuccessBuild");
         if(callV3) return ResultData.ok();
@@ -782,15 +784,17 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         //13表示转台
         Long cameraType = 13L;
 
-        //激光转台 八目相机占用 10 和 11
-        if(fdageJson.getJSONObject("cam").getIntValue("type") == 10){
+        //激光相机10 13
+        int camType = fdageJson.getJSONObject("cam").getIntValue("type");
+        log.info("camType:{}", camType);
+        if(laserCamTypeList.contains(camType)){
             //激光转台
             cameraType = 14L;
         }
 
         // 判断是否是V3的场景
         ScenePro scenePro = sceneProService.getOne(
-            new LambdaQueryWrapper<ScenePro>().like(ScenePro::getDataSource, fileId));
+            new LambdaQueryWrapper<ScenePro>().like(ScenePro::getDataSource, "/".concat(fileId).concat("/")));
 
         boolean callV3 = callV3(scenePro, preParams, fdageJson, "api/scene/file/turntableUploadSuccess");
         if (callV3) return ResultData.ok();
@@ -820,8 +824,8 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
             }
             //判断 是否为激光相机
             Camera camera = cameraService.getByChildName(mac);
-            if(!ObjectUtils.isEmpty(scenePlus)){
-                fdkkLaserService.saveScene(scenePlus,fdageJson.getString("pwd"),camera,userName,false);
+            if(Objects.nonNull(scenePlus)){
+                fdkkLaserService.saveScene(scenePlus,fdageJson,camera,userName,false);
             }else{
                 fdkkLaserService.saveScene(scenePro,fdageJson.getString("pwd"),camera,userName,false);
             }
@@ -830,8 +834,8 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
     }
 
     public ScenePlusVO createScenePlus(String projectNum, Long cameraId, String phoneId, String sceneKey,
-                                     Long cameraType, String dataSource, String pic, Long userId, String userName,
-                                     String algorithm, Integer sceneShootCount, String sceneName,
+                                     Long cameraType, int camType, String dataSource, String pic, Long userId, String userName,
+                                     String algorithm, Integer location, Integer sceneShootCount, String sceneName,
                                      String sceneDec, Integer sceneType, String gps,Integer type,
                                      Integer resolution, String firmwareVersion, String url, String buildType,
                                      Long cooperationUser)throws Exception{
@@ -843,26 +847,29 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         scenePlus.setCameraId(cameraId);
         scenePlus.setPhoneId(phoneId);
         scenePlus.setNum(projectNum);
-        scenePlus.setSceneSource(1);
+        scenePlus.setSceneSource(SceneSource.BM.code());
         scenePlusExt.setDataSource(dataSource);
+        scenePlusExt.setLocation(location);
 
         if(resolution == null || resolution.intValue() == 0){
             scenePlusExt.setSceneScheme(cameraType.intValue());
         }else {
-            scenePlusExt.setSceneScheme(4);
+            scenePlusExt.setSceneScheme(SceneScheme.BM.code());
         }
 
         //转台相机用4k图
-        if(cameraType.longValue() == 13 ){
-            scenePlus.setSceneSource(3);
-            scenePlusExt.setSceneScheme(10);
+        if(cameraType.longValue() == 13){
+            scenePlus.setSceneSource(SceneSource.ZT.code());
+            scenePlusExt.setSceneScheme(SceneScheme.FOUR_K.code());
         }
 
         //激光相机
-        if(cameraType.longValue() == 14 ){
-            scenePlus.setSceneSource(4);
-            scenePlusExt.setSceneScheme(10);
-            scenePlusExt.setModelKind(modelKind);
+        if(cameraType.longValue() == 14){
+            scenePlus.setSceneSource(SceneSource.JG.code());
+            scenePlusExt.setSceneScheme(SceneScheme.FOUR_K.code());
+            if(camType == CameraTypeEnum.LASER_SG.getType()){
+                scenePlus.setSceneSource(SceneSource.SG.code());
+            }
         }
 
         if(ModelKind.THREE_D_TILE.code().equals(modelKind)
@@ -1145,17 +1152,19 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
     }
 
     public BuildSceneCallMessage getBuildSceneMqMessage(String projectNum,
-                                                        Long cameraType, String algorithm, Integer resolution,
+                                                        Long cameraType, String algorithm, JSONObject fdageJson,
                                                         String buildType, String dataSource) {
         BuildSceneCallMessage mqMsg = new BuildSceneCallMessage();
         mqMsg.setSceneNum(projectNum);
         mqMsg.setCameraType(String.valueOf(cameraType));
         mqMsg.setAlgorithm(algorithm);
-        mqMsg.setResolution(String.valueOf(resolution));
+        mqMsg.setResolution(String.valueOf(fdageJson.getInteger("resolution")));
         mqMsg.setBuildType(buildType);
         mqMsg.setPath(dataSource);
         mqMsg.setCreateTime(DateUtil.format(Calendar.getInstance().getTime(), DateExtUtil.dateStyle));
-        mqMsg.setExt(new HashMap<>());
+        Map<String, Object> ext = new HashMap<>();
+        ext.put("location", fdageJson.getInteger("location"));
+        mqMsg.setExt(ext);
         return mqMsg;
     }
 
@@ -1244,11 +1253,11 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         if(sceneSource == 3){
             cameraType = 13L;
         }
-        if(sceneSource == 4){
+        if(sceneSource == 4 || sceneSource == 5){
             cameraType = 14L;
         }
         BuildSceneCallMessage message = null;
-        if(sceneSource == 4){
+        if(cameraType == 14){
             String userName = null;
             Long sceneUserId = scenePlus.getUserId();
             if (!ObjectUtils.isEmpty(sceneUserId)) {
@@ -1258,14 +1267,12 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
             Camera cameraEntity = cameraService.getById(scenePlus.getCameraId());
             fdkkLaserService.saveScene(scenePlus,null,cameraEntity,userName,true);
             message = this.getBuildSceneMqMessage(
-                    num, cameraType,
-                    fdageData.getString("location") != null && "1".equals(fdageData.getString("location")) ? "sfm" : "slam",
-                    fdageData.getInteger("resolution"), buildType, path);
+                    num, cameraType, fdageData.getString("location") != null && "1".equals(fdageData.getString("location")) ? "sfm" : "slam",
+                    fdageData, buildType, path);
         }else{
             message = this.getBuildSceneMqMessage(
                     num, cameraType, fdageData.getString("location") != null && "1".equals(fdageData.getString("location")) ? "sfm" : "slam",
-                    fdageData.getInteger("resolution"), buildType,
-                    path);
+                    fdageData, buildType, path);
         }
         if(deleteExtras){
             message.getExt().put("deleteExtras",deleteExtras);
@@ -1372,7 +1379,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
 
         BuildSceneCallMessage buildSceneMqMessage = this.getBuildSceneMqMessage(
                 num, cameraType, fdageData.getString("location") != null && "1".equals(fdageData.getString("location")) ? "sfm" : "slam",
-                fdageData.getInteger("resolution"), buildType, path);
+                fdageData, buildType, path);
         rabbitMqProducer.sendByWorkQueue(queueV3ModelingPre, buildSceneMqMessage);
 
         //重算的场景,先移除该场景对应的容量
@@ -1397,7 +1404,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
 //            fYunFileService.copyFileBetweenBucket(sourceBucet,fYunPath,fYunFileConfig.getBucket(),fYunPath);
 //        }
         // 下载data.fdage
-        JSONObject fdageData = JSONObject.parseObject(fYunFileService.getFileContent(fYunPath + "/data.fdage"));
+        JSONObject fdageData = JSONObject.parseObject(fYunFileService.getFileContent(sourceBucet, fYunPath + "/data.fdage"));
         if(ObjectUtils.isEmpty(fdageData)){
             throw new BusinessException(ErrorCode.SYSTEM_ERROR.code(),"4dage 文件不存在");
         }
@@ -1459,7 +1466,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
                         cameraType = 13L;
                     }
 
-                    if (detailEntity.getType() == 10) {
+                    if (CollUtil.isNotEmpty(laserCamTypeList) && laserCamTypeList.contains(detailEntity.getType())) {
                         cameraType = 14L;
                     }
 
@@ -1492,7 +1499,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
                                 if (!ObjectUtils.isEmpty(detailEntity.getUserId())) {
                                     userName = userService.getSSOUserByUserId(detailEntity.getUserId()).getUserName();
                                 }
-                                fdkkLaserService.saveScene(scenePlus, fdageData.getString("pwd"), cameraEntity, userName, false);
+                                fdkkLaserService.saveScene(scenePlus, fdageData, cameraEntity, userName, false);
                             }
                             break;
                     }
@@ -1558,7 +1565,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
 
         BuildSceneCallMessage buildSceneMqMessage = this.getBuildSceneMqMessage(
                 sceneNum, cameraType, jsonObject.getString("location") != null && "1".equals(jsonObject.getString("location")) ? "sfm" : "slam",
-                jsonObject.getInteger("resolution"), buildType, dataSource);
+                jsonObject, buildType, dataSource);
         rabbitMqProducer.sendByWorkQueue(queueV3ModelingPre, buildSceneMqMessage);
 
     }

+ 5 - 0
src/main/resources/mapper/contro/CameraTypeMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fdkankan.contro.mapper.ICameraTypeMapper">
+
+</mapper>