Browse Source

修改计算逻辑

tianboguang 2 years ago
parent
commit
4751ab04c4

+ 11 - 3
4dkankan-utils-model/src/main/java/com/fdkankan/model/utils/ComputerUtil.java

@@ -8,9 +8,9 @@ import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.common.constant.ErrorCode;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.util.FileUtils;
-import com.fdkankan.model.constants.ConstantFileName;
 import com.fdkankan.model.constants.ConstantFilePath;
 import com.fdkankan.model.constants.UploadFilePath;
+import org.apache.commons.lang3.ObjectUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -232,8 +232,8 @@ public class ComputerUtil {
         FileUtils.writeFile(calPath + "/data.json", dataJson.toString());
     }
 
-    public static Map<String, String> getTypeString(String cameraType, String algorithm, String resolution){
-        Map<String, String> map = new HashMap<String, String>();
+    public static Map<String, String> getTypeString(String cameraType, String algorithm, String resolution,JSONObject fdageData){
+        Map<String, String> map = new HashMap<>();
         String splitType = "";
         String skyboxType = "";
         String dataDescribe = "";
@@ -273,6 +273,14 @@ public class ComputerUtil {
                 log.info("激光转台相机调用算法");
                 skyboxType = "SKYBOX_V11";
                 splitType = "SPLIT_V14";
+                if (!ObjectUtils.isEmpty(fdageData)) {
+                    if (fdageData.containsKey("exportMeshObj") && fdageData.getIntValue("exportMeshObj") == 1) {
+                        splitType = "SPLIT_V22";
+                    }
+                    if (fdageData.containsKey("OnlyExportMeshObj")) {
+                        splitType = "SPLIT_V20";
+                    }
+                }
             }
 
         }else {