|
@@ -262,7 +262,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
dataSource = scenePlusService.getDataSourceLikeUnicode("/" + folderName);
|
|
|
}
|
|
|
|
|
|
- if (!ObjectUtils.isEmpty(dataSource)) {
|
|
|
+ if (StrUtil.isNotEmpty(dataSource)) {
|
|
|
log.info("从数据库中查到与 fileId:{} 匹配的路径为:{}", fileId, dataSource);
|
|
|
int n = dataSource.split("/").length;
|
|
|
if (n > 1) {
|
|
@@ -270,7 +270,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (ObjectUtils.isEmpty(fileId)) {
|
|
|
+ if (StrUtil.isEmpty(fileId)) {
|
|
|
fileId = new SnowflakeIdGenerator(0, 0).nextId() + "";
|
|
|
log.info("新生成build数据,{}", fileId);
|
|
|
}
|
|
@@ -328,6 +328,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
rebuild = 0;
|
|
|
} else {
|
|
|
sceneNum = scenePlus.getNum();
|
|
|
+ sceneCopyLogService.checkCanBuild(sceneNum);
|
|
|
if (scenePlus.getSceneStatus().equals(SceneStatus.wait.code())) {
|
|
|
log.info(scenePlus.getNum() + ":场景处于计算中,不能再计算");
|
|
|
return null;
|
|
@@ -427,8 +428,10 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
}
|
|
|
|
|
|
public ScenePlusVO buildV3Scene(ScenePro scenePro,String fileId, String prefix,JSONObject jsonObject,String buildType,long cameraType) throws Exception{
|
|
|
- //调用createScene方法生成scene数据和加入算法队列
|
|
|
|
|
|
+ sceneCopyLogService.checkCanBuild(scenePro.getNum());
|
|
|
+
|
|
|
+ //调用createScene方法生成scene数据和加入算法队列
|
|
|
String cameraName = jsonObject.getJSONObject("cam").getString("uuid");
|
|
|
String unicode = jsonObject.getString("creator") + "_" + jsonObject.getString("uuidtime");
|
|
|
|
|
@@ -630,6 +633,12 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
}
|
|
|
|
|
|
private boolean callV3(ScenePro scenePro, String preParams, JSONObject fdageJson,String api) throws Exception {
|
|
|
+
|
|
|
+ //复制出来的场景不支持补拍上传
|
|
|
+ if(Objects.nonNull(scenePro)){
|
|
|
+ sceneCopyLogService.checkCanBuild(scenePro.getNum());
|
|
|
+ }
|
|
|
+
|
|
|
String cameraName = fdageJson.getJSONObject("cam").getString("uuid");
|
|
|
|
|
|
Camera camera = cameraService.getByChildName(cameraName);
|
|
@@ -1119,7 +1128,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);
|
|
|
|
|
|
//复制出来的场景不支持重算
|
|
|
- List<SceneCopyLog> sceneCopyLogs = sceneCopyLogService.listByNewNum(num);
|
|
|
+ List<SceneCopyLog> sceneCopyLogs = sceneCopyLogService. listByNewNum(num);
|
|
|
if(CollUtil.isNotEmpty(sceneCopyLogs)){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5071);
|
|
|
}
|