Explorar o código

故宫博物馆

dengsixing hai 1 mes
pai
achega
dc0c136f42

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

@@ -272,7 +272,7 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
             ScenePlus scenePlus = scenePlusService.getScenePlusByNum(sceneCode);
             ScenePlus scenePlus = scenePlusService.getScenePlusByNum(sceneCode);
 
 
             Integer cameraType = Integer.parseInt(message.getBuildContext().get("cameraType").toString());
             Integer cameraType = Integer.parseInt(message.getBuildContext().get("cameraType").toString());
-            Map<String, String> uploadFiles = commonService.getUploadFiles(scenePlus,path,cameraType,fdageData);
+            Map<String, String> uploadFiles = commonService.getUploadFiles(scenePlus,path,cameraType,fdageData, message);
 
 
             scenePlus.setPayStatus(PayStatus.PAY.code());
             scenePlus.setPayStatus(PayStatus.PAY.code());
             scenePlus.setUpdateTime(new Date());
             scenePlus.setUpdateTime(new Date());

+ 3 - 0
src/main/java/com/fdkankan/contro/service/ICommonService.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.common.util.FileUtils;
 import com.fdkankan.common.util.FileUtils;
 import com.fdkankan.contro.entity.*;
 import com.fdkankan.contro.entity.*;
 import com.fdkankan.rabbitmq.bean.BuildSceneCallMessage;
 import com.fdkankan.rabbitmq.bean.BuildSceneCallMessage;
+import com.fdkankan.rabbitmq.bean.BuildSceneResultMqMessage;
 
 
 import java.io.IOException;
 import java.io.IOException;
 import java.util.LinkedHashMap;
 import java.util.LinkedHashMap;
@@ -61,6 +62,8 @@ public interface ICommonService {
 
 
     Map<String, String> getUploadFiles(ScenePlus scenePlus,String path,Integer cameraType,JSONObject fdageData) throws Exception;
     Map<String, String> getUploadFiles(ScenePlus scenePlus,String path,Integer cameraType,JSONObject fdageData) throws Exception;
 
 
+    Map<String, String> getUploadFiles(ScenePlus scenePlus, String path, Integer cameraType, JSONObject fdageData, BuildSceneResultMqMessage brMsg) throws Exception;
+
     boolean checkIsSpVr(JSONObject dataFdageJson, CameraDetail cameraDetail);
     boolean checkIsSpVr(JSONObject dataFdageJson, CameraDetail cameraDetail);
 
 
     Integer getShootCount(String num);
     Integer getShootCount(String num);

+ 16 - 0
src/main/java/com/fdkankan/contro/service/impl/CommonServiceImpl.java

@@ -31,6 +31,7 @@ import com.fdkankan.model.utils.CreateObjUtil;
 import com.fdkankan.model.utils.FloorPlanUserUtil;
 import com.fdkankan.model.utils.FloorPlanUserUtil;
 import com.fdkankan.model.utils.SceneUtil;
 import com.fdkankan.model.utils.SceneUtil;
 import com.fdkankan.rabbitmq.bean.BuildSceneCallMessage;
 import com.fdkankan.rabbitmq.bean.BuildSceneCallMessage;
+import com.fdkankan.rabbitmq.bean.BuildSceneResultMqMessage;
 import com.fdkankan.rabbitmq.util.RabbitMqProducer;
 import com.fdkankan.rabbitmq.util.RabbitMqProducer;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.util.RedisUtil;
 import com.fdkankan.redis.util.RedisUtil;
@@ -697,6 +698,12 @@ public class CommonServiceImpl implements ICommonService {
 
 
     @Override
     @Override
     public Map<String, String> getUploadFiles(ScenePlus scenePlus,String path,Integer cameraType,JSONObject fdageData) throws Exception {
     public Map<String, String> getUploadFiles(ScenePlus scenePlus,String path,Integer cameraType,JSONObject fdageData) throws Exception {
+        return this.getUploadFiles(scenePlus,path,cameraType,fdageData,null);
+
+    }
+
+    @Override
+    public Map<String, String> getUploadFiles(ScenePlus scenePlus,String path,Integer cameraType,JSONObject fdageData, BuildSceneResultMqMessage brMsg) throws Exception {
         if (ObjectUtils.isEmpty(scenePlus)) {
         if (ObjectUtils.isEmpty(scenePlus)) {
             throw new Exception("未找到场景信息:" + path);
             throw new Exception("未找到场景信息:" + path);
         }
         }
@@ -764,6 +771,11 @@ public class CommonServiceImpl implements ICommonService {
             }
             }
         }
         }
 
 
+        String splitType = null;
+        if(brMsg != null){
+            splitType = (String) brMsg.getExt().get("splitType");
+        }
+
         //exportMeshObj这个是字段由app写入的
         //exportMeshObj这个是字段由app写入的
         boolean genModel = true;//是否生成模型 默认生成,深时场景要根据 exportMeshObj判断是否生成
         boolean genModel = true;//是否生成模型 默认生成,深时场景要根据 exportMeshObj判断是否生成
         if(!ObjectUtils.isEmpty(cameraType)
         if(!ObjectUtils.isEmpty(cameraType)
@@ -777,6 +789,10 @@ public class CommonServiceImpl implements ICommonService {
                 || !sdTilesSceneSourceList.contains(scenePlus.getSceneSource())){
                 || !sdTilesSceneSourceList.contains(scenePlus.getSceneSource())){
             gen3dTiles = false;
             gen3dTiles = false;
         }
         }
+        //算法部又偷偷改了东西了,SPLIT_V3以前是生成obj模型的,现在生成了3dtiles
+        if(splitType != null && splitType.equals("SPLIT_V3")){
+            gen3dTiles = true;
+        }
 
 
         if(genModel){
         if(genModel){
             if (!gen3dTiles) {
             if (!gen3dTiles) {