From bd6b08e65fe29994c6c6b5430639022f2a4f5e5c Mon Sep 17 00:00:00 2001
From: wenminjie <1036699586@qq.com>
Date: 星期二, 14 七月 2026 11:48:08 +0800
Subject: [PATCH] 修复了已知的BUG
---
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPedigreeChartServiceImpl.java | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPedigreeChartServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPedigreeChartServiceImpl.java
index 0aa0881..be1c6f1 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPedigreeChartServiceImpl.java
+++ b/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;
}
--
Gitblit v1.7.1