Commit 54df158f authored by wdy's avatar wdy

Merge branch 'wangdingyi' into 'dev'

查看暂存任务

See merge request !266
parents 21b5ea80 f995b534
...@@ -2,6 +2,8 @@ package com.ruoyi.service.impl; ...@@ -2,6 +2,8 @@ package com.ruoyi.service.impl;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.DataStatisticsUtils; import com.ruoyi.common.DataStatisticsUtils;
...@@ -104,6 +106,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -104,6 +106,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
@Autowired @Autowired
private TaskUserRelationMapper taskUserRelationMapper; private TaskUserRelationMapper taskUserRelationMapper;
@Autowired
private TestRecordsMapper testRecordsMapper;
@Override @Override
public List<Task> findList(TaskListRequest request) { public List<Task> findList(TaskListRequest request) {
return taskMapper.findList(request); return taskMapper.findList(request);
...@@ -1078,25 +1083,28 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -1078,25 +1083,28 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 小组成员 // 小组成员
List<TaskUserRelation> relation = taskUserRelationService.selectQTeamMembers(id); List<TaskUserRelation> relation = taskUserRelationService.selectQTeamMembers(id);
// 小组成员姓名、部门 if(relation != null && relation.size() != 0) {
List<UserNameResponse> userList = taskMapper.findByRelation(relation);
for (UserNameResponse response : userList) { // 小组成员姓名、部门
for (TaskUserRelation taskUserRelation : relation) { List<UserNameResponse> userList = taskMapper.findByRelation(relation);
if (Objects.equals(response.getUserId(), taskUserRelation.getUserId())) {
taskUserRelation.setName(response.getName()); for (UserNameResponse response : userList) {
taskUserRelation.setDeptName(response.getDeptName()); for (TaskUserRelation taskUserRelation : relation) {
if (Objects.equals(response.getUserId(), taskUserRelation.getUserId())) {
taskUserRelation.setName(response.getName());
taskUserRelation.setDeptName(response.getDeptName());
}
} }
} }
}
// 小组成员状态 // 小组成员状态
List<TaskUserRelation> relationList = taskUserRelationMapper.findByIdList(relation); List<TaskUserRelation> relationList = taskUserRelationMapper.findByIdList(relation);
for ( TaskUserRelation userRelation : relationList) { for ( TaskUserRelation userRelation : relationList) {
for (TaskUserRelation taskUserRelation : relation) { for (TaskUserRelation taskUserRelation : relation) {
if (Objects.equals(userRelation.getUserId(), taskUserRelation.getUserId())) { if (Objects.equals(userRelation.getUserId(), taskUserRelation.getUserId())) {
taskUserRelation.setStatus(userRelation.getStatus()); taskUserRelation.setStatus(userRelation.getStatus());
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment