|
@@ -1308,13 +1308,28 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
message.setRebuild("1");
|
|
|
}
|
|
|
|
|
|
- if(Objects.nonNull(scenePlusExt.getLocation()) && scenePlusExt.getLocation() == 7){
|
|
|
- //发送到全景看看进行初始化
|
|
|
- JSONObject jsonObject = JSONObject.parseObject(fYunFileService.getFileContent(SceneUtil.getHomePath(scenePlusExt.getDataSource()) + "data.fdage"));
|
|
|
- intermitSceneService.sendMq(num, jsonObject, CommonSuccessStatus.WAITING.code());
|
|
|
- rabbitMqProducer.sendByWorkQueue(queueIntermitModelingPre, message);
|
|
|
+ String ossOrignPath = commonService.getOssOrignPath(path);
|
|
|
+ String ossPath = fYunFileService.getFileContent(ossOrignPath + "custom.txt");
|
|
|
+ if(StrUtil.isNotEmpty(ossPath) && ossPath.contains("MKT862")){
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ jsonObject.put("location", 4);
|
|
|
+ BuildSceneCallMessage mqMessage = getBuildSceneMqMessage(num, 13L, null, jsonObject, "V3",
|
|
|
+ path);
|
|
|
+ mqMessage.getExt().put("deleteExtras", deleteExtras);
|
|
|
+ mqMessage.getExt().put("ossPath", ossPath);
|
|
|
+ //故宫博物馆需求,特殊算法参数
|
|
|
+ mqMessage.getExt().put("splitType", "SPLIT_V3");
|
|
|
+ mqMessage.getExt().put("skyboxType", "SKYBOX_V6");
|
|
|
+ rabbitMqProducer.sendByWorkQueue(queueLiguangModelingPre, mqMessage);
|
|
|
}else{
|
|
|
- rabbitMqProducer.sendByWorkQueue(queueModelingPre, message);
|
|
|
+ if(Objects.nonNull(scenePlusExt.getLocation()) && scenePlusExt.getLocation() == 7){
|
|
|
+ //发送到全景看看进行初始化
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(fYunFileService.getFileContent(SceneUtil.getHomePath(scenePlusExt.getDataSource()) + "data.fdage"));
|
|
|
+ intermitSceneService.sendMq(num, jsonObject, CommonSuccessStatus.WAITING.code());
|
|
|
+ rabbitMqProducer.sendByWorkQueue(queueIntermitModelingPre, message);
|
|
|
+ }else{
|
|
|
+ rabbitMqProducer.sendByWorkQueue(queueModelingPre, message);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
scenePlusService.update(new LambdaUpdateWrapper<ScenePlus>()
|
|
@@ -1850,6 +1865,9 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
if(StrUtil.isEmpty(ossPath)){
|
|
|
return ResultData.error(-1, "资源路径不能为空");
|
|
|
}
|
|
|
+ if(StrUtil.endWith(ossPath, "/")){
|
|
|
+ ossPath = ossPath + "/";
|
|
|
+ }
|
|
|
|
|
|
if(StrUtil.isEmpty(num) && StrUtil.isEmpty(snCode)){
|
|
|
return ResultData.error(-1, "场景码或者相机码不能同时为空");
|
|
@@ -1901,6 +1919,10 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
|
|
|
dataSource = ConstantFilePath.BUILD_MODEL_PATH + snCode + "/" + fileId + "/" + unicode;
|
|
|
|
|
|
+ String dataFdageStr = fYunFileService.getFileContent(ossPath + "data.fdage");
|
|
|
+ JSONObject dataFdage = JSON.parseObject(dataFdageStr);
|
|
|
+ String name = dataFdage.getString("name");
|
|
|
+
|
|
|
//生成主表
|
|
|
if(Objects.isNull(scenePlus)){
|
|
|
scenePlus = new ScenePlus();
|
|
@@ -1908,14 +1930,14 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
scenePlus.setDescription("<p>四维看看 让空间讲故事</p>");
|
|
|
scenePlus.setUserId(cameraDetail.getUserId());
|
|
|
scenePlus.setPhoneId(snCode);
|
|
|
- scenePlus.setTitle("默认场景标题");
|
|
|
+ scenePlus.setTitle(name);
|
|
|
scenePlus.setSceneStatus(SceneStatus.wait.code());
|
|
|
scenePlus.setSceneSource(SceneSource.ZT.code());
|
|
|
scenePlus.setPayStatus(PayStatus.PAY.code());
|
|
|
scenePlus.setSceneType(SceneType.OTHER.code());
|
|
|
scenePlus.setCameraId(camera.getId());
|
|
|
- scenePlusService.save(scenePlus);
|
|
|
}
|
|
|
+ scenePlusService.saveOrUpdate(scenePlus);
|
|
|
if(Objects.isNull(scenePlusExt)){
|
|
|
scenePlusExt = new ScenePlusExt();
|
|
|
scenePlusExt.setPlusId(scenePlus.getId());
|
|
@@ -1929,30 +1951,35 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
scenePlusExt.setModelKind(ModelKind.DAM.code());
|
|
|
scenePlusExt.setYunFileBucket(fYunFileConfig.getBucket());
|
|
|
scenePlusExt.setLocation(4);
|
|
|
- scenePlusExtService.save(scenePlusExt);
|
|
|
}
|
|
|
+ scenePlusExtService.saveOrUpdate(scenePlusExt);
|
|
|
|
|
|
//生成编辑表
|
|
|
if(Objects.isNull(sceneEditInfo)){
|
|
|
sceneEditInfo = new SceneEditInfo();
|
|
|
sceneEditInfo.setScenePlusId(scenePlus.getId());
|
|
|
- sceneEditInfo.setTitle(scenePlus.getTitle());
|
|
|
+ sceneEditInfo.setTitle(name);
|
|
|
sceneEditInfo.setDescription(scenePlus.getDescription());
|
|
|
- sceneEditInfoService.save(sceneEditInfo);
|
|
|
}
|
|
|
+ sceneEditInfoService.saveOrUpdate(sceneEditInfo);
|
|
|
if(Objects.isNull(sceneEditInfoExt)){
|
|
|
sceneEditInfoExt = new SceneEditInfoExt();
|
|
|
sceneEditInfoExt.setScenePlusId(scenePlus.getId());
|
|
|
sceneEditInfoExt.setEditInfoId(sceneEditInfo.getId());
|
|
|
- sceneEditInfoExtService.save(sceneEditInfoExt);
|
|
|
}
|
|
|
+ sceneEditInfoExtService.saveOrUpdate(sceneEditInfoExt);
|
|
|
|
|
|
//生成控制表
|
|
|
if(Objects.isNull(sceneEditControls)){
|
|
|
sceneEditControls = new SceneEditControls();
|
|
|
sceneEditControls.setEditInfoId(sceneEditInfo.getId());
|
|
|
- sceneEditControlsService.save(sceneEditControls);
|
|
|
}
|
|
|
+ sceneEditControlsService.saveOrUpdate(sceneEditControls);
|
|
|
+
|
|
|
+ //上传data.fdage和custom.txt到home目录
|
|
|
+ String homePath = dataSource.replace(ConstantFilePath.BUILD_MODEL_PATH, ConstantFilePath.OSS_PREFIX);
|
|
|
+ fYunFileService.uploadFile(dataFdageStr.getBytes(StandardCharsets.UTF_8), homePath + "data.fdage");
|
|
|
+ fYunFileService.uploadFile(ossPath.getBytes(StandardCharsets.UTF_8), homePath + "custom.txt");
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("location", 4);
|