| | |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="central" /> |
| | | <option name="name" value="Central Repository" /> |
| | | <option name="url" value="https://repo.maven.apache.org/maven2" /> |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="central" /> |
| | | <option name="name" value="Maven Central repository" /> |
| | | <option name="url" value="https://repo1.maven.org/maven2" /> |
| | | </remote-repository> |
| | |
| | | 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); |
| | |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.*; |
| | | import com.ruoyi.system.mapper.TProjectTeamMapper; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.TPedigreeChartConfirmQuery; |
| | | import com.ruoyi.system.query.TPedigreeChartDetailConfirmCountDTO; |
| | |
| | | } |
| | | }else if (!sysUser.getRoleType().equals("1")){ |
| | | query.setRoleType(3); |
| | | |
| | | 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()){ List<String> projectIds = projectTeamService.lambdaQuery().in(TProjectTeam::getId, allProjectIds) |
| | | if (!allProjectIds.isEmpty()){ |
| | | List<String> projectIds = projectTeamService.lambdaQuery().in(TProjectTeam::getId, allProjectIds) |
| | | .eq(TProjectTeam::getStatus, 1).list().stream().map(TProjectTeam::getId).collect(Collectors.toList()); |
| | | if (projectIds.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | |
| | | }else{ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | } |
| | | |
| | | }else{ |
| | | query.setRoleType(1); |
| | | } |
| | |
| | | String child = JSON.toJSONString(dto.getOne().get(0)); |
| | | parent.setJson(child); |
| | | } |
| | | |
| | | //不能修改别人的数据 |
| | | TPedigreeChart byId = pedigreeChartService.getById(parent.getId()); |
| | | if (!loginUser.getUser().getNickName().equals(byId.getCreateBy())) { |
| | | return R.fail("不能修改其他工程师数据"); |
| | | } |
| | | |
| | | List<String> projectIds = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getUserId, |
| | | tokenService.getLoginUser().getUserId()) |
| | | .list().stream().map(TProjectTeamStaff::getTeamId).collect(Collectors.toList()); |
| | |
| | | TPedigreeChartDetailQuery query = JSON.parseObject(param, TPedigreeChartDetailQuery.class); |
| | | return R.ok(pedigreeChartService.pageListDetail(query)); |
| | | } |
| | | |
| | | @Resource |
| | | private TProjectTeamMapper tProjectTeamMapper; |
| | | |
| | | /** |
| | | * 谱系图-菌种传代生产谱系图详情 |
| | | */ |
| | |
| | | tPedigreeChartParentAllDetailDTO.setOne(tPedigreeChartParentOneDTOS); |
| | | } |
| | | pedigreeChart.setPedigreeChartParentAllDetailDTO(tPedigreeChartParentAllDetailDTO); |
| | | |
| | | if (com.ruoyi.common.utils.StringUtils.isNotEmpty(pedigreeChart.getProjectId())) { |
| | | TProjectTeam tProjectTeam = tProjectTeamMapper.selectById(pedigreeChart.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 (org.springframework.util.StringUtils.hasLength(staffNames.toString())){ |
| | | tProjectTeam.setStaff(staffNames.substring(0, staffNames.toString().length() - 1)); |
| | | } |
| | | |
| | | List<TProjectTeam> tProjectTeamList = new ArrayList<>(); |
| | | tProjectTeamList.add(tProjectTeam); |
| | | pedigreeChart.setTProjectTeamList(tProjectTeamList); |
| | | } |
| | | } |
| | | |
| | | return R.ok(pedigreeChart); |
| | | } |
| | | /** |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | TProjectTeamQuery query = JSON.parseObject(param, TProjectTeamQuery.class); |
| | | return R.ok(projectTeamService.pageList(query)); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取当前用户的所属项目组") |
| | | @PostMapping(value = "/api/t_project_myteam/pageList") |
| | | public R<List<TProjectTeam>> myTeamPageList() { |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | List<TProjectTeam> list; |
| | | |
| | | // 判断是否为管理员(超级管理员) |
| | | if (tokenService.getLoginUser().getUser().isAdmin()) { |
| | | // 管理员查询全部 |
| | | list = projectTeamService.lambdaQuery() |
| | | .eq(TProjectTeam::getStatus, 1) |
| | | .list(); |
| | | } else { |
| | | // 普通用户查询自己的项目组 |
| | | List<String> projetIds = projectTeamStaffService.lambdaQuery() |
| | | .eq(TProjectTeamStaff::getUserId, userId) |
| | | .list() |
| | | .stream() |
| | | .map(TProjectTeamStaff::getTeamId) |
| | | .collect(Collectors.toList()); |
| | | |
| | | if (projetIds.isEmpty()) { |
| | | list = new ArrayList<>(); |
| | | } else { |
| | | list = projectTeamService.lambdaQuery() |
| | | .eq(TProjectTeam::getStatus, 1) |
| | | .in(TProjectTeam::getId, projetIds) |
| | | .list(); |
| | | } |
| | | } |
| | | |
| | | return R.ok(list); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增报告-获取项目组分页列表") |
| | | @PostMapping(value = "/api/t_project_team/pageList1") |
| | | public R<PageInfo<TProjectTeamVO>> pageList1(@RequestBody String param) { |
| | |
| | | tStrainReportDetailExperimentVO.setUserName(sysUserService.selectUserById(Long.valueOf(tStrainReportDetail.getExperimentId())).getNickName()); |
| | | tStrainReportDetailExperimentVO.setHandleCount((int) collect.stream().filter(e -> e.getExperimentId().equals(tStrainReportDetail.getExperimentId())).count()); |
| | | BigDecimal handleIntegral = collect.stream() |
| | | .filter(e -> e.getEvaluateHumanType().equals(1)&&e.getExperimentId().equals(sysUser.getUserId()+"") |
| | | &&e.getReportType()==1) |
| | | .filter(e -> e.getEvaluateHumanType().equals(1)&&e.getExperimentId().equals(sysUser.getUserId()+"") &&e.getReportType()==1) |
| | | .map(TStrainReportDetail::getEvaluateTotal) |
| | | .reduce(BigDecimal::add) |
| | | .orElse(BigDecimal.ZERO); |
| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.*; |
| | | import com.ruoyi.system.mapper.TProjectTeamMapper; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.TBreedingAndPreservationQuery; |
| | | import com.ruoyi.system.query.TStrainValidationDataQuery; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | }else if (!sysUser.getRoleType().equals("1")){ |
| | | if (query.getProjectIds() == null || query.getProjectIds().isEmpty()) { |
| | | 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<>()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return R.ok(strainValidationDataService.pageList(query)); |
| | |
| | | if (StringUtils.hasLength(dto.getHandleSignature())){ |
| | | dto.setHandleTime(LocalDateTime.now()); |
| | | } |
| | | |
| | | if (com.ruoyi.common.utils.StringUtils.isEmpty(dto.getProjectId())) { |
| | | List<String> projectIds = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getUserId, tokenService.getLoginUser().getUserId()) |
| | | .list().stream().map(TProjectTeamStaff::getTeamId).collect(Collectors.toList()); |
| | | if (!projectIds.isEmpty()){ |
| | |
| | | .last("limit 1").one(); |
| | | dto.setProjectId(projectTeam.getId()); |
| | | } |
| | | } |
| | | |
| | | strainValidationDataService.save(dto); |
| | | if (dto.getIsDraft()==0){ |
| | | dto.setStatus(1); |
| | |
| | | strainValidationDataService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Log(title = "菌种验证数据资料-确认验证资料", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "确认验证资料",response = AddStrainValidationDataDetailDTO.class) |
| | | @PostMapping(value = "/api/t-strain-validation-data/confirm") |
| | |
| | | } |
| | | dto.setStatus(2); |
| | | strainValidationDataService.updateById(dto); |
| | | |
| | | // 先删除该 dataId 的所有数据 |
| | | LambdaQueryWrapper<TStrainValidationDataDetail> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TStrainValidationDataDetail::getDataId, dto.getId()); |
| | | strainValidationDataDetailService.remove(wrapper); |
| | | |
| | | strainValidationDataDetailService.saveBatch(list); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Log(title = "菌种验证数据资料-存草稿", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "确认验证资料",response = AddStrainValidationDataDetailDTO.class) |
| | | @PostMapping(value = "/api/t-strain-validation-data/saveDraf") |
| | | public R<Boolean> saveDraf(@RequestBody String param) { |
| | | AddStrainValidationDataDetailDTO dto = JSON.parseObject(param,AddStrainValidationDataDetailDTO.class); |
| | | List<TStrainValidationDataDetail> list = dto.getList(); |
| | | for (TStrainValidationDataDetail tStrainValidationDataDetail : list) { |
| | | tStrainValidationDataDetail.setDataId(dto.getId()); |
| | | } |
| | | dto.setIsDraft(1); |
| | | strainValidationDataService.updateById(dto); |
| | | |
| | | // 先删除该 dataId 的所有数据 |
| | | LambdaQueryWrapper<TStrainValidationDataDetail> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TStrainValidationDataDetail::getDataId, dto.getId()); |
| | | strainValidationDataDetailService.remove(wrapper); |
| | | |
| | | strainValidationDataDetailService.saveBatch(list); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Resource |
| | | private TProjectTeamMapper tProjectTeamMapper; |
| | | |
| | | /** |
| | | * 查看菌种验证数据资料详情 |
| | |
| | | BeanUtils.copyProperties(strainValidationData,res); |
| | | List<TStrainValidationDataDetail> list = strainValidationDataDetailService.lambdaQuery().eq(TStrainValidationDataDetail::getDataId, id).list(); |
| | | res.setList(list); |
| | | |
| | | if (com.ruoyi.common.utils.StringUtils.isNotEmpty(strainValidationData.getProjectId())) { |
| | | TProjectTeam tProjectTeam = tProjectTeamMapper.selectById(strainValidationData.getProjectId()); |
| | | if (tProjectTeam != null) { |
| | | List<TProjectTeamStaff> listProsd = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getTeamId, tProjectTeam.getId()).list(); |
| | | StringBuilder staffNames = new StringBuilder(); |
| | | for (TProjectTeamStaff tProjectTeamStaff : listProsd) { |
| | | 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.setProjectName(tProjectTeam.getTeamName()); |
| | | } |
| | | } |
| | | |
| | | return R.ok(res); |
| | | } |
| | | @Log(title = "主细胞-删除菌种验证数据资料", businessType = BusinessType.DELETE) |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | |
| | | SysUser sysUser = sysUserService.selectUserById(userId); |
| | | TTrainLibraryQuery query = JSON.parseObject(param, TTrainLibraryQuery.class); |
| | | if (sysUser.getRoleType().equals("2")){ |
| | | List<String> allProjectIds = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getUserId, tokenService.getLoginUser().getUserId()) |
| | | .list().stream().map(TProjectTeamStaff::getTeamId).collect(Collectors.toList()); |
| | | if (!allProjectIds.isEmpty()){ List<String> projectIds = projectTeamService.lambdaQuery().in(TProjectTeam::getId, allProjectIds) |
| | | .list().stream().map(TProjectTeam::getId).collect(Collectors.toList()); |
| | | |
| | | if (projectIds.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | query.setProjectIds(projectIds); |
| | | }else { |
| | | return R.ok(new PageInfo<>()); |
| | | if (CollectionUtils.isNotEmpty(query.getProjectIds())) { |
| | | query.setProjectIds(query.getProjectIds()); |
| | | } |
| | | }else if (!sysUser.getRoleType().equals("1")){ |
| | | if (CollectionUtils.isNotEmpty(query.getProjectIds())) { |
| | | query.setProjectIds(query.getProjectIds()); |
| | | }else { |
| | | // 没有根据项目组查询 |
| | | List<String> allProjectIds = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getUserId, tokenService.getLoginUser().getUserId()) |
| | | .list().stream().map(TProjectTeamStaff::getTeamId).collect(Collectors.toList()); |
| | | if (!allProjectIds.isEmpty()){ |
| | |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | } |
| | | return R.ok(tTrainLibraryService.pageList(query)); |
| | | } |
| | | return R.ok(tTrainLibraryService.pageList(query, sysUser.getRoleType())); |
| | | } |
| | | |
| | | /** |
| | | * 获取菌种库出入库时间轴列表 |
| | | */ |
| | |
| | | return R.fail(401,"登陆失效"); |
| | | } |
| | | TTrainLibraryDTO dto = JSON.parseObject(param,TTrainLibraryDTO.class); |
| | | List<String> projectIds = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getUserId, tokenService.getLoginUser().getUserId()) |
| | | .list().stream().map(TProjectTeamStaff::getTeamId).collect(Collectors.toList()); |
| | | if (!projectIds.isEmpty()){ |
| | | TProjectTeam projectTeam = projectTeamService.lambdaQuery().in(TProjectTeam::getId, projectIds) |
| | | .eq(TProjectTeam::getStatus, 1) |
| | | .orderByDesc(BaseModel::getCreateTime) |
| | | .last("limit 1").one(); |
| | | dto.setProjectId(projectTeam.getId()); |
| | | } |
| | | |
| | | //改为前端传值 |
| | | // List<String> projectIds = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getUserId, tokenService.getLoginUser().getUserId()) |
| | | // .list().stream().map(TProjectTeamStaff::getTeamId).collect(Collectors.toList()); |
| | | // if (!projectIds.isEmpty()){ |
| | | // TProjectTeam projectTeam = projectTeamService.lambdaQuery().in(TProjectTeam::getId, projectIds) |
| | | // .eq(TProjectTeam::getStatus, 1) |
| | | // .orderByDesc(BaseModel::getCreateTime) |
| | | // .last("limit 1").one(); |
| | | // dto.setProjectId(projectTeam.getId()); |
| | | // } |
| | | tTrainLibraryService.save(dto); |
| | | if (dto.getIsDraft()==0){ |
| | | // 新增入库记录 |
| | |
| | | location: /file/ |
| | | qrLocation: /file/qrCode/ |
| | | accessPath: /file/ |
| | | allowExt: .jpg|.png|.gif|.jpeg|.doc|.docx|.apk|.MP4|.mp4|.pdf|.PDF|.xls|.xlsx|.rar|.zip|.rar |
| | | allowExt: .jpg|.png|.gif|.jpeg|.doc|.docx|.apk|.MP4|.mp4|.pdf|.PDF|.xls|.xlsx|.rar|.zip|.rar|.ppt|.pptx |
| | | url: |
| | | # prefix: http://localhost:${server.port}${server.servlet.context-path} |
| | | prefix: https://xzgt.test.591taxi.cn:${server.port}${server.servlet.context-path} |
| | |
| | | location: /file/ |
| | | qrLocation: /file/qrCode/ |
| | | accessPath: /file/ |
| | | allowExt: .jpg|.png|.gif|.jpeg|.doc|.docx|.apk|.MP4|.mp4|.pdf|.PDF|.xls|.xlsx|.rar|.zip|.rar |
| | | allowExt: .jpg|.png|.gif|.jpeg|.doc|.docx|.apk|.MP4|.mp4|.pdf|.PDF|.xls|.xlsx|.rar|.zip|.rar|.ppt|.pptx |
| | | url: |
| | | # prefix: http://localhost:${server.port}${server.servlet.context-path} |
| | | prefix: https://xzgt.test.591taxi.cn:${server.port}${server.servlet.context-path} |
| | |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("项目组数据") |
| | | @TableField(exist = false) |
| | | private List<TProjectTeam> tProjectTeamList; |
| | | } |
| | |
| | | @TableField("project_id") |
| | | private String projectId; |
| | | |
| | | @ApiModelProperty(value = "项目组名称") |
| | | @TableField(exist = false) |
| | | private String projectName; |
| | | |
| | | @ApiModelProperty(value = "菌种来源1 是沙土管或甘油管的源头菌种;入原始细胞库(祖代-0) 2 是斜面的源头菌种;接种入主细胞库(祖代-0)。经过育种、验证后,菌种保藏为甘油管或沙土管的,入原始细胞库(祖代-0)3 是含菌物质自己分离后获得的斜面源头菌种,接种入主细胞库;经生产验证后,保藏为沙土管或甘油管,入原始细胞库(祖代-O)") |
| | | @TableField("strain_source") |
| | | private String strainSource; |
| | |
| | | */ |
| | | public interface TTrainLibraryService extends IService<TTrainLibrary> { |
| | | |
| | | PageInfo<TTrainLibraryVO> pageList(TTrainLibraryQuery query); |
| | | PageInfo<TTrainLibraryVO> pageList(TTrainLibraryQuery query, String roleType); |
| | | |
| | | TTrainLibraryDetailVO getDetailById(TTrainLibraryDetailQuery query); |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.mapper.TBreedingAndPreservationMapper; |
| | | import com.ruoyi.system.mapper.TProjectTeamMapper; |
| | | import com.ruoyi.system.mapper.TProjectTeamStaffMapper; |
| | | import com.ruoyi.system.model.TBreedingAndPreservation; |
| | | import com.ruoyi.system.model.TProjectTeam; |
| | | import com.ruoyi.system.model.TProjectTeamStaff; |
| | | import com.ruoyi.system.query.TBreedingAndPreservationQuery; |
| | | import com.ruoyi.system.service.TBreedingAndPreservationService; |
| | | import com.ruoyi.system.vo.TBreedingAndPreservationVO; |
| | | import com.ruoyi.system.vo.TPedigreeChartVO; |
| | | import com.ruoyi.system.vo.TProjectTeamVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | public class TBreedingAndPreservationServiceImpl extends ServiceImpl<TBreedingAndPreservationMapper, TBreedingAndPreservation> implements TBreedingAndPreservationService { |
| | | @Autowired |
| | | private TProjectTeamMapper projectTeamMapper; |
| | | |
| | | @Override |
| | | public PageInfo<TBreedingAndPreservationVO> pageList(TBreedingAndPreservationQuery query) { |
| | | PageInfo<TBreedingAndPreservationVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TBreedingAndPreservationVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | for (TBreedingAndPreservationVO tBreedingAndPreservationVO : list) { |
| | | if (StringUtils.isNotEmpty(tBreedingAndPreservationVO.getProjectId())) { |
| | | TProjectTeam tProjectTeam = projectTeamMapper.selectById(tBreedingAndPreservationVO.getProjectId()); |
| | | if (tProjectTeam != null) { |
| | | tBreedingAndPreservationVO.setProjectName(tProjectTeam.getTeamName()); |
| | | } |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | | import com.ruoyi.system.mapper.TPedigreeChartDetailMapper; |
| | | import com.ruoyi.system.mapper.TPedigreeChartMapper; |
| | | import com.ruoyi.system.mapper.TProjectTeamMapper; |
| | | import com.ruoyi.system.model.TPedigreeChart; |
| | | import com.ruoyi.system.model.TPedigreeChartDetail; |
| | | import com.ruoyi.system.model.TProjectTeam; |
| | | import com.ruoyi.system.model.TProjectTeamStaff; |
| | | import com.ruoyi.system.query.TPedigreeChartConfirmQuery; |
| | | import com.ruoyi.system.query.TPedigreeChartDetailQuery; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | public class TPedigreeChartServiceImpl extends ServiceImpl<TPedigreeChartMapper, TPedigreeChart> implements TPedigreeChartService { |
| | | |
| | | @Resource |
| | | private TProjectTeamMapper tProjectTeamMapper; |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | @Autowired |
| | |
| | | public PageInfo<TPedigreeChartVO> pageList(TPedigreeChartQuery query) { |
| | | PageInfo<TPedigreeChartVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TPedigreeChartVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | |
| | | for (TPedigreeChartVO tPedigreeChartVO : list) { |
| | | if (StringUtils.isNotEmpty(tPedigreeChartVO.getProjectId())) { |
| | | TProjectTeam tProjectTeam = tProjectTeamMapper.selectById(tPedigreeChartVO.getProjectId()); |
| | | if (tProjectTeam != null) { |
| | | tPedigreeChartVO.setProjectName(tProjectTeam.getTeamName()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | |
| | | public PageInfo<TStrainReportProjectVO> pageListProject(TStrainReportProjectQuery query) { |
| | | PageInfo<TStrainReportProjectVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TStrainReportProjectVO> list = this.baseMapper.pageListProject(query,pageInfo); |
| | | LambdaQueryWrapper<TStrainReport> queryWrapper = new LambdaQueryWrapper<TStrainReport>().eq(TStrainReport::getStatus, 3); |
| | | LambdaQueryWrapper<TStrainReport> queryWrapper = new LambdaQueryWrapper<TStrainReport>().eq(TStrainReport::getStatus, 3) |
| | | .orderByDesc(TStrainReport::getEvaluateTime); |
| | | |
| | | List<TStrainReport> tStrainReports = this.baseMapper.selectList( |
| | | queryWrapper); |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.mapper.TProjectTeamMapper; |
| | | import com.ruoyi.system.mapper.TStrainValidationDataMapper; |
| | | import com.ruoyi.system.model.TProjectTeam; |
| | | import com.ruoyi.system.model.TProjectTeamStaff; |
| | | import com.ruoyi.system.model.TStrainValidationData; |
| | | import com.ruoyi.system.query.TStrainValidationDataQuery; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | public class TStrainValidationDataServiceImpl extends ServiceImpl<TStrainValidationDataMapper, TStrainValidationData> implements TStrainValidationDataService { |
| | | @Resource |
| | | private TProjectTeamMapper tProjectTeamMapper; |
| | | |
| | | @Override |
| | | public PageInfo<TStrainValidationDataVO> pageList(TStrainValidationDataQuery query) { |
| | | PageInfo<TStrainValidationDataVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TStrainValidationDataVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | |
| | | for (TStrainValidationDataVO tStrainValidationDataVO : list) { |
| | | if (StringUtils.isNotEmpty(tStrainValidationDataVO.getProjectId())) { |
| | | TProjectTeam tProjectTeam = tProjectTeamMapper.selectById(tStrainValidationDataVO.getProjectId()); |
| | | if (tProjectTeam != null) { |
| | | tStrainValidationDataVO.setProjectName(tProjectTeam.getTeamName()); |
| | | } |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.system.mapper.TTrainLibraryMapper; |
| | | import com.ruoyi.system.model.TProjectTeam; |
| | | import com.ruoyi.system.model.TTrainLibrary; |
| | | import com.ruoyi.system.model.TTrainLibraryWarehousing; |
| | | import com.ruoyi.system.query.TTrainLibraryDetailQuery; |
| | | import com.ruoyi.system.query.TTrainLibraryQuery; |
| | | import com.ruoyi.system.service.TProjectTeamService; |
| | | import com.ruoyi.system.service.TTrainLibraryService; |
| | | import com.ruoyi.system.vo.TProjectTeamVO; |
| | | import com.ruoyi.system.vo.TTrainLibraryDetailVO; |
| | | import com.ruoyi.system.vo.TTrainLibraryVO; |
| | | import com.ruoyi.system.vo.TTrainLibraryWarehousingVO; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Service |
| | | public class TTrainLibraryServiceImpl extends ServiceImpl<TTrainLibraryMapper, TTrainLibrary> implements TTrainLibraryService { |
| | | @Resource |
| | | private TProjectTeamService projectTeamService; |
| | | |
| | | @Override |
| | | public PageInfo<TTrainLibraryVO> pageList(TTrainLibraryQuery query) { |
| | | public PageInfo<TTrainLibraryVO> pageList(TTrainLibraryQuery query, String roleType) { |
| | | PageInfo<TTrainLibraryVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TTrainLibraryVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | |
| | | List<TTrainLibraryVO> resultList = new ArrayList<>(); |
| | | |
| | | for (TTrainLibraryVO tTrainLibraryVO : list) { |
| | | if (StringUtils.isNotEmpty(tTrainLibraryVO.getProjectId())) { |
| | | TProjectTeam byId = projectTeamService.getById(tTrainLibraryVO.getProjectId()); |
| | | //未封存的数据 |
| | | if (byId != null && ("2".equals(roleType) || byId.getStatus() == 1)) { // 只处理status为1的数据 |
| | | tTrainLibraryVO.setProjectName(byId.getTeamName()); |
| | | resultList.add(tTrainLibraryVO); |
| | | } |
| | | } |
| | | } |
| | | |
| | | pageInfo.setRecords(resultList); |
| | | pageInfo.setTotal(resultList.size()); // 重新设置总记录数 |
| | | return pageInfo; |
| | | } |
| | | |
| | |
| | | package com.ruoyi.system.vo; |
| | | |
| | | import com.ruoyi.system.model.TProjectTeam; |
| | | import com.ruoyi.system.model.TStrainValidationData; |
| | | import com.ruoyi.system.model.TStrainValidationDataDetail; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | public class AddStrainValidationDataDetailVO extends TStrainValidationData { |
| | | @ApiModelProperty("确认详情列表") |
| | | private List<TStrainValidationDataDetail> list; |
| | | @ApiModelProperty("项目组名称") |
| | | private String projectName; |
| | | @ApiModelProperty("项目组数据") |
| | | private List<TProjectTeam> tProjectTeamList; |
| | | |
| | | } |
| | |
| | | private List<TVaccinationSlope> vaccinationSlopes; |
| | | @ApiModelProperty("菌种保藏记录") |
| | | private List<TCulturePreservation> culturePreservations; |
| | | |
| | | @ApiModelProperty("项目组数据") |
| | | private List<TProjectTeam> tProjectTeamList; |
| | | } |
| | |
| | | package com.ruoyi.system.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.system.model.TBreedingAndPreservation; |
| | | import com.ruoyi.system.model.TPedigreeChart; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "菌种选育保藏记录分页列表返回VO") |
| | | public class TBreedingAndPreservationVO extends TBreedingAndPreservation { |
| | | |
| | | @ApiModelProperty(value = "项目组名称") |
| | | private String projectName; |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModel(value = "谱系图分页列表返回VO") |
| | | public class TPedigreeChartVO extends TPedigreeChart { |
| | | |
| | | |
| | | |
| | | private String projectName; |
| | | } |
| | |
| | | package com.ruoyi.system.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.system.model.TBreedingAndPreservation; |
| | | import com.ruoyi.system.model.TStrainValidationData; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "菌种验证数据资料分页列表返回VO") |
| | | public class TStrainValidationDataVO extends TStrainValidationData { |
| | | |
| | | @ApiModelProperty(value = "项目组名称") |
| | | private String projectName; |
| | | |
| | | |
| | | } |
| | |
| | | <result column="temperature" property="temperature" /> |
| | | <result column="aerobic_type" property="aerobicType" /> |
| | | <result column="is_draft" property="isDraft" /> |
| | | <result column="project_id" property="projectId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, create_time, update_time, create_by, update_by, disabled, preserve_source, strain_name, strain_code, formula, source_material_time_batch_number, separate_colony_number, culture_medium, temperature, aerobic_type, is_draft |
| | | id, create_time, update_time, create_by, project_id, update_by, disabled, preserve_source, strain_name, strain_code, formula, source_material_time_batch_number, separate_colony_number, culture_medium, temperature, aerobic_type, is_draft |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TBreedingAndPreservationVO"> |
| | | select |
| | |
| | | and status = 2 |
| | | </if> |
| | | <if test="query.roleType == 3"> |
| | | and status = 2 or status = 1 |
| | | and (status = 2 or status = 1) |
| | | </if> |
| | | <if test="query.projectIds != null and query.projectIds.size() > 0"> |
| | | and project_id in |
| | |
| | | <result column="status" property="status" /> |
| | | <result column="type" property="type" /> |
| | | <result column="signature" property="signature" /> |
| | | <result column="project_id" property="projectId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, strain_code, strain_name, create_time, update_time, create_by, update_by, disabled, strain_source, appraisal_method, features, save_method, save_location, stock, remark, status, `type`, signature,is_draft |
| | | id, strain_code, strain_name, project_id, create_time, update_time, create_by, update_by, disabled, strain_source, appraisal_method, features, save_method, save_location, stock, remark, status, `type`, signature,is_draft |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TTrainLibraryVO"> |
| | | select |
| | |
| | | <result column="temperature" property="temperature" /> |
| | | <result column="aerobic_type" property="aerobicType" /> |
| | | <result column="is_draft" property="isDraft" /> |
| | | <result column="project_id" property="projectId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, create_time, update_time, create_by, update_by, disabled, preserve_source, strain_name, strain_code, formula, source_material_time_batch_number, separate_colony_number, culture_medium, temperature, aerobic_type, is_draft |
| | | id, create_time, update_time, create_by, project_id, update_by, disabled, preserve_source, strain_name, strain_code, formula, source_material_time_batch_number, separate_colony_number, culture_medium, temperature, aerobic_type, is_draft |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TBreedingAndPreservationVO"> |
| | | select |
| | |
| | | and status = 2 |
| | | </if> |
| | | <if test="query.roleType == 3"> |
| | | and status = 2 or status = 1 |
| | | and (status = 2 or status = 1) |
| | | </if> |
| | | <if test="query.projectIds != null and query.projectIds.size() > 0"> |
| | | and project_id in |
| | |
| | | <result column="status" property="status" /> |
| | | <result column="type" property="type" /> |
| | | <result column="signature" property="signature" /> |
| | | <result column="project_id" property="projectId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, strain_code, strain_name, create_time, update_time, create_by, update_by, disabled, strain_source, appraisal_method, features, save_method, save_location, stock, remark, status, `type`, signature,is_draft |
| | | id, strain_code, strain_name, project_id, create_time, update_time, create_by, update_by, disabled, strain_source, appraisal_method, features, save_method, save_location, stock, remark, status, `type`, signature,is_draft |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TTrainLibraryVO"> |
| | | select |