| 
					
				 | 
			
			
				@@ -1,12 +1,16 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 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.dto.StudentApplyDetailDto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ym.mec.biz.dal.dto.StudentHasCourseDto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.dto.TeacherSalaryDto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.dto.musicalListDetailDto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.entity.Goods; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.page.CourseScheduleTeacherSalaryQueryInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.page.StudentRegistrationQueryInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.service.CourseScheduleTeacherSalaryService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ym.mec.biz.service.StudentManageService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.service.StudentPaymentOrderDetailService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.service.StudentRegistrationService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.common.controller.BaseController; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -21,6 +25,7 @@ import org.springframework.security.access.prepost.PreAuthorize; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.stereotype.Controller; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.web.bind.annotation.PostMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.web.bind.annotation.RequestMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import javax.servlet.http.HttpServletResponse; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.Date; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.List; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -33,9 +38,36 @@ public class ExportController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private StudentRegistrationService studentRegistrationService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private StudentManageService studentManageService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private StudentPaymentOrderDetailService studentPaymentOrderDetailService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private CourseScheduleTeacherSalaryService courseScheduleTeacherSalaryService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private SysUserFeignService sysUserFeignService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @ApiOperation(value = "导出学员是否有课") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @PostMapping("export/studentHasCourse") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @PreAuthorize("@pcs.hasPermissions('export/studentHasCourse')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void studentHasCourse(HttpServletResponse response){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SysUser sysUser = sysUserFeignService.queryUserInfo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(sysUser == null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new BizException("获取用户信息失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<StudentHasCourseDto> hasCourseDtos =  studentManageService.queryHasCourseStudent(sysUser.getOrganId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            HSSFWorkbook workbook = POIUtil.exportExcel(new String[] {"学员编号", "姓名","分部","所在乐团","所在vip课"}, new String[] { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    "userId","userName","organName","musicGroupName","vipGroupName"}, hasCourseDtos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            response.setContentType("application/octet-stream"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            response.flushBuffer(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            workbook.write(response.getOutputStream()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            workbook.close(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation(value = "导出乐器采购清单") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PostMapping("order/musicalListExport") 
			 |