| 
					
				 | 
			
			
				@@ -8,19 +8,20 @@ import com.keao.edu.common.page.PageInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.keao.edu.common.service.impl.BaseServiceImpl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.keao.edu.user.dao.ExamReviewDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.keao.edu.user.dto.ExamReviewDto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.keao.edu.user.dto.ExamRoomStudentRelationDto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.keao.edu.user.entity.ExamReview; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.keao.edu.user.entity.Subject; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.keao.edu.user.enums.YesOrNoEnum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.keao.edu.user.page.ExamReviewQueryInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.keao.edu.user.service.ExamReviewService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.keao.edu.util.collection.MapUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.apache.poi.ss.formula.functions.T; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.stereotype.Service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.transaction.annotation.Transactional; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import java.util.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.HashMap; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.Map; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.Objects; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.stream.Collectors; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @Service 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -42,8 +43,8 @@ public class ExamReviewServiceImpl extends BaseServiceImpl<Long, ExamReview> imp 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Map<String, Object> params = new HashMap<String, Object>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		MapUtil.populateMap(params, queryInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		List<Integer> nextLevelOrganIds = organizationService.getChildOrganIds(queryInfo.getOrganId(), true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		params.put("organIds", nextLevelOrganIds); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//		List<Integer> nextLevelOrganIds = organizationService.getChildOrganIds(queryInfo.getOrganId(), true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//		params.put("organIds", nextLevelOrganIds); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		List<ExamReviewDto> dataList = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		int count = examReviewDao.countExamResult(params); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -51,12 +52,12 @@ public class ExamReviewServiceImpl extends BaseServiceImpl<Long, ExamReview> imp 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			pageInfo.setTotal(count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			params.put("offset", pageInfo.getOffset()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			dataList = examReviewDao.findExamResult(params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			List<Integer> studentIds = dataList.stream().map(ExamReviewDto::getStudentId).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			List<Integer> teacherIds = dataList.stream().map(ExamReviewDto::getTeacherId).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			List<Integer> subjectIds = dataList.stream().map(e->e.getExamRegistration().getSubjectId()).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Map<Integer, String> studentIdNameMap = this.getMap("sys_user", "id_", "real_name_", studentIds, Integer.class, String.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			Map<Integer, String> teacherIdNameMap = this.getMap("sys_user", "id_", "real_name_", teacherIds, Integer.class, String.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			Map<Integer, String> subjectIdNameMap = this.getMap("subject", "id_", "name_", subjectIds, Integer.class, String.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			for (ExamReviewDto e : dataList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				e.setStudentInfo(new SysUser(e.getStudentId(),studentIdNameMap.get(e.getStudentId()))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				e.setTeacher(new SysUser(e.getStudentId(),teacherIdNameMap.get(e.getStudentId()))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				e.getExamRegistration().setSubject(new Subject(e.getExamRegistration().getSubjectId(), subjectIdNameMap.get(e.getExamRegistration().getSubjectId()))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} 
			 |