| | |
| | | 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; |
| | | } |