|
@@ -23,6 +23,7 @@ import com.fdkankan.ucenter.common.OssPath;
|
|
|
import com.fdkankan.ucenter.common.PageInfo;
|
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
import com.fdkankan.image.MatrixToImageWriterUtil;
|
|
|
+import com.fdkankan.ucenter.common.RedisKeyUtil;
|
|
|
import com.fdkankan.ucenter.common.constants.ConstantFilePath;
|
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
|
import com.fdkankan.ucenter.common.constants.NacosProperty;
|
|
@@ -691,7 +692,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
if(!canSpace){
|
|
|
throw new BusinessException(CameraConstant.FAILURE_CODE_6008, CameraConstant.FAILURE_MSG_6008);
|
|
|
}
|
|
|
- copyScene(detailEntity,scenePro,scenePlus);
|
|
|
+ copyScene(detailEntity,scenePro,scenePlus,cameraType);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -725,25 +726,29 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
throw new BusinessException(CameraConstant.FAILURE_CODE_6008, CameraConstant.FAILURE_MSG_6008);
|
|
|
}
|
|
|
|
|
|
- copyScene(detailEntity,scenePro,scenePlus);
|
|
|
+ copyScene(detailEntity,scenePro,scenePlus,cameraType);
|
|
|
}
|
|
|
|
|
|
- private void copyScene(CameraDetail detailEntity,ScenePro scenePro,ScenePlus scenePlus) throws Exception {
|
|
|
+ private void copyScene(CameraDetail detailEntity,ScenePro scenePro,ScenePlus scenePlus,CameraType cameraType) throws Exception {
|
|
|
String newNum = scene3dNumService.generateSceneNum(detailEntity.getType());
|
|
|
|
|
|
Long sceneId = scenePro == null ? scenePlus.getId() :scenePro.getId();
|
|
|
Long newSceneId = null;
|
|
|
FolderScene folderScene = folderSceneService.getByType(sceneId, null);
|
|
|
+ if(cameraType.getIsLaser() == 1){
|
|
|
+ String redisKey = RedisKeyUtil.laserCopyLock + newNum;
|
|
|
+ redisUtil.set(redisKey,"1",60*60);
|
|
|
+ }
|
|
|
|
|
|
if(scenePro !=null){ //v3场景复制
|
|
|
log.info("场景复制--V3--OldNum:{},oldTitle:{},newNum:{},", scenePro.getNum(),scenePro.getSceneName(),newNum);
|
|
|
|
|
|
- newSceneId = this.copyV3Scene(scenePro, newNum, detailEntity);
|
|
|
+ newSceneId = this.copyV3Scene(scenePro, newNum, detailEntity,cameraType);
|
|
|
}
|
|
|
if(scenePlus != null){ //v4场景复制
|
|
|
log.info("场景复制--V4--OldNum:{},oldTitle:{},newNum:{}", scenePlus.getNum(),scenePlus.getTitle(),newNum);
|
|
|
|
|
|
- newSceneId = scenePlusService.copyV4Scene(scenePlus,newNum,detailEntity);
|
|
|
+ newSceneId = scenePlusService.copyV4Scene(scenePlus,newNum,detailEntity,cameraType);
|
|
|
}
|
|
|
log.info("场景复制--完成--sceneId:{}",newSceneId);
|
|
|
|
|
@@ -768,7 +773,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public Long copyV3Scene(ScenePro scenePro,String newNum,CameraDetail cameraDetail) throws Exception {
|
|
|
+ public Long copyV3Scene(ScenePro scenePro,String newNum,CameraDetail cameraDetail,CameraType cameraType) throws Exception {
|
|
|
|
|
|
String oldNum = scenePro.getNum();
|
|
|
Long sceneProId = scenePro.getId();
|
|
@@ -782,7 +787,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
scenePro.setStatus(0);
|
|
|
this.save(scenePro);
|
|
|
|
|
|
- CameraType cameraType = cameraTypeService.getByCameraType(cameraDetail.getType());
|
|
|
|
|
|
ExecutorService executor = ThreadUtil.newSingleExecutor();
|
|
|
try {
|