|  | @@ -7,6 +7,7 @@ import com.ym.mec.biz.dal.dto.*;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.entity.Student;
 |  |  import com.ym.mec.biz.dal.entity.Student;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.entity.StudentRegistration;
 |  |  import com.ym.mec.biz.dal.entity.StudentRegistration;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.entity.SysUserCashAccount;
 |  |  import com.ym.mec.biz.dal.entity.SysUserCashAccount;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.dal.entity.Teacher;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 |  |  import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.page.*;
 |  |  import com.ym.mec.biz.dal.page.*;
 | 
											
												
													
														|  |  import com.ym.mec.biz.service.StudentManageService;
 |  |  import com.ym.mec.biz.service.StudentManageService;
 | 
											
										
											
												
													
														|  | @@ -18,9 +19,11 @@ import com.ym.mec.common.page.PageInfo;
 | 
											
												
													
														|  |  import com.ym.mec.im.ImFeignService;
 |  |  import com.ym.mec.im.ImFeignService;
 | 
											
												
													
														|  |  import com.ym.mec.util.collection.MapUtil;
 |  |  import com.ym.mec.util.collection.MapUtil;
 | 
											
												
													
														|  |  import org.apache.commons.lang3.StringUtils;
 |  |  import org.apache.commons.lang3.StringUtils;
 | 
											
												
													
														|  | 
 |  | +import org.apache.poi.ss.formula.functions.T;
 | 
											
												
													
														|  |  import org.springframework.beans.factory.annotation.Autowired;
 |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
											
												
													
														|  |  import org.springframework.stereotype.Service;
 |  |  import org.springframework.stereotype.Service;
 | 
											
												
													
														|  |  import org.springframework.transaction.annotation.Transactional;
 |  |  import org.springframework.transaction.annotation.Transactional;
 | 
											
												
													
														|  | 
 |  | +import org.springframework.util.CollectionUtils;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  import java.util.*;
 |  |  import java.util.*;
 | 
											
												
													
														|  |  import java.util.stream.Collectors;
 |  |  import java.util.stream.Collectors;
 | 
											
										
											
												
													
														|  | @@ -162,6 +165,45 @@ public class StudentManageServiceImpl implements StudentManageService {
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @Override
 |  |      @Override
 | 
											
												
													
														|  | 
 |  | +    public PageInfo<SimpleUserDto> queryStudentsWithTeacher(StudentManageQueryInfo queryInfo) {
 | 
											
												
													
														|  | 
 |  | +        PageInfo<SimpleUserDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
 | 
											
												
													
														|  | 
 |  | +        Map<String, Object> params = new HashMap<String, Object>();
 | 
											
												
													
														|  | 
 |  | +        MapUtil.populateMap(params, queryInfo);
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        Teacher teacher = teacherDao.get(queryInfo.getTeacherId());
 | 
											
												
													
														|  | 
 |  | +        if(Objects.isNull(teacher)){
 | 
											
												
													
														|  | 
 |  | +            return null;
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        List<Integer> organIds=new ArrayList<>();
 | 
											
												
													
														|  | 
 |  | +        if(Objects.nonNull(teacher.getTeacherOrganId())){
 | 
											
												
													
														|  | 
 |  | +            organIds.add(teacher.getTeacherOrganId());
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        if(StringUtils.isNotBlank(teacher.getFlowOrganRange())){
 | 
											
												
													
														|  | 
 |  | +            List<Integer> flowOrganRangeIds = Arrays.stream(teacher.getFlowOrganRange().split(",")).map(e -> Integer.valueOf(e)).collect(Collectors.toList());
 | 
											
												
													
														|  | 
 |  | +            organIds.addAll(flowOrganRangeIds);
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        if(CollectionUtils.isEmpty(organIds)){
 | 
											
												
													
														|  | 
 |  | +            return null;
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        params.put("organIds", organIds);
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        List<SimpleUserDto> dataList = null;
 | 
											
												
													
														|  | 
 |  | +        int count = studentDao.countStudentsWithOrgan(params);
 | 
											
												
													
														|  | 
 |  | +        if (count > 0) {
 | 
											
												
													
														|  | 
 |  | +            pageInfo.setTotal(count);
 | 
											
												
													
														|  | 
 |  | +            params.put("offset", pageInfo.getOffset());
 | 
											
												
													
														|  | 
 |  | +            dataList = studentDao.getStudentsWithOrgan(params);
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        if (count == 0) {
 | 
											
												
													
														|  | 
 |  | +            dataList = new ArrayList<>();
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        pageInfo.setRows(dataList);
 | 
											
												
													
														|  | 
 |  | +        return pageInfo;
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    @Override
 | 
											
												
													
														|  |      public StudentManageListDto findStudentManageBaseInfo(Integer userId) {
 |  |      public StudentManageListDto findStudentManageBaseInfo(Integer userId) {
 | 
											
												
													
														|  |          return studentManageDao.findStudentBaseInfoByUserID(userId);
 |  |          return studentManageDao.findStudentBaseInfoByUserID(userId);
 | 
											
												
													
														|  |      }
 |  |      }
 |