|
@@ -376,10 +376,16 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
|
|
|
List<ScenePlus> scenePlusList = scenePlusService.getListByCameraIds(cameraIds);
|
|
|
sceneCooperationService.deleteCooperationList(sceneProList,scenePlusList);
|
|
|
|
|
|
- List<Long> v3Ids = v3List.stream().map(SceneResource::getId).collect(Collectors.toList());
|
|
|
- List<Long> v4Ids = v4List.stream().map(SceneResource::getId).collect(Collectors.toList());
|
|
|
- sceneCooperationService.saveBatchByList(sceneProList,new ArrayList<>(),user.getId(),v3Ids);
|
|
|
- sceneCooperationService.saveBatchByList(new ArrayList<>(),scenePlusList,user.getId(),v4Ids);
|
|
|
+ if(!v3List.isEmpty() && !sceneProList.isEmpty()){
|
|
|
+ List<Long> v3Ids = v3List.stream().map(SceneResource::getId).collect(Collectors.toList());
|
|
|
+ sceneCooperationService.saveBatchByList(sceneProList,new ArrayList<>(),user.getId(),v3Ids);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!v4List.isEmpty() && !scenePlusList.isEmpty()){
|
|
|
+ List<Long> v4Ids = v4List.stream().map(SceneResource::getId).collect(Collectors.toList());
|
|
|
+ sceneCooperationService.saveBatchByList(new ArrayList<>(),scenePlusList,user.getId(),v4Ids);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
fdkkLaserService.disableCooperation(detailMap, cameraMap);
|
|
|
fdkkLaserService.enableCameraCooperation(detailMap, cameraMap, username);
|