Bladeren bron

Merge branch 'feature-slimming-nas-20220130-dsx' into test

# Conflicts:
#	src/main/java/com/fdkankan/contro/mq/service/impl/BuildObjServiceImpl.java
dsx 2 jaren geleden
bovenliggende
commit
18312874a1

+ 10 - 14
src/main/java/com/fdkankan/contro/mq/service/impl/BuildObjServiceImpl.java

@@ -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,17 +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);
@@ -258,12 +254,12 @@ public class BuildObjServiceImpl implements IBuildSceneService {
                         .eq(SceneProEdit::getProId,scenePro.getId()));
             }
 
-            ScenePlus scenePlus = scenePlusService.getScenePlusByNum(projectNum);
-            if(!ObjectUtils.isEmpty(scenePlus)){
-                LambdaUpdateWrapper<ScenePlus> plusUpdateWrapper = new LambdaUpdateWrapper<ScenePlus>()
-                        .set(ScenePlus::getSceneStatus, -2).eq(ScenePlus::getNum, projectNum);
-                scenePlusService.update(plusUpdateWrapper);
-            }
+                ScenePlus scenePlus = scenePlusService.getScenePlusByNum(projectNum);
+                if(!ObjectUtils.isEmpty(scenePlus)){
+                    LambdaUpdateWrapper<ScenePlus> plusUpdateWrapper = new LambdaUpdateWrapper<ScenePlus>()
+                            .set(ScenePlus::getSceneStatus, -2).eq(ScenePlus::getNum, projectNum);
+                    scenePlusService.update(plusUpdateWrapper);
+                }
 
             // 如果未升级V4,则升级V4
             if("v3".equals(version)){

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

@@ -125,8 +125,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)){