|
@@ -1261,12 +1261,13 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
buildV3Scene2(dataSource,fdageData,cameraType,sceneNum,cameraEntity,detailEntity,icon);
|
|
|
break;
|
|
|
case "V4":
|
|
|
- List<ScenePlusExt> plusExts = scenePlusExtService.list(new LambdaQueryWrapper<ScenePlusExt>()
|
|
|
- .like(ScenePlusExt::getDataSource, dataSource));
|
|
|
- if (plusExts.size() > 0) {
|
|
|
- return ResultData.error(ErrorCode.PARAM_ERROR.code(),"该场景资源已存在,请勿重复添加!");
|
|
|
+ int rebuild = 0;
|
|
|
+ ScenePlus scenePlus = scenePlusService.getByFileId(dataSource);
|
|
|
+ if (!ObjectUtils.isEmpty(scenePlus)) {
|
|
|
+ log.info("该场景资源已存在,执行补拍逻辑!");
|
|
|
+ rebuild = 1;
|
|
|
+ sceneNum = scenePlus.getNum();
|
|
|
}
|
|
|
-
|
|
|
imgViewPath = String.format(UploadFilePath.IMG_VIEW_PATH, sceneNum);
|
|
|
if(fdageData.containsKey("icon") && StringUtils.isNotEmpty(fdageData.getString("icon"))){
|
|
|
String ossPath = ConstantFilePath.OSS_PREFIX + dataSource.replace(ConstantFilePath.BUILD_MODEL_PATH, "")
|
|
@@ -1275,10 +1276,9 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
icon = fYunFileConfig.getHost() + imgViewPath + fdageData.getString("icon");
|
|
|
log.info("上传icon成功....");
|
|
|
}
|
|
|
- buildScenePost(dataSource, fdageData, "V3", cameraType, sceneNum, detailEntity, 0, icon);
|
|
|
+ buildScenePost(dataSource, fdageData, "V3", cameraType, sceneNum, detailEntity, rebuild, icon);
|
|
|
if (cameraType == 14) {
|
|
|
// 通知激光系统
|
|
|
- ScenePlus scenePlus = scenePlusService.getScenePlusByNum(sceneNum);
|
|
|
String userName = null;
|
|
|
if (!ObjectUtils.isEmpty(detailEntity.getUserId())) {
|
|
|
userName = userService.getSSOUserByUserId(detailEntity.getUserId()).getUserName();
|