|
@@ -159,11 +159,22 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
|
|
|
|
|
|
@Override
|
|
|
public PageInfo pageList(CameraParam param) {
|
|
|
- User user = userService.getByUserName(param.getUserName());
|
|
|
- Set<Long> roleIds = userRoleService.getByUser(user);
|
|
|
- if(roleIds.contains(6L) || !roleIds.contains(5L)){
|
|
|
- param.setCompanyId(user.getCompanyId());
|
|
|
+
|
|
|
+ if(StringUtils.isNotBlank(param.getSceneCode())){
|
|
|
+ Long cameraId = sceneProService.getCameraIdByNum(param.getSceneCode());
|
|
|
+ if(cameraId != null){
|
|
|
+ CameraDetail cameraDetail = cameraDetailService.getByCameraId(cameraId);
|
|
|
+ if(cameraDetail != null && cameraDetail.getCompanyId() != null){
|
|
|
+ param.setCompanyId(cameraDetail.getCompanyId());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+ User user = userService.getByUserName(param.getUserName());
|
|
|
+// Set<Long> roleIds = userRoleService.getByUser(user);
|
|
|
+// if(roleIds.contains(6L) || !roleIds.contains(5L)){
|
|
|
+// param.setCompanyId(user.getCompanyId());
|
|
|
+// }
|
|
|
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<>(); //场景数量,最后拍摄时间
|