瀏覽代碼

Merge remote-tracking branch 'origin/feature-v4-20220801' into feature-v4-20220801

dengsixing 2 年之前
父節點
當前提交
a38d5f26c7

+ 2 - 0
4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/SceneConstant.java

@@ -115,4 +115,6 @@ public class SceneConstant {
     public static final int FAILURE_CODE_5037 = 5037;
     public static final String FAILURE_MSG_5037 = "场景正在计算中,请待计算完成后再操作。";
 
+    public static final int FAILURE_CODE_5038 = 5038;
+    public static final String FAILURE_MSG_5038 = "生成 obj 失败,请重算场景。";
 }

+ 1 - 1
4dkankan-utils-fyun-local/src/main/java/com/fdkankan/fyun/local/LocalFileService.java

@@ -62,7 +62,7 @@ public class LocalFileService extends AbstractFYunFileService {
         try {
             String optType = new File(filePath).isDirectory() ? "folder" : "file";
             String command = String.format(fYunConstants.DOWNLOAD_SH, bucket, filePath, remoteFilePath, FYunTypeEnum.LOCAL.code(), optType);
-            log.info("开始上传文件, ossPath:{}, srcPath:{}", remoteFilePath, filePath);
+            log.info("开始下载文件, ossPath:{}, srcPath:{}", remoteFilePath, filePath);
             callshell(command);
         } catch (Exception e) {
             log.error("上传文件失败, ossPath:{}, srcPath:{}", remoteFilePath, filePath);

+ 1 - 1
4dkankan-utils-fyun-s3/src/main/java/com/fdkankan/fyun/s3/S3FileService.java

@@ -104,7 +104,7 @@ public class S3FileService extends AbstractFYunFileService {
         try {
             String optType = new File(filePath).isDirectory() ? "folder" : "file";
             String command = String.format(fYunConstants.DOWNLOAD_SH, bucket, remoteFilePath, filePath, FYunTypeEnum.AWS.code(), optType);
-            log.info("开始上传文件, ossPath:{}, srcPath:{}", remoteFilePath, filePath);
+            log.info("开始下载文件, ossPath:{}, srcPath:{}", remoteFilePath, filePath);
             callshell(command);
         } catch (Exception e) {
             log.error("上传文件失败, ossPath:{}, srcPath:{}", remoteFilePath, filePath);

+ 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 {

+ 8 - 1
4dkankan-utils-rabbitmq/src/main/java/com/fdkankan/rabbitmq/util/RabbitMqProducer.java

@@ -1,16 +1,20 @@
 package com.fdkankan.rabbitmq.util;
 
+import cn.hutool.json.JSONObject;
 import com.fdkankan.rabbitmq.config.ModelingQueueConfig;
 import com.rabbitmq.client.AMQP;
 import com.rabbitmq.client.AMQP.Queue.DeclareOk;
 import com.rabbitmq.client.Channel;
-import java.util.UUID;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.amqp.rabbit.connection.CorrelationData;
 import org.springframework.amqp.rabbit.core.ChannelCallback;
 import org.springframework.amqp.rabbit.core.RabbitTemplate;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
+import java.util.UUID;
+
 /**
  * <p>
  * TODO
@@ -22,6 +26,8 @@ import org.springframework.stereotype.Component;
 @Component
 public class RabbitMqProducer {
 
+    private Logger log = LoggerFactory.getLogger(this.getClass().getName());
+
     @Autowired
     ModelingQueueConfig modelingQueueConfig;
 
@@ -32,6 +38,7 @@ public class RabbitMqProducer {
      * 工作队列模式发送
      */
     public void sendByWorkQueue(String queue, Object content){
+        log.info("开始发送Mq消息,消息内容:{}", new JSONObject(content).toString());
         CorrelationData correlationId = new CorrelationData(UUID.randomUUID().toString());
         rabbitTemplate.convertAndSend(queue, content, correlationId);
     }

+ 2 - 2
4dkankan-utils-sms/src/main/java/com/fdkankan/sms/SmsService.java

@@ -64,7 +64,7 @@ public class SmsService {
             // 必填:待发送手机号
             request.setPhoneNumbers(phoneNum);
             // 必填:短信签名-可在短信控制台中找到
-            request.setSignName(new String(sign.getBytes("ISO-8859-1"),"utf-8"));
+            request.setSignName(sign);
             // 必填:短信模板-可在短信控制台中找到
             request.setTemplateCode(templateCode);
 
@@ -125,7 +125,7 @@ public class SmsService {
         //必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式
         request.setPhoneNumbers(userPhone);
         //必填:短信签名-可在短信控制台中找到
-        request.setSignName(new String(sign.getBytes("ISO-8859-1"),"utf-8"));
+        request.setSignName(sign);
         //必填:短信模板-可在短信控制台中找到
         request.setTemplateCode("SMS_199808901");
         JSONObject jsonObject = new JSONObject();