|
@@ -106,28 +106,24 @@ public class BuildV3SceneServiceImpl implements IBuildSceneService {
|
|
|
//下载资源到本地
|
|
|
this.downLoadSource(message, message.getPath());
|
|
|
JSONObject fdageJson = JSONObject.parseObject(FileUtils.readFile(message.getPath().concat("/capture/data.fdage")));
|
|
|
- boolean rewrite = false;
|
|
|
- boolean reUpload = false;
|
|
|
- if (!ObjectUtils.isEmpty(modelSceneKind)) {
|
|
|
- // 修改dataFdage文件
|
|
|
- fdageJson.put("modelType", modelSceneKind);
|
|
|
- rewrite = true;
|
|
|
- }
|
|
|
-
|
|
|
// 兼容旧的数据,防止OnlyExportMeshObj标志未删除掉
|
|
|
+ boolean rewrite = false;
|
|
|
if (fdageJson.containsKey("OnlyExportMeshObj")) {
|
|
|
// 写入data.fdage 防止重算
|
|
|
fdageJson.remove("OnlyExportMeshObj");
|
|
|
+ String ossPath = getOssPath(message.getPath());
|
|
|
+ fYunFileService.uploadFile(fdageJson.toJSONString().getBytes(), ossPath + "data.fdage");
|
|
|
+ rewrite = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!ObjectUtils.isEmpty(modelSceneKind)) {
|
|
|
+ // 修改dataFdage文件
|
|
|
+ fdageJson.put("modelType", modelSceneKind);
|
|
|
rewrite = true;
|
|
|
- reUpload = true;
|
|
|
}
|
|
|
|
|
|
if (rewrite) {
|
|
|
FileUtils.writeFile(message.getPath().concat("/capture/data.fdage"), fdageJson.toJSONString());
|
|
|
- if(reUpload){
|
|
|
- String ossPath = getOssPath(message.getPath());
|
|
|
- fYunFileService.uploadFile(message.getPath().concat("/capture/data.fdage"), ossPath + "data.fdage");
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
message.getBuildContext().put("cameraType",message.getCameraType());
|