|  | @@ -10,6 +10,7 @@ import java.util.Objects;
 | 
	
		
			
				|  |  |  import java.util.Set;
 | 
	
		
			
				|  |  |  import java.util.stream.Collectors;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.*;
 | 
	
		
			
				|  |  |  import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  |  import org.slf4j.Logger;
 | 
	
		
			
				|  |  |  import org.slf4j.LoggerFactory;
 | 
	
	
		
			
				|  | @@ -35,14 +36,6 @@ import com.ym.mec.biz.dal.dao.StudentAttendanceDao;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dao.StudentDao;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dao.SysConfigDao;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dao.TeacherAttendanceDao;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.dto.CourseScheduleResponse;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.dto.ExportStudentAttendanceDto;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.dto.StudentAttendanceDto;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.dto.StudentAttendanceResponse;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.dto.StudentAttendanceStatisticsResponse;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.dto.StudentAttendanceStatusCountDto;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.dto.StudentPersonalAttendanceDto;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.dto.StudentStatusCountUtilEntity;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.entity.ClassGroup;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.entity.ClassGroupStudentMapper;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.entity.CourseSchedule;
 | 
	
	
		
			
				|  | @@ -691,13 +684,19 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 | 
	
		
			
				|  |  |              if (dataList == null) {
 | 
	
		
			
				|  |  |                  dataList = new ArrayList<>();
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | -            for(StudentAttendance sa : dataList){
 | 
	
		
			
				|  |  | -            	if(sa.getGroupType() == GroupType.MUSIC){
 | 
	
		
			
				|  |  | -            		Set<Integer> userId = new HashSet<Integer>();
 | 
	
		
			
				|  |  | -            		userId.add(sa.getUserId());
 | 
	
		
			
				|  |  | -            		Map<Integer,String> paymentStatusMap = MapUtil.convertIntegerMap(musicGroupPaymentCalenderDao.queryUserCoursePaymentStatus(userId,sa.getMusicGroupId()));
 | 
	
		
			
				|  |  | -            		sa.setPaymentStatus(paymentStatusMap.get(sa.getUserId()));
 | 
	
		
			
				|  |  | +            if(dataList.size() > 0){
 | 
	
		
			
				|  |  | +                Set<Integer> userIds = dataList.stream().map(StudentAttendance::getUserId).collect(Collectors.toSet());
 | 
	
		
			
				|  |  | +                //获取学员当月请假次数
 | 
	
		
			
				|  |  | +                String month = DateUtil.format(new Date(), DateUtil.ISO_YEAR_MONTH_FORMAT);
 | 
	
		
			
				|  |  | +                Map<Integer, Long> leaveNumMap = MapUtil.convertIntegerMap(studentAttendanceDao.queryLeaveNum(userIds,month));
 | 
	
		
			
				|  |  | +                for(StudentAttendance sa : dataList){
 | 
	
		
			
				|  |  | +                    sa.setLeaveNum(leaveNumMap.get(sa.getUserId()));
 | 
	
		
			
				|  |  | +                    if(sa.getGroupType() == GroupType.MUSIC){
 | 
	
		
			
				|  |  | +                        Set<Integer> userId = new HashSet<Integer>();
 | 
	
		
			
				|  |  | +                        userId.add(sa.getUserId());
 | 
	
		
			
				|  |  | +                        Map<Integer,String> paymentStatusMap = MapUtil.convertIntegerMap(musicGroupPaymentCalenderDao.queryUserCoursePaymentStatus(userId,sa.getMusicGroupId()));
 | 
	
		
			
				|  |  | +                        sa.setPaymentStatus(paymentStatusMap.get(sa.getUserId()));
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 |