|
@@ -14,6 +14,7 @@ import com.fdkankan.common.constant.ModelKind;
|
|
import com.fdkankan.common.constant.RecStatus;
|
|
import com.fdkankan.common.constant.RecStatus;
|
|
import com.fdkankan.common.constant.SceneSource;
|
|
import com.fdkankan.common.constant.SceneSource;
|
|
import com.fdkankan.model.utils.CreateHouseJsonUtil;
|
|
import com.fdkankan.model.utils.CreateHouseJsonUtil;
|
|
|
|
+import com.fdkankan.model.utils.FloorPlanUserUtil;
|
|
import com.fdkankan.scene.entity.FolderScene;
|
|
import com.fdkankan.scene.entity.FolderScene;
|
|
import com.fdkankan.scene.entity.ScenePlus;
|
|
import com.fdkankan.scene.entity.ScenePlus;
|
|
import com.fdkankan.scene.service.IFolderSceneService;
|
|
import com.fdkankan.scene.service.IFolderSceneService;
|
|
@@ -480,6 +481,22 @@ public class SceneUpgradeToV4Service implements ISceneUpgradeToV4Service {
|
|
String sceneJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH+"scene.json", num);
|
|
String sceneJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH+"scene.json", num);
|
|
fYunFileService.uploadFile(JSON.toJSONBytes(sceneJson), sceneJsonPath);
|
|
fYunFileService.uploadFile(JSON.toJSONBytes(sceneJson), sceneJsonPath);
|
|
|
|
|
|
|
|
+ //生成默认的floorplan.json
|
|
|
|
+ String ossFloorplanCadPath = String.format(UploadFilePath.DATA_VIEW_PATH, num).concat("floorplan_cad.json");
|
|
|
|
+ String floorPlanCardFilePath = scenePlusExt.getDataSource() + File.separator + "results/floorplan_cad.json";
|
|
|
|
+ fYunFileService.downloadFile(ossFloorplanCadPath, floorPlanCardFilePath);
|
|
|
|
+ if (!new File(floorPlanCardFilePath).exists()) {
|
|
|
|
+ log.warn("floorplan_cad.json 文件不存在,文件路径:{}", floorPlanCardFilePath);
|
|
|
|
+ }else{
|
|
|
|
+ JSONObject json = FloorPlanUserUtil.createFloorPlanUserJson(floorPlanCardFilePath);
|
|
|
|
+ if(Objects.isNull(json)){
|
|
|
|
+ log.warn("生成floorplan.json失败,cadPath:{}", floorPlanCardFilePath);
|
|
|
|
+ }else{
|
|
|
|
+ String floorplanJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "floorplan.json";
|
|
|
|
+ fYunFileService.uploadFile(json.toJSONString().getBytes(), floorplanJsonPath);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
redisUtil.del(String.format(RedisKey.SCENE_JSON, num));
|
|
redisUtil.del(String.format(RedisKey.SCENE_JSON, num));
|
|
|
|
|
|
//迁移耗时
|
|
//迁移耗时
|