|
@@ -0,0 +1,436 @@
|
|
|
|
+package com.fdkankan.tools.service.impl;
|
|
|
|
+import java.io.File;
|
|
|
|
+import java.util.*;
|
|
|
|
+
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
|
+import cn.hutool.core.io.FileUtil;
|
|
|
|
+import cn.hutool.core.lang.hash.Hash;
|
|
|
|
+import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
|
+import com.fdkankan.tools.entity.*;
|
|
|
|
+import com.fdkankan.tools.httpClient.client.FdkkClient;
|
|
|
|
+import com.fdkankan.tools.mapper.IScenePlusMapper;
|
|
|
|
+import com.fdkankan.tools.service.*;
|
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
+import com.fdkankan.tools.utils.OssToOssUtil;
|
|
|
|
+import com.fdkankan.tools.utils.UploadToAws;
|
|
|
|
+import com.fdkankan.tools.utils.UploadToOss;
|
|
|
|
+import com.fdkankan.tools.utils.UploadToOss2;
|
|
|
|
+import javafx.scene.Scene;
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
+import org.springframework.beans.factory.FactoryBean;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
|
+import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * <p>
|
|
|
|
+ * 场景主表 服务实现类
|
|
|
|
+ * </p>
|
|
|
|
+ *
|
|
|
|
+ * @author
|
|
|
|
+ * @since 2023-02-08
|
|
|
|
+ */
|
|
|
|
+@Service
|
|
|
|
+@Slf4j
|
|
|
|
+public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlus> implements IScenePlusService {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ IScenePlusExtService scenePlusExtService;
|
|
|
|
+ @Autowired
|
|
|
|
+ ISceneEditControlsService sceneEditControlsService;
|
|
|
|
+ @Autowired
|
|
|
|
+ ISceneEditInfoService sceneEditInfoService;
|
|
|
|
+ @Autowired
|
|
|
|
+ ISceneEditInfoExtService sceneEditInfoExtService;
|
|
|
|
+ @Autowired
|
|
|
|
+ ISceneFileBuildService sceneFileBuildService;
|
|
|
|
+ @Autowired
|
|
|
|
+ ISceneProService sceneProService;
|
|
|
|
+ @Autowired
|
|
|
|
+ ISceneProEditService sceneProEditService;
|
|
|
|
+ @Autowired
|
|
|
|
+ ICameraService cameraService;
|
|
|
|
+ @Autowired
|
|
|
|
+ ICameraDetailService cameraDetailService;
|
|
|
|
+ @Autowired
|
|
|
|
+ OssToOssUtil ossToOssUtil;
|
|
|
|
+ @Autowired
|
|
|
|
+ FdkkClient fdkkClient;
|
|
|
|
+
|
|
|
|
+ @Value("${db1.fyun.host}")
|
|
|
|
+ private String db1Host;
|
|
|
|
+ @Value("${db2.fyun.host}")
|
|
|
|
+ private String db2Host;
|
|
|
|
+ @Value("${db1.main}")
|
|
|
|
+ private String db1main;
|
|
|
|
+ @Value("${db2.main}")
|
|
|
|
+ private String db2main;
|
|
|
|
+
|
|
|
|
+ static HashMap<String,ScenePlus> plusMap = new HashMap<>();
|
|
|
|
+ static HashMap<String,ScenePlusExt> extMap = new HashMap<>();
|
|
|
|
+ static HashMap<String,SceneEditInfo> editInfoMap = new HashMap<>();
|
|
|
|
+ static HashMap<String,SceneEditInfoExt> editInfoExtMap = new HashMap<>();
|
|
|
|
+ static HashMap<String,SceneEditControls> editControlsMap = new HashMap<>();
|
|
|
|
+ static HashMap<String,ScenePro> proMap = new HashMap<>();
|
|
|
|
+ static HashMap<String,SceneProEdit> proEditMap = new HashMap<>();
|
|
|
|
+ static HashMap<Long,Camera> cameraMap = new HashMap<>();
|
|
|
|
+ static HashMap<Long,CameraDetail> cameraDetailMap = new HashMap<>();
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Object db1ToDb2ByUserId(Long userId) {
|
|
|
|
+ LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ wrapper.eq(ScenePlus::getUserId,userId);
|
|
|
|
+ List<ScenePlus> list = this.list(wrapper);
|
|
|
|
+ for (ScenePlus scenePlus : list) {
|
|
|
|
+ db1ToDb2(scenePlus.getNum());
|
|
|
|
+ }
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Boolean db1ToDb2(String num) {
|
|
|
|
+
|
|
|
|
+ ScenePro scenePro = this.getByNumPro(num);
|
|
|
|
+ if(scenePro != null){
|
|
|
|
+ SceneProEdit sceneProEdit = this.getEditByProId(scenePro.getId());
|
|
|
|
+ if(sceneProEdit == null){
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ proMap.put(num,scenePro);
|
|
|
|
+ proEditMap.put(num,sceneProEdit);
|
|
|
|
+ this.setCameraMap(scenePro.getCameraId());
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ScenePlus scenePlus = this.getByNum(num);
|
|
|
|
+ if(scenePlus == null){
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ ScenePlusExt scenePlusExt = this.getPlusExtByPlusId(scenePlus.getId());
|
|
|
|
+ if(scenePlusExt == null){
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ SceneEditInfo sceneEditInfo = this.getEditInfoByPlusId(scenePlus.getId());
|
|
|
|
+ if(sceneEditInfo == null){
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ SceneEditInfoExt sceneEditInfoExt = this.getEditInfoExtByPlusId(sceneEditInfo.getId());
|
|
|
|
+ if(sceneEditInfoExt == null){
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ SceneEditControls sceneEditControls = this.getEditControlsByPlusId(sceneEditInfo.getId());
|
|
|
|
+ if(sceneEditControls == null){
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ this.setCameraMap(scenePlus.getCameraId());
|
|
|
|
+ plusMap.put(num,scenePlus);
|
|
|
|
+ extMap.put(num,scenePlusExt);
|
|
|
|
+ editInfoMap.put(num,sceneEditInfo);
|
|
|
|
+ editInfoExtMap.put(num,sceneEditInfoExt);
|
|
|
|
+ editControlsMap.put(num,sceneEditControls);
|
|
|
|
+
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private void setCameraMap(Long cameraId) {
|
|
|
|
+ if(cameraMap.get(cameraId) == null){
|
|
|
|
+ Camera camera = this.getCameraById(cameraId);
|
|
|
|
+ if(camera == null){
|
|
|
|
+ return ;
|
|
|
|
+ }
|
|
|
|
+ CameraDetail cameraDetail = this.getCameraDetailByCameraId(cameraId);
|
|
|
|
+ if(cameraDetail == null){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ cameraMap.put(camera.getId(),camera);
|
|
|
|
+ cameraDetailMap.put(camera.getId(),cameraDetail);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ @DS("flowable")
|
|
|
|
+ public void db2Save(String type) {
|
|
|
|
+ for (String num : plusMap.keySet()) {
|
|
|
|
+ this.db2Save(plusMap.get(num),extMap.get(num),editInfoMap.get(num),
|
|
|
|
+ editInfoExtMap.get(num),editControlsMap.get(num),type);
|
|
|
|
+ }
|
|
|
|
+ for (String num : proMap.keySet()) {
|
|
|
|
+ this.db2Save(proMap.get(num),proEditMap.get(num),type);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @DS("flowable")
|
|
|
|
+ public void db2Save(ScenePro scenePro,SceneProEdit sceneProEdit,String type) {
|
|
|
|
+ Long newCameraId = this.saveCamera(scenePro.getCameraId());
|
|
|
|
+ ScenePro pro = this.getByNumPro(scenePro.getNum());
|
|
|
|
+ if(pro != null){
|
|
|
|
+ if(pro.getStatus() == -1){
|
|
|
|
+ ossToOssUtil.awsToOss(scenePro.getDataSource(), scenePro.getNum(),type);
|
|
|
|
+ if(pro.getIsUpgrade() == 0 && pro.getSceneSource() == 4){
|
|
|
|
+ fdkkClient.upgradeToV4(scenePro.getNum());
|
|
|
|
+ waitNumUp(scenePro.getNum());
|
|
|
|
+ }
|
|
|
|
+ fdkkClient.rebuildScene(scenePro.getNum());
|
|
|
|
+ }
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ scenePro.setId(null);
|
|
|
|
+ scenePro.setUserId(null);
|
|
|
|
+ scenePro.setCameraId(newCameraId);
|
|
|
|
+ String webSite = scenePro.getWebSite();
|
|
|
|
+ String newWebSite = webSite.replaceAll(db1main,db2main);
|
|
|
|
+ String thumb = scenePro.getThumb();
|
|
|
|
+ String newThumb = thumb.replaceAll(db1Host,db2Host);
|
|
|
|
+ String videos = scenePro.getVideos();
|
|
|
|
+ String newVideos = videos.replaceAll(db1Host,db2Host);
|
|
|
|
+ scenePro.setWebSite(newWebSite);
|
|
|
|
+ scenePro.setThumb(newThumb);
|
|
|
|
+ scenePro.setVideos(newVideos);
|
|
|
|
+ scenePro.setSceneScheme(10);
|
|
|
|
+ sceneProService.save(scenePro);
|
|
|
|
+ sceneProEdit.setId(null);
|
|
|
|
+ sceneProEdit.setProId(scenePro.getId());
|
|
|
|
+ sceneProEditService.save(sceneProEdit);
|
|
|
|
+ this.fileBuild(scenePro.getDataSource(),scenePro.getNum(),type,"v3");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @DS("flowable")
|
|
|
|
+ private void waitNumUp(String num) {
|
|
|
|
+ ScenePro pro = this.getByNumProV3(num);
|
|
|
|
+ while (pro.getIsUpgrade() != 1){
|
|
|
|
+ try {
|
|
|
|
+ pro = this.getByNumProV3(num);
|
|
|
|
+ log.info("v3场景:{}未升级完成,等待中。。。",pro.getNum());
|
|
|
|
+ Thread.sleep(2000L);
|
|
|
|
+ }catch ( Exception e){
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ log.info("v3场景:{}升级完成",pro.getNum());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @DS("flowable")
|
|
|
|
+ private Long saveCamera(Long cameraId) {
|
|
|
|
+ Camera camera = cameraMap.get(cameraId);
|
|
|
|
+ CameraDetail cameraDetail = cameraDetailMap.get(cameraId);
|
|
|
|
+
|
|
|
|
+ LambdaQueryWrapper<Camera> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ wrapper.eq(Camera::getSnCode,camera.getSnCode());
|
|
|
|
+ Camera dbCamera = cameraService.getOne(wrapper);
|
|
|
|
+ if(dbCamera!=null){
|
|
|
|
+ return dbCamera.getId();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ camera.setId(null);
|
|
|
|
+ cameraService.save(camera);
|
|
|
|
+
|
|
|
|
+ cameraDetail.setId(null);
|
|
|
|
+ cameraDetail.setCameraId(camera.getId());
|
|
|
|
+ cameraDetail.setUserId(null);
|
|
|
|
+ cameraDetail.setOutTime(new Date());
|
|
|
|
+ cameraDetail.setAddress(camera.getSnCode());
|
|
|
|
+ cameraDetail.setAddress(camera.getSnCode());
|
|
|
|
+ cameraDetail.setTotalSpace(0L);
|
|
|
|
+ cameraDetail.setUsedSpace(0L);
|
|
|
|
+ cameraDetailService.save(cameraDetail);
|
|
|
|
+ return camera.getId();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @DS("flowable")
|
|
|
|
+ public void fileBuild(String dataSource,String num,String type,String version) {
|
|
|
|
+ SceneFileBuild sceneFileBuild = new SceneFileBuild();
|
|
|
|
+ String[] split = dataSource.split("/");
|
|
|
|
+ sceneFileBuild.setChildName(split[3]);
|
|
|
|
+ sceneFileBuild.setFileId(split[4]);
|
|
|
|
+ sceneFileBuild.setUnicode(split[5]);
|
|
|
|
+ sceneFileBuild.setUploadStatus(0);
|
|
|
|
+ sceneFileBuild.setBuildStatus(3);
|
|
|
|
+ sceneFileBuild.setTotalPicNum(1000);
|
|
|
|
+ sceneFileBuild.setChunks(3);
|
|
|
|
+ sceneFileBuild.setCreateTime(new Date());
|
|
|
|
+ sceneFileBuild.setRecStatus("A");
|
|
|
|
+ sceneFileBuild.setUpdateTime(new Date());
|
|
|
|
+ sceneFileBuildService.save(sceneFileBuild);
|
|
|
|
+
|
|
|
|
+ ossToOssUtil.awsToOss(dataSource,num,type);
|
|
|
|
+ if(version.equals("v3") && num.contains("SS-")){
|
|
|
|
+ fdkkClient.upgradeToV4(num);
|
|
|
|
+ waitNumUp(num);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ fdkkClient.rebuildScene(num);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @DS("flowable")
|
|
|
|
+ public void db2Save(ScenePlus scenePlus, ScenePlusExt scenePlusExt,
|
|
|
|
+ SceneEditInfo sceneEditInfo, SceneEditInfoExt sceneEditInfoExt,
|
|
|
|
+ SceneEditControls sceneEditControls,String type) {
|
|
|
|
+ ScenePlus plus = this.getByNum(scenePlus.getNum());
|
|
|
|
+ if(plus != null){
|
|
|
|
+ ScenePlusExt scenePlusExt1 = this.getPlusExtByPlusId(plus.getId());
|
|
|
|
+ if(scenePlusExt1 !=null ){
|
|
|
|
+ Boolean reBuild = false;
|
|
|
|
+ if(scenePlusExt1.getSceneScheme() !=10){
|
|
|
|
+ LambdaUpdateWrapper<ScenePlusExt> wrapper = new LambdaUpdateWrapper<>();
|
|
|
|
+ wrapper.eq(ScenePlusExt::getId,scenePlusExt1.getId());
|
|
|
|
+ wrapper.set(ScenePlusExt::getSceneScheme,10);
|
|
|
|
+ wrapper.set(ScenePlusExt::getSceneKind,"tiles");
|
|
|
|
+ scenePlusExtService.update(wrapper);
|
|
|
|
+ reBuild = true;
|
|
|
|
+ }
|
|
|
|
+ if(plus.getSceneStatus() == -1 || reBuild){
|
|
|
|
+ ossToOssUtil.awsToOss(scenePlusExt1.getDataSource(), plus.getNum(),type);
|
|
|
|
+ fdkkClient.rebuildScene(plus.getNum());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ Long newCameraId = this.saveCamera(scenePlus.getCameraId());
|
|
|
|
+ scenePlus.setCameraId(newCameraId);
|
|
|
|
+ scenePlus.setId(null);
|
|
|
|
+ scenePlus.setUserId(null);
|
|
|
|
+ scenePlusExt.setId(null);
|
|
|
|
+ sceneEditInfo.setId(null);
|
|
|
|
+ sceneEditInfoExt.setId(null);
|
|
|
|
+ sceneEditControls.setId(null);
|
|
|
|
+ this.save(scenePlus);
|
|
|
|
+ Long plusId = scenePlus.getId();
|
|
|
|
+
|
|
|
|
+ scenePlusExt.setPlusId(plusId);
|
|
|
|
+ scenePlusExt.setYunFileBucket(null);
|
|
|
|
+ if(scenePlusExt.getSceneKind().equals("face")){
|
|
|
|
+ scenePlusExt.setSceneKind("tiles");
|
|
|
|
+ }
|
|
|
|
+ scenePlusExt.setSceneScheme(10);
|
|
|
|
+ String webSite = scenePlusExt.getWebSite();
|
|
|
|
+ String newWebSite = webSite.replaceAll(db1main,db2main);
|
|
|
|
+ String thumb = scenePlusExt.getThumb();
|
|
|
|
+ String newThumb = thumb.replaceAll(db1Host,db2Host);
|
|
|
|
+ String videos = scenePlusExt.getVideos();
|
|
|
|
+ String newVideos = videos.replaceAll(db1Host,db2Host);
|
|
|
|
+
|
|
|
|
+ scenePlusExt.setWebSite(newWebSite);
|
|
|
|
+ scenePlusExt.setThumb(newThumb);
|
|
|
|
+ scenePlusExt.setVideos(newVideos);
|
|
|
|
+
|
|
|
|
+ scenePlusExtService.save(scenePlusExt);
|
|
|
|
+
|
|
|
|
+ sceneEditInfo.setScenePlusId(plusId);
|
|
|
|
+ sceneEditInfo.setFloorPlanUser(0);
|
|
|
|
+ sceneEditInfo.setTags(0);
|
|
|
|
+ sceneEditInfo.setIsUploadObj(0);
|
|
|
|
+ sceneEditInfo.setBuildVideoStatus(0);
|
|
|
|
+ sceneEditInfo.setFloorPlanUpload(null);
|
|
|
|
+ sceneEditInfoService.save(sceneEditInfo);
|
|
|
|
+
|
|
|
|
+ sceneEditInfoExt.setEditInfoId(sceneEditInfo.getId());
|
|
|
|
+ sceneEditInfoExt.setScenePlusId(plusId);
|
|
|
|
+ sceneEditInfoExt.setTours(0);
|
|
|
|
+ sceneEditInfoExt.setMosaic(0);
|
|
|
|
+ sceneEditInfoExt.setLinks(0);
|
|
|
|
+ sceneEditInfoExt.setFilters(0);
|
|
|
|
+ sceneEditInfoExt.setSurveillances(0);
|
|
|
|
+ sceneEditInfoExtService.save(sceneEditInfoExt);
|
|
|
|
+
|
|
|
|
+ sceneEditControls.setEditInfoId(sceneEditInfo.getId());
|
|
|
|
+ sceneEditControlsService.save(sceneEditControls);
|
|
|
|
+
|
|
|
|
+ this.fileBuild(scenePlusExt.getDataSource(),scenePlus.getNum(),type,"v4");
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ @DS("flowable")
|
|
|
|
+ public void updateSceneScheme(List<String> asList) {
|
|
|
|
+ LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ wrapper.in(ScenePlus::getNum,asList);
|
|
|
|
+ List<ScenePlus> list = this.list(wrapper);
|
|
|
|
+ for (ScenePlus scenePlus : list) {
|
|
|
|
+ ScenePlusExt scenePlusExt = this.getPlusExtByPlusId(scenePlus.getId());
|
|
|
|
+ if(scenePlusExt != null && scenePlusExt.getSceneScheme() !=10){
|
|
|
|
+ LambdaUpdateWrapper<ScenePlusExt> updateWrapper = new LambdaUpdateWrapper<>();
|
|
|
|
+ updateWrapper.eq(ScenePlusExt::getId,scenePlusExt.getId());
|
|
|
|
+ updateWrapper.set(ScenePlusExt::getSceneScheme,10);
|
|
|
|
+ updateWrapper.set(ScenePlusExt::getSceneKind,"tiles");
|
|
|
|
+ scenePlusExtService.update(updateWrapper);
|
|
|
|
+ fdkkClient.rebuildScene(scenePlus.getNum());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public SceneEditInfoExt getEditInfoExtByPlusId(Long id) {
|
|
|
|
+ LambdaQueryWrapper<SceneEditInfoExt> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ wrapper.eq(SceneEditInfoExt::getEditInfoId,id);
|
|
|
|
+ return sceneEditInfoExtService.getOne(wrapper);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public SceneEditInfo getEditInfoByPlusId(Long plusId) {
|
|
|
|
+ LambdaQueryWrapper<SceneEditInfo> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ wrapper.eq(SceneEditInfo::getScenePlusId,plusId);
|
|
|
|
+ return sceneEditInfoService.getOne(wrapper);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public SceneEditControls getEditControlsByPlusId(Long editInfoId) {
|
|
|
|
+ LambdaQueryWrapper<SceneEditControls> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ wrapper.eq(SceneEditControls::getEditInfoId,editInfoId);
|
|
|
|
+ return sceneEditControlsService.getOne(wrapper);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public ScenePlusExt getPlusExtByPlusId(Long plusId) {
|
|
|
|
+ LambdaQueryWrapper<ScenePlusExt> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ wrapper.eq(ScenePlusExt::getPlusId,plusId);
|
|
|
|
+ return scenePlusExtService.getOne(wrapper);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public ScenePlus getByNum(String num) {
|
|
|
|
+ LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ wrapper.eq(ScenePlus::getNum,num);
|
|
|
|
+ return this.getOne(wrapper);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private SceneProEdit getEditByProId(Long proId) {
|
|
|
|
+ LambdaQueryWrapper<SceneProEdit> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ wrapper.eq(SceneProEdit::getProId,proId);
|
|
|
|
+ return sceneProEditService.getOne(wrapper);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private ScenePro getByNumPro(String num) {
|
|
|
|
+ LambdaQueryWrapper<ScenePro> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ wrapper.eq(ScenePro::getNum,num);
|
|
|
|
+ wrapper.eq(ScenePro::getIsUpgrade,0);
|
|
|
|
+ return sceneProService.getOne(wrapper);
|
|
|
|
+ }
|
|
|
|
+ private ScenePro getByNumProV3(String num) {
|
|
|
|
+ LambdaQueryWrapper<ScenePro> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ wrapper.eq(ScenePro::getNum,num);
|
|
|
|
+ return sceneProService.getOne(wrapper);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private CameraDetail getCameraDetailByCameraId(Long cameraId) {
|
|
|
|
+ LambdaQueryWrapper<CameraDetail> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ wrapper.eq(CameraDetail::getCameraId,cameraId);
|
|
|
|
+ return cameraDetailService.getOne(wrapper);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private Camera getCameraById(Long cameraId) {
|
|
|
|
+ LambdaQueryWrapper<Camera> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ wrapper.eq(Camera::getId,cameraId);
|
|
|
|
+ return cameraService.getOne(wrapper);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|