|
@@ -7,6 +7,7 @@ import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.fdkankan.common.constant.CommonOperStatus;
|
|
|
import com.fdkankan.common.constant.ErrorCode;
|
|
|
+import com.fdkankan.common.constant.SceneConstant;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
import com.fdkankan.common.util.DateExtUtil;
|
|
|
import com.fdkankan.common.util.FileUtils;
|
|
@@ -174,5 +175,30 @@ public class SceneServiceImpl implements ISceneService {
|
|
|
scenePlusService.deleteByList(plusList,userId);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void copyScene(String sceneNum,String userName) throws Exception {
|
|
|
+ if(StringUtils.isEmpty(sceneNum)){
|
|
|
+ throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
+ }
|
|
|
+ ScenePlus scenePlus = scenePlusService.getScenePlusByNum(sceneNum);
|
|
|
+ if(scenePlus== null){
|
|
|
+ throw new BusinessException(SceneConstant.FAILURE_CODE_5005, SceneConstant.FAILURE_MSG_5005);
|
|
|
+ }
|
|
|
+
|
|
|
+ String newNum = scene3dNumService.generateSceneNum(detailEntity.getType());
|
|
|
+
|
|
|
+ Long sceneId = scenePlus.getId();
|
|
|
+ Long newSceneId = null;
|
|
|
+
|
|
|
+ if(scenePlus != null){ //v4场景复制
|
|
|
+ log.info("场景复制--V4--OldNum:{},oldTitle:{},newNum:{}", scenePlus.getNum(),scenePlus.getTitle(),newNum);
|
|
|
+
|
|
|
+ newSceneId = scenePlusService.copyV4Scene(scenePlus,newNum,detailEntity);
|
|
|
+ }
|
|
|
+ log.info("场景复制--完成--sceneId:{}",newSceneId);
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|