|
@@ -171,10 +171,11 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
|
|
|
}
|
|
|
|
|
|
User user = userService.getByUserName(param.getUserName());
|
|
|
-// Set<Long> roleIds = userRoleService.getByUser(user);
|
|
|
-// if(roleIds.contains(6L) || !roleIds.contains(5L)){
|
|
|
-// param.setCompanyId(user.getCompanyId());
|
|
|
-// }
|
|
|
+ Long userId = null;
|
|
|
+ Set<Long> roleIds = userRoleService.getByUser(user);
|
|
|
+ if(roleIds.contains(6L) || roleIds.contains(5L)){
|
|
|
+ userId = user.getId();
|
|
|
+ }
|
|
|
Page<CameraVo> page = this.getBaseMapper().pageList(new Page<>(param.getPageNum(),param.getPageSize()),param);
|
|
|
List<Long> cameraIdList = page.getRecords().parallelStream().map(CameraVo::getId).collect(Collectors.toList());
|
|
|
HashMap<Long,GroupByCount> sceneNumMap = new HashMap<>(); //场景数量,最后拍摄时间
|
|
@@ -187,8 +188,8 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
|
|
|
}
|
|
|
for (CameraVo responseCamera : page.getRecords()) {
|
|
|
|
|
|
- List<ScenePro> proList = sceneProService.getListByUserId(user.getId(),responseCamera.getId());
|
|
|
- List<ScenePlus> plusList = scenePlusService.getListByUserId(user.getId(),responseCamera.getId());
|
|
|
+ List<ScenePro> proList = sceneProService.getListByUserId(userId,responseCamera.getId());
|
|
|
+ List<ScenePlus> plusList = scenePlusService.getListByUserId(userId,responseCamera.getId());
|
|
|
Set<String> numList = proList.stream().map(ScenePro::getNum).collect(Collectors.toSet());
|
|
|
Set<String> numList2 = plusList.stream().map(ScenePlus::getNum).collect(Collectors.toSet());
|
|
|
numList.addAll(numList2);
|