lyhzzz 5 月之前
父节点
当前提交
56ccb796d3
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      src/main/java/com/fdkankan/ucenter/service/impl/SceneCooperationServiceImpl.java

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

@@ -453,13 +453,18 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
                 }
             }
         }
+        List<ScenePro> collect1 = proList.stream().filter(e -> SceneSourceUtil.getLaserList().contains(e.getSceneSource())).collect(Collectors.toList());
+        List<ScenePlus> collect2 = plusList.stream().filter(e -> SceneSourceUtil.getLaserList().contains(e.getSceneSource())).collect(Collectors.toList());
+        Set<String> numList1 = collect1.stream().map(ScenePro::getNum).collect(Collectors.toSet());
+        Set<String> numList2 = collect2.stream().map(ScenePlus::getNum).collect(Collectors.toSet());
+        numList1.addAll(numList2);
 
         List<String> collect = userList.stream().map(User::getUserName).collect(Collectors.toList());
         List<String> snCodeList = new ArrayList<>();
         if(cameraList !=null ){
             snCodeList = cameraList.stream().map(Camera::getSnCode).collect(Collectors.toList());
         }
-        laserService.saveBatchCooperation(new ArrayList<>(numList),snCodeList,LoginUser.getUserName(),collect,type);
+        laserService.saveBatchCooperation(new ArrayList<>(numList1),snCodeList,LoginUser.getUserName(),collect,type);
 
     }