|
@@ -649,15 +649,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
if(user == null || !user.getId().equals(userId) ){
|
|
if(user == null || !user.getId().equals(userId) ){
|
|
throw new BusinessException(SceneConstant.FAILURE_CODE_5013, SceneConstant.FAILURE_MSG_5013);
|
|
throw new BusinessException(SceneConstant.FAILURE_CODE_5013, SceneConstant.FAILURE_MSG_5013);
|
|
}
|
|
}
|
|
- this.copySceneNoCheck(sceneNum);
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public void copySceneNoCheck(String sceneNum) throws Exception {
|
|
|
|
- ScenePro scenePro = this.getByNum(sceneNum);
|
|
|
|
- ScenePlus scenePlus = scenePlusService.getByNum(sceneNum);
|
|
|
|
- Long cameraId = scenePro == null ? scenePlus.getCameraId() : scenePro.getCameraId();
|
|
|
|
CameraDetail detailEntity = cameraDetailService.getByCameraId(cameraId);
|
|
CameraDetail detailEntity = cameraDetailService.getByCameraId(cameraId);
|
|
if(detailEntity == null){
|
|
if(detailEntity == null){
|
|
throw new BusinessException(CameraConstant.FAILURE_CODE_6029, CameraConstant.FAILURE_MSG_6029);
|
|
throw new BusinessException(CameraConstant.FAILURE_CODE_6029, CameraConstant.FAILURE_MSG_6029);
|
|
@@ -670,6 +661,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
if(incrementType == null){
|
|
if(incrementType == null){
|
|
throw new BusinessException(LoginConstant.FAILURE_CODE_3030, LoginConstant.FAILURE_MSG_3030);
|
|
throw new BusinessException(LoginConstant.FAILURE_CODE_3030, LoginConstant.FAILURE_MSG_3030);
|
|
}
|
|
}
|
|
|
|
+
|
|
if(incrementType.getCameraCapacity() != -1){
|
|
if(incrementType.getCameraCapacity() != -1){
|
|
Long usedSpace = detailEntity.getUsedSpace();
|
|
Long usedSpace = detailEntity.getUsedSpace();
|
|
if( scenePro != null && scenePro.getSpace() + usedSpace > incrementType.getCameraCapacity() * 1024 * 1024 * 1024L){
|
|
if( scenePro != null && scenePro.getSpace() + usedSpace > incrementType.getCameraCapacity() * 1024 * 1024 * 1024L){
|
|
@@ -682,6 +674,19 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ this.copySceneNoCheck(sceneNum);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void copySceneNoCheck(String sceneNum) throws Exception {
|
|
|
|
+ ScenePro scenePro = this.getByNum(sceneNum);
|
|
|
|
+ ScenePlus scenePlus = scenePlusService.getByNum(sceneNum);
|
|
|
|
+ Long cameraId = scenePro == null ? scenePlus.getCameraId() : scenePro.getCameraId();
|
|
|
|
+ CameraDetail detailEntity = cameraDetailService.getByCameraId(cameraId);
|
|
|
|
+ if(detailEntity == null){
|
|
|
|
+ throw new BusinessException(CameraConstant.FAILURE_CODE_6029, CameraConstant.FAILURE_MSG_6029);
|
|
|
|
+ }
|
|
|
|
|
|
String newNum = scene3dNumService.generateSceneNum(detailEntity.getType());
|
|
String newNum = scene3dNumService.generateSceneNum(detailEntity.getType());
|
|
String title = scenePro == null ? scenePlus.getTitle() : scenePro.getSceneName();
|
|
String title = scenePro == null ? scenePlus.getTitle() : scenePro.getSceneName();
|