| | |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if(roleType != 1){ |
| | | // 查询项目组 |
| | | List<TProjectTeamStaff> projectTeamStaffs = projectTeamStaffService.list(Wrappers.lambdaQuery(TProjectTeamStaff.class) |
| | | .eq(TProjectTeamStaff::getUserId, userId) |
| | | .eq(TProjectTeamStaff::getRoleType, 2)); |
| | | if(!CollectionUtils.isEmpty(projectTeamStaffs)){ |
| | | List<String> teamIds = projectTeamStaffs.stream().map(TProjectTeamStaff::getTeamId).collect(Collectors.toList()); |
| | | // 查询分组 |
| | | List<TProjectTeamStaff> tProjectTeamStaffs = projectTeamStaffService.list(Wrappers.lambdaQuery(TProjectTeamStaff.class) |
| | | .in(TProjectTeamStaff::getTeamId, teamIds) |
| | | .eq(TProjectTeamStaff::getRoleType, 3)); |
| | | List<Long> userIds = tProjectTeamStaffs.stream().map(TProjectTeamStaff::getUserId).collect(Collectors.toList()); |
| | | // 查询用户所参与的实验调度 |
| | | List<TExperimentDispatchParticipants> experimentDispatchParticipants = experimentDispatchParticipantsService.list(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class) |
| | | .eq(TExperimentDispatchParticipants::getUserId, userId)); |
| | | if(experimentDispatchParticipants.size() > 0){ |
| | | .in(TExperimentDispatchParticipants::getUserId, userIds)); |
| | | if(!experimentDispatchParticipants.isEmpty()){ |
| | | // 查询项目组id |
| | | List<String> dispatchIds = experimentDispatchParticipants.stream().map(TExperimentDispatchParticipants::getDispatchId).distinct().collect(Collectors.toList()); |
| | | query.setDispatchIds(dispatchIds); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(experimentResultReportService.evaluatePageList(query)); |
| | | } |
| | | |