|  | @@ -1,38 +1,37 @@
 | 
	
		
			
				|  |  |  package com.ym.mec.web.controller;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.dao.MusicGroupDao;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.dto.StudentApplyDetailDto;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.dto.TeacherSalaryDto;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.entity.Goods;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.entity.MusicGroup;
 | 
	
		
			
				|  |  | -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.MusicGroupService;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.service.StudentPaymentOrderDetailService;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.service.StudentRegistrationService;
 | 
	
		
			
				|  |  | -import com.ym.mec.common.controller.BaseController;
 | 
	
		
			
				|  |  | -import com.ym.mec.common.exception.BizException;
 | 
	
		
			
				|  |  | -import com.ym.mec.util.date.DateUtil;
 | 
	
		
			
				|  |  | -import com.ym.mec.util.excel.POIUtil;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiImplicitParam;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiImplicitParams;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import java.io.IOException;
 | 
	
		
			
				|  |  | +import java.io.OutputStream;
 | 
	
		
			
				|  |  | +import java.util.Date;
 | 
	
		
			
				|  |  | +import java.util.List;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import javax.servlet.http.HttpServletResponse;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | -import org.springframework.http.MediaType;
 | 
	
		
			
				|  |  |  import org.springframework.security.access.prepost.PreAuthorize;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Controller;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.GetMapping;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.PostMapping;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.RequestMapping;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -import javax.servlet.http.HttpServletResponse;
 | 
	
		
			
				|  |  | -import java.io.IOException;
 | 
	
		
			
				|  |  | -import java.io.OutputStream;
 | 
	
		
			
				|  |  | -import java.util.Date;
 | 
	
		
			
				|  |  | -import java.util.List;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.StudentApplyDetailDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.TeacherSalaryDto;
 | 
	
		
			
				|  |  | +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.StudentPaymentOrderDetailService;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.service.StudentRegistrationService;
 | 
	
		
			
				|  |  | +import com.ym.mec.common.controller.BaseController;
 | 
	
		
			
				|  |  | +import com.ym.mec.common.exception.BizException;
 | 
	
		
			
				|  |  | +import com.ym.mec.util.date.DateUtil;
 | 
	
		
			
				|  |  | +import com.ym.mec.util.excel.POIUtil;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  @RequestMapping
 | 
	
		
			
				|  |  |  @Api(tags = "数据导出服务")
 | 
	
	
		
			
				|  | @@ -48,7 +47,6 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "导出乐器采购清单")
 | 
	
		
			
				|  |  |      @GetMapping("order/musicalListExport")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@pcs.hasPermissions('order/musicalListExport')")
 | 
	
		
			
				|  |  |      @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团id", required = true, dataType = "String")})
 | 
	
		
			
				|  |  |      public void musicalListExport(HttpServletResponse response,String musicGroupId){
 | 
	
		
			
				|  |  |          List<Goods> musicalList = studentPaymentOrderDetailService.getMusicalList(musicGroupId);
 | 
	
	
		
			
				|  | @@ -79,7 +77,6 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "乐团【报名中、缴费中】 学生详情列表导出")
 | 
	
		
			
				|  |  |      @PostMapping(value = "studentRegistration/queryStudentApplyDetailExport")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@pcs.hasPermissions('studentRegistration/queryStudentApplyDetailExport')")
 | 
	
		
			
				|  |  |      public void queryStudentApplyDetailExport(StudentRegistrationQueryInfo queryInfo, HttpServletResponse response) {
 | 
	
		
			
				|  |  |          List<StudentApplyDetailDto> studentApplyDetail = studentRegistrationService.queryStudentDetailPage(queryInfo).getRows();
 | 
	
		
			
				|  |  |          if(studentApplyDetail == null || studentApplyDetail.size() < 1){
 | 
	
	
		
			
				|  | @@ -108,15 +105,14 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "分页导出教师薪酬列表")
 | 
	
		
			
				|  |  | -    @PostMapping("courseScheduleTeacherSalary/export")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@pcs.hasPermissions('courseScheduleTeacherSalary/export')")
 | 
	
		
			
				|  |  | +    @RequestMapping("courseScheduleTeacherSalary/export")
 | 
	
		
			
				|  |  |      public void export(CourseScheduleTeacherSalaryQueryInfo queryInfo, HttpServletResponse response) {
 | 
	
		
			
				|  |  |          List<TeacherSalaryDto> teacherSalaries = courseScheduleTeacherSalaryService.querySalaries(queryInfo).getRows();
 | 
	
		
			
				|  |  |          OutputStream ouputStream = null;
 | 
	
		
			
				|  |  |          try {
 | 
	
		
			
				|  |  |              HSSFWorkbook workbook = POIUtil.exportExcel(new String[] { "用户编号","用户名", "手机号", "课程类型", "实际薪水", "补助", "结算时间", "教师角色"}, new String[] {
 | 
	
		
			
				|  |  |                      "userId","username", "phone", "type.msg", "name", "actualSalary", "subsidy", "settlementTime", "teacherRole.msg"}, teacherSalaries);
 | 
	
		
			
				|  |  | -            response.setContentType("application/msexcel");
 | 
	
		
			
				|  |  | +            response.setContentType("application/vnd.ms-excel");
 | 
	
		
			
				|  |  |              response.setHeader("Content-disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
		
			
				|  |  |              ouputStream = response.getOutputStream();
 | 
	
		
			
				|  |  |              workbook.write(ouputStream);
 |