|  | @@ -3,6 +3,7 @@ package com.ym.mec.web.controller;
 | 
	
		
			
				|  |  |  import com.ym.mec.auth.api.client.SysUserFeignService;
 | 
	
		
			
				|  |  |  import com.ym.mec.auth.api.entity.SysUser;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.entity.*;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.page.NoClassMusicStudentQueryInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.EmployeeService;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
	
		
			
				|  | @@ -270,24 +271,40 @@ public class StudentRegistrationController extends BaseController {
 | 
	
		
			
				|  |  |              response.flushBuffer();
 | 
	
		
			
				|  |  |              return;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        MusicGroup musicGroup = musicGroupDao.get(queryInfo.getMusicGroupId());
 | 
	
		
			
				|  |  |          for (StudentPreRegistrationDto row : studentPreRegistration.getRows()) {
 | 
	
		
			
				|  |  |              if (row.getKitPurchaseMethod().equals("OWNED")) {
 | 
	
		
			
				|  |  |                  row.setKitPurchaseMethod("自行准备");
 | 
	
		
			
				|  |  |              } else if (row.getKitPurchaseMethod().equals("GROUP")) {
 | 
	
		
			
				|  |  |                  row.setKitPurchaseMethod("团购");
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            if(row.getSubjectFirst().equals(999)){
 | 
	
		
			
				|  |  | +            if (row.getCloudTeacherMethod().equals("OWNED")) {
 | 
	
		
			
				|  |  | +                row.setCloudTeacherMethod("自行准备");
 | 
	
		
			
				|  |  | +            } else if (row.getCloudTeacherMethod().equals("GROUP")) {
 | 
	
		
			
				|  |  | +                row.setCloudTeacherMethod("团购");
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            if (row.getSubjectFirst().equals(999)) {
 | 
	
		
			
				|  |  |                  row.setSubjectFirstName("听从老师安排");
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            if(row.getSubjectSecond().equals(999)){
 | 
	
		
			
				|  |  | +            if (row.getSubjectSecond().equals(999)) {
 | 
	
		
			
				|  |  |                  row.setSubjectSecondName("听从老师安排");
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              row.setCurrentGrade(row.getCurrentGrade() + row.getCurrentClass());
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          OutputStream outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  |          try {
 | 
	
		
			
				|  |  | -            String[] header = {"学员编号", "学员姓名", "性别", "联系电话", "年级班级", "选报声部1", "选报声部2", "是否服从调剂", "乐器准备方式"};
 | 
	
		
			
				|  |  | -            String[] body = {"userId", "userName", "gender ? '男' : '女'", "phone", "currentGrade", "subjectFirstName", "subjectSecondName", "isAllowAdjust ? '是' : '否'", "kitPurchaseMethod"};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            String[] headerArr = {"学员编号", "学员姓名", "性别", "联系电话", "年级班级", "选报声部1", "选报声部2", "是否服从调剂", "乐器准备方式"};
 | 
	
		
			
				|  |  | +            String[] bodyArr = {"userId", "userName", "gender ? '男' : '女'", "phone", "currentGrade", "subjectFirstName", "subjectSecondName", "isAllowAdjust ? '是' : '否'", "kitPurchaseMethod"};
 | 
	
		
			
				|  |  | +            List<String> headerList = Arrays.asList(headerArr);
 | 
	
		
			
				|  |  | +            List<String> bodyList = Arrays.asList(bodyArr);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            if (musicGroup.getCourseViewType().equals(CourseViewTypeEnum.CLOUD_TEACHER)) {
 | 
	
		
			
				|  |  | +                headerList.add("系统意向");
 | 
	
		
			
				|  |  | +                bodyList.add("cloudTeacherMethod");
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            String[] header = headerList.toArray(new String[headerList.size()]);
 | 
	
		
			
				|  |  | +            String[] body = bodyList.toArray(new String[bodyList.size()]);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              HSSFWorkbook workbook = POIUtil.exportExcel(header, body, studentPreRegistration.getRows());
 | 
	
		
			
				|  |  |              response.setContentType("application/octet-stream");
 | 
	
	
		
			
				|  | @@ -312,7 +329,7 @@ public class StudentRegistrationController extends BaseController {
 | 
	
		
			
				|  |  |      @ApiOperation(value = "查询乐团中未加入班级学员信息")
 | 
	
		
			
				|  |  |      @GetMapping("/queryNoClassMusicStudentInfo")
 | 
	
		
			
				|  |  |      @PreAuthorize("@pcs.hasPermissions('studentRegistration/queryNoClassMusicStudentInfo')")
 | 
	
		
			
				|  |  | -    public HttpResponseResult queryNoClassMusicStudentInfo(NoClassMusicStudentQueryInfo queryInfo){
 | 
	
		
			
				|  |  | +    public HttpResponseResult queryNoClassMusicStudentInfo(NoClassMusicStudentQueryInfo queryInfo) {
 | 
	
		
			
				|  |  |          SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  |          if (sysUser == null) {
 | 
	
		
			
				|  |  |              return failed("用户信息获取失败");
 | 
	
	
		
			
				|  | @@ -320,11 +337,11 @@ public class StudentRegistrationController extends BaseController {
 | 
	
		
			
				|  |  |          Employee employee = employeeService.get(sysUser.getId());
 | 
	
		
			
				|  |  |          if (StringUtils.isBlank(queryInfo.getOrganIds())) {
 | 
	
		
			
				|  |  |              queryInfo.setOrganIds(employee.getOrganIdList());
 | 
	
		
			
				|  |  | -        }else if(StringUtils.isEmpty(employee.getOrganIdList())){
 | 
	
		
			
				|  |  | +        } else if (StringUtils.isEmpty(employee.getOrganIdList())) {
 | 
	
		
			
				|  |  |              return failed("用户所在分部异常");
 | 
	
		
			
				|  |  | -        }else {
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  |              List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
 | 
	
		
			
				|  |  | -            if(!list.containsAll(Arrays.asList(queryInfo.getOrganIds().split(",")))){
 | 
	
		
			
				|  |  | +            if (!list.containsAll(Arrays.asList(queryInfo.getOrganIds().split(",")))) {
 | 
	
		
			
				|  |  |                  return failed("非法请求");
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 |