|
@@ -325,25 +325,13 @@ public class Scene3dfamilyServiceImpl extends ServiceImpl<IScene3dfamilyMapper,
|
|
// 下载用户的户型图数据
|
|
// 下载用户的户型图数据
|
|
if (fYunFileService.fileExist(String.format(UploadFilePath.USER_VIEW_PATH, sceneNum) + "floorplan.json")) {
|
|
if (fYunFileService.fileExist(String.format(UploadFilePath.USER_VIEW_PATH, sceneNum) + "floorplan.json")) {
|
|
fYunFileService.downloadFile(String.format(UploadFilePath.USER_VIEW_PATH, sceneNum) + "floorplan.json",
|
|
fYunFileService.downloadFile(String.format(UploadFilePath.USER_VIEW_PATH, sceneNum) + "floorplan.json",
|
|
- path + File.separator + "scene" + File.separator + "data" + File.separator + "data" + sceneNum+"/houst_floor.json"
|
|
|
|
|
|
+ path + File.separator + "scene" + File.separator + "data" + File.separator + "data" + sceneNum+"/floorplan.json"
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
- //转换house.json
|
|
|
|
- Integer bo = JsonToHouseUtil.ToHouseJson(path + File.separator + "scene" + File.separator + dataBuf);
|
|
|
|
-
|
|
|
|
- if (bo != 0) {
|
|
|
|
- switch (bo) {
|
|
|
|
- case -1:
|
|
|
|
- throw new BusinessException(ErrorCode.FAILURE_CODE_5029.code(), "点位数据为空");
|
|
|
|
- case -2:
|
|
|
|
- throw new BusinessException(ErrorCode.FAILURE_CODE_5029.code(), "点位数据重复");
|
|
|
|
- case -3:
|
|
|
|
- throw new BusinessException(ErrorCode.FAILURE_CODE_5029.code(), "转换异常");
|
|
|
|
- case -4:
|
|
|
|
- throw new BusinessException(ErrorCode.FAILURE_CODE_5029.code(), "源文件不存在");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ // 文件重命名
|
|
|
|
+ FileUtils.copyFile(path + File.separator + "scene" + File.separator + "data" + File.separator + "data" + sceneNum+"/floorplan.json",
|
|
|
|
+ path + File.separator + "scene" + File.separator + "data" + File.separator + "data" + sceneNum+"/house.json", true);
|
|
|
|
|
|
//下载 scene.json 改名为 getinfo.json
|
|
//下载 scene.json 改名为 getinfo.json
|
|
fYunFileService.downloadFile(String.format(UploadFilePath.DATA_VIEW_PATH, sceneNum) + "scene.json",
|
|
fYunFileService.downloadFile(String.format(UploadFilePath.DATA_VIEW_PATH, sceneNum) + "scene.json",
|