wenminjie
2026-07-14 bd6b08e65fe29994c6c6b5430639022f2a4f5e5c
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPedigreeChartServiceImpl.java
@@ -4,11 +4,14 @@
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;
@@ -22,6 +25,7 @@
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
@@ -35,7 +39,8 @@
 */
@Service
public class TPedigreeChartServiceImpl extends ServiceImpl<TPedigreeChartMapper, TPedigreeChart> implements TPedigreeChartService {
    @Resource
    private TProjectTeamMapper tProjectTeamMapper;
    @Autowired
    private SysUserMapper sysUserMapper;
    @Autowired
@@ -44,6 +49,16 @@
    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;
    }