lyhzzz 5 kuukautta sitten
vanhempi
commit
56ccb796d3

+ 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);
 
     }