|
@@ -701,7 +701,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
if(!canSpace){
|
|
|
throw new BusinessException(CameraConstant.FAILURE_CODE_6008, CameraConstant.FAILURE_MSG_6008);
|
|
|
}
|
|
|
- copyScene(sceneNum,detailEntity,scenePro,scenePlus,cameraType);
|
|
|
+ copyScene(sceneNum,scenePro,scenePlus);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -709,33 +709,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
public synchronized 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);
|
|
|
- }
|
|
|
- IncrementType incrementType = null;
|
|
|
- UserIncrement userIncrement = userIncrementService.getByCameraId(cameraId);
|
|
|
- if(userIncrement != null && userIncrement.getIsExpired() != 1){
|
|
|
- incrementType = incrementTypeService.getById(userIncrement.getIncrementTypeId());
|
|
|
- }
|
|
|
- Long space = null;
|
|
|
- if( scenePro != null ){
|
|
|
- space = scenePro.getSpace();
|
|
|
- }
|
|
|
- if( scenePlus != null ){
|
|
|
- ScenePlusExt ext = scenePlusExtService.getByPlusId(scenePlus.getId());
|
|
|
- space = ext.getSpace();
|
|
|
- }
|
|
|
- CameraType cameraType = cameraTypeService.getByCameraType(detailEntity.getType());
|
|
|
-
|
|
|
- Boolean canSpace = cameraDetailService.checkSpace(detailEntity,incrementType,space,cameraType);
|
|
|
-
|
|
|
- if(!canSpace){
|
|
|
- throw new BusinessException(CameraConstant.FAILURE_CODE_6008, CameraConstant.FAILURE_MSG_6008);
|
|
|
- }
|
|
|
-
|
|
|
- copyScene(sceneNum,detailEntity,scenePro,scenePlus,cameraType);
|
|
|
+ copyScene(sceneNum,scenePro,scenePlus);
|
|
|
}
|
|
|
|
|
|
@Autowired
|
|
@@ -744,8 +718,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
@Value("${queue.scene.copy:ucenter-copy-scene}")
|
|
|
private String copySceneQueue;
|
|
|
|
|
|
- private void copyScene(String oldNum,CameraDetail detailEntity,ScenePro scenePro,ScenePlus scenePlus,CameraType cameraType) throws Exception {
|
|
|
- String newNum = scene3dNumService.generateSceneNum(detailEntity.getType());
|
|
|
+ private void copyScene(String oldNum,ScenePro scenePro,ScenePlus scenePlus) throws Exception {
|
|
|
+ String newNum = scene3dNumService.generateSceneNum(oldNum);
|
|
|
Long userId = scenePro == null ? scenePlus.getUserId() :scenePro.getUserId();
|
|
|
sceneCopyLogService.saveByNum(oldNum,newNum,userId);
|
|
|
HashMap<String,String > map = new HashMap<>();
|