| 
					
				 | 
			
			
				@@ -23,7 +23,9 @@ import com.ankaibei.workFlow.webadmin.ankaibei.service.TaskInfoService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ankaibei.workFlow.webadmin.ankaibei.utils.FlowTaskStart; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ankaibei.workFlow.webadmin.ankaibei.vo.ResMsg; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ankaibei.workFlow.webadmin.ankaibei.vo.TaskInfoVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ankaibei.workflow.api.LoginApi; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.apache.commons.lang3.ObjectUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.flowable.idm.engine.impl.cmd.GetUserInfoCmd; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.data.domain.Page; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.data.domain.PageRequest; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -60,8 +62,11 @@ public class TaskInfoServiceImpl implements TaskInfoService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public ResMsg findTaskInfo(Integer pageIndex, Integer pageSize, TaskInfoEntity taskInfoEntity) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //拿到用户的ID,根据用户 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String userId = TokenData.takeFromRequest().getUserId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //System.out.println("tokenData:===" + tokenData.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Pageable page = PageRequest.of(pageIndex - 1, pageSize); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        Page<Map<String, String>> all = taskInfoMapper.findTaskInfo(taskInfoEntity.getTargetTask(), taskInfoEntity.getTaskStatus(), page); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Page<Map<String, String>> all = taskInfoMapper.findTaskInfo(userId, taskInfoEntity.getTargetTask(), taskInfoEntity.getTaskStatus(), page); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //先将项目信息全部查出,再根据项目ID匹配项目名称 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ArrayList<Integer> projectIds = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ArrayList<String> participants = new ArrayList<>(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -70,15 +75,19 @@ public class TaskInfoServiceImpl implements TaskInfoService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             participants.add(map.get("taskParticipant")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<ProjectInfoEntity> allById = projectInfoMapper.findAllById(projectIds); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //先将用户信息全部查出,再根据项目ID匹配项目名称 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //先将用户信息全部查出,再匹配名称 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         HashMap<String, String> userMap = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<UserInfoEntity> userAll = userInfoMapper.findAll(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (String s : participants) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             String[] split = s.split(","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             List<String> list = Arrays.stream(split).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            List<UserInfoEntity> allByUserId = userInfoMapper.findAllByUserId(list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             StringBuffer str = new StringBuffer(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            for (UserInfoEntity name : allByUserId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                str.append(name.getShowName()).append(","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (String s1 : list) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                for (UserInfoEntity userInfoEntity : userAll) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (userInfoEntity.getUserId().equals(s1)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        str.append(userInfoEntity.getShowName()).append(","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             userMap.put(s, str.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -97,7 +106,7 @@ public class TaskInfoServiceImpl implements TaskInfoService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // 如果这个任务的参与人不为空,就把参与人姓名复制给参与人字段 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             String taskParticipant = map.get("taskParticipant"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (ObjectUtils.isNotEmpty(userMap)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 userMap.entrySet().stream() 
			 |