|
@@ -20,6 +20,7 @@ import com.fdkankan.common.util.FileUtils;
|
|
|
import com.fdkankan.contro.bean.SceneJsonBean;
|
|
|
import com.fdkankan.contro.entity.*;
|
|
|
import com.fdkankan.contro.mq.service.IBuildSceneService;
|
|
|
+import com.fdkankan.contro.mq.service.ICommonService;
|
|
|
import com.fdkankan.contro.service.*;
|
|
|
import com.fdkankan.contro.vo.SceneEditControlsVO;
|
|
|
import com.fdkankan.fyun.config.FYunFileConfig;
|
|
@@ -123,6 +124,8 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
|
private ICompanyService companyService;
|
|
|
@Autowired
|
|
|
private ISceneAsynOperLogService sceneAsynOperLogService;
|
|
|
+ @Autowired
|
|
|
+ private ICommonService commonService;
|
|
|
|
|
|
@Override
|
|
|
public void buildScenePre(BuildSceneCallMessage message) throws Exception{
|
|
@@ -289,7 +292,7 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
|
this.copyToEditDir(sceneCode);
|
|
|
|
|
|
//计算完毕后,同步全景图到缓存目录
|
|
|
- this.cachePanorama(path, sceneCode);
|
|
|
+// this.cachePanorama(path, sceneCode);
|
|
|
|
|
|
//生成houseTypejson并上传
|
|
|
boolean existHouseType = this.uploadHouseTypeJson(sceneCode, scenePlusExt.getDataSource());
|
|
@@ -312,6 +315,7 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
|
fdkkLaserService.cloudPointBuild(sceneCode,path);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
//写scene.json
|
|
|
this.writeSceneJson(sceneCode, videosJson,sceneEditInfo, sceneEditInfoExt, sceneEditControls, scenePlus,scenePlusExt,company);
|
|
|
|
|
@@ -329,7 +333,11 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
|
//更新场景主表
|
|
|
scenePlusService.updateById(scenePlus);
|
|
|
|
|
|
- CreateObjUtil.deleteFile(path.replace(ConstantFilePath.BUILD_MODEL_PATH, "/") + "/capture");
|
|
|
+ //上传计算结果文件
|
|
|
+ commonService.uploadBuildResultData(sceneCode, path, SceneVersionType.V4.code());
|
|
|
+
|
|
|
+ //删除计算目录
|
|
|
+ CreateObjUtil.deleteFile(path.replace(ConstantFilePath.BUILD_MODEL_PATH, "/"));
|
|
|
|
|
|
log.info("场景计算结果处理结束,场景码:{}", sceneCode);
|
|
|
|
|
@@ -360,23 +368,23 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- private void cachePanorama(String dataSource, String num){
|
|
|
- String cachedImagesPath = String.format(ConstantFilePath.SCENE_CACHE_IMAGES, num);
|
|
|
- //将全景图缓存到缓存目录
|
|
|
- List<String> imagesList = FileUtil.listFileNames(dataSource + "/caches/images");
|
|
|
- //先清除旧的全景图
|
|
|
- cn.hutool.core.io.FileUtil.del(cachedImagesPath);
|
|
|
- String visionPath = dataSource + "/results/vision.txt";
|
|
|
- List<String> panoramaImageList = SceneUtil.getPanoramaImageList(visionPath);
|
|
|
- imagesList.stream().forEach(fileName -> {
|
|
|
- if (panoramaImageList.contains(fileName)) {
|
|
|
- String srcPath = dataSource + "/caches/images/" + fileName;
|
|
|
- String targetPath = cachedImagesPath + fileName;
|
|
|
- log.info("源文件:{}, 目标文件:{}", srcPath, targetPath);
|
|
|
- cn.hutool.core.io.FileUtil.copy(srcPath, targetPath, true);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+// private void cachePanorama(String dataSource, String num){
|
|
|
+// String cachedImagesPath = String.format(ConstantFilePath.SCENE_CACHE_IMAGES, num);
|
|
|
+// //将全景图缓存到缓存目录
|
|
|
+// List<String> imagesList = FileUtil.listFileNames(dataSource + "/caches/images");
|
|
|
+// //先清除旧的全景图
|
|
|
+// cn.hutool.core.io.FileUtil.del(cachedImagesPath);
|
|
|
+// String visionPath = dataSource + "/results/vision.txt";
|
|
|
+// List<String> panoramaImageList = SceneUtil.getPanoramaImageList(visionPath);
|
|
|
+// imagesList.stream().forEach(fileName -> {
|
|
|
+// if (panoramaImageList.contains(fileName)) {
|
|
|
+// String srcPath = dataSource + "/caches/images/" + fileName;
|
|
|
+// String targetPath = cachedImagesPath + fileName;
|
|
|
+// log.info("源文件:{}, 目标文件:{}", srcPath, targetPath);
|
|
|
+// cn.hutool.core.io.FileUtil.copy(srcPath, targetPath, true);
|
|
|
+// }
|
|
|
+// });
|
|
|
+// }
|
|
|
|
|
|
private Map<String, String> getUploadFiles(ScenePlus scenePlus,String path,Integer cameraType,JSONObject fdageData) throws Exception {
|
|
|
if (ObjectUtils.isEmpty(scenePlus)) {
|