dengsixing 10 ヶ月 前
コミット
9467d831cd

+ 47 - 47
src/main/java/com/fdkankan/scene/mq/consumer/CopySceneConsumer.java

@@ -1,47 +1,47 @@
-package com.fdkankan.scene.mq.consumer;
-
-import com.alibaba.fastjson.JSONObject;
-import com.fdkankan.redis.util.RedisUtil;
-import com.fdkankan.scene.service.ISceneCopyService;
-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.nio.charset.StandardCharsets;
-
-/**
- * 场景封存解封 mq
- */
-@Slf4j
-@Component
-public class CopySceneConsumer {
-
-
-    @Autowired
-    ISceneCopyService sceneCopyService;
-    @RabbitListener(
-            queuesToDeclare = @Queue("${queue.scene.copy:ucenter-copy-scene}") ,
-            concurrency = "1"
-    )
-    public void consumerQueue(Channel channel, Message message)  {
-        try {
-            String messageId = message.getMessageProperties().getMessageId();
-            String msg = new String(message.getBody(), StandardCharsets.UTF_8);
-            log.info("copy-scene--messageId:{},msg:{}",messageId,msg);
-            channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
-
-            JSONObject jsonObject = JSONObject.parseObject(msg);
-            String oldNum = jsonObject.getString("oldNum");
-            String newNum = jsonObject.getString("newNum");
-            sceneCopyService.copyScene(oldNum,newNum);
-        }catch (Exception e){
-            log.info("copy-scene----消费失败",e);
-        }
-
-    }
-
-}
+//package com.fdkankan.scene.mq.consumer;
+//
+//import com.alibaba.fastjson.JSONObject;
+//import com.fdkankan.redis.util.RedisUtil;
+//import com.fdkankan.scene.service.ISceneCopyService;
+//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.nio.charset.StandardCharsets;
+//
+///**
+// * 场景封存解封 mq
+// */
+//@Slf4j
+//@Component
+//public class CopySceneConsumer {
+//
+//
+//    @Autowired
+//    ISceneCopyService sceneCopyService;
+//    @RabbitListener(
+//            queuesToDeclare = @Queue("${queue.scene.copy:ucenter-copy-scene}") ,
+//            concurrency = "1"
+//    )
+//    public void consumerQueue(Channel channel, Message message)  {
+//        try {
+//            String messageId = message.getMessageProperties().getMessageId();
+//            String msg = new String(message.getBody(), StandardCharsets.UTF_8);
+//            log.info("copy-scene--messageId:{},msg:{}",messageId,msg);
+//            channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
+//
+//            JSONObject jsonObject = JSONObject.parseObject(msg);
+//            String oldNum = jsonObject.getString("oldNum");
+//            String newNum = jsonObject.getString("newNum");
+//            sceneCopyService.copyScene(oldNum,newNum);
+//        }catch (Exception e){
+//            log.info("copy-scene----消费失败",e);
+//        }
+//
+//    }
+//
+//}

+ 15 - 0
src/main/java/com/fdkankan/scene/oss/OssUtil.java

@@ -1,6 +1,9 @@
 package com.fdkankan.scene.oss;
 
+import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.io.FileUtil;
+import cn.hutool.core.util.StrUtil;
+import com.fdkankan.common.util.DateExtUtil;
 import com.fdkankan.scene.config.FdkkLaserConfig;
 import com.fdkankan.scene.config.ServiceConfig;
 import com.fdkankan.scene.oss.aliyun.AliyunOssTemplate;
@@ -16,8 +19,10 @@ import java.io.File;
 import java.io.InputStream;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.FileSystemException;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
+import java.util.UUID;
 import java.util.regex.Matcher;
 import java.util.stream.Collectors;
 
@@ -25,6 +30,8 @@ import java.util.stream.Collectors;
 @Component
 public class OssUtil {
 
+    public static final String tempBasePath = "download/temp/";
+
     @Autowired
     AliyunOssTemplate aliyunOssTemplate;
     @Autowired
@@ -403,4 +410,12 @@ public class OssUtil {
     public void uploadMulFiles(String prefix, Map<String, String> files){
         files.keySet().stream().forEach(key -> this.uploadFile(prefix, files.get(key), key, false));
     }
+
+    public static String getUploadTempFileKey(String prefix, String extName){
+        String fileName = StrUtil.isNotEmpty(prefix) ? prefix : UUID.randomUUID().toString();
+        if(StrUtil.isNotEmpty(extName)){
+            fileName += "." + extName;
+        }
+        return tempBasePath + DateUtil.format(new Date(), DateExtUtil.dateStyle6) + "/" + fileName;
+    }
 }

+ 9 - 9
src/main/java/com/fdkankan/scene/schedule/ScheduleJob.java

@@ -31,15 +31,15 @@ public class ScheduleJob {
     @Autowired
     private IDownloadTourVideoService downloadTourVideoService;
 
-    /**
-     * 每天凌晨一点执行
-     */
-    @Scheduled(cron="0 0 1 * * ?")
-    public void cleanDownloadPanorama() {
-        log.info("定时清除全景图压缩包开始");
-        sceneAsynOperLogService.cleanDownloadPanorama();
-        log.info("定时清除全景图压缩包完毕");
-    }
+//    /**
+//     * 每天凌晨一点执行
+//     */
+//    @Scheduled(cron="0 0 1 * * ?")
+//    public void cleanDownloadPanorama() {
+//        log.info("定时清除全景图压缩包开始");
+//        sceneAsynOperLogService.cleanDownloadPanorama();
+//        log.info("定时清除全景图压缩包完毕");
+//    }
 
     @Scheduled(cron = "0/5 * * * * ? ")
     public void job4SceneDownload() throws Exception {

+ 11 - 13
src/main/java/com/fdkankan/scene/service/impl/CommonServiceImpl.java

@@ -2,30 +2,28 @@ package com.fdkankan.scene.service.impl;
 
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.StrUtil;
-import com.fdkankan.scene.factory.UserEditData.UserEditDataHandler;
-import com.fdkankan.scene.factory.UserEditData.UserEditDataHandlerFactory;
-import com.fdkankan.scene.service.ICommonService;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
 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.fdkankan.model.utils.CreateObjUtil;
+import com.fdkankan.scene.factory.UserEditData.UserEditDataHandler;
+import com.fdkankan.scene.factory.UserEditData.UserEditDataHandlerFactory;
+import com.fdkankan.scene.oss.OssUtil;
 import com.fdkankan.scene.service.ICommonService;
+import com.fdkankan.scene.util.MergeVideoUtil;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
-import java.util.Map;
-import java.util.Set;
 import javax.annotation.Resource;
 import java.io.File;
+import java.util.Map;
+import java.util.Set;
 
 @Slf4j
 @Service
 public class CommonServiceImpl implements ICommonService {
 
     @Resource
-    private FYunFileServiceInterface fYunFileService;
+    private OssUtil ossUtil;
 
     @Override
     public void initUserEditData(String num, Set<String> bizs, Map<String, Map<String ,Object>> params) {
@@ -56,14 +54,14 @@ public class CommonServiceImpl implements ICommonService {
 
         //从用户编辑目录中下载视频到本地
         String filePath = userEditPath + fileName;
-        fYunFileService.downloadFile(bucket, filePath, localImagesPath + fileName);
+        ossUtil.downloadFile(bucket, filePath, localImagesPath + fileName);
 
         //视频格式转换
-        CreateObjUtil.mp4ToFlv(localFilePath, localFilePath.replace("mp4", "flv"));
+        MergeVideoUtil.ffmpegFormatMp4(localFilePath, localFilePath.replace("mp4", "flv"));
 
         //上传
         String flvFileName = fileName.replace("mp4", "flv");
-        fYunFileService.uploadFile(bucket, localFilePath.replace("mp4", "flv"), userEditPath+flvFileName);
+        ossUtil.uploadFile(bucket, userEditPath+flvFileName, localFilePath.replace("mp4", "flv"), false);
     }
 
 }

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

@@ -12,7 +12,6 @@ import com.fdkankan.common.constant.ErrorCode;
 import com.fdkankan.common.constant.FileBizType;
 import com.fdkankan.common.exception.BusinessException;
 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.fdkankan.redis.constant.RedisKey;
@@ -23,6 +22,7 @@ import com.fdkankan.scene.bean.TagBean;
 import com.fdkankan.scene.entity.SceneEditInfoExt;
 import com.fdkankan.scene.entity.ScenePlus;
 import com.fdkankan.scene.entity.ScenePlusExt;
+import com.fdkankan.scene.oss.OssUtil;
 import com.fdkankan.scene.service.*;
 import com.fdkankan.scene.vo.BaseJsonArrayParamVO;
 import com.fdkankan.scene.vo.BaseSceneParamVO;
@@ -33,6 +33,7 @@ import com.google.j2objc.annotations.AutoreleasePool;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.io.IOException;
 import java.util.*;
 import java.util.stream.Collectors;
@@ -55,9 +56,9 @@ public class CutModelServiceImpl implements ICutModelService {
     @Autowired
     private RedisLockUtil redisLockUtil;
     @Autowired
-    private FYunFileServiceInterface fYunFileService;
-    @Autowired
     private ISceneUploadService sceneUploadService;
+    @Resource
+    private OssUtil ossUtil;
 
 
     @Override
@@ -134,11 +135,11 @@ public class CutModelServiceImpl implements ICutModelService {
         String userEditPath = String.format(UploadFilePath.USER_EDIT_PATH, sceneNum) + "cutModel.json";
         List<String> list = redisUtil.hgetValues(Key);
         if(CollUtil.isEmpty(list)){
-            fYunFileService.deleteFile(bucket, userEditPath);
+            ossUtil.deleteObject(bucket, userEditPath);
             return;
         }
         List<JSONObject> collect = list.stream().map(str -> JSON.parseObject(str)).collect(Collectors.toList());
-        fYunFileService.uploadFile(bucket, JSON.toJSONString(collect).getBytes(), userEditPath);
+        ossUtil.uploadFileBytes(bucket, userEditPath, JSON.toJSONString(collect).getBytes());
     }
 
     private List<String> deleteCutModel(String num, List<String> deleteSidList, String bucket) throws Exception {

+ 31 - 40
src/main/java/com/fdkankan/scene/service/impl/LaserServiceImpl.java

@@ -5,26 +5,19 @@ import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.scene.bean.LaserSceneBean;
 import com.fdkankan.scene.config.FdkkLaserConfig;
 import com.fdkankan.scene.constant.LaserApiConstant;
+import com.fdkankan.scene.oss.OssUtil;
 import com.fdkankan.scene.service.ILaserService;
 import com.fdkankan.scene.util.forest.ErrorCallback;
 import com.fdkankan.scene.util.forest.HttpClient;
 import com.fdkankan.scene.util.forest.SuccessCallback;
-import java.io.File;
-import javax.annotation.PostConstruct;
-import com.fdkankan.fyun.face.FYunFileServiceInterface;
-import com.fdkankan.rabbitmq.util.RabbitMqProducer;
-import com.fdkankan.scene.service.ILaserService;
 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.util.HashMap;
-import java.util.Map;
-
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+import java.io.File;
 
 /**
  * <p>
@@ -46,10 +39,8 @@ public class LaserServiceImpl implements ILaserService {
     private String host = "127.0.0.1";
     private int port;
 
-    @Autowired
-    RabbitMqProducer rabbitMqProducer;
-    @Autowired
-    private FYunFileServiceInterface fYunFileService;
+    @Resource
+    private OssUtil ossUtil;
 
     @Value("${4dkk.laserService.cloud-point-fyun-path:testdata/%s/data/bundle_%s/building/}")
     private String cloudPointFyunPath;
@@ -80,34 +71,34 @@ public class LaserServiceImpl implements ILaserService {
 
     @Override
     public void copy(String oldNum, String newNum, String path, Boolean flag) {
-        Map<String,Object> params = new HashMap<>();
-        params.put("sceneCode", newNum);
-        params.put("oldSceneCode", oldNum);
-        params.put("path",path);
-        params.put("init",flag);
-        if(flag){
-            rabbitMqProducer.sendByWorkQueue(laserInitCopyScene,params);
-            return;
-        }
-        rabbitMqProducer.sendByWorkQueue(laserCopyScene,params);
+//        Map<String,Object> params = new HashMap<>();
+//        params.put("sceneCode", newNum);
+//        params.put("oldSceneCode", oldNum);
+//        params.put("path",path);
+//        params.put("init",flag);
+//        if(flag){
+//            rabbitMqProducer.sendByWorkQueue(laserInitCopyScene,params);
+//            return;
+//        }
+//        rabbitMqProducer.sendByWorkQueue(laserCopyScene,params);
     }
 
     @Override
     public void cloudPointBuild(String oldSceneCode,String sceneCode) {
-        if (!fYunFileService.fileExist(bucket,String.format(cloudPointFyunPath,oldSceneCode,oldSceneCode) +"vision_edit.txt")){
-            return;
-        }
-        log.info("开始同步点云编辑文件");
-        // 上传点云编辑文件,并通知激光系统
-        fYunFileService.copyFileBetweenBucket(bucket,String.format(cloudPointFyunPath,oldSceneCode,oldSceneCode) + "vision_edit.txt",
-                bucket,String.format(cloudPointFyunPath,sceneCode,sceneCode) + "vision_edit.txt");
-
-        fYunFileService.copyFileBetweenBucket(bucket,String.format(cloudPointFyunPath,oldSceneCode,oldSceneCode) + "uuidcloud",
-                bucket,String.format(cloudPointFyunPath,sceneCode,sceneCode) + "uuidcloud");
-
-        Map<String, Object> params = new HashMap<>();
-        params.put("sceneNum", sceneCode);
-        params.put("businessType", 0);
-        rabbitMqProducer.sendByWorkQueue(cloudPointBuild, params);
+//        if (!fYunFileService.fileExist(bucket,String.format(cloudPointFyunPath,oldSceneCode,oldSceneCode) +"vision_edit.txt")){
+//            return;
+//        }
+//        log.info("开始同步点云编辑文件");
+//        // 上传点云编辑文件,并通知激光系统
+//        fYunFileService.copyFileBetweenBucket(bucket,String.format(cloudPointFyunPath,oldSceneCode,oldSceneCode) + "vision_edit.txt",
+//                bucket,String.format(cloudPointFyunPath,sceneCode,sceneCode) + "vision_edit.txt");
+//
+//        fYunFileService.copyFileBetweenBucket(bucket,String.format(cloudPointFyunPath,oldSceneCode,oldSceneCode) + "uuidcloud",
+//                bucket,String.format(cloudPointFyunPath,sceneCode,sceneCode) + "uuidcloud");
+//
+//        Map<String, Object> params = new HashMap<>();
+//        params.put("sceneNum", sceneCode);
+//        params.put("businessType", 0);
+//        rabbitMqProducer.sendByWorkQueue(cloudPointBuild, params);
     }
 }

+ 0 - 1
src/main/java/com/fdkankan/scene/service/impl/SceneAsynOperLogServiceImpl.java

@@ -14,7 +14,6 @@ import com.fdkankan.common.constant.SceneAsynModuleType;
 import com.fdkankan.common.constant.SceneAsynOperType;
 import com.fdkankan.common.constant.*;
 import com.fdkankan.common.exception.BusinessException;
-import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.scene.entity.SceneAsynOperLog;
 import com.fdkankan.scene.entity.ScenePlus;
 import com.fdkankan.scene.entity.ScenePlusExt;

+ 488 - 490
src/main/java/com/fdkankan/scene/service/impl/SceneCopyServiceImpl.java

@@ -1,490 +1,488 @@
-package com.fdkankan.scene.service.impl;
-
-import cn.hutool.core.io.FileUtil;
-import cn.hutool.core.util.StrUtil;
-import cn.hutool.extra.qrcode.QrCodeUtil;
-import cn.hutool.extra.qrcode.QrConfig;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.fdkankan.common.constant.SceneVersionType;
-import com.fdkankan.common.exception.BusinessException;
-import com.fdkankan.common.util.FileUtils;
-import com.fdkankan.common.util.SnowflakeIdGenerator;
-import com.fdkankan.fyun.face.FYunFileServiceInterface;
-import com.fdkankan.rabbitmq.util.RabbitMqProducer;
-import com.fdkankan.scene.entity.*;
-import com.fdkankan.scene.mq.consumer.SceneResourcePath;
-import com.fdkankan.scene.service.*;
-import lombok.extern.slf4j.Slf4j;
-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.stereotype.Service;
-
-import java.io.File;
-import java.util.*;
-
-@Service
-@Slf4j
-public class SceneCopyServiceImpl implements ISceneCopyService {
-
-    @Autowired
-    ISceneProService sceneProService;
-    @Autowired
-    ISceneProEditService sceneProEditService;
-    @Autowired
-    IScenePlusService scenePlusService;
-    @Autowired
-    IScenePlusExtService scenePlusExtService;
-    @Autowired
-    ISceneEditInfoService sceneEditInfoService;
-    @Autowired
-    ISceneEditInfoExtService sceneEditInfoExtService;
-    @Autowired
-    ISceneEditControlsService sceneEditControlsService;
-    @Autowired
-    ISurveillanceService surveillanceService;
-    @Autowired
-    IFolderSceneService folderSceneService;
-
-    @Autowired
-    ILaserService laserService;
-    @Autowired
-    FYunFileServiceInterface fYunFileServiceInterface;
-    @Autowired
-    RabbitMqProducer rabbitMqProducer;
-    @Override
-    public void copyScene(String oldNum, String newNum) {
-        ScenePro scenePro = sceneProService.getByNum(oldNum);
-        if(scenePro != null && scenePro.getIsUpgrade() == 0){
-            cpV3(scenePro,oldNum,newNum);
-        }
-        ScenePlus scenePlus = scenePlusService.getScenePlusByNum(oldNum);
-        if(scenePlus != null){
-            cpV4(scenePlus,oldNum,newNum);
-        }
-    }
-
-    private void cpV4(ScenePlus scenePlus, String oldNum, String newNum) {
-        try {
-            Long plusId = scenePlus.getId();
-            ScenePlusExt plusExt = scenePlusExtService.getScenePlusExtByPlusId(plusId);
-            if(plusExt == null){
-                return;
-            }
-            scenePlus.setNum(newNum);
-            scenePlus.setTitle(scenePlus.getTitle() +"(copy)");
-            scenePlus.setSceneStatus(0);
-            scenePlus.setId(null);
-            scenePlusService.save(scenePlus);
-
-            this.saveFolder(plusId,scenePlus.getId());
-
-            String oldDataSource = plusExt.getDataSource();
-            String newDataSource = this.getNewDataSource(oldDataSource);
-            log.info("sceneCopy-V4-oldNum:{},oldDataSource:{},newNum:{},newDataSource:{}", oldNum,oldDataSource,newNum,newDataSource);
-
-            String newVideos = plusExt.getVideos();
-            if(StrUtil.isNotEmpty(newVideos)){
-                newVideos = plusExt.getVideos().replaceAll("/data/data" + oldNum, "/scene_view_data/" + newNum + "/data").replaceAll(oldNum, newNum);
-            }
-            plusExt.setId(null);
-            plusExt.setPlusId(scenePlus.getId());
-            plusExt.setDataSource(newDataSource);
-            plusExt.setWebSite(plusExt.getWebSite().replace(oldNum, newNum));
-            plusExt.setThumb(plusExt.getThumb().replace(oldNum, newNum));
-            plusExt.setVideos(newVideos);
-            plusExt.setViewCount(0);
-            scenePlusExtService.save(plusExt);
-
-            SceneEditInfo sceneEditInfo = sceneEditInfoService.getByScenePlusId(plusId);
-            Long sceneEditInfoId = sceneEditInfo.getId();
-
-            sceneEditInfo.setId(null);
-            sceneEditInfo.setScenePlusId(scenePlus.getId());
-            sceneEditInfo.setSceneProId(null);
-            sceneEditInfo.setTitle(scenePlus.getTitle());
-            sceneEditInfoService.save(sceneEditInfo);
-
-            SceneEditInfoExt sceneEditInfoExt = sceneEditInfoExtService.getByEditInfoId(sceneEditInfoId);
-            sceneEditInfoExt.setId(null);
-            sceneEditInfoExt.setEditInfoId(sceneEditInfo.getId());
-            sceneEditInfoExt.setScenePlusId(scenePlus.getId());
-            sceneEditInfoExt.setSceneProId(null);
-            sceneEditInfoExtService.save(sceneEditInfoExt);
-
-            SceneEditControls sceneEditControls = sceneEditControlsService.getBySceneEditId(sceneEditInfoId);
-            sceneEditControls.setId(null);
-            sceneEditControls.setEditInfoId(sceneEditInfo.getId());
-            sceneEditControlsService.save(sceneEditControls);
-
-            List<Surveillance> list = surveillanceService.list(new LambdaQueryWrapper<Surveillance>().eq(Surveillance::getNum, oldNum));
-            if (!Objects.isNull(list)) {
-                list.stream().forEach(item -> {
-                    item.setNum(newNum);
-                    item.setId(null);
-                    surveillanceService.save(item);
-                });
-            }
-
-            if(scenePlus.getSceneSource() == 4 || scenePlus.getSceneSource() == 5){  //深时复制
-                laserService.copy(oldNum,newNum,newDataSource,true);
-            }else {
-                laserService.cloudPointBuild(oldNum,newNum);
-            }
-
-            //重新生成编辑页基础设置二维码
-            this.createNewQrCode(SceneVersionType.V4.code(),sceneEditInfoExt.getShareLogoImg(),newNum,plusExt.getWebSite());
-            //copyDataSource
-            //cn.hutool.core.io.FileUtil.copyContent(new File(oldDataSource),new File(newDataSource),true);
-
-            this.copyOssAndNasV4(oldNum,newNum);
-
-            //修改 oss status.json ,nas scene.json
-            String targetData = String.format(SceneResourcePath.DATA_VIEW_PATH,newNum);
-            this.updateOssJson(targetData,oldNum,newNum,"status.json");
-
-            this.updateNasSceneJson(targetData,oldNum,newNum,scenePlus.getTitle(),"v4","scene.json");
-
-            if(scenePlus.getSceneSource() == 4 || scenePlus.getSceneSource() == 5){  //深时复制
-                laserService.copy(oldNum,newNum,newDataSource,false);
-            }else {
-                scenePlus.setSceneStatus(-2);
-                scenePlusService.updateById(scenePlus);
-                sendMq(oldNum,newNum);
-            }
-        }catch (Exception e){
-            log.error("copy-V4-error-oldNum:{},newNum:{}",oldNum,newNum,e);
-            scenePlus.setSceneStatus(-1);
-            scenePlusService.updateById(scenePlus);
-        }
-
-    }
-
-    private void cpV3(ScenePro scenePro ,String oldNum,String newNum) {
-        try {
-            Long sceneProId = scenePro.getId();
-            scenePro.setNum(newNum);
-            scenePro.setId(null);
-            scenePro.setSceneName(scenePro.getSceneName() +"(copy)");
-            scenePro.setViewCount(0);
-            scenePro.setThumb(scenePro.getThumb().replaceAll(oldNum,scenePro.getNum()));
-            scenePro.setWebSite(scenePro.getWebSite().replaceAll(oldNum,scenePro.getNum()));
-            scenePro.setStatus(0);
-            sceneProService.save(scenePro);
-
-            this.saveFolder(sceneProId,scenePro.getId());
-
-            String oldDataSource = scenePro.getDataSource();
-            String newDataSource = this.getNewDataSource(oldDataSource);
-            if(StringUtils.isBlank(newDataSource)){
-                log.info("cpv3-error-newDataSource为空:{}",newDataSource);
-                return;
-            }
-            log.info("sceneCopy-v3-oldNum:{},oldDataSource:{},newNum:{},newDataSource:{}", oldNum,oldDataSource,newNum,newDataSource);
-            scenePro.setDataSource(newDataSource);
-
-            SceneProEdit oldEditScene = sceneProEditService.getByProId(sceneProId);
-            oldEditScene.setId(null);
-            oldEditScene.setProId(scenePro.getId());
-            oldEditScene.setScreencapVoiceSrc(oldEditScene.getScreencapVoiceSrc() == null ? null : oldEditScene.getScreencapVoiceSrc().replace(oldNum, scenePro.getNum()));
-            oldEditScene.setScreencapVoiceSound(oldEditScene.getScreencapVoiceSound() == null ? null : oldEditScene.getScreencapVoiceSound().replace(oldNum, scenePro.getNum()));
-            oldEditScene.setScreencapVoiceSoundsync(oldEditScene.getScreencapVoiceSoundsync() == null ? null : oldEditScene.getScreencapVoiceSoundsync().replace(oldNum, scenePro.getNum()));
-            oldEditScene.setPlayData(oldEditScene.getPlayData() == null ? null : oldEditScene.getPlayData().replace(oldNum, scenePro.getNum()));
-            oldEditScene.setScreencapThumb(oldEditScene.getScreencapThumb() == null ? null : oldEditScene.getScreencapThumb().replace(oldNum, scenePro.getNum()));
-            oldEditScene.setFloorPlanPng(oldEditScene.getFloorPlanPng() == null ? null : oldEditScene.getFloorPlanPng().replace(oldNum, scenePro.getNum()));
-            sceneProEditService.save(oldEditScene);
-
-            if(scenePro.getSceneSource() == 4 || scenePro.getSceneSource() == 5) {  //深时复制
-                laserService.copy(oldNum,newNum,newDataSource,true);
-            }
-            //重新生成编辑页基础设置二维码
-            this.createNewQrCode(SceneVersionType.V3.code(),oldEditScene.getShareLogo(),newNum,scenePro.getWebSite());
-            //copyDataSource
-            // cn.hutool.core.io.FileUtil.copyContent(new File(oldDataSource),new File(newDataSource),true);
-            String sourceData = String.format(SceneResourcePath.dataPath, oldNum);
-            String targetData = String.format(SceneResourcePath.dataPath, scenePro.getNum());
-            this.copyOssAndNasV3(oldNum,scenePro.getNum(),sourceData,targetData);
-            //修改 oss status.json ,nas scene.json
-            this.updateOssJson(targetData,oldNum,newNum,"status.json");
-            this.updateOssJson(targetData,oldNum,newNum,"hot.json");
-            this.updateNasSceneJson(targetData,oldNum,newNum,scenePro.getSceneName(),"v3","scene.json");
-            this.updateNasSceneJson(targetData,oldNum,newNum,scenePro.getSceneName(),"v3","hot.json");
-
-            String sourceImages = String.format(SceneResourcePath.imagesPath, oldNum);
-            String targetImages = String.format(SceneResourcePath.imagesPath, scenePro.getNum());
-            this.copyOssAndNasV3(oldNum,scenePro.getNum(),sourceImages,targetImages);
-
-            String sourceVideo = String.format(SceneResourcePath.videoPath, oldNum);
-            String targetVideo = String.format(SceneResourcePath.videoPath, scenePro.getNum());
-            this.copyOssAndNasV3(oldNum,scenePro.getNum(),sourceVideo,targetVideo);
-
-            String sourceVoice = String.format(SceneResourcePath.voicePath, oldNum);
-            String targetVoice = String.format(SceneResourcePath.voicePath, scenePro.getNum());
-            this.copyOssAndNasV3(oldNum,scenePro.getNum(),sourceVoice,targetVoice);
-
-            if(scenePro.getSceneSource() == 4 || scenePro.getSceneSource() == 5){  //深时复制
-                laserService.copy(oldNum,newNum,newDataSource,false);
-            }else {
-                scenePro.setStatus(-2);
-                sceneProService.updateById(scenePro);
-                sendMq(oldNum,newNum);
-            }
-        }catch (Exception e){
-            log.info("cpv3-error:{},{}",oldNum,newNum,e);
-            scenePro.setStatus(-1);
-            sceneProService.updateById(scenePro);
-        }
-
-    }
-
-    private void saveFolder(Long oldSceneId,Long newSceneId) {
-        FolderScene folderScene = folderSceneService.getByType(oldSceneId, null);
-        if(folderScene!= null){
-            folderScene.setId(null);
-            folderScene.setSceneId(newSceneId);
-            folderSceneService.save(folderScene);
-        }
-    }
-
-
-    @Value("${queue.scene.copy.result:ucenter-copy-scene-result}")
-    private String ucenterCpResultQueue;
-
-    private void sendMq(String oldNum, String newNum) {
-        HashMap<String,Object> map = new HashMap<>();
-        map.put("oldNum",oldNum);
-        map.put("newNum",newNum);
-        rabbitMqProducer.sendByWorkQueue(ucenterCpResultQueue,map);
-    }
-
-
-
-    public String getNewDataSource(String oldDataSource){
-
-        String newDataSource = null;
-        if(StringUtils.isBlank(oldDataSource)){
-            log.info("oldDataSource为空:{}",oldDataSource);
-            return null;
-        }
-        if(!oldDataSource.contains("/")){
-            log.info("oldDataSource格式错误:{}",oldDataSource);
-            return null;
-        }
-
-        String time = com.fdkankan.common.util.DateUtil.date2String(new Date(), com.fdkankan.common.util.DateUtil.YYYYMMDDHHMMSSSSS_DATA_FORMAT);
-        String[] split = oldDataSource.split("/");
-        if(split.length == 6 ){
-            String oldFileId = split[4];
-            Long fileId = new SnowflakeIdGenerator(1,1).nextId();
-            newDataSource = oldDataSource.replace(oldFileId,fileId.toString());
-
-            String snCodeTime = split[5];
-            if(!snCodeTime.contains("_") || snCodeTime.split("_").length <= 1){
-                log.info("oldDataSource格式错误:{}",oldDataSource);
-            }
-            newDataSource = newDataSource.replace(snCodeTime.split("_")[1],time);
-            //this.copyFdage(oldDataSource,newDataSource,time);
-        }
-        if(newDataSource == null){
-            log.info("newDataSource格式错误:{}",newDataSource);
-        }
-        return newDataSource;
-    }
-
-
-    public  void createNewQrCode(String sceneVersion,String logoPath ,String newNum, String webSite){
-        String localLogoPath = null;
-        try {
-            if(StringUtils.isNotBlank(logoPath)){
-                if(sceneVersion.equals(SceneVersionType.V3.code())){
-                    localLogoPath = SceneResourcePath.nasBasePath + logoPath;
-                }else{
-                    localLogoPath = SceneResourcePath.qrCodeBasePath + newNum +"/logo/logo.png";
-                    fYunFileServiceInterface.downloadFile(logoPath,localLogoPath);
-                }
-            }
-            String outPathZh = SceneResourcePath.qrCodeBasePath + newNum + ".png";
-            String outPathEn = SceneResourcePath.qrCodeBasePath + newNum + "_en.png";
-            QrConfig qrConfig = QrConfig.create();
-            qrConfig.setWidth(1024);
-            qrConfig.setHeight(1024);
-            if(!ObjectUtils.isEmpty(localLogoPath)){
-                qrConfig.setImg(localLogoPath);
-            }
-            QrCodeUtil.generate(webSite, qrConfig, FileUtil.file(outPathZh));
-            QrCodeUtil.generate(webSite + "&lang=en", qrConfig, FileUtil.file(outPathEn));
-
-            fYunFileServiceInterface.uploadFile(outPathZh, String.format(SceneResourcePath.DOWNLOADS_QRCODE, newNum) + newNum + ".png");
-            fYunFileServiceInterface.uploadFile(outPathEn, String.format(SceneResourcePath.DOWNLOADS_QRCODE, newNum) + newNum + "_en.png");
-        }catch (Exception e){
-            log.info("copy-scene-error:{},newNum:{},error:{}",newNum,e);
-        }
-
-    }
-
-
-    public void updateNasSceneJson(String targetPath, String oldNum, String newNum,String newSceneName,String sceneVersion,String fileName) {
-        String fileContent = null;
-        if("v3".equals(sceneVersion)){
-            String localPath = SceneResourcePath.nasBasePath + targetPath + "/" + fileName;
-            File file = new File(localPath);
-            if(!file.exists()){
-                log.error("sceneCopy-error--localFileExist:localPath:{},oldNum:{},newNum:{}",localPath,oldNum,newNum);
-                return;
-            }
-            fileContent = FileUtil.readUtf8String(file);
-        }
-        if("v4".equals(sceneVersion)){
-            String ossStatusJsonPath =  targetPath + "/" + fileName;
-            if(!fYunFileServiceInterface.fileExist(ossStatusJsonPath)){
-                log.error("sceneCopy-error--ossFileExist:targetPath:{},oldNum:{},newNum:{}",ossStatusJsonPath,oldNum,newNum);
-                return;
-            }
-            fileContent = fYunFileServiceInterface.getFileContent(ossStatusJsonPath);
-        }
-
-        if(StringUtils.isNotBlank(fileContent)){
-            //v3编辑器使用
-            String localPath = SceneResourcePath.nasBasePath + targetPath +"/" + fileName;
-            File file = new File(localPath);
-            if(!file.getParentFile().exists()){
-                file.getParentFile().mkdirs();
-            }
-            String newJson = fileContent.replaceAll(oldNum,newNum);
-            try {
-                if("v3".equals(sceneVersion)){
-                    if(fileName.contains("scene.json")){
-                        JSONObject jsonObject = JSONObject.parseObject(newJson);
-                        jsonObject.put("sceneName",newSceneName);
-                        FileUtils.writeFile(localPath ,jsonObject.toJSONString());
-                        String sceneJsonPath = String.format(SceneResourcePath.dataPath+"/"+fileName, newNum);
-                        fYunFileServiceInterface.uploadFile(localPath, sceneJsonPath);
-                    }else {
-                        FileUtils.writeFile(localPath ,newJson);
-                    }
-
-                }
-                if("v4".equals(sceneVersion)){
-                    JSONObject jsonObject = JSONObject.parseObject(newJson);
-                    jsonObject.put("title",newSceneName);
-                    jsonObject.put("dynamicPanel",0);
-                    FileUtils.writeFile(localPath, jsonObject.toJSONString());
-
-                    String sceneJsonPath = String.format(SceneResourcePath.DATA_VIEW_PATH+"/" + fileName, newNum);
-                    fYunFileServiceInterface.uploadFile(localPath, sceneJsonPath);
-
-                    //修改图片名称
-                    String filePath = String.format(SceneResourcePath.USER_VIEW_PATH, newNum) ;
-                    List<String> files = fYunFileServiceInterface.listRemoteFiles(filePath);
-                    for (String ossFilePath : files) {
-                        if(ossFilePath.contains(oldNum)){
-                            String oldName = ossFilePath;
-                            ossFilePath = ossFilePath.replace(oldNum,newNum);
-                            fYunFileServiceInterface.copyFileInBucket(oldName,ossFilePath);
-                            fYunFileServiceInterface.deleteFile(oldName);
-                        }
-                    }
-                    String dynamicViewPath = String.format(SceneResourcePath.DYNAMIC_VIEW_PATH, newNum);
-                    String dynamicEditPath = String.format(SceneResourcePath.DYNAMIC_EDIT_PATH, newNum);
-                    if(fYunFileServiceInterface.fileExist(dynamicViewPath)){
-                        fYunFileServiceInterface.deleteFile(dynamicViewPath);
-                    }
-                    if(fYunFileServiceInterface.fileExist(dynamicEditPath)){
-                        fYunFileServiceInterface.deleteFile(dynamicEditPath);
-                    }
-
-                }
-            }catch (Exception e){
-                log.error("writeFile-error:{}",e);
-            }
-
-        }
-
-    }
-
-
-    public void updateOssJson(String targetPath,String oldNum, String newNum,String fileName) {
-        String ossStatusJsonPath =  targetPath + "/" + fileName;
-
-        if(!fYunFileServiceInterface.fileExist(ossStatusJsonPath)){
-            log.error("sceneCopy-error--ossFileExist:targetPath:{},oldNum:{},newNum:{}",ossStatusJsonPath,oldNum,newNum);
-            return;
-        }
-        String localPath = SceneResourcePath.nasBasePath + ossStatusJsonPath;
-        File file = new File(localPath);
-        if(!file.getParentFile().exists()){
-            file.getParentFile().mkdirs();
-        }
-        String fileContent = fYunFileServiceInterface.getFileContent(ossStatusJsonPath);
-        if(StringUtils.isNotBlank(fileContent)){
-            String newJson = fileContent.replaceAll(oldNum,newNum);
-            try {
-                FileUtils.writeFile(localPath, newJson);
-                fYunFileServiceInterface.uploadFile(localPath,ossStatusJsonPath);
-            }catch (Exception e){
-                log.error("writeFile-error:{}",e);
-            }
-        }
-
-    }
-
-    private void copyOssAndNasV3(String oldNum ,String newNum ,String sourcePath,String targetPath){
-        log.info("sceneCopy-ossSource-oldNum:{},newNum:{},sourcePath:{},targetPath:{}",oldNum,newNum,sourcePath,targetPath);
-        fYunFileServiceInterface.copyFileInBucket(sourcePath,targetPath);
-        File fileData = new File(SceneResourcePath.nasBasePath + sourcePath);
-        if(fileData.exists()){
-            if(targetPath.contains("images")){
-                this.delLink(fileData.getPath());
-            }
-            cn.hutool.core.io.FileUtil.copyContent(fileData,new File(SceneResourcePath.nasBasePath + targetPath),true);
-        }
-    }
-    private  void copyOssAndNasV4(String oldNum,String newNum){
-        // 拷贝场景编辑资源
-        String oldEditPath = String.format(SceneResourcePath.EDIT_PATH_v4, oldNum);
-        String newEditPath = String.format(SceneResourcePath.EDIT_PATH_v4, newNum);
-        fYunFileServiceInterface.copyFileInBucket(oldEditPath, newEditPath);
-
-        // 拷贝场景展示资源
-        String oldViewPath = String.format(SceneResourcePath.VIEW_PATH_v4, oldNum);
-        String newViewPath = String.format(SceneResourcePath.VIEW_PATH_v4, newNum);
-        fYunFileServiceInterface.copyFileInBucket(oldViewPath, newViewPath);
-
-        //复制计算结果文件
-        String oldResultPath = String.format(SceneResourcePath.SCENE_RESULT_DATA_PATH, oldNum);
-        String newResultPath = String.format(SceneResourcePath.SCENE_RESULT_DATA_PATH, newNum);
-        fYunFileServiceInterface.copyFileInBucket(oldResultPath, newResultPath);
-
-        // 拷贝本地资源
-        String oldPath = SceneResourcePath.nasBasePath + oldNum;
-        String newPath = SceneResourcePath.nasBasePath + newNum;
-        if(new File(oldPath).exists()){
-            FileUtil.copyContent(new File(oldPath), new File(newPath),true);
-        }
-        String oldPath_v4 = SceneResourcePath.nasBasePath_v4 + oldNum;
-        String newPath_v4 = SceneResourcePath.nasBasePath_v4 + newNum;
-        if(new File(oldPath_v4).exists()){
-            FileUtil.copyContent(new File(oldPath_v4), new File(newPath_v4),true);
-        }
-    }
-
-
-    public void delLink(String path) {
-        String panPath = path +"/panorama";
-        File file = new File(panPath);
-        if(file.exists()){
-            File[] files = file.listFiles();
-            if(files == null || files.length == 0){
-                return;
-            }
-            for (File file1 : files) {
-                String linkPath =file1.getPath() + "/capture";
-                log.info("delLink--filePath:{}",linkPath);
-                org.apache.commons.io.FileUtils.deleteQuietly(new File(linkPath));
-            }
-        }
-    }
-
-}
+//package com.fdkankan.scene.service.impl;
+//
+//import cn.hutool.core.io.FileUtil;
+//import cn.hutool.core.util.StrUtil;
+//import cn.hutool.extra.qrcode.QrCodeUtil;
+//import cn.hutool.extra.qrcode.QrConfig;
+//import com.alibaba.fastjson.JSONObject;
+//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+//import com.fdkankan.common.constant.SceneVersionType;
+//import com.fdkankan.common.exception.BusinessException;
+//import com.fdkankan.common.util.FileUtils;
+//import com.fdkankan.common.util.SnowflakeIdGenerator;
+//import com.fdkankan.scene.entity.*;
+//import com.fdkankan.scene.mq.consumer.SceneResourcePath;
+//import com.fdkankan.scene.service.*;
+//import lombok.extern.slf4j.Slf4j;
+//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.stereotype.Service;
+//
+//import java.io.File;
+//import java.util.*;
+//
+//@Service
+//@Slf4j
+//public class SceneCopyServiceImpl implements ISceneCopyService {
+//
+//    @Autowired
+//    ISceneProService sceneProService;
+//    @Autowired
+//    ISceneProEditService sceneProEditService;
+//    @Autowired
+//    IScenePlusService scenePlusService;
+//    @Autowired
+//    IScenePlusExtService scenePlusExtService;
+//    @Autowired
+//    ISceneEditInfoService sceneEditInfoService;
+//    @Autowired
+//    ISceneEditInfoExtService sceneEditInfoExtService;
+//    @Autowired
+//    ISceneEditControlsService sceneEditControlsService;
+//    @Autowired
+//    ISurveillanceService surveillanceService;
+//    @Autowired
+//    IFolderSceneService folderSceneService;
+//
+//    @Autowired
+//    ILaserService laserService;
+////    @Autowired
+////    FYunFileServiceInterface fYunFileServiceInterface;
+////    @Autowired
+////    RabbitMqProducer rabbitMqProducer;
+//    @Override
+//    public void copyScene(String oldNum, String newNum) {
+//        ScenePro scenePro = sceneProService.getByNum(oldNum);
+//        if(scenePro != null && scenePro.getIsUpgrade() == 0){
+//            cpV3(scenePro,oldNum,newNum);
+//        }
+//        ScenePlus scenePlus = scenePlusService.getScenePlusByNum(oldNum);
+//        if(scenePlus != null){
+//            cpV4(scenePlus,oldNum,newNum);
+//        }
+//    }
+//
+//    private void cpV4(ScenePlus scenePlus, String oldNum, String newNum) {
+//        try {
+//            Long plusId = scenePlus.getId();
+//            ScenePlusExt plusExt = scenePlusExtService.getScenePlusExtByPlusId(plusId);
+//            if(plusExt == null){
+//                return;
+//            }
+//            scenePlus.setNum(newNum);
+//            scenePlus.setTitle(scenePlus.getTitle() +"(copy)");
+//            scenePlus.setSceneStatus(0);
+//            scenePlus.setId(null);
+//            scenePlusService.save(scenePlus);
+//
+//            this.saveFolder(plusId,scenePlus.getId());
+//
+//            String oldDataSource = plusExt.getDataSource();
+//            String newDataSource = this.getNewDataSource(oldDataSource);
+//            log.info("sceneCopy-V4-oldNum:{},oldDataSource:{},newNum:{},newDataSource:{}", oldNum,oldDataSource,newNum,newDataSource);
+//
+//            String newVideos = plusExt.getVideos();
+//            if(StrUtil.isNotEmpty(newVideos)){
+//                newVideos = plusExt.getVideos().replaceAll("/data/data" + oldNum, "/scene_view_data/" + newNum + "/data").replaceAll(oldNum, newNum);
+//            }
+//            plusExt.setId(null);
+//            plusExt.setPlusId(scenePlus.getId());
+//            plusExt.setDataSource(newDataSource);
+//            plusExt.setWebSite(plusExt.getWebSite().replace(oldNum, newNum));
+//            plusExt.setThumb(plusExt.getThumb().replace(oldNum, newNum));
+//            plusExt.setVideos(newVideos);
+//            plusExt.setViewCount(0);
+//            scenePlusExtService.save(plusExt);
+//
+//            SceneEditInfo sceneEditInfo = sceneEditInfoService.getByScenePlusId(plusId);
+//            Long sceneEditInfoId = sceneEditInfo.getId();
+//
+//            sceneEditInfo.setId(null);
+//            sceneEditInfo.setScenePlusId(scenePlus.getId());
+//            sceneEditInfo.setSceneProId(null);
+//            sceneEditInfo.setTitle(scenePlus.getTitle());
+//            sceneEditInfoService.save(sceneEditInfo);
+//
+//            SceneEditInfoExt sceneEditInfoExt = sceneEditInfoExtService.getByEditInfoId(sceneEditInfoId);
+//            sceneEditInfoExt.setId(null);
+//            sceneEditInfoExt.setEditInfoId(sceneEditInfo.getId());
+//            sceneEditInfoExt.setScenePlusId(scenePlus.getId());
+//            sceneEditInfoExt.setSceneProId(null);
+//            sceneEditInfoExtService.save(sceneEditInfoExt);
+//
+//            SceneEditControls sceneEditControls = sceneEditControlsService.getBySceneEditId(sceneEditInfoId);
+//            sceneEditControls.setId(null);
+//            sceneEditControls.setEditInfoId(sceneEditInfo.getId());
+//            sceneEditControlsService.save(sceneEditControls);
+//
+//            List<Surveillance> list = surveillanceService.list(new LambdaQueryWrapper<Surveillance>().eq(Surveillance::getNum, oldNum));
+//            if (!Objects.isNull(list)) {
+//                list.stream().forEach(item -> {
+//                    item.setNum(newNum);
+//                    item.setId(null);
+//                    surveillanceService.save(item);
+//                });
+//            }
+//
+//            if(scenePlus.getSceneSource() == 4 || scenePlus.getSceneSource() == 5){  //深时复制
+//                laserService.copy(oldNum,newNum,newDataSource,true);
+//            }else {
+//                laserService.cloudPointBuild(oldNum,newNum);
+//            }
+//
+//            //重新生成编辑页基础设置二维码
+//            this.createNewQrCode(SceneVersionType.V4.code(),sceneEditInfoExt.getShareLogoImg(),newNum,plusExt.getWebSite());
+//            //copyDataSource
+//            //cn.hutool.core.io.FileUtil.copyContent(new File(oldDataSource),new File(newDataSource),true);
+//
+//            this.copyOssAndNasV4(oldNum,newNum);
+//
+//            //修改 oss status.json ,nas scene.json
+//            String targetData = String.format(SceneResourcePath.DATA_VIEW_PATH,newNum);
+//            this.updateOssJson(targetData,oldNum,newNum,"status.json");
+//
+//            this.updateNasSceneJson(targetData,oldNum,newNum,scenePlus.getTitle(),"v4","scene.json");
+//
+//            if(scenePlus.getSceneSource() == 4 || scenePlus.getSceneSource() == 5){  //深时复制
+//                laserService.copy(oldNum,newNum,newDataSource,false);
+//            }else {
+//                scenePlus.setSceneStatus(-2);
+//                scenePlusService.updateById(scenePlus);
+//                sendMq(oldNum,newNum);
+//            }
+//        }catch (Exception e){
+//            log.error("copy-V4-error-oldNum:{},newNum:{}",oldNum,newNum,e);
+//            scenePlus.setSceneStatus(-1);
+//            scenePlusService.updateById(scenePlus);
+//        }
+//
+//    }
+//
+//    private void cpV3(ScenePro scenePro ,String oldNum,String newNum) {
+//        try {
+//            Long sceneProId = scenePro.getId();
+//            scenePro.setNum(newNum);
+//            scenePro.setId(null);
+//            scenePro.setSceneName(scenePro.getSceneName() +"(copy)");
+//            scenePro.setViewCount(0);
+//            scenePro.setThumb(scenePro.getThumb().replaceAll(oldNum,scenePro.getNum()));
+//            scenePro.setWebSite(scenePro.getWebSite().replaceAll(oldNum,scenePro.getNum()));
+//            scenePro.setStatus(0);
+//            sceneProService.save(scenePro);
+//
+//            this.saveFolder(sceneProId,scenePro.getId());
+//
+//            String oldDataSource = scenePro.getDataSource();
+//            String newDataSource = this.getNewDataSource(oldDataSource);
+//            if(StringUtils.isBlank(newDataSource)){
+//                log.info("cpv3-error-newDataSource为空:{}",newDataSource);
+//                return;
+//            }
+//            log.info("sceneCopy-v3-oldNum:{},oldDataSource:{},newNum:{},newDataSource:{}", oldNum,oldDataSource,newNum,newDataSource);
+//            scenePro.setDataSource(newDataSource);
+//
+//            SceneProEdit oldEditScene = sceneProEditService.getByProId(sceneProId);
+//            oldEditScene.setId(null);
+//            oldEditScene.setProId(scenePro.getId());
+//            oldEditScene.setScreencapVoiceSrc(oldEditScene.getScreencapVoiceSrc() == null ? null : oldEditScene.getScreencapVoiceSrc().replace(oldNum, scenePro.getNum()));
+//            oldEditScene.setScreencapVoiceSound(oldEditScene.getScreencapVoiceSound() == null ? null : oldEditScene.getScreencapVoiceSound().replace(oldNum, scenePro.getNum()));
+//            oldEditScene.setScreencapVoiceSoundsync(oldEditScene.getScreencapVoiceSoundsync() == null ? null : oldEditScene.getScreencapVoiceSoundsync().replace(oldNum, scenePro.getNum()));
+//            oldEditScene.setPlayData(oldEditScene.getPlayData() == null ? null : oldEditScene.getPlayData().replace(oldNum, scenePro.getNum()));
+//            oldEditScene.setScreencapThumb(oldEditScene.getScreencapThumb() == null ? null : oldEditScene.getScreencapThumb().replace(oldNum, scenePro.getNum()));
+//            oldEditScene.setFloorPlanPng(oldEditScene.getFloorPlanPng() == null ? null : oldEditScene.getFloorPlanPng().replace(oldNum, scenePro.getNum()));
+//            sceneProEditService.save(oldEditScene);
+//
+//            if(scenePro.getSceneSource() == 4 || scenePro.getSceneSource() == 5) {  //深时复制
+//                laserService.copy(oldNum,newNum,newDataSource,true);
+//            }
+//            //重新生成编辑页基础设置二维码
+//            this.createNewQrCode(SceneVersionType.V3.code(),oldEditScene.getShareLogo(),newNum,scenePro.getWebSite());
+//            //copyDataSource
+//            // cn.hutool.core.io.FileUtil.copyContent(new File(oldDataSource),new File(newDataSource),true);
+//            String sourceData = String.format(SceneResourcePath.dataPath, oldNum);
+//            String targetData = String.format(SceneResourcePath.dataPath, scenePro.getNum());
+//            this.copyOssAndNasV3(oldNum,scenePro.getNum(),sourceData,targetData);
+//            //修改 oss status.json ,nas scene.json
+//            this.updateOssJson(targetData,oldNum,newNum,"status.json");
+//            this.updateOssJson(targetData,oldNum,newNum,"hot.json");
+//            this.updateNasSceneJson(targetData,oldNum,newNum,scenePro.getSceneName(),"v3","scene.json");
+//            this.updateNasSceneJson(targetData,oldNum,newNum,scenePro.getSceneName(),"v3","hot.json");
+//
+//            String sourceImages = String.format(SceneResourcePath.imagesPath, oldNum);
+//            String targetImages = String.format(SceneResourcePath.imagesPath, scenePro.getNum());
+//            this.copyOssAndNasV3(oldNum,scenePro.getNum(),sourceImages,targetImages);
+//
+//            String sourceVideo = String.format(SceneResourcePath.videoPath, oldNum);
+//            String targetVideo = String.format(SceneResourcePath.videoPath, scenePro.getNum());
+//            this.copyOssAndNasV3(oldNum,scenePro.getNum(),sourceVideo,targetVideo);
+//
+//            String sourceVoice = String.format(SceneResourcePath.voicePath, oldNum);
+//            String targetVoice = String.format(SceneResourcePath.voicePath, scenePro.getNum());
+//            this.copyOssAndNasV3(oldNum,scenePro.getNum(),sourceVoice,targetVoice);
+//
+//            if(scenePro.getSceneSource() == 4 || scenePro.getSceneSource() == 5){  //深时复制
+//                laserService.copy(oldNum,newNum,newDataSource,false);
+//            }else {
+//                scenePro.setStatus(-2);
+//                sceneProService.updateById(scenePro);
+//                sendMq(oldNum,newNum);
+//            }
+//        }catch (Exception e){
+//            log.info("cpv3-error:{},{}",oldNum,newNum,e);
+//            scenePro.setStatus(-1);
+//            sceneProService.updateById(scenePro);
+//        }
+//
+//    }
+//
+//    private void saveFolder(Long oldSceneId,Long newSceneId) {
+//        FolderScene folderScene = folderSceneService.getByType(oldSceneId, null);
+//        if(folderScene!= null){
+//            folderScene.setId(null);
+//            folderScene.setSceneId(newSceneId);
+//            folderSceneService.save(folderScene);
+//        }
+//    }
+//
+//
+//    @Value("${queue.scene.copy.result:ucenter-copy-scene-result}")
+//    private String ucenterCpResultQueue;
+//
+//    private void sendMq(String oldNum, String newNum) {
+//        HashMap<String,Object> map = new HashMap<>();
+//        map.put("oldNum",oldNum);
+//        map.put("newNum",newNum);
+//        rabbitMqProducer.sendByWorkQueue(ucenterCpResultQueue,map);
+//    }
+//
+//
+//
+//    public String getNewDataSource(String oldDataSource){
+//
+//        String newDataSource = null;
+//        if(StringUtils.isBlank(oldDataSource)){
+//            log.info("oldDataSource为空:{}",oldDataSource);
+//            return null;
+//        }
+//        if(!oldDataSource.contains("/")){
+//            log.info("oldDataSource格式错误:{}",oldDataSource);
+//            return null;
+//        }
+//
+//        String time = com.fdkankan.common.util.DateUtil.date2String(new Date(), com.fdkankan.common.util.DateUtil.YYYYMMDDHHMMSSSSS_DATA_FORMAT);
+//        String[] split = oldDataSource.split("/");
+//        if(split.length == 6 ){
+//            String oldFileId = split[4];
+//            Long fileId = new SnowflakeIdGenerator(1,1).nextId();
+//            newDataSource = oldDataSource.replace(oldFileId,fileId.toString());
+//
+//            String snCodeTime = split[5];
+//            if(!snCodeTime.contains("_") || snCodeTime.split("_").length <= 1){
+//                log.info("oldDataSource格式错误:{}",oldDataSource);
+//            }
+//            newDataSource = newDataSource.replace(snCodeTime.split("_")[1],time);
+//            //this.copyFdage(oldDataSource,newDataSource,time);
+//        }
+//        if(newDataSource == null){
+//            log.info("newDataSource格式错误:{}",newDataSource);
+//        }
+//        return newDataSource;
+//    }
+//
+//
+//    public  void createNewQrCode(String sceneVersion,String logoPath ,String newNum, String webSite){
+//        String localLogoPath = null;
+//        try {
+//            if(StringUtils.isNotBlank(logoPath)){
+//                if(sceneVersion.equals(SceneVersionType.V3.code())){
+//                    localLogoPath = SceneResourcePath.nasBasePath + logoPath;
+//                }else{
+//                    localLogoPath = SceneResourcePath.qrCodeBasePath + newNum +"/logo/logo.png";
+//                    fYunFileServiceInterface.downloadFile(logoPath,localLogoPath);
+//                }
+//            }
+//            String outPathZh = SceneResourcePath.qrCodeBasePath + newNum + ".png";
+//            String outPathEn = SceneResourcePath.qrCodeBasePath + newNum + "_en.png";
+//            QrConfig qrConfig = QrConfig.create();
+//            qrConfig.setWidth(1024);
+//            qrConfig.setHeight(1024);
+//            if(!ObjectUtils.isEmpty(localLogoPath)){
+//                qrConfig.setImg(localLogoPath);
+//            }
+//            QrCodeUtil.generate(webSite, qrConfig, FileUtil.file(outPathZh));
+//            QrCodeUtil.generate(webSite + "&lang=en", qrConfig, FileUtil.file(outPathEn));
+//
+//            fYunFileServiceInterface.uploadFile(outPathZh, String.format(SceneResourcePath.DOWNLOADS_QRCODE, newNum) + newNum + ".png");
+//            fYunFileServiceInterface.uploadFile(outPathEn, String.format(SceneResourcePath.DOWNLOADS_QRCODE, newNum) + newNum + "_en.png");
+//        }catch (Exception e){
+//            log.info("copy-scene-error:{},newNum:{},error:{}",newNum,e);
+//        }
+//
+//    }
+//
+//
+//    public void updateNasSceneJson(String targetPath, String oldNum, String newNum,String newSceneName,String sceneVersion,String fileName) {
+//        String fileContent = null;
+//        if("v3".equals(sceneVersion)){
+//            String localPath = SceneResourcePath.nasBasePath + targetPath + "/" + fileName;
+//            File file = new File(localPath);
+//            if(!file.exists()){
+//                log.error("sceneCopy-error--localFileExist:localPath:{},oldNum:{},newNum:{}",localPath,oldNum,newNum);
+//                return;
+//            }
+//            fileContent = FileUtil.readUtf8String(file);
+//        }
+//        if("v4".equals(sceneVersion)){
+//            String ossStatusJsonPath =  targetPath + "/" + fileName;
+////            if(!fYunFileServiceInterface.fileExist(ossStatusJsonPath)){
+////                log.error("sceneCopy-error--ossFileExist:targetPath:{},oldNum:{},newNum:{}",ossStatusJsonPath,oldNum,newNum);
+////                return;
+////            }
+////            fileContent = fYunFileServiceInterface.getFileContent(ossStatusJsonPath);
+//        }
+//
+//        if(StringUtils.isNotBlank(fileContent)){
+//            //v3编辑器使用
+//            String localPath = SceneResourcePath.nasBasePath + targetPath +"/" + fileName;
+//            File file = new File(localPath);
+//            if(!file.getParentFile().exists()){
+//                file.getParentFile().mkdirs();
+//            }
+//            String newJson = fileContent.replaceAll(oldNum,newNum);
+//            try {
+//                if("v3".equals(sceneVersion)){
+//                    if(fileName.contains("scene.json")){
+//                        JSONObject jsonObject = JSONObject.parseObject(newJson);
+//                        jsonObject.put("sceneName",newSceneName);
+//                        FileUtils.writeFile(localPath ,jsonObject.toJSONString());
+//                        String sceneJsonPath = String.format(SceneResourcePath.dataPath+"/"+fileName, newNum);
+////                        fYunFileServiceInterface.uploadFile(localPath, sceneJsonPath);
+//                    }else {
+//                        FileUtils.writeFile(localPath ,newJson);
+//                    }
+//
+//                }
+//                if("v4".equals(sceneVersion)){
+//                    JSONObject jsonObject = JSONObject.parseObject(newJson);
+//                    jsonObject.put("title",newSceneName);
+//                    jsonObject.put("dynamicPanel",0);
+//                    FileUtils.writeFile(localPath, jsonObject.toJSONString());
+//
+//                    String sceneJsonPath = String.format(SceneResourcePath.DATA_VIEW_PATH+"/" + fileName, newNum);
+////                    fYunFileServiceInterface.uploadFile(localPath, sceneJsonPath);
+//
+//                    //修改图片名称
+//                    String filePath = String.format(SceneResourcePath.USER_VIEW_PATH, newNum) ;
+////                    List<String> files = fYunFileServiceInterface.listRemoteFiles(filePath);
+////                    for (String ossFilePath : files) {
+////                        if(ossFilePath.contains(oldNum)){
+////                            String oldName = ossFilePath;
+////                            ossFilePath = ossFilePath.replace(oldNum,newNum);
+////                            fYunFileServiceInterface.copyFileInBucket(oldName,ossFilePath);
+////                            fYunFileServiceInterface.deleteFile(oldName);
+////                        }
+////                    }
+//                    String dynamicViewPath = String.format(SceneResourcePath.DYNAMIC_VIEW_PATH, newNum);
+//                    String dynamicEditPath = String.format(SceneResourcePath.DYNAMIC_EDIT_PATH, newNum);
+////                    if(fYunFileServiceInterface.fileExist(dynamicViewPath)){
+////                        fYunFileServiceInterface.deleteFile(dynamicViewPath);
+////                    }
+////                    if(fYunFileServiceInterface.fileExist(dynamicEditPath)){
+////                        fYunFileServiceInterface.deleteFile(dynamicEditPath);
+////                    }
+//
+//                }
+//            }catch (Exception e){
+//                log.error("writeFile-error:{}",e);
+//            }
+//
+//        }
+//
+//    }
+//
+//
+//    public void updateOssJson(String targetPath,String oldNum, String newNum,String fileName) {
+//        String ossStatusJsonPath =  targetPath + "/" + fileName;
+//
+////        if(!fYunFileServiceInterface.fileExist(ossStatusJsonPath)){
+////            log.error("sceneCopy-error--ossFileExist:targetPath:{},oldNum:{},newNum:{}",ossStatusJsonPath,oldNum,newNum);
+////            return;
+////        }
+//        String localPath = SceneResourcePath.nasBasePath + ossStatusJsonPath;
+//        File file = new File(localPath);
+//        if(!file.getParentFile().exists()){
+//            file.getParentFile().mkdirs();
+//        }
+////        String fileContent = fYunFileServiceInterface.getFileContent(ossStatusJsonPath);
+//        if(StringUtils.isNotBlank(fileContent)){
+//            String newJson = fileContent.replaceAll(oldNum,newNum);
+//            try {
+//                FileUtils.writeFile(localPath, newJson);
+//                fYunFileServiceInterface.uploadFile(localPath,ossStatusJsonPath);
+//            }catch (Exception e){
+//                log.error("writeFile-error:{}",e);
+//            }
+//        }
+//
+//    }
+//
+//    private void copyOssAndNasV3(String oldNum ,String newNum ,String sourcePath,String targetPath){
+//        log.info("sceneCopy-ossSource-oldNum:{},newNum:{},sourcePath:{},targetPath:{}",oldNum,newNum,sourcePath,targetPath);
+//        fYunFileServiceInterface.copyFileInBucket(sourcePath,targetPath);
+//        File fileData = new File(SceneResourcePath.nasBasePath + sourcePath);
+//        if(fileData.exists()){
+//            if(targetPath.contains("images")){
+//                this.delLink(fileData.getPath());
+//            }
+//            cn.hutool.core.io.FileUtil.copyContent(fileData,new File(SceneResourcePath.nasBasePath + targetPath),true);
+//        }
+//    }
+//    private  void copyOssAndNasV4(String oldNum,String newNum){
+//        // 拷贝场景编辑资源
+//        String oldEditPath = String.format(SceneResourcePath.EDIT_PATH_v4, oldNum);
+//        String newEditPath = String.format(SceneResourcePath.EDIT_PATH_v4, newNum);
+//        fYunFileServiceInterface.copyFileInBucket(oldEditPath, newEditPath);
+//
+//        // 拷贝场景展示资源
+//        String oldViewPath = String.format(SceneResourcePath.VIEW_PATH_v4, oldNum);
+//        String newViewPath = String.format(SceneResourcePath.VIEW_PATH_v4, newNum);
+//        fYunFileServiceInterface.copyFileInBucket(oldViewPath, newViewPath);
+//
+//        //复制计算结果文件
+//        String oldResultPath = String.format(SceneResourcePath.SCENE_RESULT_DATA_PATH, oldNum);
+//        String newResultPath = String.format(SceneResourcePath.SCENE_RESULT_DATA_PATH, newNum);
+//        fYunFileServiceInterface.copyFileInBucket(oldResultPath, newResultPath);
+//
+//        // 拷贝本地资源
+//        String oldPath = SceneResourcePath.nasBasePath + oldNum;
+//        String newPath = SceneResourcePath.nasBasePath + newNum;
+//        if(new File(oldPath).exists()){
+//            FileUtil.copyContent(new File(oldPath), new File(newPath),true);
+//        }
+//        String oldPath_v4 = SceneResourcePath.nasBasePath_v4 + oldNum;
+//        String newPath_v4 = SceneResourcePath.nasBasePath_v4 + newNum;
+//        if(new File(oldPath_v4).exists()){
+//            FileUtil.copyContent(new File(oldPath_v4), new File(newPath_v4),true);
+//        }
+//    }
+//
+//
+//    public void delLink(String path) {
+//        String panPath = path +"/panorama";
+//        File file = new File(panPath);
+//        if(file.exists()){
+//            File[] files = file.listFiles();
+//            if(files == null || files.length == 0){
+//                return;
+//            }
+//            for (File file1 : files) {
+//                String linkPath =file1.getPath() + "/capture";
+//                log.info("delLink--filePath:{}",linkPath);
+//                org.apache.commons.io.FileUtils.deleteQuietly(new File(linkPath));
+//            }
+//        }
+//    }
+//
+//}

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

@@ -12,7 +12,6 @@ import com.fdkankan.common.constant.ErrorCode;
 import com.fdkankan.common.constant.FileBizType;
 import com.fdkankan.common.exception.BusinessException;
 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.fdkankan.redis.constant.RedisKey;
@@ -23,6 +22,7 @@ import com.fdkankan.scene.bean.TagBean;
 import com.fdkankan.scene.entity.SceneEditInfoExt;
 import com.fdkankan.scene.entity.ScenePlus;
 import com.fdkankan.scene.entity.ScenePlusExt;
+import com.fdkankan.scene.oss.OssUtil;
 import com.fdkankan.scene.service.*;
 import com.fdkankan.scene.vo.BaseJsonArrayParamVO;
 import com.fdkankan.scene.vo.DeleteFileParamVO;
@@ -54,7 +54,7 @@ public class SceneDrawServiceImpl implements ISceneDrawService {
     @Autowired
     private ISceneEditInfoService sceneEditInfoService;
     @Resource
-    private FYunFileServiceInterface fYunFileService;
+    private OssUtil ossUtil;
 
     @Override
     public void saveSceneDraw(BaseJsonArrayParamVO param) throws Exception {
@@ -235,10 +235,10 @@ public class SceneDrawServiceImpl implements ISceneDrawService {
         String userEditPath = String.format(UploadFilePath.USER_EDIT_PATH, sceneNum) + SCENE_DRAW_JSON_NAME;
         List<String> list = redisUtil.hgetValues(Key);
         if(CollUtil.isEmpty(list)){
-            fYunFileService.deleteFile(bucket, userEditPath);
+            ossUtil.deleteObject(bucket, userEditPath);
             return;
         }
         List<JSONObject> collect = list.stream().map(str -> JSON.parseObject(str)).collect(Collectors.toList());
-        fYunFileService.uploadFile(bucket, JSON.toJSONString(collect).getBytes(), userEditPath);
+        ossUtil.uploadFileBytes(bucket, userEditPath, JSON.toJSONString(collect).getBytes());
     }
 }

+ 101 - 101
src/main/java/com/fdkankan/scene/service/impl/SceneDynamicPanelServiceImpl.java

@@ -1,101 +1,101 @@
-package com.fdkankan.scene.service.impl;
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.io.FileUtil;
-import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.fdkankan.common.constant.CommonStatus;
-import com.fdkankan.common.constant.ErrorCode;
-import com.fdkankan.common.exception.BusinessException;
-import com.fdkankan.fyun.face.FYunFileServiceInterface;
-import com.fdkankan.model.constants.UploadFilePath;
-import com.fdkankan.scene.entity.SceneDynamicPanel;
-import com.fdkankan.scene.entity.SceneEditInfo;
-import com.fdkankan.scene.entity.ScenePlus;
-import com.fdkankan.scene.mapper.ISceneDynamicPanelMapper;
-import com.fdkankan.scene.service.ISceneDynamicPanelService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.fdkankan.scene.service.ISceneEditInfoService;
-import com.fdkankan.scene.service.IScenePlusService;
-import com.fdkankan.scene.vo.BaseJsonDataParamVO;
-import com.fdkankan.scene.vo.SceneDynamicPanelVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.nio.charset.StandardCharsets;
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * <p>
- * 场景动态面板 服务实现类
- * </p>
- *
- * @author
- * @since 2024-05-21
- */
-@Service
-public class SceneDynamicPanelServiceImpl extends ServiceImpl<ISceneDynamicPanelMapper, SceneDynamicPanel> implements ISceneDynamicPanelService {
-
-    @Resource
-    private FYunFileServiceInterface fileServiceInterface;
-    @Autowired
-    private ISceneEditInfoService sceneEditInfoService;
-    @Autowired
-    private IScenePlusService scenePlusService;
-
-    @Override
-    public List<SceneDynamicPanelVO> list(String num) {
-        List<SceneDynamicPanel> list = this.list(new LambdaQueryWrapper<SceneDynamicPanel>().eq(SceneDynamicPanel::getNum, num));
-        return BeanUtil.copyToList(list, SceneDynamicPanelVO.class);
-    }
-
-    @Override
-    public void update(BaseJsonDataParamVO param) {
-        JSONObject data = param.getData();
-        String sid = data.getString("sid");
-        if(StrUtil.isEmpty(sid)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001, "sid can not be null");
-        }
-
-        ScenePlus scenePlus = scenePlusService.getScenePlusByNum(param.getNum());
-        SceneDynamicPanel one = this.getOne(new LambdaQueryWrapper<SceneDynamicPanel>().eq(SceneDynamicPanel::getNum, param.getNum()).eq(SceneDynamicPanel::getSid, sid));
-        if(Objects.isNull(one)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001, "sid error");
-        }
-
-        //上传文件
-        String editPath = String.format(UploadFilePath.USER_EDIT_PATH, param.getNum()) + "dynamicPanel.json";
-        String viewPath = String.format(UploadFilePath.USER_VIEW_PATH, param.getNum()) + "dynamicPanel.json";
-
-        String fileContent = fileServiceInterface.getFileContent(editPath);
-        JSONArray jsonArray = JSON.parseArray(fileContent);
-        Map<String, JSONObject> map = new HashMap<>();
-        jsonArray.stream().forEach(v->{
-            JSONObject obj = (JSONObject) v;
-            map.put(obj.getString("sid"), obj);
-        });
-        JSONObject oldObj = map.get(sid);
-        if(Objects.nonNull(oldObj)){
-            data.put("text", oldObj.get("text"));
-        }
-        map.put(sid, data);
-        Collection<JSONObject> values = map.values();
-        fileServiceInterface.uploadFile(JSON.toJSONString(values).getBytes(StandardCharsets.UTF_8), editPath);
-        fileServiceInterface.uploadFile(JSON.toJSONString(values).getBytes(StandardCharsets.UTF_8), viewPath);
-
-        //更新版本号
-        SceneEditInfo sceneEditInfo = sceneEditInfoService.getByScenePlusId(scenePlus.getId());
-        sceneEditInfoService.upgradeVersionById(sceneEditInfo.getId());
-    }
-
-    @Override
-    public Byte checkDynamicPanel(String num) {
-        Long count = this.count(new LambdaQueryWrapper<SceneDynamicPanel>().eq(SceneDynamicPanel::getNum, num));
-        return count > 0 ? CommonStatus.YES.code() : CommonStatus.NO.code();
-    }
-}
+//package com.fdkankan.scene.service.impl;
+//
+//import cn.hutool.core.bean.BeanUtil;
+//import cn.hutool.core.io.FileUtil;
+//import cn.hutool.core.util.StrUtil;
+//import com.alibaba.fastjson.JSON;
+//import com.alibaba.fastjson.JSONArray;
+//import com.alibaba.fastjson.JSONObject;
+//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+//import com.fdkankan.common.constant.CommonStatus;
+//import com.fdkankan.common.constant.ErrorCode;
+//import com.fdkankan.common.exception.BusinessException;
+//import com.fdkankan.fyun.face.FYunFileServiceInterface;
+//import com.fdkankan.model.constants.UploadFilePath;
+//import com.fdkankan.scene.entity.SceneDynamicPanel;
+//import com.fdkankan.scene.entity.SceneEditInfo;
+//import com.fdkankan.scene.entity.ScenePlus;
+//import com.fdkankan.scene.mapper.ISceneDynamicPanelMapper;
+//import com.fdkankan.scene.service.ISceneDynamicPanelService;
+//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+//import com.fdkankan.scene.service.ISceneEditInfoService;
+//import com.fdkankan.scene.service.IScenePlusService;
+//import com.fdkankan.scene.vo.BaseJsonDataParamVO;
+//import com.fdkankan.scene.vo.SceneDynamicPanelVO;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Service;
+//
+//import javax.annotation.Resource;
+//import java.nio.charset.StandardCharsets;
+//import java.util.*;
+//import java.util.stream.Collectors;
+//
+///**
+// * <p>
+// * 场景动态面板 服务实现类
+// * </p>
+// *
+// * @author
+// * @since 2024-05-21
+// */
+//@Service
+//public class SceneDynamicPanelServiceImpl extends ServiceImpl<ISceneDynamicPanelMapper, SceneDynamicPanel> implements ISceneDynamicPanelService {
+//
+//    @Resource
+//    private FYunFileServiceInterface fileServiceInterface;
+//    @Autowired
+//    private ISceneEditInfoService sceneEditInfoService;
+//    @Autowired
+//    private IScenePlusService scenePlusService;
+//
+//    @Override
+//    public List<SceneDynamicPanelVO> list(String num) {
+//        List<SceneDynamicPanel> list = this.list(new LambdaQueryWrapper<SceneDynamicPanel>().eq(SceneDynamicPanel::getNum, num));
+//        return BeanUtil.copyToList(list, SceneDynamicPanelVO.class);
+//    }
+//
+//    @Override
+//    public void update(BaseJsonDataParamVO param) {
+//        JSONObject data = param.getData();
+//        String sid = data.getString("sid");
+//        if(StrUtil.isEmpty(sid)){
+//            throw new BusinessException(ErrorCode.FAILURE_CODE_3001, "sid can not be null");
+//        }
+//
+//        ScenePlus scenePlus = scenePlusService.getScenePlusByNum(param.getNum());
+//        SceneDynamicPanel one = this.getOne(new LambdaQueryWrapper<SceneDynamicPanel>().eq(SceneDynamicPanel::getNum, param.getNum()).eq(SceneDynamicPanel::getSid, sid));
+//        if(Objects.isNull(one)){
+//            throw new BusinessException(ErrorCode.FAILURE_CODE_3001, "sid error");
+//        }
+//
+//        //上传文件
+//        String editPath = String.format(UploadFilePath.USER_EDIT_PATH, param.getNum()) + "dynamicPanel.json";
+//        String viewPath = String.format(UploadFilePath.USER_VIEW_PATH, param.getNum()) + "dynamicPanel.json";
+//
+//        String fileContent = fileServiceInterface.getFileContent(editPath);
+//        JSONArray jsonArray = JSON.parseArray(fileContent);
+//        Map<String, JSONObject> map = new HashMap<>();
+//        jsonArray.stream().forEach(v->{
+//            JSONObject obj = (JSONObject) v;
+//            map.put(obj.getString("sid"), obj);
+//        });
+//        JSONObject oldObj = map.get(sid);
+//        if(Objects.nonNull(oldObj)){
+//            data.put("text", oldObj.get("text"));
+//        }
+//        map.put(sid, data);
+//        Collection<JSONObject> values = map.values();
+//        fileServiceInterface.uploadFile(JSON.toJSONString(values).getBytes(StandardCharsets.UTF_8), editPath);
+//        fileServiceInterface.uploadFile(JSON.toJSONString(values).getBytes(StandardCharsets.UTF_8), viewPath);
+//
+//        //更新版本号
+//        SceneEditInfo sceneEditInfo = sceneEditInfoService.getByScenePlusId(scenePlus.getId());
+//        sceneEditInfoService.upgradeVersionById(sceneEditInfo.getId());
+//    }
+//
+//    @Override
+//    public Byte checkDynamicPanel(String num) {
+//        Long count = this.count(new LambdaQueryWrapper<SceneDynamicPanel>().eq(SceneDynamicPanel::getNum, num));
+//        return count > 0 ? CommonStatus.YES.code() : CommonStatus.NO.code();
+//    }
+//}

+ 14 - 37
src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoServiceImpl.java

@@ -5,7 +5,6 @@ import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.io.IORuntimeException;
 import cn.hutool.core.util.CharsetUtil;
-import cn.hutool.core.util.CharsetUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.core.util.ZipUtil;
 import com.alibaba.fastjson.JSON;
@@ -18,18 +17,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fdkankan.common.constant.*;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.util.FileSizeUtil;
-import com.fdkankan.common.util.FileMd5Util;
-import com.fdkankan.common.util.FileSizeUtil;
 import com.fdkankan.common.util.FileUtils;
 import com.fdkankan.dxf.parse.utils.FdJsonToDxfUtil;
-import com.fdkankan.fyun.config.FYunFileConfig;
-import com.fdkankan.fyun.face.FYunFileServiceInterface;
-import com.fdkankan.fyun.util.OssFileUtil;
 import com.fdkankan.model.constants.ConstantFilePath;
 import com.fdkankan.model.constants.UploadFilePath;
 import com.fdkankan.model.utils.ComputerUtil;
 import com.fdkankan.model.utils.CreateHouseJsonUtil;
-import com.fdkankan.model.utils.CreateObjUtil;
 import com.fdkankan.model.utils.SceneUtil;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.constant.RedisLockKey;
@@ -39,8 +32,6 @@ import com.fdkankan.scene.bean.*;
 import com.fdkankan.scene.config.FdkkLaserConfig;
 import com.fdkankan.scene.constant.ConstantFileLocPath;
 import com.fdkankan.scene.entity.*;
-import com.fdkankan.scene.bean.*;
-import com.fdkankan.scene.entity.*;
 import com.fdkankan.scene.mapper.ISceneEditInfoMapper;
 import com.fdkankan.scene.oss.OssUtil;
 import com.fdkankan.scene.service.*;
@@ -48,8 +39,6 @@ import com.fdkankan.scene.util.CmdBuildUtil;
 import com.fdkankan.scene.util.MergeVideoUtil;
 import com.fdkankan.scene.util.VisionUtil;
 import com.fdkankan.scene.vo.*;
-import com.fdkankan.scene.service.*;
-import com.fdkankan.scene.vo.*;
 import com.fdkankan.web.response.ResultData;
 import com.google.common.collect.Lists;
 import com.google.errorprone.annotations.Var;
@@ -60,21 +49,11 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
-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.transaction.annotation.Transactional;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.annotation.Resource;
 import java.io.File;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.FileSystemException;
 import java.util.*;
-import java.util.*;
 import java.util.Map.Entry;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -131,13 +110,11 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
     @Autowired
     private ICommonService commonService;
     @Autowired
-    private FYunFileConfig fYunFileConfig;
-    @Autowired
     private ISceneDrawService sceneDrawService;
     @Autowired
     private ISceneDynamicPanelService sceneDynamicPanelService;
-    @Autowired
-    private IWbService wbService;
+//    @Autowired
+//    private IWbService wbService;
 
     @Transactional
     @Override
@@ -343,7 +320,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
         scenePlusService.updateById(scenePlus);
 
         //推送文保系统
-        wbService.sendMq(num);
+//        wbService.sendMq(num);
 
         return ResultData.ok();
     }
@@ -410,7 +387,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
             }).collect(Collectors.toList());
         }
         String linkScenePath = userEditPath + "links.json";
-        ossUtil.uploadFileBytes(bucket, linkScenePath, linkPanArr.toString().getBytes(StandardCharsets.UTF_8));
+        ossUtil.uploadFileBytes(bucket, linkScenePath, JSON.toJSONString(tags).getBytes(StandardCharsets.UTF_8));
 
         //拷贝编辑目录到发布目录
         ossUtil.deleteObject(bucket,imgViewPath + "panorama");
@@ -527,7 +504,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
 
         this.SortBoxVideos(sceneInfoVO);
 
-        this.setExtData(sceneInfoVO, scenePlus.getCameraId());
+//        this.setExtData(sceneInfoVO, scenePlus.getCameraId());
 
         sceneInfoVO.setDynamicPanel(sceneDynamicPanelService.checkDynamicPanel(num));
 
@@ -752,7 +729,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
             JSONArray floors = floorplanUserObj.getJSONArray("floors");
             JSONObject floor = floors.getJSONObject(0);
 
-            String ossFloorplanUserStr = fYunFileService.getFileContent(editUserPath + "floorplan.json");
+            String ossFloorplanUserStr = ossUtil.getFileContent(scenePlusExt.getYunFileBucket(), editUserPath + "floorplan.json");
             JSONObject ossFloorplanUserObj = JSON.parseObject(ossFloorplanUserStr);
             JSONArray ossFloors = ossFloorplanUserObj.getJSONArray("floors");
             for(int i = 0; i < ossFloors.size(); i++){
@@ -765,12 +742,12 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
 
             FileUtil.writeUtf8String(ossFloorplanUserObj.toJSONString(), floorplanUserPath);
 
-            fYunFileService.uploadFile(scenePlusExt.getYunFileBucket(), floorplanUserPath, editUserPath + "floorplan.json");
+            ossUtil.uploadFile(scenePlusExt.getYunFileBucket(), editUserPath + "floorplan.json", floorplanUserPath, false);
             JSONObject houseTypeJson = CreateHouseJsonUtil
                     .createHouseTypeJsonByUser(floorplanUserPath);
-            if(Objects.nonNull(houseTypeJson)) {
-                fYunFileService.uploadFile(scenePlusExt.getYunFileBucket(), houseTypeJson.toJSONString().getBytes(), editUserPath + "houseType.json");
-            }
+//            if(Objects.nonNull(houseTypeJson)) {
+//                fYunFileService.uploadFile(scenePlusExt.getYunFileBucket(), houseTypeJson.toJSONString().getBytes(), editUserPath + "houseType.json");
+//            }
 
             SceneEditInfo sceneEditInfoDb = this.getByScenePlusId(scenePlus.getId());
             this.update(new LambdaUpdateWrapper<SceneEditInfo>()
@@ -805,12 +782,12 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
         }
 
         String localFloorplan = String.format(ConstantFilePath.SCENE_USER_PATH_V4, num) + UUID.randomUUID() + ".json";
-        fYunFileService.downloadFile(scenePlusExt.getYunFileBucket(), ossFloorplanPath, localFloorplan);
+        ossUtil.downloadFile(scenePlusExt.getYunFileBucket(), ossFloorplanPath, localFloorplan);
         String localDxf = String.format(ConstantFilePath.SCENE_USER_PATH_V4, num) + UUID.randomUUID() + ".dxf";
         FdJsonToDxfUtil.fdJsonToDxf(localFloorplan, localDxf, subgroup);
-        String key = OssFileUtil.getUploadTempFileKey(null, "dxf");
-        fYunFileService.uploadFile(scenePlusExt.getYunFileBucket(), localDxf, key);
-        String url = fYunFileConfig.getHost() + key;
+        String key = ossUtil.getUploadTempFileKey(null, "dxf");
+        ossUtil.uploadFile(scenePlusExt.getYunFileBucket(), key, localDxf, false);
+        String url = key;
 
         return ResultData.ok(url);
     }

+ 4 - 5
src/main/java/com/fdkankan/scene/service/impl/SceneProServiceImpl.java

@@ -17,7 +17,6 @@ import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.util.FileUtils;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.util.FileUtils;
-import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.model.constants.ConstantFileName;
 import com.fdkankan.model.constants.ConstantFilePath;
 import com.fdkankan.model.constants.UploadFilePath;
@@ -967,11 +966,11 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
 
                 //算法计算完后,生成压缩文件,上传到oss
                 //上传3dtiles
-                fYunFileService.deleteFolder(bucket, String.format(UploadFilePath.IMG_VIEW_PATH, num) + "3dtiles");
-                fYunFileService.uploadFileByCommand(bucket, tilesPath, String.format(UploadFilePath.IMG_VIEW_PATH, num) + "3dtiles");
+                ossUtil.deleteObject(bucket, String.format(UploadFilePath.IMG_VIEW_PATH, num) + "3dtiles");
+                ossUtil.uploadFileDirCmd(bucket, tilesPath, String.format(UploadFilePath.IMG_VIEW_PATH, num) + "3dtiles", false);
                 //上传mesh
-                fYunFileService.deleteFolder(bucket, String.format(UploadFilePath.DATA_VIEW_PATH, num) + "mesh");
-                fYunFileService.uploadFileByCommand(bucket, meshPath, String.format(UploadFilePath.DATA_VIEW_PATH, num) + "mesh");
+                ossUtil.deleteObject(bucket, String.format(UploadFilePath.DATA_VIEW_PATH, num) + "mesh");
+                ossUtil.uploadFileDirCmd(bucket, meshPath, String.format(UploadFilePath.DATA_VIEW_PATH, num) + "mesh",false);
 
                 //更新版本信息
                 ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);

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

@@ -91,11 +91,6 @@ public class SceneServiceImpl extends ServiceImpl<ISceneMapper, Scene> implement
     private ISurveillanceService surveillanceService;
     @Autowired
     private ISceneService sceneService;
-    public FYunFileConfig fYunFileConfig;
-    @Autowired
-    public IScenePlusService scenePlusService;
-    @Autowired
-    public IScenePlusExtService scenePlusExtService;
 
     @Override
     public ResultData uploadBodySegment(MultipartFile file, Integer rotate) throws Exception {

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

@@ -139,10 +139,10 @@ public class SceneUploadServiceImpl extends ServiceImpl<ISceneUploadMapper, Scen
             String fileName = file.getOriginalFilename();
             // 获取文件后缀
             String prefix = fileName.substring(fileName.lastIndexOf("."));
-            String path = String.format(ConstantFilePath.SCENE_TMP_PATH_V4, num).concat(UUID.randomUUID().toString()).concat(prefix);
-//            File newFile = File.createTempFile(UUID.randomUUID().toString() ,prefix);
-            FileUtil.mkParentDirs(path);
-            file.transferTo(new File(path));
+//            String path = String.format(ConstantFilePath.SCENE_TMP_PATH_V4, num).concat(UUID.randomUUID().toString()).concat(prefix);
+            File newFile = File.createTempFile(UUID.randomUUID().toString() ,prefix);
+//            FileUtil.mkParentDirs(path);
+            file.transferTo(newFile);
             String realFileName = fileName;
             if(files.size() ==1 && StringUtils.isNotBlank(sendFileName)){
                 realFileName = sendFileName ;

+ 8 - 9
src/main/java/com/fdkankan/scene/service/impl/SurveillanceServiceImpl.java

@@ -9,24 +9,23 @@ import com.fdkankan.common.constant.CommonStatus;
 import com.fdkankan.common.constant.ErrorCode;
 import com.fdkankan.common.constant.ServerCode;
 import com.fdkankan.common.exception.BusinessException;
-import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.model.constants.UploadFilePath;
 import com.fdkankan.scene.entity.*;
 import com.fdkankan.scene.mapper.ISurveillanceMapper;
+import com.fdkankan.scene.oss.OssUtil;
 import com.fdkankan.scene.service.*;
 import com.fdkankan.scene.vo.BaseSidParamVO;
 import com.fdkankan.scene.vo.SurveillanceParamVO;
 import com.fdkankan.scene.vo.SurveillanceVO;
 import com.fdkankan.web.response.ResultData;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.io.IOException;
 import java.util.List;
 import java.util.Objects;
 import java.util.stream.Collectors;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
 
 /**
  * <p>
@@ -45,12 +44,12 @@ public class SurveillanceServiceImpl extends ServiceImpl<ISurveillanceMapper, Su
     private ISceneEditInfoExtService sceneEditInfoExtService;
     @Autowired
     private ISceneEditInfoService sceneEditInfoService;
-    @Resource
-    private FYunFileServiceInterface yunFileService;
     @Autowired
     private IScenePlusExtService scenePlusExtService;
     @Autowired
     private ICommonService commonService;
+    @Resource
+    OssUtil ossUtil;
 
     @Override
     public ResultData saveSurveillance(SurveillanceParamVO param) throws Exception {
@@ -131,10 +130,10 @@ public class SurveillanceServiceImpl extends ServiceImpl<ISurveillanceMapper, Su
         if(surveillance.getUrlType() == 2){
             String userEditPath = String.format(UploadFilePath.USER_EDIT_PATH, param.getNum());
             if(StrUtil.isNotEmpty(surveillance.getFileName())){
-                yunFileService.deleteFile(bucket, userEditPath.concat(surveillance.getFileName()));
+                ossUtil.deleteObject(bucket, userEditPath.concat(surveillance.getFileName()));
             }
             if(StrUtil.isNotEmpty(surveillance.getPoster())){
-                yunFileService.deleteFile(bucket, userEditPath.concat(surveillance.getPoster()));
+                ossUtil.deleteObject(bucket, userEditPath.concat(surveillance.getPoster()));
             }
         }
 

+ 13 - 3
src/main/java/com/fdkankan/scene/service/impl/VisionServiceImpl.java

@@ -4,8 +4,12 @@ import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.model.constants.UploadFilePath;
+import com.fdkankan.scene.entity.ScenePlus;
+import com.fdkankan.scene.entity.ScenePlusExt;
+import com.fdkankan.scene.oss.OssUtil;
+import com.fdkankan.scene.service.IScenePlusExtService;
+import com.fdkankan.scene.service.IScenePlusService;
 import com.fdkankan.scene.service.IVisionService;
 import com.google.common.collect.Lists;
 import lombok.extern.slf4j.Slf4j;
@@ -23,12 +27,18 @@ import java.util.Objects;
 public class VisionServiceImpl implements IVisionService {
 
     @Resource
-    private FYunFileServiceInterface fYunFileService;
+    private OssUtil ossUtil;
+    @Autowired
+    private IScenePlusService scenePlusService;
+    @Autowired
+    private IScenePlusExtService scenePlusExtService;
 
     @Override
     public List<Map<String, Object>> getPointLatAndLon(String num) {
+        ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);
+        ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(scenePlus.getId());
         List<Map<String, Object>> list = Lists.newArrayList();
-        String visionTxt = fYunFileService.getFileContent(String.format(UploadFilePath.IMG_VIEW_PATH, num) + "vision.txt");
+        String visionTxt = ossUtil.getFileContent(scenePlusExt.getYunFileBucket(), String.format(UploadFilePath.IMG_VIEW_PATH, num) + "vision.txt");
         JSONObject visionJson = JSON.parseObject(visionTxt);
         if(!visionJson.containsKey("sweepLocations")){
             return list;

+ 50 - 50
src/main/java/com/fdkankan/scene/service/impl/WbServiceImpl.java

@@ -1,50 +1,50 @@
-package com.fdkankan.scene.service.impl;
-
-import com.fdkankan.common.constant.SceneSource;
-import com.fdkankan.rabbitmq.util.RabbitMqProducer;
-import com.fdkankan.scene.entity.Camera;
-import com.fdkankan.scene.entity.CameraDetail;
-import com.fdkankan.scene.entity.ScenePlus;
-import com.fdkankan.scene.service.ICameraDetailService;
-import com.fdkankan.scene.service.ICameraService;
-import com.fdkankan.scene.service.IScenePlusService;
-import com.fdkankan.scene.service.IWbService;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-
-@Slf4j
-@Service
-public class WbServiceImpl implements IWbService {
-
-    @Autowired
-    private RabbitMqProducer mqProducer;
-    @Autowired
-    private IScenePlusService scenePlusService;
-    @Autowired
-    private ICameraService cameraService;
-    @Autowired
-    private ICameraDetailService cameraDetailService;
-
-    @Override
-    public void sendMq(String num) {
-        try {
-            ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);
-            Camera camera = cameraService.getById(scenePlus.getCameraId());
-            CameraDetail cameraDetail = cameraDetailService.findByCameraId(camera.getId());
-            if(Objects.isNull(cameraDetail.getCompanyId()) || cameraDetail.getCompanyId() != 26 || scenePlus.getSceneSource() != SceneSource.ZT.code().intValue()){
-                return;
-            }
-            Map<String, Object> params = new HashMap<>();
-            params.put("sceneCode", num);
-            params.put("sceneName", scenePlus.getTitle());
-            mqProducer.sendByWorkQueue("relics-update-name-queue", params);
-        }catch (Exception e){
-            log.error("发送看见场景到全景看看失败, num:{}", num, e);
-        }
-    }
-}
+//package com.fdkankan.scene.service.impl;
+//
+//import com.fdkankan.common.constant.SceneSource;
+//import com.fdkankan.rabbitmq.util.RabbitMqProducer;
+//import com.fdkankan.scene.entity.Camera;
+//import com.fdkankan.scene.entity.CameraDetail;
+//import com.fdkankan.scene.entity.ScenePlus;
+//import com.fdkankan.scene.service.ICameraDetailService;
+//import com.fdkankan.scene.service.ICameraService;
+//import com.fdkankan.scene.service.IScenePlusService;
+//import com.fdkankan.scene.service.IWbService;
+//import lombok.extern.slf4j.Slf4j;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Service;
+//
+//import java.util.HashMap;
+//import java.util.Map;
+//import java.util.Objects;
+//
+//@Slf4j
+//@Service
+//public class WbServiceImpl implements IWbService {
+//
+//    @Autowired
+//    private RabbitMqProducer mqProducer;
+//    @Autowired
+//    private IScenePlusService scenePlusService;
+//    @Autowired
+//    private ICameraService cameraService;
+//    @Autowired
+//    private ICameraDetailService cameraDetailService;
+//
+//    @Override
+//    public void sendMq(String num) {
+//        try {
+//            ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);
+//            Camera camera = cameraService.getById(scenePlus.getCameraId());
+//            CameraDetail cameraDetail = cameraDetailService.findByCameraId(camera.getId());
+//            if(Objects.isNull(cameraDetail.getCompanyId()) || cameraDetail.getCompanyId() != 26 || scenePlus.getSceneSource() != SceneSource.ZT.code().intValue()){
+//                return;
+//            }
+//            Map<String, Object> params = new HashMap<>();
+//            params.put("sceneCode", num);
+//            params.put("sceneName", scenePlus.getTitle());
+//            mqProducer.sendByWorkQueue("relics-update-name-queue", params);
+//        }catch (Exception e){
+//            log.error("发送看见场景到全景看看失败, num:{}", num, e);
+//        }
+//    }
+//}