|
|
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fdkankan.common.constant.ErrorCode;
|
|
|
import com.fdkankan.common.constant.SceneConstant;
|
|
|
import com.fdkankan.common.constant.SceneKind;
|
|
|
import com.fdkankan.common.constant.SceneVersionType;
|
|
|
@@ -38,6 +39,7 @@ import com.fdkankan.ucenter.service.*;
|
|
|
import com.fdkankan.ucenter.util.DateUserUtil;
|
|
|
import com.fdkankan.ucenter.util.SceneResourcePath;
|
|
|
import com.fdkankan.ucenter.vo.ResponseScene;
|
|
|
+import com.fdkankan.ucenter.vo.request.DemoSceneParam;
|
|
|
import com.fdkankan.ucenter.vo.request.RequestScene;
|
|
|
import com.fdkankan.ucenter.vo.request.SceneParam;
|
|
|
import com.fdkankan.ucenter.vo.response.*;
|
|
|
@@ -801,9 +803,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
@Autowired
|
|
|
RabbitMqProducer rabbitMqProducer;
|
|
|
|
|
|
- @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());
|
|
|
Long userId = scenePro == null ? scenePlus.getUserId() :scenePro.getUserId();
|
|
|
@@ -811,7 +810,23 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
HashMap<String,String > map = new HashMap<>();
|
|
|
map.put("oldNum",oldNum);
|
|
|
map.put("newNum",newNum);
|
|
|
- rabbitMqProducer.sendByWorkQueue(copySceneQueue,map);
|
|
|
+ rabbitMqProducer.sendByWorkQueue(ucenterConfig.getCopySceneQueue(),map);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void copyScene(String num,Long userId) {
|
|
|
+ if(StringUtils.isBlank(num)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ String[] split = num.split(",");
|
|
|
+ for (String oldNum : split) {
|
|
|
+ String newNum = scene3dNumService.generateSceneNumByOldNum(oldNum);
|
|
|
+ sceneCopyLogService.saveByNum(oldNum,newNum,userId);
|
|
|
+ HashMap<String,Object > map = new HashMap<>();
|
|
|
+ map.put("oldNum",oldNum);
|
|
|
+ map.put("newNum",newNum);
|
|
|
+ map.put("userId",userId);
|
|
|
+ rabbitMqProducer.sendByWorkQueue(ucenterConfig.getCopySceneQueue(),map);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -1418,4 +1433,26 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public PageInfo demoSceneList(DemoSceneParam param) {
|
|
|
+ if(param.getUserId() == null){
|
|
|
+ throw new BusinessException(ErrorCode.USER_NOT_LOGIN);
|
|
|
+ }
|
|
|
+ if(param.getIsObj() == 0){ //点云列表
|
|
|
+ param.setSceneSourceList(SceneSourceUtil.LaserSceneSource);
|
|
|
+ }
|
|
|
+ Page<SceneVo> page = scenePlusService.domeSceneList(new Page<>(param.getPageNum(),param.getPageSize()),param);
|
|
|
+ if(param.getIsObj() == 0){ //点云列表
|
|
|
+ for (SceneVo record : page.getRecords()) {
|
|
|
+ if(ucenterConfig.getActive().contains("prod")){
|
|
|
+ record.setWebSite(ucenterConfig.getBasePath() +"/index.html?m="+record.getNum());
|
|
|
+ }else {
|
|
|
+ record.setWebSite(ucenterConfig.getBasePath() +"/uat/index.html?m="+record.getNum());
|
|
|
+ }
|
|
|
+ record.setSceneName(record.getLaserTitle());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return PageInfo.PageInfo(page);
|
|
|
+ }
|
|
|
}
|