Browse Source

平面图恢复默认,增加判断floorplan_cad.json是否存在,不存在时不生成houseType

dsx 2 years ago
parent
commit
9e24b45580

+ 4 - 0
src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoServiceImpl.java

@@ -730,6 +730,10 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
         result.put("version", "2.1");
 
         String floorplanCadPath = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "floorplan_cad.json";
+        if(!fYunFileService.fileExist(bucket, floorplanCadPath)){
+            log.warn("生成houseType.json失败,原因:floorplan_cad.json文件不存在,num:{}", num);
+            return;
+        }
         String floorcadStr = fYunFileService.getFileContent(bucket, floorplanCadPath);
 
         JSONObject floorcadObj = JSON.parseObject(floorcadStr);