| | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.system.dto.TConfirmBreedingAndPreservationDTO; |
| | | import com.ruoyi.system.mapper.TProjectTeamMapper; |
| | | import com.ruoyi.system.model.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | }else if (!sysUser.getRoleType().equals("1")){ |
| | | if (query.getProjectIds() == null || query.getProjectIds().isEmpty()){ |
| | | List<String> allProjectIds = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getUserId, tokenService.getLoginUser().getUserId()) |
| | | .list().stream().map(TProjectTeamStaff::getTeamId).collect(Collectors.toList()); |
| | | if (!allProjectIds.isEmpty()){ |
| | |
| | | query.setProjectIds(projectIds); |
| | | }else { |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | culturePreservationService.updateById(culturePreservation); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Resource |
| | | private TProjectTeamMapper tProjectTeamMapper; |
| | | |
| | | //@PreAuthorize("@ss.hasPermi('system:breedingAndPreservation:detail')") |
| | | @ApiOperation(value = "选育保藏记录详情") |
| | | @GetMapping(value = "/open/t-breeding-and-preservation/getDetailById") |
| | |
| | | vaccinationSlope.setHandleName(sysUser.getNickName()); |
| | | } |
| | | } |
| | | |
| | | if (com.ruoyi.common.utils.StringUtils.isNotEmpty(breedingAndPreservation.getProjectId())) { |
| | | TProjectTeam tProjectTeam = tProjectTeamMapper.selectById(breedingAndPreservation.getProjectId()); |
| | | if (tProjectTeam != null) { |
| | | List<TProjectTeamStaff> list = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getTeamId, tProjectTeam.getId()).list(); |
| | | StringBuilder staffNames = new StringBuilder(); |
| | | for (TProjectTeamStaff tProjectTeamStaff : list) { |
| | | SysUser sysUser = sysUserService.selectUserById(Long.valueOf(tProjectTeamStaff.getUserId())); |
| | | if (sysUser!=null){ |
| | | staffNames.append(sysUser.getNickName()).append(","); |
| | | } |
| | | } |
| | | if (StringUtils.hasLength(staffNames.toString())){ |
| | | tProjectTeam.setStaff(staffNames.substring(0, staffNames.toString().length() - 1)); |
| | | } |
| | | |
| | | List<TProjectTeam> tProjectTeamList = new ArrayList<>(); |
| | | tProjectTeamList.add(tProjectTeam); |
| | | res.setTProjectTeamList(tProjectTeamList); |
| | | } |
| | | } |
| | | |
| | | res.setSeparationOfCultureDishesList(separationOfCultureDishesList); |
| | | res.setObservationOfPetriDishes(observationOfPetriDishes); |
| | | res.setVaccinationSlopes(vaccinationSlopes); |