|
@@ -1,5 +1,6 @@
|
|
package com.fdkankan.ucenter.service.impl;
|
|
package com.fdkankan.ucenter.service.impl;
|
|
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
import cn.hutool.core.io.FileUtil;
|
|
import cn.hutool.core.io.FileUtil;
|
|
import cn.hutool.json.JSONUtil;
|
|
import cn.hutool.json.JSONUtil;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -11,6 +12,7 @@ import com.fdkankan.common.constant.SceneConstant;
|
|
import com.fdkankan.common.constant.SceneKind;
|
|
import com.fdkankan.common.constant.SceneKind;
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
import com.fdkankan.common.util.*;
|
|
import com.fdkankan.common.util.*;
|
|
|
|
+import com.fdkankan.model.constants.UploadFilePath;
|
|
import com.fdkankan.rabbitmq.bean.BuildSceneCallMessage;
|
|
import com.fdkankan.rabbitmq.bean.BuildSceneCallMessage;
|
|
import com.fdkankan.rabbitmq.util.RabbitMqProducer;
|
|
import com.fdkankan.rabbitmq.util.RabbitMqProducer;
|
|
import com.fdkankan.redis.constant.RedisKey;
|
|
import com.fdkankan.redis.constant.RedisKey;
|
|
@@ -1223,17 +1225,28 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
ScenePlusExt scenePlusExt = scenePlusExtService.getByPlusId(scenePlus.getId());
|
|
ScenePlusExt scenePlusExt = scenePlusExtService.getByPlusId(scenePlus.getId());
|
|
|
|
|
|
// 拷贝文件
|
|
// 拷贝文件
|
|
- String path = scenePlusExt.getDataSource();
|
|
|
|
- if (!new File(path + "/caches/reconstruction/final.bin").exists()
|
|
|
|
- || !new File(path + "/caches/reconstruction/chunk.json").exists()
|
|
|
|
- || !new File(path + "/caches/images").exists()
|
|
|
|
- || !new File(path + "/caches/depthmap").exists()
|
|
|
|
- || !new File(path + "/caches/depthmap_csc").exists()
|
|
|
|
- || !new File(path + "/caches/panorama.json").exists()
|
|
|
|
- || !new File(path + "/results/laserData/laser.ply").exists()) {
|
|
|
|
- log.error("生成obj缺少必要文件,生成失败!");
|
|
|
|
|
|
+ String ossResultPath = String.format(UploadFilePath.scene_result_data_path, num);
|
|
|
|
+ String ossReconstruction = ossResultPath + "caches/reconstruction/";
|
|
|
|
+ if(!fYunFileService.fileExist(ossReconstruction + "final.bin")
|
|
|
|
+ || !fYunFileService.fileExist(ossReconstruction + "chunk.json")
|
|
|
|
+ || CollUtil.isEmpty(fYunFileService.listRemoteFiles(ossResultPath + "caches/images"))
|
|
|
|
+ || CollUtil.isEmpty(fYunFileService.listRemoteFiles(ossResultPath + "caches/depthmap"))
|
|
|
|
+ || CollUtil.isEmpty(fYunFileService.listRemoteFiles(ossResultPath + "caches/depthmap_csc"))
|
|
|
|
+ || !fYunFileService.fileExist(ossResultPath + "caches/panorama.json")
|
|
|
|
+ || !fYunFileService.fileExist(ossResultPath + "results/laserData/laser.ply")){
|
|
throw new BusinessException(SceneConstant.FAILURE_CODE_5038, SceneConstant.FAILURE_MSG_5038);
|
|
throw new BusinessException(SceneConstant.FAILURE_CODE_5038, SceneConstant.FAILURE_MSG_5038);
|
|
}
|
|
}
|
|
|
|
+// String path = scenePlusExt.getDataSource();
|
|
|
|
+// if (!new File(path + "/caches/reconstruction/final.bin").exists()
|
|
|
|
+// || !new File(path + "/caches/reconstruction/chunk.json").exists()
|
|
|
|
+// || !new File(path + "/caches/images").exists()
|
|
|
|
+// || !new File(path + "/caches/depthmap").exists()
|
|
|
|
+// || !new File(path + "/caches/depthmap_csc").exists()
|
|
|
|
+// || !new File(path + "/caches/panorama.json").exists()
|
|
|
|
+// || !new File(path + "/results/laserData/laser.ply").exists()) {
|
|
|
|
+// log.error("生成obj缺少必要文件,生成失败!");
|
|
|
|
+// throw new BusinessException(SceneConstant.FAILURE_CODE_5038, SceneConstant.FAILURE_MSG_5038);
|
|
|
|
+// }
|
|
|
|
|
|
// 获取最新的场景名称
|
|
// 获取最新的场景名称
|
|
JSONObject sceneInfo = fdkkLaserService.getSceneByNum(num);
|
|
JSONObject sceneInfo = fdkkLaserService.getSceneByNum(num);
|