Sfoglia il codice sorgente

Merge branch 'release-故宫博物馆' into test

dengsixing 1 mese fa
parent
commit
6223d662d8

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

@@ -162,8 +162,12 @@ public class BuildLiguangServiceImpl implements IBuildSceneService {
             message.getBuildContext().put("cameraType",message.getCameraType());
             message.setBizType("standard");
 
+            Map<String, String> dataMap = new HashMap<>();
+            dataMap.put("splitType", (String) message.getExt().get("splitType"));
+            dataMap.put("skyboxType", (String) message.getExt().get("skyboxType"));
+
             JSONObject fdageData = commonService.getFdageData(message.getPath() + File.separator + "capture" + File.separator + "data.fdage");
-            buildService.writeDataJson(message, fdageData, null, null);
+            buildService.writeDataJson(message, fdageData, dataMap, null);
 
             log.info("场景计算资源准备结束,场景码:{}", message.getSceneNum());
 

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

@@ -298,7 +298,7 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
             ScenePlus scenePlus = scenePlusService.getScenePlusByNum(sceneCode);
 
             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.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.contro.entity.*;
 import com.fdkankan.rabbitmq.bean.BuildSceneCallMessage;
+import com.fdkankan.rabbitmq.bean.BuildSceneResultMqMessage;
 
 import java.io.IOException;
 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, BuildSceneResultMqMessage brMsg) throws Exception;
+
     boolean checkIsSpVr(JSONObject dataFdageJson, CameraDetail cameraDetail);
 
     Integer getShootCount(String num);

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

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