dengsixing 6 дней назад
Родитель
Сommit
0b23217792

+ 1 - 1
src/main/java/com/fdkankan/contro/controller/SceneFileController.java

@@ -78,7 +78,7 @@ public class SceneFileController{
      */
     @PostMapping("turntableUploadSuccess")
     public ResultData turntableUploadSuccess(String params) throws Exception {
-        return sceneFileBuildService.turntableUploadSuccess(params, null, false, true);
+        return sceneFileBuildService.turntableUploadSuccess(params, null, false, true, null);
     }
 
     /**

+ 3 - 3
src/main/java/com/fdkankan/contro/mq/listener/UploadSceneListener.java

@@ -108,7 +108,7 @@ public class UploadSceneListener {
                 if(relocation){
                     this.uploadSceneRelocation(zipDir + uuid);
                 }else{
-                    this.uploadSceneOirg(num, zipDir + uuid);
+                    this.uploadSceneOirg(num, zipDir + uuid, jsonObject.getIntValue("genGs"));
                 }
             }
 
@@ -130,7 +130,7 @@ public class UploadSceneListener {
 //    }
 
 
-    private void uploadSceneOirg(String num, String sourcePath) throws Exception {
+    private void uploadSceneOirg(String num, String sourcePath, Integer genGs) throws Exception {
         ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);
         NameFileFilter fileFilter = new NameFileFilter("data.fdage");
         File dataFdageFile = FileUtil.loopFiles(sourcePath, fileFilter).stream().filter(v -> !v.getAbsolutePath().contains("/backup/")).findFirst().get();
@@ -156,7 +156,7 @@ public class UploadSceneListener {
         String params = snCode + "#" + fileId + "#" + uniCode;
         String encode = Base64.encode(RSAEncrypt.encrypt(RSAEncrypt.loadPublicKeyByStr(RSAEncrypt.loadPublicKeyByFile()), params.getBytes(StandardCharsets.UTF_8)));
         if(camType == 9 || camType == 10 || camType == 11 || camType == 12){
-            sceneFileBuildService.turntableUploadSuccess(encode, user, true, false);
+            sceneFileBuildService.turntableUploadSuccess(encode, user, true, false, genGs);
         }else{
             sceneFileBuildService.uploadSuccessBuild(encode, user, true, false);
         }

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

@@ -200,7 +200,16 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
             message.setBizType("standard");
 
             //写入算法参数文件
-            buildService.writeDataJson(message, fdageJson, null, null);
+            Map<String, String> dataMap = null;
+            if(message.getExt().get("genGs") != null){
+                Integer genGs = (Integer) message.getExt().get("genGs");
+                if(genGs != null && genGs == CommonStatus.YES.code().intValue()){
+                    dataMap = new HashMap<>();
+                    dataMap.put("splitType", "SPLIT_V34");
+                    dataMap.put("skyboxType", "SPLIT_V15");
+                }
+            }
+            buildService.writeDataJson(message, fdageJson, dataMap, null);
 
             //发送mq,就进行计算
             mqProducer.sendByWorkQueue(queueModelingCall, message);

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

@@ -26,7 +26,7 @@ public interface ISceneFileBuildService extends IService<SceneFileBuild> {
 
     ResultData uploadSuccessBuild(String params, User user, boolean forceBuild, boolean checkUploadFile) throws Exception;
 
-    ResultData turntableUploadSuccess(String params, User user, boolean forceBuild, boolean checkUploadFile) throws Exception;
+    ResultData turntableUploadSuccess(String params, User user, boolean forceBuild, boolean checkUploadFile, Integer genGs) throws Exception;
 
     ResultData rebuildScene(String num,Boolean force,Boolean deleteExtras, String from) throws IOException;
 

+ 1 - 0
src/main/java/com/fdkankan/contro/service/impl/JmgaServiceImpl.java

@@ -78,6 +78,7 @@ public class JmgaServiceImpl implements IJmgaService {
         JSONObject content = new JSONObject();
         content.put("zipPath", zipDir + zipName);
         content.put("sourceType", param.getSourceType());
+        content.put("genGs", param.getGenGs());
         Camera camera = null;
         CameraDetail cameraDetail = null;
         String sceneNum = null;

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

@@ -503,6 +503,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
             }
             mqMessage.getExt().put("deleteExtras", true);
             mqMessage.getExt().put("keepTitle", 0);
+            mqMessage.getExt().put("genGs", jsonObject.getInteger("genGs"));
             if (jsonObject.getIntValue("location") == 7) {
                 //保存重定位绑定关系
                 this.saveRelocationBind(scenePlusVO.getNum(), jsonObject);
@@ -823,7 +824,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
     }
 
     @Override
-    public ResultData turntableUploadSuccess(String params, User user, boolean forceBuild, boolean checkUploadFille) throws Exception {
+    public ResultData turntableUploadSuccess(String params, User user, boolean forceBuild, boolean checkUploadFille, Integer genGs) throws Exception {
         log.info("turntableUploadSuccess-params: " + params);
         String preParams = params;
         if (StringUtils.isEmpty(params)) {
@@ -897,6 +898,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
 
         ScenePlusVO scenePlusVO = null;
 
+        fdageJson.put("genGs", genGs);
         if (ObjectUtils.isEmpty(scenePro) || (!ObjectUtils.isEmpty(scenePro.getIsUpgrade()) && scenePro.getIsUpgrade() == 1)) {
             scenePlusVO = buildScene(fileId, prefixBuffer.toString(), fdageJson, buildType, cameraType, forceBuild);
         } else {

+ 4 - 0
src/main/java/com/fdkankan/contro/vo/UploadSceneOrigParamVo.java

@@ -17,4 +17,8 @@ public class UploadSceneOrigParamVo {
     //资源包类型 orig-原始数据  offline 离线包
     @NotBlank(message = "sourceType不能为空")
     private String sourceType;
+
+    //是否生成3d高斯
+    private Integer genGs;
+
 }