|
@@ -1309,6 +1309,23 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
}).forEach(v->{
|
|
|
fYunFileService.downloadFile(bucket, v, v.replace(meshOssPath, meshLocalPath));
|
|
|
});
|
|
|
+ String meshJsonPath = meshLocalPath + "mesh.json";
|
|
|
+ if(FileUtil.exist(meshJsonPath)){
|
|
|
+ JSONObject meshJson = JSON.parseObject(FileUtil.readUtf8String(meshJsonPath));
|
|
|
+ JSONArray floors = meshJson.getJSONArray("floors");
|
|
|
+ for (Object floor : floors) {
|
|
|
+ JSONObject floorObj = (JSONObject)floor;
|
|
|
+ JSONArray lods = floorObj.getJSONArray("lods");
|
|
|
+ for (int i = 0; i < lods.size(); i++) {
|
|
|
+ JSONObject lodObj = (JSONObject) lods.get(i);
|
|
|
+ String objPath = lodObj.getString("objPath");
|
|
|
+ if(!objPath.contains("lod_0")){
|
|
|
+ lods.remove(i);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ FileUtil.writeUtf8String(meshJson.toJSONString(), meshJsonPath);
|
|
|
+ }
|
|
|
// fYunFileService.downloadFileByCommand(bucket, meshLocalPath, meshOssPath);
|
|
|
//打包
|
|
|
ZipUtil.zip(meshLocalPath,zipFilePath);
|