فهرست منبع

生成obj,算法不生成floorplan_cad.json文件,故无需转换诶floorplan.json

dsx 2 سال پیش
والد
کامیت
e786f7446c

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

@@ -212,7 +212,7 @@ public class BuildObjServiceImpl implements IBuildSceneService {
             }
             if(this.modelKind.equals(ModelKind.THREE_D_TILE.code())
                     && CollUtil.isNotEmpty(sdTilesSceneSourceList)
-                    && sdTilesSceneSourceList.contains(SceneSource.JG.code())){){
+                    && sdTilesSceneSourceList.contains(SceneSource.JG.code())){
                 String threedtilesPath = resultsPath + ModelKind.THREE_D_TILE.code();
                 String oss3dtilesPath = ossImagePath + ModelKind.THREE_D_TILE.code();
                 List<String> list = FileUtils.list(new File(threedtilesPath));
@@ -224,7 +224,7 @@ public class BuildObjServiceImpl implements IBuildSceneService {
                 fYunFileService.uploadFileByCommand(threedtilesPath, oss3dtilesPath);
             }
 
-                String texPath = laserObjFilePath + File.separator + "results" + File.separator + "tex";
+            String texPath = laserObjFilePath + File.separator + "results" + File.separator + "tex";
 
             File texFile = new File(texPath);
             if(texFile.exists()){
@@ -239,16 +239,13 @@ public class BuildObjServiceImpl implements IBuildSceneService {
             fYunFileService.uploadFile(laserObjFilePath + File.separator + "results" + File.separator + "tex/texture1.jpg",
                     ossImagePath + ConstantFileName.modelUUID + "_50k_texture_jpg_high1/texture1.jpg");
 
-                // 拷贝结果
-                log.info("开始拷贝obj文件");
-                FileUtils.copyFolderAllFiles(laserObjFilePath + "/results/mesh", laserObjFilePath + "/laserData/mesh/", true);
+            // 拷贝结果
+            log.info("开始拷贝obj文件");
+            FileUtils.copyFolderAllFiles(laserObjFilePath + "/results/mesh", laserObjFilePath + "/laserData/mesh/", true);
 
             //上传mesh文件
             fYunFileService.uploadFileByCommand(laserObjFilePath + "/results/mesh", String.format(UploadFilePath.DATA_VIEW_PATH,  projectNum) + "mesh");
 
-            //生成floorplan.json
-            commonService.uploadFloorplanJson(projectNum, laserObjFilePath);
-
             if(!ObjectUtils.isEmpty(scenePro)){
                 LambdaUpdateWrapper<ScenePro> updateWrapper = new LambdaUpdateWrapper<ScenePro>()
                         .set(ScenePro::getStatus, -2).eq(ScenePro::getNum, projectNum);

+ 2 - 2
src/main/java/com/fdkankan/contro/mq/service/impl/CommonServiceImpl.java

@@ -135,8 +135,8 @@ public class CommonServiceImpl implements ICommonService {
     public void uploadFloorplanJson(String num, String dataSource) throws Exception{
         String floorPlanCardFilePath = dataSource + File.separator + "results/floorplan_cad.json";
         if (!new File(floorPlanCardFilePath).exists()) {
-            log.error("floorplan_cad.json 文件不存在,文件路径:{}", floorPlanCardFilePath);
-            throw new Exception("floorplan_cad.json 文件不存在,文件路径:" + floorPlanCardFilePath);
+            log.warn("floorplan_cad.json 文件不存在,文件路径:{}", floorPlanCardFilePath);
+            return;
         }
         JSONObject json = FloorPlanUserUtil.createFloorPlanUserJson(floorPlanCardFilePath);
         if(Objects.isNull(json)){