|  | @@ -10,11 +10,13 @@ import com.ym.mec.biz.dal.entity.*;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.enums.GroupType;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.page.CourseScheduleTeacherSalaryQueryInfo;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.page.MusicGroupStudentQueryInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.page.StudentPaymentOrderQueryInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.page.StudentRegistrationQueryInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.*;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.controller.BaseController;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.exception.BizException;
 | 
	
		
			
				|  |  | +import com.ym.mec.common.page.PageInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.collection.MapUtil;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.date.DateUtil;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.excel.POIUtil;
 | 
	
	
		
			
				|  | @@ -25,8 +27,10 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  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.math.BigDecimal;
 | 
	
		
			
				|  |  |  import java.util.Date;
 | 
	
	
		
			
				|  | @@ -261,4 +265,57 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @ApiOperation(value = "乐团管理--乐团详情-导出学员列表")
 | 
	
		
			
				|  |  | +    @RequestMapping("export/musicGroupStudent")
 | 
	
		
			
				|  |  | +    @PreAuthorize("@pcs.hasPermissions('export/musicGroupStudent')")
 | 
	
		
			
				|  |  | +    public void queryMusicGroupStudent(MusicGroupStudentQueryInfo queryInfo, HttpServletResponse response) {
 | 
	
		
			
				|  |  | +        queryInfo.setRows(99999);
 | 
	
		
			
				|  |  | +        PageInfo<MusicGroupStudentsDto> musicGroupStudentsDtoPageInfo = studentManageService.queryMusicGroupStudent(queryInfo);
 | 
	
		
			
				|  |  | +        try {
 | 
	
		
			
				|  |  | +            for (MusicGroupStudentsDto row : musicGroupStudentsDtoPageInfo.getRows()) {
 | 
	
		
			
				|  |  | +                if (row.getGender().equals("1")) {
 | 
	
		
			
				|  |  | +                    row.setGender("男");
 | 
	
		
			
				|  |  | +                } else {
 | 
	
		
			
				|  |  | +                    row.setGender("女");
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                if (row.getPaymentStatus().equals("PAID_COMPLETED")) {
 | 
	
		
			
				|  |  | +                    row.setPaymentStatus("完成缴费");
 | 
	
		
			
				|  |  | +                } else if (row.getPaymentStatus().equals("NON_PAYMENT")) {
 | 
	
		
			
				|  |  | +                    row.setPaymentStatus("未缴费");
 | 
	
		
			
				|  |  | +                } else if (row.getPaymentStatus().equals("PROCESSING")) {
 | 
	
		
			
				|  |  | +                    row.setPaymentStatus("缴费中");
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                if(row.getStudentStatus().equals("NORMAL")){
 | 
	
		
			
				|  |  | +                    row.setStudentStatus("在读");
 | 
	
		
			
				|  |  | +                }else {
 | 
	
		
			
				|  |  | +                    row.setStudentStatus("退团");
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                if (row.getIsActive()) {
 | 
	
		
			
				|  |  | +                    row.setActiveName("在读");
 | 
	
		
			
				|  |  | +                } else {
 | 
	
		
			
				|  |  | +                    row.setActiveName("退团");
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                if(row.getIsNewStudent().equals(1)){
 | 
	
		
			
				|  |  | +                    row.setIsNewStudentStr("是");
 | 
	
		
			
				|  |  | +                }else {
 | 
	
		
			
				|  |  | +                    row.setIsNewStudentStr("否");
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                row.setCurrentGrade(row.getCurrentGrade() + row.getCurrentClass());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            String[] header = {"学生姓名", "性别", "联系电话", "年级班级", "专业", "学员状态", "新增学员", "缴费金额",
 | 
	
		
			
				|  |  | +                    "下次缴费日期", "报名缴费", "是否激活"};
 | 
	
		
			
				|  |  | +            String[] body = {"realName", "gender", "phone", "currentGrade", "subjectName", "studentStatus", "isNewStudentStr",
 | 
	
		
			
				|  |  | +                    "courseFee", "nextPaymentDate", "activeName"};
 | 
	
		
			
				|  |  | +            HSSFWorkbook workbook = POIUtil.exportExcel(header, body, musicGroupStudentsDtoPageInfo.getRows());
 | 
	
		
			
				|  |  | +            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();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  }
 |