浏览代码

v4.9.0 点云场景生成obj bug

dsx 2 年之前
父节点
当前提交
7ea13003ae
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      src/main/java/com/fdkankan/contro/mq/service/impl/BuildObjServiceImpl.java

+ 5 - 3
src/main/java/com/fdkankan/contro/mq/service/impl/BuildObjServiceImpl.java

@@ -2,6 +2,7 @@ package com.fdkankan.contro.mq.service.impl;
 
 import cn.hutool.core.exceptions.ExceptionUtil;
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
@@ -122,9 +123,13 @@ public class BuildObjServiceImpl implements IBuildSceneService {
                 log.error("data.fdage文件不存在");
                 return ;
             }
+            //下载资源到本地
+            this.downLoadSource(message, laserObjFilePath);
+
             if (!jsonObject.containsKey("exportMeshObj") || jsonObject.getIntValue("exportMeshObj") != 1) {
                 // 写入data.fdage 防止重算
                 jsonObject.put("exportMeshObj", 1);
+                FileUtil.writeUtf8String(jsonObject.toJSONString(), laserObjFilePath + File.separator + "capture" + File.separator + "data.fdage");
                 fYunFileService.uploadFile(laserObjFilePath + File.separator + "capture" + File.separator + "data.fdage",
                         ConstantFilePath.OSS_PREFIX + path.replace(ConstantFilePath.BUILD_MODEL_LASER_PATH, "") + "/data.fdage");
             }
@@ -138,9 +143,6 @@ public class BuildObjServiceImpl implements IBuildSceneService {
             message.setPath(laserObjFilePath);
             message.setResultReceiverMqName(queueObjModelingPost);
 
-            //下载资源到本地
-            this.downLoadSource(message, laserObjFilePath);
-
             //发送mq,就进行计算
             mqProducer.sendByWorkQueue(queueModelingCall, message);