lyhzzz 1 سال پیش
والد
کامیت
a9b9bb2a60

+ 3 - 2
src/main/java/com/fdkankan/ucenter/httpClient/service/LaserService.java

@@ -166,7 +166,7 @@ public class LaserService {
     }
 
 
-    public void copy(Long camaraId, String createTime, String newNum, Integer status,
+    public void copy(Long camaraId, String createTime, String oldNum,String newNum, Integer status,
                      String  path, String sceneKey, String sceneName, Long userId,String version){
         String phone = null;
         String snCode = null;
@@ -182,11 +182,12 @@ public class LaserService {
         params.put("childName",snCode);
         params.put("createTime", createTime);
         params.put("phone", phone);
+        params.put("oldSceneCode", oldNum);
         params.put("sceneCode", newNum);
         params.put("snCode",snCode);
         params.put("status", status);
         params.put("password", sceneKey);
-        params.put("title", sceneName);
+       // params.put("title", sceneName);
         params.put("userId", userId);
         params.put("isCopy", true);
         params.put("path",path);

+ 1 - 1
src/main/java/com/fdkankan/ucenter/service/impl/CameraServiceImpl.java

@@ -208,7 +208,7 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
             }
 
 
-            if(responseCamera.getType() == 10){
+            if(responseCamera.getType() == 10 || responseCamera.getType() == 11){
                 Map<String, String> params = new HashMap<>();
                 params.put("snCode", responseCamera.getSnCode());
                 responseCamera.setSceneNum(fdkkLaserService.getLaserSceneNum(params));

+ 1 - 1
src/main/java/com/fdkankan/ucenter/service/impl/SceneApiService.java

@@ -70,7 +70,7 @@ public class SceneApiService {
         if(!cameraDetailEntity.getUserId().equals(user.getId())){
             return Result.success();
         }
-        if(cameraDetailEntity.getType() == 10 ){    //激光场景
+        if(cameraDetailEntity.getType() == 10 || cameraDetailEntity.getType() == 11){    //激光场景
             List<SceneBySnCodeVo> scenesBySnCode = laserService.getScenesBySnCode(snCode, token);
             return Result.success(scenesBySnCode);
         }

+ 4 - 4
src/main/java/com/fdkankan/ucenter/service/impl/ScenePlusServiceImpl.java

@@ -228,8 +228,8 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
                 sceneEditControls.setEditInfoId(sceneEditInfo.getId());
                 sceneEditControlsService.save(sceneEditControls);
 
-                if(scenePlus.getSceneSource() == 4){  //深时复制
-                    laserService.copy(scenePlus.getCameraId(),scenePlus.getCreateTime(),newNum,0,null,
+                if(scenePlus.getSceneSource() == 4 || scenePlus.getSceneSource() == 5){  //深时复制
+                    laserService.copy(scenePlus.getCameraId(),scenePlus.getCreateTime(),num,newNum,0,null,
                             sceneEditInfo.getScenePassword(),scenePlus.getTitle(),scenePlus.getUserId(),"V4");
                 }
 
@@ -279,9 +279,9 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
                 scenePlus.setSceneStatus(-2);
                 this.updateById(scenePlus);
                 log.info("复制场景结束-{}", new Date());
-                if(scenePlus.getSceneSource() == 4){  //深时复制
+                if(scenePlus.getSceneSource() == 4 || scenePlus.getSceneSource() == 5){  //深时复制
                     String laserPath = laserService.copyDataSource(oldDataSource,plusExt.getDataSource());
-                    laserService.copy(scenePlus.getCameraId(),scenePlus.getCreateTime(),newNum,2,laserPath,
+                    laserService.copy(scenePlus.getCameraId(),scenePlus.getCreateTime(),num,newNum,2,laserPath,
                             sceneEditInfo.getScenePassword(),scenePlus.getTitle(),scenePlus.getUserId(),"V4");
                 }
                 sceneCopyLogService.saveByNum(num,newNum,scenePlus.getUserId());

+ 4 - 4
src/main/java/com/fdkankan/ucenter/service/impl/SceneProServiceImpl.java

@@ -717,8 +717,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         oldScene.setDataSource(newDataSource);
 
         this.save(oldScene);
-        if(oldScene.getSceneSource() == 4){  //深时复制
-            laserService.copy(oldScene.getCameraId(),oldScene.getCreateTime(),newNum,0,null,
+        if(oldScene.getSceneSource() == 4 || oldScene.getSceneSource() == 5){  //深时复制
+            laserService.copy(oldScene.getCameraId(),oldScene.getCreateTime(),oldNum,newNum,0,null,
                     oldEditScene.getSceneKey(),oldScene.getSceneName(),oldScene.getUserId(),"V3");
         }
         //更新video
@@ -786,9 +786,9 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
                 oldScene.setStatus(-2);
                 this.updateById(oldScene);
                 log.info("复制场景结束-{}", new Date());
-                if(oldScene.getSceneSource() == 4){  //深时复制
+                if(oldScene.getSceneSource() == 4 || oldScene.getSceneSource() == 5){  //深时复制
                     String laserPath = laserService.copyDataSource(preDataSource,oldScene.getDataSource());
-                    laserService.copy(oldScene.getCameraId(),oldScene.getCreateTime(),newNum,2,laserPath,
+                    laserService.copy(oldScene.getCameraId(),oldScene.getCreateTime(),oldNum,newNum,2,laserPath,
                             oldEditScene.getSceneKey(),oldScene.getSceneName(),oldScene.getUserId(),"V3");
                 }
                 sceneCopyLogService.saveByNum(oldNum,newNum,oldScene.getUserId());