dengsixing преди 3 седмици
родител
ревизия
92689a06b7

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

@@ -566,9 +566,10 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
             //推送ai识别平面图mq
             this.sendMqForAiPano(sceneCode);
 
-//            redisUtil.set(String.format(RedisKey.SCENE_BUILD_FINISH_NUM, sceneCode), "1");
-
-            status = true;
+            //自动ai识别只在场景初次计算时执行
+            if(StrUtil.isEmpty(message.getRebuild()) || message.getRebuild().equals("0")){
+                this.sendMqForAiSeg(sceneCode);
+            }
 
             log.info("场景计算结果处理结束,场景码:{}", sceneCode);
 
@@ -596,8 +597,6 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
             Map<String, Object> sceneStatusParam = new HashMap<>();
             sceneStatusParam.put("num", sceneCode);
             sceneStatusParam.put("status", message.getBuildSuccess() ? 1 : -1);
-//            commonService.sendUpdateSceneStatusMqToQueues(sceneStatusParam);
-
             if(StrUtil.isNotEmpty(batchIds)){
                 origFileUploadBatchService.update(new LambdaUpdateWrapper<OrigFileUploadBatch>().set(OrigFileUploadBatch::getStatus, 3).in(OrigFileUploadBatch::getBatchId, batchIds.split(",")));
             }
@@ -635,6 +634,12 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
         mqProducer.sendByWorkQueue("detect-queue-pano", map);
     }
 
+    private void sendMqForAiSeg(String num){
+        Map<String, String> map = new HashMap<>();
+        map.put("num", num);
+        mqProducer.sendByWorkQueue("pano-ai-seg", map);
+    }
+
     private Map<String, String> getUploadFiles(ScenePlus scenePlus,String path,Integer cameraType,JSONObject fdageData) throws Exception {
         if (ObjectUtils.isEmpty(scenePlus)) {
             throw new Exception("未找到场景信息:" + path);

+ 0 - 2
src/main/java/com/fdkankan/contro/service/ISceneFileBuildService.java

@@ -32,8 +32,6 @@ public interface ISceneFileBuildService extends IService<SceneFileBuild> {
 
     ResultData uploadFile(MultipartFile file, String params, String dir) throws Exception;
 
-    ResultData sendCallAlgorithm(SendCallAlgorithmParam param) throws Exception;
-
     ResultData uploadFile(SendCallAlgorithmParam param) throws Exception;
 
     ResultData noticeBuild(String params, Long bdId, String dataSource, String uploadType) throws Exception;

+ 4 - 713
src/main/java/com/fdkankan/contro/service/impl/SceneFileBuildServiceImpl.java

@@ -7,9 +7,7 @@ import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.exceptions.ExceptionUtil;
 import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.lang.UUID;
-import cn.hutool.core.thread.ThreadUtil;
 import cn.hutool.core.util.StrUtil;
-import cn.hutool.core.util.ZipUtil;
 import cn.hutool.crypto.digest.MD5;
 import cn.hutool.extra.qrcode.QrCodeUtil;
 import cn.hutool.extra.qrcode.QrConfig;
@@ -25,7 +23,10 @@ import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.util.*;
 import com.fdkankan.contro.bean.SendCallAlgorithmDetail;
 import com.fdkankan.contro.common.Result;
-import com.fdkankan.contro.constant.*;
+import com.fdkankan.contro.constant.ApiConstant;
+import com.fdkankan.contro.constant.ModelingControlRespCode;
+import com.fdkankan.contro.constant.RedisConstants;
+import com.fdkankan.contro.constant.RedisKeyExt;
 import com.fdkankan.contro.entity.*;
 import com.fdkankan.contro.enums.CameraTypeEnum;
 import com.fdkankan.contro.httpclient.MyClient;
@@ -50,7 +51,6 @@ import com.fdkankan.redis.util.RedisUtil;
 import com.fdkankan.web.response.ResultData;
 import com.fdkankan.web.util.RSAEncrypt;
 import lombok.extern.slf4j.Slf4j;
-import net.lingala.zip4j.core.ZipFile;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.lang3.StringUtils;
 import org.joda.time.DateTime;
@@ -70,8 +70,6 @@ import java.io.File;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
 import java.util.*;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ExecutorService;
 
 /**
  * <p>
@@ -94,17 +92,9 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
 
     private static final String URL_ADD_UCENTER_USER = "/service/manage/inner/addUcenterUser";
 
-    @Value("${main.url}")
-    private String mainUrl;
-    @Value("${fyun.type}")
-    private String fyunType;
-
     @Value("${scene.pro.new.url}")
     private String sceneProNewUrl;
 
-    @Value("${scene.pro.v3.url}")
-    private String sceneProV3Url;
-
     @Value("${queue.modeling.modeling-pre}")
     private String queueModelingPre;
 
@@ -191,30 +181,18 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
     @Autowired
     private RedisLockUtil redisLockUtil;
 
-    @Autowired
-    private IScenePreService scenePreService;
-
     private RestTemplate restTemplate = new RestTemplate();
 
     @Autowired
-    private ISceneCopyDistinctEnvService sceneCopyDistinctEnvService;
-
-    @Autowired
     private ISceneCopyLogService sceneCopyLogService;
 
     @Autowired
-    private ISceneCleanOrigService sceneCleanOrigService;
-
-    @Autowired
     private ICommonService commonService;
 
     @Autowired
     private IExceedSpaceSceneService exceedSpaceSceneService;
 
     @Autowired
-    private ISceneColdStorageLogService sceneColdStorageLogService;
-
-    @Autowired
     private ISceneColdStorageService sceneColdStorageService;
     @Autowired
     private IntermitSceneService intermitSceneService;
@@ -236,9 +214,6 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
     private MyClient myClient;
 
     @Autowired
-    IJySceneAuthService jySceneAuthService;
-
-    @Autowired
     private IJyUserService jyUserService;
 
     @Autowired
@@ -253,8 +228,6 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
     @Autowired
     private ISceneOrigBdService sceneOrigBdService;
     @Autowired
-    private ISceneFilenameService sceneFilenameService;
-    @Autowired
     private UploadShootingService uploadShootingService;
 
     @Override
@@ -774,9 +747,6 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         ScenePro scenePro = sceneProService.getOne(
             new LambdaQueryWrapper<ScenePro>().like(ScenePro::getDataSource, "/".concat(fileId).concat("/")));
 
-//        boolean callV3 = callV3(scenePro, preParams, fdageJson, "api/scene/file/uploadSuccessBuild");
-//        if(callV3) return ResultData.ok();
-
 
         if (ObjectUtils.isEmpty(scenePro) || (!ObjectUtils.isEmpty(scenePro.getIsUpgrade()) && scenePro.getIsUpgrade() == 1)) {
             buildScene(fileId, prefixBuffer.toString(),fdageJson,buildType,cameraType, user);
@@ -832,12 +802,6 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
                 return Boolean.TRUE;
             }
         }
-//        else if (Objects.nonNull(scenePro) &&
-//            scenePro.getSceneSource() != SceneSource.JG.code() &&
-//            scenePro.getIsUpgrade() == CommonStatus.NO.code().intValue()){
-//            callV3Service(preParams,api);
-//            return Boolean.TRUE;
-//        }
         return Boolean.FALSE;
     }
 
@@ -937,9 +901,6 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         ScenePro scenePro = sceneProService.getOne(
             new LambdaQueryWrapper<ScenePro>().like(ScenePro::getDataSource, "/".concat(fileId).concat("/")));
 
-//        boolean callV3 = callV3(scenePro, preParams, fdageJson, "api/scene/file/turntableUploadSuccess");
-//        if (callV3) return ResultData.ok();
-
         //激光场景校验是否能够计算
         this.checkJgCanBuild(scenePro);
 
@@ -1050,9 +1011,6 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         if (sceneName != null) {
             scenePlus.setTitle(sceneName);
         }
-//        if (sceneDec != null) {
-//            scenePlus.setDescription("<p>" + new String(sceneDec.getBytes("UTF-8")) + "</p>");
-//        }
 
         if (sceneType != null) {
             scenePlus.setSceneType(sceneType);
@@ -1083,7 +1041,6 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
             scenePlusExt.setPlusId(scenePlus.getId());
             scenePlusExtService.save(scenePlusExt);
             sceneEditInfo.setTitle(scenePlus.getTitle());
-//            sceneEditInfo.setDescription(scenePlus.getDescription());
             sceneEditInfo.setScenePlusId(scenePlus.getId());
 
             if(StrUtil.isNotBlank(sceneKey)) {
@@ -1355,27 +1312,9 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
             cameraId = scenePro.getCameraId();
         }
 
-//        //查询场景是否处于冻结状态,如果已冻结,不允许重算
-//        SceneColdStorage sceneColdStorage = sceneColdStorageService.getOne(new LambdaQueryWrapper<SceneColdStorage>().eq(SceneColdStorage::getNum, num).eq(SceneColdStorage::getState, 1));
-//        if(Objects.nonNull(sceneColdStorage)){
-//            throw new BusinessException(ErrorCode.FAILURE_CODE_5074);
-//        }
-//
-//        //查询最后一次计算时间后是否有删除过目录,如果有,则不支持重算
-//        List<SceneCleanOrig> sceneCleanOrigs = sceneCleanOrigService.lisByNumAfterLastCall(num, laseCallTime);
-//        if(CollUtil.isNotEmpty(sceneCleanOrigs)){
-//            throw new BusinessException(ErrorCode.FAILURE_CODE_5072);
-//        }
-
-
         //激光场景校验是否能够计算
         this.checkJgCanBuild(scenePro);
 
-//        if(Objects.nonNull(scenePro) && (Objects.isNull(scenePro.getIsUpgrade())
-//                || scenePro.getIsUpgrade() != CommonStatus.YES.code().intValue())){
-//            return rebuildV3Scene(scenePro,num,force);
-//        }
-
         if(Objects.isNull(scenePlus)){
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
         }
@@ -1524,176 +1463,6 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
 
     }
 
-//    public ResultData rebuildV3Scene(ScenePro scenePro,String num,Boolean force) throws IOException {
-//
-//                    JSONObject configJson = JSONObject.parseObject(FileUtils.readFile(configJsonPath));
-//                    String folderName = configJson.getString("id");
-//                    String customUserId = configJson.getString("customUserId");
-//                    if(StrUtil.isBlank(folderName) || StrUtil.isBlank(snCode)){
-//                        throw new RuntimeException("config.json 文件有误!");
-//                    }
-//
-//                    // 检测是否有生成
-//                    String fileId = getFileIdByFolderName(folderName);
-//                    String subFolder = snCode.concat(File.separator).concat(fileId).concat(File.separator).concat(folderName);
-//                    // 解压获取dataSource 并上传资源到OSS
-//                    String dataSource = ConstantFilePath.BUILD_MODEL_PATH.concat(subFolder);
-//                    log.info("dataSource 为:{}", dataSource);
-//
-//                    scenePre.setFileId(fileId);
-//                    scenePre.setStatus(1);
-//                    scenePre.setUpdateTime(new Date());
-//                    scenePreService.updateById(scenePre);
-//                    log.info("异步开始上传文件");
-//                    // 上传oaas
-//                    fYunFileService.uploadFileByCommand(dataPath, ConstantFilePath.OSS_PREFIX.concat(subFolder));
-//
-//                    //删除本地压缩包,防止补拍上传文件不一致
-//                    FileUtil.del(parentPath);
-//
-//                    scenePre.setOssPath(ConstantFilePath.OSS_PREFIX.concat(subFolder));
-//                    scenePre.setStatus(2);
-//                    scenePre.setUpdateTime(new Date());
-//                    scenePreService.updateById(scenePre);
-//                    log.info("文件上传成功,开始通知计算");
-//                    // 通知计算
-//                    this.copyDataAndBuild(null, dataSource, "V4", null, customUserId);
-//                    log.info("通知计算成功");
-//
-//                    scenePre.setStatus(3);
-//                    scenePre.setUpdateTime(new Date());
-//                    scenePreService.updateById(scenePre);
-//                } catch (Exception e) {
-//                    log.error("上传失败", e);
-//                    scenePre.setStatus(CommonSuccessStatus.FAIL.code());
-//                    scenePreService.updateById(scenePre);
-//                }
-//            }, executor);
-//        }finally {
-//            executor.shutdown();
-//        }
-//        return ResultData.ok();
-//    }
-
-    private String getFileIdByFolderName(String folderName) {
-        // 检测是否有生成
-        String fileId = redisUtil.get(String.format(RedisConstants.FOLDER_FILEID_BUILD, folderName));
-        if (!org.springframework.util.ObjectUtils.isEmpty(fileId)) {
-            return fileId;
-        }
-
-        SceneFileBuild sceneFileBuild = this.findByUnicode(folderName);
-        if (sceneFileBuild != null) {
-            fileId = sceneFileBuild.getFileId();
-            redisUtil.set(String.format(RedisConstants.FOLDER_FILEID_BUILD, folderName), fileId, 2 * 24 * 60 * 60);
-            return fileId;
-        }
-
-        // 加锁
-        boolean lock = redisLockUtil.lock(String.format(RedisConstants.FOLDER_LOCK_BUILD, folderName), 120);
-        if (!lock) {
-            throw new BusinessException(ErrorCode.FAILURE_CODE_5052);
-        }
-
-        String dataSource =  scenePlusService.getDataSourceLikeUnicode("/" + folderName);
-
-        if (!org.springframework.util.ObjectUtils.isEmpty(dataSource)) {
-            log.info("从数据库中查到与 fileId:{} 匹配的路径为:{}", fileId, dataSource);
-            int n = dataSource.split("/").length;
-            if (n > 1) {
-                fileId = dataSource.split("/")[n - 2];
-            }
-        }
-
-        if (org.springframework.util.ObjectUtils.isEmpty(fileId)) {
-            fileId = new SnowflakeIdGenerator(0, 0).nextId() + "";
-            log.info("新生成build数据,{}", fileId);
-        }
-
-        sceneFileBuild = new SceneFileBuild();
-        sceneFileBuild.setChildName(folderName.split("_")[0]);
-        sceneFileBuild.setFileId(fileId);
-        sceneFileBuild.setRecStatus("A");
-        sceneFileBuild.setUnicode(folderName);
-        sceneFileBuild.setCreateTime(new Date());
-        this.save(sceneFileBuild);
-        redisUtil.set(String.format(RedisConstants.FOLDER_FILEID_BUILD, folderName), fileId, 2 * 24 * 60 * 60);
-        redisUtil.set(String.format(RedisConstants.FILEID_FOLDER_BUILD, fileId), folderName, 2 * 24 * 60 * 60);
-        return fileId;
-    }
-
-    public ResultData copyDataAndBuild(String sourceBucet,String dataSource,String sceneVer,User user, String customUserId) throws Exception {
-        if(!StringUtils.equals(sceneVer,"V3") && ! StringUtils.equals(sceneVer,"V4")){
-            throw new BusinessException(ErrorCode.PARAM_FORMAT_ERROR.code(),"版本有误,请填写 V3 或者 V4");
-        }
-
-        String fYunPath = ConstantFilePath.OSS_PREFIX + dataSource.replace(ConstantFilePath.BUILD_MODEL_PATH, "")
-                .replace(ConstantFilePath.BUILD_MODEL_LASER_PATH, "");
-        if(!ObjectUtils.isEmpty(sourceBucet)){
-            fYunFileService.copyFileBetweenBucket(sourceBucet,fYunPath,fYunFileConfig.getBucket(),fYunPath);
-        }
-        // 下载data.fdage
-        JSONObject fdageData = JSONObject.parseObject(fYunFileService.getFileContent(fYunPath + "/data.fdage"));
-        if(ObjectUtils.isEmpty(fdageData)){
-            throw new BusinessException(ErrorCode.SYSTEM_ERROR.code(),"4dage 文件不存在");
-        }
-        String cameraName = fdageData.getJSONObject("cam").getString("uuid");
-        Camera cameraEntity = cameraService.getByChildName(cameraName);
-        if(cameraEntity ==  null){
-            log.error("该相机不存在:" + cameraName);
-            throw new BusinessException(ErrorCode.FAILURE_CODE_6003);
-        }
-
-        CameraDetail detailEntity = cameraDetailService.getByCameraId(cameraEntity.getId());
-        if(detailEntity ==  null){
-            log.error("该相机详情不存在:" + cameraName);
-            throw new BusinessException(ErrorCode.FAILURE_CODE_6003);
-        }
-
-        Long cameraType = 11L;
-        //判断是否转台相机
-        if (detailEntity.getType() == 9) {
-            cameraType = 13L;
-        }
-
-        if (CollUtil.isNotEmpty(laserCamTypeList) && laserCamTypeList.contains(detailEntity.getType())) {
-            cameraType = 14L;
-        }
-        String sceneNum = scene3dNumService.generateSceneNum(detailEntity.getType());
-
-        String icon = null;
-        String imgViewPath = null;
-        switch (sceneVer) {
-            case "V3":
-            case "V4":
-                int rebuild = 0;
-                ScenePlus scenePlus = scenePlusService.getByFileId(dataSource);
-                if (!ObjectUtils.isEmpty(scenePlus)) {
-                    log.info("该场景资源已存在,执行补拍逻辑!");
-                    rebuild = 1;
-                    sceneNum = scenePlus.getNum();
-                }
-
-                imgViewPath = String.format(UploadFilePath.IMG_VIEW_PATH, sceneNum);
-                if(fdageData.containsKey("icon") && StringUtils.isNotEmpty(fdageData.getString("icon"))){
-                    String ossPath = ConstantFilePath.OSS_PREFIX + dataSource.replace(ConstantFilePath.BUILD_MODEL_PATH, "")
-                            .replace(ConstantFilePath.BUILD_MODEL_LASER_PATH, "");
-                    fYunFileService.copyFileInBucket(ossPath + File.separator + fdageData.getString("icon"),imgViewPath + fdageData.getString("icon"));
-                    icon = fYunFileConfig.getHost() + imgViewPath + fdageData.getString("icon");
-                    log.info("上传icon成功....");
-                }
-                buildScenePost(dataSource, fdageData, "V3", cameraType, sceneNum, cameraEntity, detailEntity, rebuild, icon, user, customUserId, "zip");
-
-                scenePlus = scenePlusService.getScenePlusByNum(sceneNum);
-                fdkkLaserService.saveScene(scenePlus,fdageData,cameraEntity,user.getUserName(),rebuild == 1 ? true : false, scenePlus.getPayStatus(), null);
-
-                break;
-        }
-        Map<String,Object> result = new HashMap<>();
-        result.put("code",sceneNum);
-        return ResultData.ok(result);
-    }
-
     private ScenePlusVO buildScenePost(String dataSource, JSONObject jsonObject, String buildType, long cameraType,
                                        String sceneNum, Camera camera, CameraDetail cameraDetail, int rebuild,String icon,User user, String customUserId, String uploadType) throws Exception {
         String imgViewPath = String.format(UploadFilePath.IMG_VIEW_PATH, sceneNum);
@@ -1771,288 +1540,6 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         return scenePlusVO;
     }
 
-
-    private void buildV3Scene2(String dataSource,JSONObject jsonObject,long cameraType,String sceneNum,Camera cameraEntity,CameraDetail detailEntity,String icon) throws Exception {
-
-        String cameraName = jsonObject.getJSONObject("cam").getString("uuid");
-
-        log.info("查询相机:" + cameraName);
-
-        String userName = null;
-        if(detailEntity.getUserId() != null){
-            SSOUser user = userService.getSSOUserByUserId(detailEntity.getUserId());
-            userName = user.getUserName();
-        }
-
-        JSONObject firmwareVersion = new JSONObject();
-        if(jsonObject.containsKey("camSoftwareVersion") && StringUtils.isNotEmpty(jsonObject.getString("camSoftwareVersion"))){
-            firmwareVersion.put("camSoftwareVersion", jsonObject.getString("camSoftwareVersion"));
-        }
-
-        if(jsonObject.containsKey("version") && StringUtils.isNotEmpty(jsonObject.getString("version"))){
-            firmwareVersion.put("version", jsonObject.getString("version"));
-        }
-
-
-        String buildType = "V3";
-        String sceneUrl = mainUrl + "/" + sceneProV3Url;
-
-        boolean isObj = jsonObject.containsKey("exportMeshObj") && jsonObject.getIntValue("exportMeshObj") == 1;
-
-        ScenePro scenePro = createScenePro(sceneNum, detailEntity.getCameraId(), jsonObject.getString("creator"),
-                jsonObject.getString("pwd"),
-                cameraType, dataSource, "", icon, detailEntity.getUserId(), userName,
-                jsonObject.getString("location") != null && "1".equals(jsonObject.getString("location")) ? "sfm" : "slam",
-                jsonObject.getJSONArray("points").size(), jsonObject.getString("name"), jsonObject.getString("info"),
-                jsonObject.getInteger("scenetype"), jsonObject.getString("gps"), 0,
-                jsonObject.getInteger("resolution"), firmwareVersion.toString(), sceneUrl, buildType,
-                detailEntity.getCooperationUser(), isObj);
-
-        // 通知激光场景系统开始构建场景
-        if(cameraType == 14){
-            scenePro.setStatus(0);
-            fdkkLaserService.saveScene(scenePro, jsonObject.getString("pwd"), cameraEntity, userName, false, scenePro.getPayStatus());
-        }
-
-        BuildSceneCallMessage buildSceneMqMessage = this.getBuildSceneMqMessage(
-                sceneNum, cameraType, jsonObject.getString("location") != null && "1".equals(jsonObject.getString("location")) ? "sfm" : "slam",
-                jsonObject, buildType, dataSource);
-        rabbitMqProducer.sendByWorkQueue(queueV3ModelingPre, buildSceneMqMessage);
-
-    }
-
-    public ScenePro createScenePro(String projectNum, Long cameraId, String phoneId, String sceneKey,
-                                         Long cameraType, String dataSource, String imgsName,
-                                         String pic, Long userId, String userName, String algorithm,
-                                         Integer sceneShootCount, String sceneName, String sceneDec, Integer sceneType,
-                                         String gps, Integer type, Integer resolution, String firmwareVersion, String url,
-                                         String buildType, Long cooperationUser,Boolean isObj) throws Exception {
-        ScenePro scene;
-        SceneProEdit sceneEdit;
-        if (type == 0) {
-            scene = new ScenePro();
-            sceneEdit = new SceneProEdit();
-        } else {
-            scene = sceneProService.getByNum(projectNum);
-            sceneEdit = sceneProEditService.getByProId(scene.getId());
-        }
-        //先返回链接地址
-        scene.setWebSite(url + projectNum);
-        scene.setCameraId(cameraId);
-        scene.setPhoneId(phoneId);
-        scene.setNum(projectNum);
-
-        scene.setSceneSource(1);
-        scene.setDataSource(dataSource);
-        if (cameraType.longValue() == 5 || cameraType.longValue() == 6) {
-            //场景来源双目相机
-            scene.setSceneSource(2);
-        }
-
-        if (resolution == null || resolution.intValue() == 0) {
-            scene.setSceneScheme(cameraType.intValue());
-        } else {
-            scene.setSceneScheme(4);
-        }
-
-        //场景来源双目相机,sceneScheme为4,加载high,low图
-        if (cameraType.longValue() == 5 || cameraType.longValue() == 6) {
-            scene.setSceneScheme(4);
-        }
-
-        //转台相机用4k图
-        if (cameraType.longValue() == 13) {
-            scene.setSceneSource(3);
-            scene.setSceneScheme(10);
-        }
-
-        //激光相机
-        if (cameraType.longValue() == 14) {
-            scene.setSceneSource(4);
-            scene.setSceneScheme(10);
-        }
-
-        if (pic != null && pic.length() > 5) {
-            scene.setThumb(pic);
-        } else {
-            scene.setThumb(ConstantUrl.DEFAULT_SCENE_PIC);
-        }
-        scene.setThumb(scene.getThumb().concat("?t=") + System.currentTimeMillis());
-        if (!ObjectUtils.isEmpty(userName)) {
-            scene.setUserId(userId);
-        }
-
-        if (sceneShootCount == null) {
-            scene.setShootCount(0);
-        } else {
-            scene.setShootCount(sceneShootCount);
-        }
-        if (sceneName != null) {
-            scene.setSceneName(sceneName);
-        }
-        if (sceneDec != null) {
-            scene.setSceneDec("<p>" + new String(sceneDec.getBytes("UTF-8")) + "</p>");
-        }
-
-        if (sceneType != null) {
-            scene.setSceneType(sceneType);
-        }
-
-        if (gps != null && !gps.trim().equals("")) {
-            scene.setGps(gps);
-        }
-
-        scene.setAlgorithm(algorithm);
-        scene.setFilesName(imgsName);
-        if (!org.springframework.util.StringUtils.isEmpty(firmwareVersion)) {
-            scene.setFirmwareVersion(firmwareVersion);
-        }
-        scene.setBuildType(buildType);
-        log.info("场景记录添加到数据库:" + projectNum);
-        //type=0为新生成场景,其余为重新计算场景
-
-
-        if (type == 0) {
-            scene.setIsObj(ObjectUtils.isEmpty(isObj) || !isObj ? 0 : 1);
-            sceneProService.save(scene);
-
-            sceneEdit = new SceneProEdit();
-            sceneEdit.setNeedKey(0);
-
-            if (sceneKey == null) {
-                sceneKey = "";
-            }
-            sceneEdit.setSceneKey(sceneKey);
-            if (!sceneKey.equals("")) {
-                sceneEdit.setNeedKey(1);
-            } else {
-                sceneEdit.setNeedKey(0);
-            }
-
-            sceneEdit.setProId(scene.getId());
-            sceneEdit.setMapVisi(1);
-            sceneEdit.setTourVisi(1);
-            sceneEdit.setVrVisi(1);
-            sceneEdit.setRulerVisi(0);
-            sceneEdit.setCadImgVisi(1);
-            sceneEdit.setPanoVisi(1);
-            sceneEdit.setM2dVisi(1);
-            sceneEdit.setM3dVisi(1);
-            sceneEdit.setMeasureVisi(0);
-            sceneEdit.setFloorLogoSize(100);
-            sceneEdit.setCreateTime(new Date());
-            sceneProEditService.save(sceneEdit);
-
-            //新增场景时,同时新增场景协作信息
-            if (cooperationUser != null) {
-                SceneCooperation sceneCooperationEntity = new SceneCooperation();
-                sceneCooperationEntity.setNum(projectNum);
-                sceneCooperationEntity.setUserId(cooperationUser);
-                sceneCooperationService.save(sceneCooperationEntity);
-
-                List<SceneResourceCamera> resourceCameraList = sceneResourceCameraService.findListByCameraId(cameraId);
-
-                SceneResourceCooperation sceneResourceCooperationEntity = null;
-                if (resourceCameraList != null && resourceCameraList.size() > 0) {
-                    for (SceneResourceCamera sceneResourceCameraEntity : resourceCameraList) {
-                        sceneResourceCooperationEntity = new SceneResourceCooperation();
-                        sceneResourceCooperationEntity.setSceneResourceId(sceneResourceCameraEntity.getSceneResourceId());
-                        sceneResourceCooperationEntity.setSceneCooperationId(sceneCooperationEntity.getId());
-                        sceneResourceCooperationService.save(sceneResourceCooperationEntity);
-                    }
-                }
-            }
-        } else {
-            scene.setStatus(0);
-            scene.setPayStatus(0);
-            scene.setRecStatus("A");
-            scene.setCreateTime(new Date());
-            if (sceneName != null) {
-                scene.setSceneName(sceneName);
-            }
-            if (sceneType != null) {
-                scene.setSceneType(sceneType);
-            }
-            sceneProService.updateById(scene);
-
-            sceneEdit.setNeedKey(0);
-            if (cameraType.longValue() != 14 && !ObjectUtils.isEmpty(sceneKey)) {
-                sceneEdit.setNeedKey(1);
-                sceneEdit.setSceneKey(sceneKey);
-            }
-            sceneEdit.setProId(scene.getId());
-            sceneEdit.setMapVisi(1);
-            sceneEdit.setTourVisi(1);
-            sceneEdit.setVrVisi(1);
-            sceneEdit.setCadImgVisi(1);
-            sceneEdit.setPanoVisi(1);
-            sceneEdit.setOverlay(null);
-            sceneEdit.setM2dVisi(1);
-            sceneEdit.setPlayData(null);
-            sceneEdit.setFloorLogo("0");
-            sceneEdit.setM3dVisi(1);
-            sceneEdit.setJumpScene(false);
-            sceneEdit.setMeasureVisi(0);
-            sceneEdit.setFloorLogoSize(100);
-            sceneEdit.setUpdateTime(new Date());
-            sceneEdit.setRecStatus("A");
-            sceneEdit.setFloorPublishVer(sceneEdit.getFloorEditVer() + 1);
-            sceneEdit.setFloorEditVer(sceneEdit.getFloorEditVer() + 1);
-            sceneEdit.setVersion(sceneEdit.getVersion() + 1);
-            sceneEdit.setImagesVersion(sceneEdit.getImagesVersion() + 1);
-
-            sceneProEditService.updateById(sceneEdit);
-
-
-        }
-
-        JSONObject scenejson = JSONObject.parseObject(JSONObject.toJSONString(scene));
-        scenejson.put("thumbImg", 0);
-        scenejson.put("version", sceneEdit.getVersion());
-        scenejson.put("floorLogo", 0);
-        if (!ObjectUtils.isEmpty(sceneKey)) {
-            scenejson.put("sceneKey", sceneKey);
-            scenejson.put("public", 1);
-        } else {
-            scenejson.put("sceneKey", "");
-            scenejson.put("public", 0);
-        }
-        if (cameraType.longValue() < 4 || cameraType.longValue() == 5 || cameraType.longValue() == 6) {
-            scenejson.put("visions", 1);
-        } else {
-            scenejson.put("visions", 2);
-        }
-        scenejson.put("createTime", new DateTime(new Date()).toString("yyyy-MM-dd HH:mm"));
-
-        scenejson.put("floorPublishVer", sceneEdit.getFloorPublishVer());
-        scenejson.put("floorEditVer", sceneEdit.getFloorEditVer());
-        scenejson.put("rulerVisi", sceneEdit.getRulerVisi());
-        scenejson.put("entry", null);
-
-        if (!org.springframework.util.StringUtils.isEmpty(sceneEdit.getHotsIds())) {
-            scenejson.put("hots", 1);
-        }
-
-        File file = new File(ConstantFilePath.SCENE_PATH + "data/data" + projectNum);
-        if (!file.exists() || !file.isDirectory()) {
-            file.mkdirs();
-        }
-        FileUtils.writeFile(ConstantFilePath.SCENE_PATH + "data/data" + projectNum + File.separator + "scene.json", scenejson.toString());
-
-        return scene;
-    }
-
-    private ResultData rebuildV3SceneToMini(ScenePro scenePro){
-        log.info("v3场景重算,请求v3服务器,url:{}",v3controlUrl+"api/scene/rebuildScene?num=" + scenePro.getNum());
-        ResponseEntity<Result> responseEntity = restTemplate.getForEntity(v3controlUrl+"api/scene/rebuildScene?num=" + scenePro.getNum(), Result.class);
-        if (responseEntity.getStatusCode().value() != HttpStatus.OK.value() || responseEntity.getBody().getCode() != ServerCode.SUCCESS.code()) {
-            log.error("请求V3服务器重算场景失败, num:{}, result:{}",scenePro.getNum(), JSON.toJSONString(responseEntity));
-            throw new BusinessException(ErrorCode.SYSTEM_BUSY);
-        }
-        log.info("v3场景重算,请求v3服务器,url:{}, result",v3controlUrl+"api/scene/rebuildScene?num=" + scenePro.getNum(), JSON.toJSONString(responseEntity));
-        return ResultData.ok();
-    }
-
     @Override
     public ResultData uploadFile(MultipartFile file, String params, String dir) throws Exception {
 
@@ -2214,201 +1701,6 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
     }
 
     @Override
-    public ResultData sendCallAlgorithm(SendCallAlgorithmParam param) throws Exception {
-        log.info("sendCallAlgorithm 参数为:{}", JSONObject.toJSONString(param));
-
-        String filePath = param.getFilepath();
-        SendCallAlgorithmDetail detail = param.getDetails();
-        String uploadType = detail.getUploadType();
-        if(StrUtil.isNotEmpty(uploadType) && "log".equals(uploadType)){
-            return ResultData.ok();
-        }
-        Integer fileChunkSum = detail.getFileChunkSum();
-        String uuid = detail.getUuid();
-        if(Objects.isNull(fileChunkSum) || StrUtil.isBlank(uuid)){
-            throw new BusinessException(ErrorCode.PARAM_REQUIRED.code(), "details参数中fileChunkSum和uuid不能为空");
-        }
-
-        String snCode = uuid.split("_")[0];
-        String parentPath = sendCallAlgorithmPath.concat(uuid);
-//        if(FileUtil.exist(parentPath)){
-//            FileUtil.del(parentPath);
-//        }
-        Camera camera = cameraService.getByChildName(snCode);
-        if(Objects.isNull(camera)){
-            throw new BusinessException(ErrorCode.CAMERA_BIND_NO_EXIST.code(), "相机未入库");
-        }
-
-        String localFilePath = parentPath.concat(File.separator).concat(uuid).concat(".zip");
-        try {
-            String extName = FileUtil.extName(filePath);
-            String subFilePath = parentPath.concat(File.separator).concat(uuid).concat(".").concat(extName);
-            FileUtil.mkParentDirs(localFilePath);
-            HttpUtil.downloadFile(filePath, subFilePath);
-        }catch (Exception e){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_5063.code(), "原始资源压缩包下载失败");
-        }
-
-        //检测压缩包分卷是否与detail中的总数一样
-        List<String> fileNames = FileUtil.listFileNames(parentPath);
-        if(fileNames.size() != fileChunkSum){
-            return ResultData.ok("压缩包分卷不完整,请继续上传剩余的分卷");
-        }
-
-        if(!FileUtil.exist(localFilePath)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_5063.code(), "zip压缩包不存在");
-        }
-
-        ScenePre scenePre = new ScenePre();
-        scenePre.setZipPath(parentPath);
-        scenePre.setCreateTime(new Date());
-        scenePre.setUpdateTime(new Date());
-        scenePre.setStatus(0);
-        scenePreService.save(scenePre);
-
-        // 异步解压资源文件上传
-        ExecutorService executor = ThreadUtil.newSingleExecutor();
-        try {
-            CompletableFuture.runAsync(() -> {
-                try {
-                    log.info("开始异步解压文件");
-                    ZipFile zipFile = new ZipFile(new File(localFilePath));
-                    if (zipFile.isEncrypted()) {
-                        zipFile.setPassword(ZipConstant.zipPassword);
-                        zipFile.extractAll(parentPath);
-                    } else {
-                        ZipUtil.unzip(localFilePath, parentPath);
-                    }
-
-                    List<String> filePathList = FileUtils.list(new File(parentPath));
-                    String configJsonPath = null;
-                    for (String item : filePathList) {
-                        if(!item.contains("config.json")){
-                            continue;
-                        }
-                        configJsonPath = item;
-                    }
-                    String dataPath = FileUtil.getParent(configJsonPath, 1);
-
-                    // 读取本地文件并校验文件
-                    // 读取config.json
-                    log.info("config.json路径:{}", configJsonPath);
-                    if(!FileUtil.exist(configJsonPath)){
-                        throw new RuntimeException("config.json 文件有误!");
-                    }
-
-                    JSONObject configJson = JSONObject.parseObject(FileUtils.readFile(configJsonPath));
-                    String folderName = configJson.getString("id");
-                    String customUserId = configJson.getString("customUserId");
-                    String customUserName = configJson.getString("customUserName");
-                    String customUserPwd = configJson.getString("customUserPwd");
-                    if(StrUtil.isBlank(folderName) || StrUtil.isBlank(snCode)){
-                        throw new RuntimeException("config.json 文件有误!");
-                    }
-
-                    // 检测是否有生成
-                    String fileId = getFileIdByFolderName(folderName);
-                    String subFolder = snCode.concat(File.separator).concat(fileId).concat(File.separator).concat(folderName);
-                    // 解压获取dataSource 并上传资源到OSS
-                    String dataSource = ConstantFilePath.BUILD_MODEL_PATH.concat(subFolder);
-                    log.info("dataSource 为:{}", dataSource);
-
-                    scenePre.setFileId(fileId);
-                    scenePre.setStatus(1);
-                    scenePre.setUpdateTime(new Date());
-                    scenePreService.updateById(scenePre);
-                    log.info("异步开始上传文件");
-                    // 上传oaas
-                    fYunFileService.uploadFileByCommand(dataPath, ConstantFilePath.OSS_PREFIX.concat(subFolder));
-
-                    //删除本地压缩包,防止补拍上传文件不一致
-                    FileUtil.del(parentPath);
-
-                    scenePre.setOssPath(ConstantFilePath.OSS_PREFIX.concat(subFolder));
-                    scenePre.setStatus(2);
-                    scenePre.setUpdateTime(new Date());
-                    scenePreService.updateById(scenePre);
-
-                    log.info("开始判断人员是否存在,走注册用户逻辑");
-                    log.info("userPasswordKey:{}", userPasswordKey);
-                    log.info("userPasswordIv:{}", userPasswordIv);
-
-                    //调注册用户接口
-                    Map<String, Object> params = new HashMap<>();
-                    params.put("ryId", customUserId);
-                    params.put("ryNo", customUserName);
-                    params.put("nickName", customUserName);
-                    params.put("password", AesUtil.encryptCBC(customUserPwd, userPasswordKey, userPasswordIv, AesUtil.ALMODE_CBC_NOPADDING));
-                    String url = fdServiceUrl.concat(ApiConstant.URL_ADD_UCENTER_USER);
-                    myClient.post(url, params);
-                    JyUser jyUser = jyUserService.getByRyId(customUserId);
-                    User user = userService.getById(jyUser.getUserId());
-                    if(Objects.isNull(jyUser)){
-                        throw new RuntimeException("注册用户失败");
-                    }
-
-                    log.info("文件上传成功,开始通知计算");
-                    // 通知计算
-                    ResultData resultData = this.copyDataAndBuild(null, dataSource, "V4", user, customUserId);
-                    log.info("通知计算成功");
-
-                    scenePre.setStatus(3);
-                    scenePre.setUpdateTime(new Date());
-                    scenePreService.updateById(scenePre);
-                } catch (Exception e) {
-                    log.error("上传失败", e);
-                    scenePre.setStatus(CommonSuccessStatus.FAIL.code());
-                    scenePreService.updateById(scenePre);
-                }
-            }, executor);
-        }finally {
-            executor.shutdown();
-        }
-        return ResultData.ok();
-    }
-
-    public static void main(String[] args) throws Exception {
-////        final String s = AesUtil.encryptCBC("Aa123456", "0000000856753656", "pwel781esd6wglxm", AesUtil.ALMODE_CBC_NOPADDING);
-////        System.out.println(s);
-////        System.out.println(UUID.fastUUID());
-//
-////        String test = "bpvt00017#1396877795149217792#";
-////        String[] split = test.split("#");
-////        System.out.println(split);
-//        String password = MD5.create().digestHex("Aa123456");
-//        System.out.println(password);
-//         password = MD5.create().digestHex16("Aa123456");
-//        System.out.println(password);
-
-//        String cmd = "java -jar D:\\4dkankan_code\\project-hyb\\target\\hyb.jar --spring.profiles.active=local";
-////        Process exec = Runtime.getRuntime().exec(cmd);
-////        System.out.println(exec);
-//        CmdUtils.callLine(cmd);
-        try {
-            String javaHome = System.getProperty("java.home");
-            String javaBin = javaHome + "/bin/java"; // 获取Java可执行文件路径
-            List<String> command = new ArrayList<>();
-            command.add(javaBin);
-            command.add("-jar");
-            command.add("D:\\4dkankan_code\\project-hyb\\target\\hyb.jar"); // 添加JAR文件路径
-            command.add("--spring.profiles.active=local");
-
-            ProcessBuilder builder = new ProcessBuilder(command);
-            builder.redirectErrorStream(true); // 将错误输出和标准输出合并
-            Process p = builder.start();
-
-//            BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));
-//            String line;
-//            while ((line = r.readLine()) != null) {
-//                System.out.println(line); // 打印输出结果
-//            }
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-
-    }
-
-    @Override
     public ResultData uploadFile(SendCallAlgorithmParam param) throws Exception {
 
         log.info("sendCallAlgorithm 参数为:{}", JSONObject.toJSONString(param));
@@ -2570,7 +1862,6 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
                 jyNo = sceneOrigBd.getRyNo();
                 nickName = sceneOrigBd.getRyName();
             }
-            //推送开始上传状态
 
             //调注册用户接口
             Map<String, Object> params = new HashMap<>();