|  | @@ -18,24 +18,18 @@ import com.ym.mec.common.tenant.TenantContextHolder;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.collection.MapUtil;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.date.DateUtil;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.excel.POIUtil;
 | 
	
		
			
				|  |  | -import com.ym.mec.util.ini.IniFileUtil;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  |  import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  |  import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | -import org.springframework.core.io.ClassPathResource;
 | 
	
		
			
				|  |  |  import org.springframework.http.HttpStatus;
 | 
	
		
			
				|  |  |  import org.springframework.security.access.prepost.PreAuthorize;
 | 
	
		
			
				|  |  |  import org.springframework.util.CollectionUtils;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.GetMapping;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.PostMapping;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.RequestMapping;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.RestController;
 | 
	
		
			
				|  |  | +import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import javax.servlet.http.HttpServletResponse;
 | 
	
		
			
				|  |  |  import java.io.IOException;
 | 
	
		
			
				|  |  | -import java.io.InputStream;
 | 
	
		
			
				|  |  |  import java.io.OutputStream;
 | 
	
		
			
				|  |  |  import java.math.BigDecimal;
 | 
	
		
			
				|  |  |  import java.util.*;
 | 
	
	
		
			
				|  | @@ -105,8 +99,6 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private TeacherService teacherService;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  | -    private MusicGroupBuildLogDao musicGroupBuildLogDao;
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  |      private MusicGroupPaymentCalenderService musicGroupPaymentCalenderService;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private SellOrderService sellOrderService;
 | 
	
	
		
			
				|  | @@ -146,88 +138,46 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |      private MusicEnlightenmentQuestionnaireService musicEnlightenmentQuestionnaireService;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private MusicGroupService musicGroupService;
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  | -    private SysUserCashAccountLogService sysUserCashAccountLogService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public static void main(String[] args) throws IOException {
 | 
	
		
			
				|  |  | -        InputStream inputStream = new ClassPathResource("exportColumnMapper.ini").getInputStream();
 | 
	
		
			
				|  |  | -        Map<String, String> columns = IniFileUtil.readIniFile(inputStream, ExportEnum.USER_CASH_ACCOUNT_LOG.getMsg());
 | 
	
		
			
				|  |  | +    @ApiOperation(value = "获取可导出字段")
 | 
	
		
			
				|  |  | +    @RequestMapping("export/getFields")
 | 
	
		
			
				|  |  | +    @PreAuthorize("@pcs.hasPermissions('export/getFields')")
 | 
	
		
			
				|  |  | +    public HttpResponseResult export(ExportEnum exportEnum) throws IOException {
 | 
	
		
			
				|  |  | +        return succeed(exportService.getExportFields(exportEnum));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public <T> void export(HttpServletResponse response,List<T> rows,ExportDto exportDto) throws IOException {
 | 
	
		
			
				|  |  | -        if(rows == null || rows.size() == 0){
 | 
	
		
			
				|  |  | -            throw new BizException("没有可导出数据");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        String[] headColumns = exportDto.getHeadColumns();
 | 
	
		
			
				|  |  | -        if(headColumns == null || headColumns.length == 0){
 | 
	
		
			
				|  |  | -            throw new BizException("请选择导出字段");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        if(exportDto.getExportEnum() == null){
 | 
	
		
			
				|  |  | -            throw new BizException("请选择导出类型");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        InputStream inputStream = new ClassPathResource("columnMapper.ini").getInputStream();
 | 
	
		
			
				|  |  | -        Map<String, String> columns = IniFileUtil.readIniFile(inputStream, exportDto.getExportEnum().getMsg());
 | 
	
		
			
				|  |  | -        OutputStream outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  | -        try {
 | 
	
		
			
				|  |  | -            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"退费编号", "学员编号", "学员姓名","分部", "课程组编号", "课程组类型",
 | 
	
		
			
				|  |  | -                    "退费金额","退费类型","退费时间","交易流水号", "打款时间"}, new String[]{
 | 
	
		
			
				|  |  | -                    "id", "userId","username", "organName", "groupId","groupType.desc",
 | 
	
		
			
				|  |  | -                    "amount", "returnFeeType.msg", "createTime", "transNo","payTime"}, rows);
 | 
	
		
			
				|  |  | -            response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  | -            response.setHeader("Content-Disposition", "attac:wq" +
 | 
	
		
			
				|  |  | -                    "hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  | -            workbook.write(outputStream);
 | 
	
		
			
				|  |  | -            outputStream.flush();
 | 
	
		
			
				|  |  | -        } catch (Exception e) {
 | 
	
		
			
				|  |  | -            e.printStackTrace();
 | 
	
		
			
				|  |  | -        } finally {
 | 
	
		
			
				|  |  | -            if (outputStream != null) {
 | 
	
		
			
				|  |  | -                try {
 | 
	
		
			
				|  |  | -                    outputStream.close();
 | 
	
		
			
				|  |  | -                } catch (IOException e) {
 | 
	
		
			
				|  |  | -                    e.printStackTrace();
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | +    @ApiOperation(value = "导出")
 | 
	
		
			
				|  |  | +    @RequestMapping("export/now")
 | 
	
		
			
				|  |  | +    @PreAuthorize("@pcs.hasPermissions('export/now')")
 | 
	
		
			
				|  |  | +    public void export(HttpServletResponse response, @RequestBody ExportDto exportDto) throws Exception {
 | 
	
		
			
				|  |  | +        if(exportDto.getExportEnum() == ExportEnum.MUSIC_GROUP_REGISTER){
 | 
	
		
			
				|  |  | +            exportService.musicGroupRegister(response,exportDto);
 | 
	
		
			
				|  |  | +        }else if(exportDto.getExportEnum() == ExportEnum.MUSIC_GROUP_NORMAL_STUDENT_NUM){
 | 
	
		
			
				|  |  | +            exportService.musicGroupNormalStudentNum(response,exportDto);
 | 
	
		
			
				|  |  | +        }else {
 | 
	
		
			
				|  |  | +            Map<String, Object> queryInfo = exportDto.getQueryInfo();
 | 
	
		
			
				|  |  | +            if(queryInfo == null){
 | 
	
		
			
				|  |  | +                queryInfo = new HashMap<>(10);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +            queryInfo.put("page",1);
 | 
	
		
			
				|  |  | +            queryInfo.put("rows",49999);
 | 
	
		
			
				|  |  | +            queryInfo.put("isExport",true);
 | 
	
		
			
				|  |  | +            exportService.export(response,exportService.getExportFuncMap().get(exportDto.getExportEnum()).apply(queryInfo),exportDto);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "退费记录导出")
 | 
	
		
			
				|  |  | -    @RequestMapping("export/userCashAccountLog")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@pcs.hasPermissions('export/userCashAccountLog')")
 | 
	
		
			
				|  |  | -    public void exportUserCashAccountLog(HttpServletResponse response, AccountLogQueryInfo queryInfo) throws IOException {
 | 
	
		
			
				|  |  | -        queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
 | 
	
		
			
				|  |  | -        queryInfo.setPage(1);
 | 
	
		
			
				|  |  | -        queryInfo.setRows(49999);
 | 
	
		
			
				|  |  | -        List<SysUserCashAccountLog> rows = sysUserCashAccountLogService.queryPage(queryInfo).getRows();
 | 
	
		
			
				|  |  | -        if(rows.size() < 1){
 | 
	
		
			
				|  |  | -            throw new BizException("没有可导出数据");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        OutputStream outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  | -        try {
 | 
	
		
			
				|  |  | -            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"退费编号", "学员编号", "学员姓名","分部", "课程组编号", "课程组类型",
 | 
	
		
			
				|  |  | -                    "退费金额","退费类型","退费时间","交易流水号", "打款时间"}, new String[]{
 | 
	
		
			
				|  |  | -                    "id", "userId","username", "organName", "groupId","groupType.desc",
 | 
	
		
			
				|  |  | -                    "amount", "returnFeeType.msg", "createTime", "transNo","payTime"}, rows);
 | 
	
		
			
				|  |  | -            response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  | -            response.setHeader("Content-Disposition", "attac:wq" +
 | 
	
		
			
				|  |  | -                    "hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | -            outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  | -            workbook.write(outputStream);
 | 
	
		
			
				|  |  | -            outputStream.flush();
 | 
	
		
			
				|  |  | -        } catch (Exception e) {
 | 
	
		
			
				|  |  | -            e.printStackTrace();
 | 
	
		
			
				|  |  | -        } finally {
 | 
	
		
			
				|  |  | -            if (outputStream != null) {
 | 
	
		
			
				|  |  | -                try {
 | 
	
		
			
				|  |  | -                    outputStream.close();
 | 
	
		
			
				|  |  | -                } catch (IOException e) {
 | 
	
		
			
				|  |  | -                    e.printStackTrace();
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +    @ApiOperation(value = "导出到报表中心")
 | 
	
		
			
				|  |  | +    @PostMapping("export/managerDownload")
 | 
	
		
			
				|  |  | +    @PreAuthorize("@pcs.hasPermissions('export/managerDownload')")
 | 
	
		
			
				|  |  | +    public HttpResponseResult managerDownload(@RequestBody ExportDto exportDto){
 | 
	
		
			
				|  |  | +        Map<String, Object> queryInfo = exportDto.getQueryInfo();
 | 
	
		
			
				|  |  | +        if(queryInfo == null){
 | 
	
		
			
				|  |  | +            queryInfo = new HashMap<>(10);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        queryInfo.put("page",1);
 | 
	
		
			
				|  |  | +        queryInfo.put("rows",49999);
 | 
	
		
			
				|  |  | +        queryInfo.put("isExport",true);
 | 
	
		
			
				|  |  | +        return exportService.getExportManageFuncMap().get(exportDto.getExportEnum()).apply(queryInfo,exportDto.getHeadColumns());
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "乐团列表导出")
 | 
	
	
		
			
				|  | @@ -251,7 +201,7 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |              response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  |              response.setHeader("Content-Disposition", "attac:wq" +
 | 
	
		
			
				|  |  |                      "hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  |              workbook.write(outputStream);
 | 
	
		
			
				|  |  |              outputStream.flush();
 | 
	
	
		
			
				|  | @@ -288,7 +238,7 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |              response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  |              response.setHeader("Content-Disposition", "attac:wq" +
 | 
	
		
			
				|  |  |                      "hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  |              workbook.write(outputStream);
 | 
	
		
			
				|  |  |              outputStream.flush();
 | 
	
	
		
			
				|  | @@ -324,7 +274,7 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |              response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  |              response.setHeader("Content-Disposition", "attac:wq" +
 | 
	
		
			
				|  |  |                      "hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  |              workbook.write(outputStream);
 | 
	
		
			
				|  |  |              outputStream.flush();
 | 
	
	
		
			
				|  | @@ -344,8 +294,8 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |      @ApiOperation(value = "分部2021双11活动统计导出")
 | 
	
		
			
				|  |  |      @RequestMapping("export/organDoubleEleven2021Statis")
 | 
	
		
			
				|  |  |      @PreAuthorize("@pcs.hasPermissions('export/organDoubleEleven2021Statis')")
 | 
	
		
			
				|  |  | -    public void organDoubleEleven2021Statis(HttpServletResponse response,Integer organId,String order, String sort) throws IOException {
 | 
	
		
			
				|  |  | -        List<DoubleEleven2021Dto> rows = vipGroupActivityService.organDoubleEleven2021Statis(order, sort,organId);
 | 
	
		
			
				|  |  | +    public void organDoubleEleven2021Statis(HttpServletResponse response,OrganDoubleEleven2021StatisDto statisDto) throws IOException {
 | 
	
		
			
				|  |  | +        List<DoubleEleven2021Dto> rows = vipGroupActivityService.organDoubleEleven2021Statis(statisDto);
 | 
	
		
			
				|  |  |          if(rows.size() < 1){
 | 
	
		
			
				|  |  |              throw new BizException("没有可导出数据");
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -360,7 +310,7 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |              response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  |              response.setHeader("Content-Disposition", "attac:wq" +
 | 
	
		
			
				|  |  |                      "hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  |              workbook.write(outputStream);
 | 
	
		
			
				|  |  |              outputStream.flush();
 | 
	
	
		
			
				|  | @@ -398,7 +348,7 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |              response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  |              response.setHeader("Content-Disposition", "attac:wq" +
 | 
	
		
			
				|  |  |                      "hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  |              workbook.write(outputStream);
 | 
	
		
			
				|  |  |              outputStream.flush();
 | 
	
	
		
			
				|  | @@ -436,7 +386,7 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |              response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  |              response.setHeader("Content-Disposition", "attac:wq" +
 | 
	
		
			
				|  |  |                      "hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  |              workbook.write(outputStream);
 | 
	
		
			
				|  |  |              outputStream.flush();
 | 
	
	
		
			
				|  | @@ -484,7 +434,7 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |              response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  |              response.setHeader("Content-Disposition", "attac:wq" +
 | 
	
		
			
				|  |  |                      "hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  |              workbook.write(outputStream);
 | 
	
		
			
				|  |  |              outputStream.flush();
 | 
	
	
		
			
				|  | @@ -520,7 +470,7 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |              response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  |              response.setHeader("Content-Disposition", "attac:wq" +
 | 
	
		
			
				|  |  |                      "hment;filename=goods-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  |              workbook.write(outputStream);
 | 
	
		
			
				|  |  |              outputStream.flush();
 | 
	
	
		
			
				|  | @@ -555,7 +505,7 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |              response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  |              response.setHeader("Content-Disposition", "attac:wq" +
 | 
	
		
			
				|  |  |                      "hment;filename=vipGroupActivity-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  |              workbook.write(outputStream);
 | 
	
		
			
				|  |  |              outputStream.flush();
 | 
	
	
		
			
				|  | @@ -590,7 +540,7 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |                      , "educationalTeacherName", "educationalTeacherId", "actualTeacherName", "actualTeacherId", "studentAttendanceStatus.msg"}, rows);
 | 
	
		
			
				|  |  |              response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  |              response.setHeader("Content-Disposition", "attachment;filename=studentAttendance-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  |              workbook.write(outputStream);
 | 
	
		
			
				|  |  |              outputStream.flush();
 | 
	
	
		
			
				|  | @@ -986,16 +936,16 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |          queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
 | 
	
		
			
				|  |  |          List<VipGroup> rows = vipGroupService.findVipGroups(queryInfo).getRows();
 | 
	
		
			
				|  |  |          OutputStream outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  | -        if (rows != null && rows.size() > 0) {
 | 
	
		
			
				|  |  | -            for (VipGroup e : rows) {
 | 
	
		
			
				|  |  | -                e.setSubClassTimes(e.getTotalClassTimes() == null ? 0 : e.getTotalClassTimes() - (e.getCurrentClassTimes() == null ? 0 : e.getCurrentClassTimes()));
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +//        if (rows != null && rows.size() > 0) {
 | 
	
		
			
				|  |  | +//            for (VipGroup e : rows) {
 | 
	
		
			
				|  |  | +//                e.setSubClassTimes(e.getTotalClassTimes() == null ? 0 : e.getTotalClassTimes() - (e.getCurrentClassTimes() == null ? 0 : e.getCurrentClassTimes()));
 | 
	
		
			
				|  |  | +//            }
 | 
	
		
			
				|  |  | +//        }
 | 
	
		
			
				|  |  |          try {
 | 
	
		
			
				|  |  |              HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"VIP编号", "课程名称", "课程状态", "指导老师", "教务老师", "班级人数", "课程单价",
 | 
	
		
			
				|  |  |                      "活动方案", "当前课次", "总课次", "剩余课次", "月消耗", "上次课时间", "开课时间", "结束时间", "申请时间", "学生姓名", "课程形式", "备注"}, new String[]{
 | 
	
		
			
				|  |  |                      "id", "name", "status.msg", "userName", "educationalTeacherName", "studentNum", "courseUnitPrice",
 | 
	
		
			
				|  |  | -                    "vipGroupActivityName", "currentClassTimes", "totalClassTimes", "subClassTimes", "monthConsumeRate", "lastOverTime",
 | 
	
		
			
				|  |  | +                    "vipGroupActivityName", "currentClassTimes", "totalClassTimes", "totalClassTimes == null ? 0 : totalClassTimes - (currentClassTimes == null ? 0 : currentClassTimes)", "monthConsumeRate", "lastOverTime",
 | 
	
		
			
				|  |  |                      "courseStartDate", "coursesExpireDate", "registrationStartTime", "userInfo", "vipGroupCategoryName", "stopReason"}, rows);
 | 
	
		
			
				|  |  |              response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  |              response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
	
		
			
				|  | @@ -1016,45 +966,6 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "终课表列表导出")
 | 
	
		
			
				|  |  | -    @GetMapping("export/superFindCourseSchedules")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@pcs.hasPermissions('export/superFindCourseSchedules')")
 | 
	
		
			
				|  |  | -    public Object superFindCourseSchedules(EndCourseScheduleQueryInfo queryInfo) throws IOException {
 | 
	
		
			
				|  |  | -        queryInfo.setPage(1);
 | 
	
		
			
				|  |  | -        queryInfo.setRows(49999);
 | 
	
		
			
				|  |  | -        queryInfo.setIsExport(true);
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if (sysUser == null) {
 | 
	
		
			
				|  |  | -            throw new BizException("用户信息获取失败");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        queryInfo.setOrganIdList(organizationService.getEmployeeOrgan(sysUser.getId(),queryInfo.getOrganIdList(),sysUser.getIsSuperAdmin()));
 | 
	
		
			
				|  |  | -        Map<String, Object> params = new HashMap<>();
 | 
	
		
			
				|  |  | -        MapUtil.populateMap(params, queryInfo);
 | 
	
		
			
				|  |  | -        int count = scheduleService.endCountCourseSchedules(params);
 | 
	
		
			
				|  |  | -        if (count <= 0) {
 | 
	
		
			
				|  |  | -            return failed("没有可导出的数据");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        if (count > 50000) {
 | 
	
		
			
				|  |  | -            return failed("数据集太大,不能导出.最大数据集不能超过50000");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        Date nowDate = new Date();
 | 
	
		
			
				|  |  | -        String no = idGeneratorService.generatorId("download") + "";
 | 
	
		
			
				|  |  | -        String fileName = "课表列表-" + no + "-" + DateUtil.getDate(nowDate) + ".xls";
 | 
	
		
			
				|  |  | -        ManagerDownload managerDownload = new ManagerDownload();
 | 
	
		
			
				|  |  | -        managerDownload.setType(ExportTypeEnum.COURSE_SCHEDULE);
 | 
	
		
			
				|  |  | -        managerDownload.setUserId(sysUser.getId());
 | 
	
		
			
				|  |  | -        managerDownload.setName(fileName);
 | 
	
		
			
				|  |  | -        managerDownload.setFileUrl("");
 | 
	
		
			
				|  |  | -        managerDownload.setCreateTime(nowDate);
 | 
	
		
			
				|  |  | -        managerDownload.setUpdateTime(nowDate);
 | 
	
		
			
				|  |  | -        managerDownloadDao.insert(managerDownload);
 | 
	
		
			
				|  |  | -        exportService.superFindCourseSchedules(queryInfo, managerDownload);
 | 
	
		
			
				|  |  | -        HttpResponseResult<Object> succeed = succeed();
 | 
	
		
			
				|  |  | -        succeed.setMsg(fileName + "导出申请已提交,请到【报表中心-下载列表查看】");
 | 
	
		
			
				|  |  | -        return succeed;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "导出零星收费列表")
 | 
	
		
			
				|  |  |      @GetMapping("export/sporadicChargeInfo")
 | 
	
	
		
			
				|  | @@ -1065,14 +976,14 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |          queryInfo.setIsExport(true);
 | 
	
		
			
				|  |  |          queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
 | 
	
		
			
				|  |  |          List<SporadicChargeInfo> rows = sporadicChargeInfoService.queryDetailPage(queryInfo).getRows();
 | 
	
		
			
				|  |  | -        for (SporadicChargeInfo row : rows) {
 | 
	
		
			
				|  |  | -            row.setOpenFlagStr(row.getOpenFlag().equals(0) ? "开启" : "关闭");
 | 
	
		
			
				|  |  | -            row.setOrderType(row.getUserId() == null ? "公用" : "个人");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +//        for (SporadicChargeInfo row : rows) {
 | 
	
		
			
				|  |  | +//            row.setOpenFlagStr(row.getOpenFlag().equals(0) ? "开启" : "关闭");
 | 
	
		
			
				|  |  | +//            row.setOrderType(row.getUserId() == null ? "公用" : "个人");
 | 
	
		
			
				|  |  | +//        }
 | 
	
		
			
				|  |  |          OutputStream outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  |          try {
 | 
	
		
			
				|  |  |              HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "收费类型", "标题", "收费状态", "金额", "时间", "学生姓名", "订单类型", "创建人"}, new String[]{
 | 
	
		
			
				|  |  | -                    "organName", "chargeType.msg", "title", "openFlagStr", "amount", "createTime", "userName", "orderType", "operatorName"}, rows);
 | 
	
		
			
				|  |  | +                    "organName", "chargeType.msg", "title", "openFlag == 0?'开启':'关闭'", "amount", "createTime", "userName", "userId == null?'公用':'个人'", "operatorName"}, rows);
 | 
	
		
			
				|  |  |              response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  |              response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
		
			
				|  |  |              
 | 
	
	
		
			
				|  | @@ -1252,81 +1163,6 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "订单列表导出")
 | 
	
		
			
				|  |  | -    @RequestMapping("export/orderList")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@pcs.hasPermissions('export/orderList')")
 | 
	
		
			
				|  |  | -    public HttpResponseResult orderList(StudentPaymentOrderQueryInfo queryInfo) throws Exception {
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if(sysUser == null || sysUser.getId() == null){
 | 
	
		
			
				|  |  | -        	return failed(HttpStatus.FORBIDDEN, "请登录");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(),queryInfo.getOrganId(),sysUser.getIsSuperAdmin()));
 | 
	
		
			
				|  |  | -        if (StringUtils.isNotBlank(queryInfo.getSearch())) {
 | 
	
		
			
				|  |  | -            List<BasicUserDto> users = studentPaymentOrderDao.getUsers(queryInfo.getSearch());
 | 
	
		
			
				|  |  | -            List<Integer> userIds = users.stream().map(BasicUserDto::getUserId).collect(Collectors.toList());
 | 
	
		
			
				|  |  | -            if (userIds.size() <= 0) {
 | 
	
		
			
				|  |  | -                userIds.add(0);
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            queryInfo.setUserIds(userIds);
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        queryInfo.setPage(1);
 | 
	
		
			
				|  |  | -        queryInfo.setRows(50000);
 | 
	
		
			
				|  |  | -        queryInfo.setIsExport(true);
 | 
	
		
			
				|  |  | -        Map<String, Object> params = new HashMap<>();
 | 
	
		
			
				|  |  | -        MapUtil.populateMap(params, queryInfo);
 | 
	
		
			
				|  |  | -        int count = studentPaymentOrderDao.queryCount(params);
 | 
	
		
			
				|  |  | -        if (count <= 0) {
 | 
	
		
			
				|  |  | -            return failed("没有可导出的数据");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        if (count > 50000) {
 | 
	
		
			
				|  |  | -            return failed("数据集太大,不能导出.最大数据集不能超过50000");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        Date nowDate = new Date();
 | 
	
		
			
				|  |  | -        String no = idGeneratorService.generatorId("download") + "";
 | 
	
		
			
				|  |  | -        String fileName = "orderList-" + no + "-" + DateUtil.getDate(nowDate) + ".xls";
 | 
	
		
			
				|  |  | -        ManagerDownload managerDownload = new ManagerDownload();
 | 
	
		
			
				|  |  | -        managerDownload.setType(ExportTypeEnum.ORDER);
 | 
	
		
			
				|  |  | -        managerDownload.setUserId(sysUser.getId());
 | 
	
		
			
				|  |  | -        managerDownload.setName(fileName);
 | 
	
		
			
				|  |  | -        managerDownload.setFileUrl("");
 | 
	
		
			
				|  |  | -        managerDownload.setCreateTime(nowDate);
 | 
	
		
			
				|  |  | -        managerDownload.setUpdateTime(nowDate);
 | 
	
		
			
				|  |  | -        managerDownloadDao.insert(managerDownload);
 | 
	
		
			
				|  |  | -        exportService.orderList(params, managerDownload, sysUser.getTenantId() <= 0);
 | 
	
		
			
				|  |  | -        HttpResponseResult<Object> succeed = succeed();
 | 
	
		
			
				|  |  | -        succeed.setMsg(fileName + "导出申请已提交,请到【报表中心-下载列表查看】");
 | 
	
		
			
				|  |  | -        return succeed;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "学员小课记录导出")
 | 
	
		
			
				|  |  | -    @RequestMapping("export/studentVipPractice")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@pcs.hasPermissions('export/studentVipPractice')")
 | 
	
		
			
				|  |  | -    public HttpResponseResult exportStudentVipPractice(String organId) throws IOException {
 | 
	
		
			
				|  |  | -        Boolean hasCourse = courseScheduleStudentPaymentDao.hasCourse(organId, TenantContextHolder.getTenantId());
 | 
	
		
			
				|  |  | -        if (hasCourse == null || !hasCourse) {
 | 
	
		
			
				|  |  | -            return failed("没有可导出的数据");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        Integer tenantId = TenantContextHolder.getTenantId();
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        Date nowDate = new Date();
 | 
	
		
			
				|  |  | -        String no = idGeneratorService.generatorId("download") + "";
 | 
	
		
			
				|  |  | -        String fileName = "studentVipPractice-" + no + "-" + DateUtil.getDate(nowDate) + ".xls";
 | 
	
		
			
				|  |  | -        ManagerDownload managerDownload = new ManagerDownload();
 | 
	
		
			
				|  |  | -        managerDownload.setType(ExportTypeEnum.STUDENT_VIP_PRACTICE);
 | 
	
		
			
				|  |  | -        managerDownload.setUserId(sysUser.getId());
 | 
	
		
			
				|  |  | -        managerDownload.setName(fileName);
 | 
	
		
			
				|  |  | -        managerDownload.setFileUrl("");
 | 
	
		
			
				|  |  | -        managerDownload.setCreateTime(nowDate);
 | 
	
		
			
				|  |  | -        managerDownload.setUpdateTime(nowDate);
 | 
	
		
			
				|  |  | -        managerDownloadDao.insert(managerDownload);
 | 
	
		
			
				|  |  | -        exportService.studentVipPractice(organId, managerDownload, tenantId);
 | 
	
		
			
				|  |  | -        HttpResponseResult<Object> succeed = succeed();
 | 
	
		
			
				|  |  | -        succeed.setMsg(fileName + "导出申请已提交,请到【报表中心-下载列表查看】");
 | 
	
		
			
				|  |  | -        return succeed;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "乐团管理--乐团详情-导出学员列表")
 | 
	
		
			
				|  |  |      @RequestMapping("export/musicGroupStudent")
 | 
	
	
		
			
				|  | @@ -1381,10 +1217,10 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |                      "VIP/网管是否有课","关心包","加油包", "欠费金额(元)", "退团原因", "会员截止时间", "会员剩余天数"};
 | 
	
		
			
				|  |  |              String[] body = {"userId", "realName", "gender", "phone","registerTime", "currentGrade", "currentClass", "subjectName", "studentStatus", "paymentStatus.desc"
 | 
	
		
			
				|  |  |                      ,"courseFee", "activeName", "hasCourse ? '是' : '否'"
 | 
	
		
			
				|  |  | -                    ,"carePackage == null || carePackage == 0 ? \"不可用\" : carePackage == 1 ? \"可用\" : \"已使用\""
 | 
	
		
			
				|  |  | -                    ,"comeOnPackage == null || comeOnPackage == 0 ? \"不可用\" : comeOnPackage == 1 ? \"可用\" : \"已使用\""
 | 
	
		
			
				|  |  | +                    ,"carePackage == null || carePackage == 0 ? '不可用' : carePackage == 1 ? '可用' : '已使用'"
 | 
	
		
			
				|  |  | +                    ,"comeOnPackage == null || comeOnPackage == 0 ? '不可用'' : comeOnPackage == 1 ? '可用' : '已使用'"
 | 
	
		
			
				|  |  |                      ,"noPaymentAmount == null ? 0 : noPaymentAmount", "quitReason",
 | 
	
		
			
				|  |  | -                    "membershipEndTime","membershipEndTime == null ? hasNoStartCloudTeacher ? \"未生效\" : \"未购买\" : membershipDay >= 0 ? membershipDay : hasNoStartCloudTeacher ? \"未生效\" : \"会员已过期\""};
 | 
	
		
			
				|  |  | +                    "membershipEndTime","membershipEndTime == null ? hasNoStartCloudTeacher ? '未生效' : '未购买' : membershipDay >= 0 ? membershipDay : hasNoStartCloudTeacher ? '未生效' : '会员已过期'"};
 | 
	
		
			
				|  |  |              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");
 | 
	
	
		
			
				|  | @@ -1413,7 +1249,6 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |          queryInfo.setIsExport(1);
 | 
	
		
			
				|  |  |          queryInfo.setPage(1);
 | 
	
		
			
				|  |  |          queryInfo.setRows(49999);
 | 
	
		
			
				|  |  | -        // PageInfo<CourseReviewDto> practiceGroupReviews = courseReviewService.findPracticeGroupReviews(queryInfo);
 | 
	
		
			
				|  |  |          PageInfo<CourseReviewDto> practiceGroupReviews = courseReviewService.getVipCourseReviews(queryInfo);
 | 
	
		
			
				|  |  |          if (practiceGroupReviews.getTotal() <= 0) {
 | 
	
		
			
				|  |  |              throw new BizException("没有可导出的记录");
 | 
	
	
		
			
				|  | @@ -1673,7 +1508,7 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |      public void exercisesSituations(StudentExercisesSituationQueryInfo queryInfo, HttpServletResponse response) throws IOException {
 | 
	
		
			
				|  |  |          queryInfo.setPage(1);
 | 
	
		
			
				|  |  |          queryInfo.setRows(49999);
 | 
	
		
			
				|  |  | -        queryInfo.setOrganIdList(organizationService.getEmployeeOrgan(queryInfo.getOrganIdList()));
 | 
	
		
			
				|  |  | +        queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
 | 
	
		
			
				|  |  |          List<StudentExercisesSituationDto> rows = studentExtracurricularExercisesSituationService.findStudentExtracurricularExercisesSituations(queryInfo).getRows();
 | 
	
		
			
				|  |  |          if (CollectionUtils.isEmpty(rows)) {
 | 
	
		
			
				|  |  |              throw new BizException("没有可导出的记录");
 | 
	
	
		
			
				|  | @@ -1931,22 +1766,22 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          OutputStream outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  |          try {
 | 
	
		
			
				|  |  | -            for (DegreeRegistration row : pageList.getRows()) {
 | 
	
		
			
				|  |  | -                if (row.getGender().equals("1")) {
 | 
	
		
			
				|  |  | -                    row.setGender("男");
 | 
	
		
			
				|  |  | -                } else {
 | 
	
		
			
				|  |  | -                    row.setGender("女");
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                if (row.getStatus().equals(2)) {
 | 
	
		
			
				|  |  | -                    row.setStatusStr("已缴费");
 | 
	
		
			
				|  |  | -                } else {
 | 
	
		
			
				|  |  | -                    row.setStatusStr("未缴费");
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +//            for (DegreeRegistration row : pageList.getRows()) {
 | 
	
		
			
				|  |  | +//                if (row.getGender().equals("1")) {
 | 
	
		
			
				|  |  | +//                    row.setGender("男");
 | 
	
		
			
				|  |  | +//                } else {
 | 
	
		
			
				|  |  | +//                    row.setGender("女");
 | 
	
		
			
				|  |  | +//                }
 | 
	
		
			
				|  |  | +//                if (row.getStatus().equals(2)) {
 | 
	
		
			
				|  |  | +//                    row.setStatusStr("已缴费");
 | 
	
		
			
				|  |  | +//                } else {
 | 
	
		
			
				|  |  | +//                    row.setStatusStr("未缴费");
 | 
	
		
			
				|  |  | +//                }
 | 
	
		
			
				|  |  | +//            }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              String[] header = {"姓名", "性别", "身份证号", "城市", "学校", "报考乐器", "报考级别", "乐理级别", "乐理级别证书", "家长联系电话", "考级费用", "乐理费用", "备注", "缴费状态", "订单编号", "商户订单号", "报名时间"};
 | 
	
		
			
				|  |  | -            String[] body = {"name", "gender", "idcard", "city", "school", "subject", "level", "theoryLevel",
 | 
	
		
			
				|  |  | -                    "theoryCert", "mobile", "money", "theoryMoney", "memo", "statusStr", "orderNo", "transNo", "createTime"};
 | 
	
		
			
				|  |  | +            String[] body = {"name", "gender == 1?'男':'女'", "idcard", "city", "school", "subject", "level", "theoryLevel",
 | 
	
		
			
				|  |  | +                    "theoryCert", "mobile", "money", "theoryMoney", "memo", "status == 2?'已缴费':'未缴费'", "orderNo", "transNo", "createTime"};
 | 
	
		
			
				|  |  |              HSSFWorkbook workbook = POIUtil.exportExcel(header, body, pageList.getRows());
 | 
	
		
			
				|  |  |              response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  |              response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
	
		
			
				|  | @@ -2003,125 +1838,7 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "报名中缴费中乐团缴费情况导出")
 | 
	
		
			
				|  |  | -    @RequestMapping("export/musicGroupRegister")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@pcs.hasPermissions('export/musicGroupRegister')")
 | 
	
		
			
				|  |  | -    public void musicGroupRegister(String organIds, HttpServletResponse response) throws IOException {
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        organIds = organizationService.getEmployeeOrgan(sysUser.getId(),organIds,sysUser.getIsSuperAdmin());
 | 
	
		
			
				|  |  | -        List<MusicGroupStatusEnum> musicGroupStatusList = new ArrayList<>();
 | 
	
		
			
				|  |  | -        musicGroupStatusList.add(MusicGroupStatusEnum.APPLY);
 | 
	
		
			
				|  |  | -        musicGroupStatusList.add(MusicGroupStatusEnum.PAY);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        List<MusicGroupRegisterDto> musicGroupRegisters = musicGroupDao.getMusicGroupRegister(musicGroupStatusList, organIds, TenantContextHolder.getTenantId());
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        if (musicGroupRegisters.size() <= 0) {
 | 
	
		
			
				|  |  | -            throw new BizException("没有可导出的记录");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        List<String> musicGroupIds = musicGroupRegisters.stream().map(MusicGroupRegisterDto::getMusicGroupId).collect(Collectors.toList());
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        List<RegisterSubjectDto> registerSubjects = musicGroupDao.getRegisterSubjectNum(musicGroupIds, null, 2);
 | 
	
		
			
				|  |  | -        List<MusicGroupRegisterDto> musicGroupRegisterOrders = musicGroupDao.getMusicGroupRegisterOrder(musicGroupIds);
 | 
	
		
			
				|  |  | -        List<MusicGroupRegisterDto> musicGroupRegisterTotalMoneys = musicGroupDao.getMusicGroupRegisterTotalMoney(musicGroupIds);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        List<MusicGroupBuildLog> musicGroupAuditSuccess = musicGroupBuildLogDao.getMusicGroupAuditSuccess(musicGroupIds);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        HashSet<Integer> added = new HashSet<>();
 | 
	
		
			
				|  |  | -        List<String> header = new ArrayList<>();
 | 
	
		
			
				|  |  | -        header.add("分部");
 | 
	
		
			
				|  |  | -        header.add("乐团名称");
 | 
	
		
			
				|  |  | -        header.add("乐团状态");
 | 
	
		
			
				|  |  | -        header.add("审核通过时间");
 | 
	
		
			
				|  |  | -        header.add("报名总数");
 | 
	
		
			
				|  |  | -        List<String> body = new ArrayList<>();
 | 
	
		
			
				|  |  | -        body.add("organName");
 | 
	
		
			
				|  |  | -        body.add("musicGroupName");
 | 
	
		
			
				|  |  | -        body.add("musicGroupStatus");
 | 
	
		
			
				|  |  | -        body.add("auditSuccessTime");
 | 
	
		
			
				|  |  | -        body.add("registerNum");
 | 
	
		
			
				|  |  | -        for (RegisterSubjectDto registerSubject : registerSubjects) {
 | 
	
		
			
				|  |  | -            if (!added.contains(registerSubject.getSubjectId())) {
 | 
	
		
			
				|  |  | -                added.add(registerSubject.getSubjectId());
 | 
	
		
			
				|  |  | -                header.add(registerSubject.getSubjectName());
 | 
	
		
			
				|  |  | -                body.add("subject" + registerSubject.getSubjectId());
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        header.add("团购数");
 | 
	
		
			
				|  |  | -        header.add("缴费总数");
 | 
	
		
			
				|  |  | -        header.add("回款总金额");
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        body.add("groupBuyMusicalNum");
 | 
	
		
			
				|  |  | -        body.add("registerPayNum");
 | 
	
		
			
				|  |  | -        body.add("totalMoney");
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        List<Map<String, Object>> data = new ArrayList<>();
 | 
	
		
			
				|  |  | -        for (MusicGroupRegisterDto musicGroupRegister : musicGroupRegisters) {
 | 
	
		
			
				|  |  | -            added.clear();
 | 
	
		
			
				|  |  | -            HashMap<String, Object> musicGroupRegisterMap = new HashMap<>();
 | 
	
		
			
				|  |  | -            int registerPayNum = 0;
 | 
	
		
			
				|  |  | -            musicGroupRegisterMap.put("organName", musicGroupRegister.getOrganName());
 | 
	
		
			
				|  |  | -            musicGroupRegisterMap.put("musicGroupName", musicGroupRegister.getMusicGroupName());
 | 
	
		
			
				|  |  | -            musicGroupRegisterMap.put("musicGroupStatus", musicGroupRegister.getMusicGroupStatus().getMsg());
 | 
	
		
			
				|  |  | -            musicGroupRegisterMap.put("registerNum", musicGroupRegister.getRegisterNum());
 | 
	
		
			
				|  |  | -            for (MusicGroupRegisterDto musicGroupRegisterOrder : musicGroupRegisterOrders) {
 | 
	
		
			
				|  |  | -                if (musicGroupRegisterOrder.getMusicGroupId().equals(musicGroupRegister.getMusicGroupId())) {
 | 
	
		
			
				|  |  | -                    musicGroupRegister.setGroupBuyMusicalNum(musicGroupRegisterOrder.getGroupBuyMusicalNum());
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            for (MusicGroupRegisterDto musicGroupRegisterTotalMoney : musicGroupRegisterTotalMoneys) {
 | 
	
		
			
				|  |  | -                if (musicGroupRegisterTotalMoney.getMusicGroupId().equals(musicGroupRegister.getMusicGroupId())) {
 | 
	
		
			
				|  |  | -                    musicGroupRegister.setTotalMoney(musicGroupRegisterTotalMoney.getTotalMoney());
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            for (RegisterSubjectDto registerSubject : registerSubjects) {
 | 
	
		
			
				|  |  | -                if (registerSubject.getMusicGroupId().equals(musicGroupRegister.getMusicGroupId())) {
 | 
	
		
			
				|  |  | -                    added.add(registerSubject.getSubjectId());
 | 
	
		
			
				|  |  | -                    musicGroupRegisterMap.put("subject" + registerSubject.getSubjectId(), registerSubject.getNum());
 | 
	
		
			
				|  |  | -                    registerPayNum += registerSubject.getNum();
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                if (!added.contains(registerSubject.getSubjectId())) {
 | 
	
		
			
				|  |  | -                    musicGroupRegisterMap.put("subject" + registerSubject.getSubjectId(), 0);
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            for (MusicGroupBuildLog groupAuditSuccess : musicGroupAuditSuccess) {
 | 
	
		
			
				|  |  | -                if (!groupAuditSuccess.getMusicGroupId().equals(musicGroupRegister.getMusicGroupId())) continue;
 | 
	
		
			
				|  |  | -                musicGroupRegisterMap.put("auditSuccessTime", groupAuditSuccess.getCreateTime());
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            musicGroupRegisterMap.put("groupBuyMusicalNum", musicGroupRegister.getGroupBuyMusicalNum());
 | 
	
		
			
				|  |  | -            musicGroupRegisterMap.put("registerPayNum", registerPayNum);
 | 
	
		
			
				|  |  | -            musicGroupRegisterMap.put("totalMoney", musicGroupRegister.getTotalMoney());
 | 
	
		
			
				|  |  | -            data.add(musicGroupRegisterMap);
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        OutputStream outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  | -        try {
 | 
	
		
			
				|  |  | -            String[] headerStr = header.toArray(new String[header.size()]);
 | 
	
		
			
				|  |  | -            String[] bodyStr = body.toArray(new String[body.size()]);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            HSSFWorkbook workbook = POIUtil.exportExcel(headerStr, bodyStr, data);
 | 
	
		
			
				|  |  | -            response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  | -            response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | -            outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  | -            workbook.write(outputStream);
 | 
	
		
			
				|  |  | -            outputStream.flush();
 | 
	
		
			
				|  |  | -        } catch (Exception e) {
 | 
	
		
			
				|  |  | -            e.printStackTrace();
 | 
	
		
			
				|  |  | -        } finally {
 | 
	
		
			
				|  |  | -            if (outputStream != null) {
 | 
	
		
			
				|  |  | -                try {
 | 
	
		
			
				|  |  | -                    outputStream.close();
 | 
	
		
			
				|  |  | -                } catch (IOException e) {
 | 
	
		
			
				|  |  | -                    e.printStackTrace();
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "财务管理导出")
 | 
	
		
			
				|  |  | +/*    @ApiOperation(value = "财务管理导出")
 | 
	
		
			
				|  |  |      @RequestMapping("export/routeOrderList")
 | 
	
		
			
				|  |  |      @PreAuthorize("@pcs.hasPermissions('export/routeOrderList')")
 | 
	
		
			
				|  |  |      public HttpResponseResult routeOrderList(StudentPaymentOrderQueryInfo queryInfo) throws Exception {
 | 
	
	
		
			
				|  | @@ -2172,6 +1889,107 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |          return succeed;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @ApiOperation(value = "学员小课记录导出")
 | 
	
		
			
				|  |  | +    @RequestMapping("export/studentVipPractice")
 | 
	
		
			
				|  |  | +    @PreAuthorize("@pcs.hasPermissions('export/studentVipPractice')")
 | 
	
		
			
				|  |  | +    public HttpResponseResult exportStudentVipPractice(String organId) throws IOException {
 | 
	
		
			
				|  |  | +        Boolean hasCourse = courseScheduleStudentPaymentDao.hasCourse(organId, TenantContextHolder.getTenantId());
 | 
	
		
			
				|  |  | +        if (hasCourse == null || !hasCourse) {
 | 
	
		
			
				|  |  | +            return failed("没有可导出的数据");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        Integer tenantId = TenantContextHolder.getTenantId();
 | 
	
		
			
				|  |  | +        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | +        Date nowDate = new Date();
 | 
	
		
			
				|  |  | +        String no = idGeneratorService.generatorId("download") + "";
 | 
	
		
			
				|  |  | +        String fileName = "studentVipPractice-" + no + "-" + DateUtil.getDate(nowDate) + ".xls";
 | 
	
		
			
				|  |  | +        ManagerDownload managerDownload = new ManagerDownload();
 | 
	
		
			
				|  |  | +        managerDownload.setType(ExportTypeEnum.STUDENT_VIP_PRACTICE);
 | 
	
		
			
				|  |  | +        managerDownload.setUserId(sysUser.getId());
 | 
	
		
			
				|  |  | +        managerDownload.setName(fileName);
 | 
	
		
			
				|  |  | +        managerDownload.setFileUrl("");
 | 
	
		
			
				|  |  | +        managerDownload.setCreateTime(nowDate);
 | 
	
		
			
				|  |  | +        managerDownload.setUpdateTime(nowDate);
 | 
	
		
			
				|  |  | +        managerDownloadDao.insert(managerDownload);
 | 
	
		
			
				|  |  | +        exportService.studentVipPractice(organId, managerDownload, tenantId);
 | 
	
		
			
				|  |  | +        HttpResponseResult<Object> succeed = succeed();
 | 
	
		
			
				|  |  | +        succeed.setMsg(fileName + "导出申请已提交,请到【报表中心-下载列表查看】");
 | 
	
		
			
				|  |  | +        return succeed;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @ApiOperation(value = "订单列表导出")
 | 
	
		
			
				|  |  | +    @RequestMapping("export/orderList")
 | 
	
		
			
				|  |  | +    @PreAuthorize("@pcs.hasPermissions('export/orderList')")
 | 
	
		
			
				|  |  | +    public HttpResponseResult orderList(StudentPaymentOrderQueryInfo queryInfo) throws Exception {
 | 
	
		
			
				|  |  | +        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | +        if(sysUser == null || sysUser.getId() == null){
 | 
	
		
			
				|  |  | +            return failed(HttpStatus.FORBIDDEN, "请登录");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(),queryInfo.getOrganId(),sysUser.getIsSuperAdmin()));
 | 
	
		
			
				|  |  | +        if (StringUtils.isNotBlank(queryInfo.getSearch())) {
 | 
	
		
			
				|  |  | +            List<BasicUserDto> users = studentPaymentOrderDao.getUsers(queryInfo.getSearch());
 | 
	
		
			
				|  |  | +            List<Integer> userIds = users.stream().map(BasicUserDto::getUserId).collect(Collectors.toList());
 | 
	
		
			
				|  |  | +            if (userIds.size() <= 0) {
 | 
	
		
			
				|  |  | +                userIds.add(0);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            queryInfo.setUserIds(userIds);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        queryInfo.setPage(1);
 | 
	
		
			
				|  |  | +        queryInfo.setRows(50000);
 | 
	
		
			
				|  |  | +        queryInfo.setIsExport(true);
 | 
	
		
			
				|  |  | +        Map<String, Object> params = new HashMap<>();
 | 
	
		
			
				|  |  | +        MapUtil.populateMap(params, queryInfo);
 | 
	
		
			
				|  |  | +        int count = studentPaymentOrderDao.queryCount(params);
 | 
	
		
			
				|  |  | +        if (count <= 0) {
 | 
	
		
			
				|  |  | +            return failed("没有可导出的数据");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        if (count > 50000) {
 | 
	
		
			
				|  |  | +            return failed("数据集太大,不能导出.最大数据集不能超过50000");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        Date nowDate = new Date();
 | 
	
		
			
				|  |  | +        String no = idGeneratorService.generatorId("download") + "";
 | 
	
		
			
				|  |  | +        String fileName = "orderList-" + no + "-" + DateUtil.getDate(nowDate) + ".xls";
 | 
	
		
			
				|  |  | +        ManagerDownload managerDownload = new ManagerDownload();
 | 
	
		
			
				|  |  | +        managerDownload.setType(ExportTypeEnum.ORDER);
 | 
	
		
			
				|  |  | +        managerDownload.setUserId(sysUser.getId());
 | 
	
		
			
				|  |  | +        managerDownload.setName(fileName);
 | 
	
		
			
				|  |  | +        managerDownload.setFileUrl("");
 | 
	
		
			
				|  |  | +        managerDownload.setCreateTime(nowDate);
 | 
	
		
			
				|  |  | +        managerDownload.setUpdateTime(nowDate);
 | 
	
		
			
				|  |  | +        managerDownloadDao.insert(managerDownload);
 | 
	
		
			
				|  |  | +        exportService.orderList(params, managerDownload, sysUser.getTenantId() <= 0);
 | 
	
		
			
				|  |  | +        HttpResponseResult<Object> succeed = succeed();
 | 
	
		
			
				|  |  | +        succeed.setMsg(fileName + "导出申请已提交,请到【报表中心-下载列表查看】");
 | 
	
		
			
				|  |  | +        return succeed;
 | 
	
		
			
				|  |  | +    }*/
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @ApiOperation(value = "终课表列表导出")
 | 
	
		
			
				|  |  | +    @GetMapping("export/superFindCourseSchedules")
 | 
	
		
			
				|  |  | +    @PreAuthorize("@pcs.hasPermissions('export/superFindCourseSchedules')")
 | 
	
		
			
				|  |  | +    public HttpResponseResult superFindCourseSchedules(EndCourseScheduleQueryInfo queryInfo) throws IOException {
 | 
	
		
			
				|  |  | +        queryInfo.setPage(1);
 | 
	
		
			
				|  |  | +        queryInfo.setRows(49999);
 | 
	
		
			
				|  |  | +        queryInfo.setIsExport(true);
 | 
	
		
			
				|  |  | +        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | +        if (sysUser == null) {
 | 
	
		
			
				|  |  | +            throw new BizException("用户信息获取失败");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        queryInfo.setOrganIdList(organizationService.getEmployeeOrgan(sysUser.getId(),queryInfo.getOrganIdList(),sysUser.getIsSuperAdmin()));
 | 
	
		
			
				|  |  | +        Map<String, Object> params = new HashMap<>();
 | 
	
		
			
				|  |  | +        MapUtil.populateMap(params, queryInfo);
 | 
	
		
			
				|  |  | +        int count = scheduleService.endCountCourseSchedules(params);
 | 
	
		
			
				|  |  | +        if (count <= 0) {
 | 
	
		
			
				|  |  | +            return failed("没有可导出的数据");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (count > 50000) {
 | 
	
		
			
				|  |  | +            return failed("数据集太大,不能导出.最大数据集不能超过50000");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        ManagerDownload managerDownload = exportService.saveManagerDownload(ExportTypeEnum.COURSE_SCHEDULE,sysUser.getId());
 | 
	
		
			
				|  |  | +        exportService.superFindCourseSchedules(queryInfo, managerDownload);
 | 
	
		
			
				|  |  | +        HttpResponseResult<Object> succeed = succeed();
 | 
	
		
			
				|  |  | +        succeed.setMsg(managerDownload.getName() + "导出申请已提交,请到【报表中心-下载列表查看】");
 | 
	
		
			
				|  |  | +        return succeed;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "老师默认课酬导出")
 | 
	
		
			
				|  |  |      @RequestMapping("export/teacherDefaultSalary")
 | 
	
	
		
			
				|  | @@ -2217,94 +2035,6 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "乐团声部在读人数导出")
 | 
	
		
			
				|  |  | -    @RequestMapping("export/musicGroupNormalStudentNum")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@pcs.hasPermissions('export/musicGroupNormalStudentNum')")
 | 
	
		
			
				|  |  | -    public void musicGroupNormalStudentNum(String organIds, HttpServletResponse response) throws IOException {
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        organIds = organizationService.getEmployeeOrgan(sysUser.getId(),organIds,sysUser.getIsSuperAdmin());
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        List<MusicGroupStatusEnum> musicGroupStatusList = new ArrayList<>();
 | 
	
		
			
				|  |  | -        musicGroupStatusList.add(MusicGroupStatusEnum.PAY);
 | 
	
		
			
				|  |  | -        musicGroupStatusList.add(MusicGroupStatusEnum.PREPARE);
 | 
	
		
			
				|  |  | -        musicGroupStatusList.add(MusicGroupStatusEnum.PROGRESS);
 | 
	
		
			
				|  |  | -        musicGroupStatusList.add(MusicGroupStatusEnum.PAUSE);
 | 
	
		
			
				|  |  | -        List<MusicGroupRegisterDto> musicGroupRegisters = musicGroupDao.getMusicGroupRegister(musicGroupStatusList, organIds, TenantContextHolder.getTenantId());
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        if (musicGroupRegisters.size() <= 0) {
 | 
	
		
			
				|  |  | -            throw new BizException("没有可导出的记录");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        List<String> musicGroupIds = musicGroupRegisters.stream().map(MusicGroupRegisterDto::getMusicGroupId).collect(Collectors.toList());
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        List<RegisterSubjectDto> registerSubjects = musicGroupDao.getRegisterSubjectNum(musicGroupIds, StudentMusicGroupStatusEnum.NORMAL, null);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        HashSet<Integer> added = new HashSet<>();
 | 
	
		
			
				|  |  | -        List<String> header = new ArrayList<>();
 | 
	
		
			
				|  |  | -        header.add("分部");
 | 
	
		
			
				|  |  | -        header.add("乐团名称");
 | 
	
		
			
				|  |  | -        header.add("乐团状态");
 | 
	
		
			
				|  |  | -        header.add("在读总人数");
 | 
	
		
			
				|  |  | -        List<String> body = new ArrayList<>();
 | 
	
		
			
				|  |  | -        body.add("organName");
 | 
	
		
			
				|  |  | -        body.add("musicGroupName");
 | 
	
		
			
				|  |  | -        body.add("musicGroupStatus");
 | 
	
		
			
				|  |  | -        body.add("normalNum");
 | 
	
		
			
				|  |  | -        for (RegisterSubjectDto registerSubject : registerSubjects) {
 | 
	
		
			
				|  |  | -            if (!added.contains(registerSubject.getSubjectId())) {
 | 
	
		
			
				|  |  | -                added.add(registerSubject.getSubjectId());
 | 
	
		
			
				|  |  | -                header.add(registerSubject.getSubjectName());
 | 
	
		
			
				|  |  | -                body.add("subject" + registerSubject.getSubjectId());
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        List<Map<String, Object>> data = new ArrayList<>();
 | 
	
		
			
				|  |  | -        for (MusicGroupRegisterDto musicGroupRegister : musicGroupRegisters) {
 | 
	
		
			
				|  |  | -            added.clear();
 | 
	
		
			
				|  |  | -            HashMap<String, Object> musicGroupRegisterMap = new HashMap<>();
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            musicGroupRegisterMap.put("organName", musicGroupRegister.getOrganName());
 | 
	
		
			
				|  |  | -            musicGroupRegisterMap.put("musicGroupName", musicGroupRegister.getMusicGroupName());
 | 
	
		
			
				|  |  | -            musicGroupRegisterMap.put("musicGroupStatus", musicGroupRegister.getMusicGroupStatus().getMsg());
 | 
	
		
			
				|  |  | -            musicGroupRegisterMap.put("normalNum", musicGroupRegister.getNormalNum());
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            for (RegisterSubjectDto registerSubject : registerSubjects) {
 | 
	
		
			
				|  |  | -                if (registerSubject.getMusicGroupId().equals(musicGroupRegister.getMusicGroupId())) {
 | 
	
		
			
				|  |  | -                    added.add(registerSubject.getSubjectId());
 | 
	
		
			
				|  |  | -                    musicGroupRegisterMap.put("subject" + registerSubject.getSubjectId(), registerSubject.getNum());
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                if (!added.contains(registerSubject.getSubjectId())) {
 | 
	
		
			
				|  |  | -                    musicGroupRegisterMap.put("subject" + registerSubject.getSubjectId(), 0);
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            data.add(musicGroupRegisterMap);
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        OutputStream outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  | -        try {
 | 
	
		
			
				|  |  | -            String[] headerStr = header.toArray(new String[header.size()]);
 | 
	
		
			
				|  |  | -            String[] bodyStr = body.toArray(new String[body.size()]);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            HSSFWorkbook workbook = POIUtil.exportExcel(headerStr, bodyStr, data);
 | 
	
		
			
				|  |  | -            response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  | -            response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | -            outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  | -            workbook.write(outputStream);
 | 
	
		
			
				|  |  | -            outputStream.flush();
 | 
	
		
			
				|  |  | -        } catch (Exception e) {
 | 
	
		
			
				|  |  | -            e.printStackTrace();
 | 
	
		
			
				|  |  | -        } finally {
 | 
	
		
			
				|  |  | -            if (outputStream != null) {
 | 
	
		
			
				|  |  | -                try {
 | 
	
		
			
				|  |  | -                    outputStream.close();
 | 
	
		
			
				|  |  | -                } catch (IOException e) {
 | 
	
		
			
				|  |  | -                    e.printStackTrace();
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      @ApiOperation(value = "回款统计")
 | 
	
		
			
				|  |  |      @RequestMapping("export/studentOrder")
 | 
	
		
			
				|  |  |      @PreAuthorize("@pcs.hasPermissions('export/studentOrder')")
 | 
	
	
		
			
				|  | @@ -2456,7 +2186,7 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |          if (sysUser == null) {
 | 
	
		
			
				|  |  |              throw new BizException("用户信息获取失败");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        queryInfo.setOrganIds(organizationService.getEmployeeOrgan(sysUser.getId(),queryInfo.getOrganIds(),sysUser.getIsSuperAdmin()));
 | 
	
		
			
				|  |  | +        queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(),queryInfo.getOrganId(),sysUser.getIsSuperAdmin()));
 | 
	
		
			
				|  |  |          queryInfo.setPage(1);
 | 
	
		
			
				|  |  |          queryInfo.setRows(49999);
 | 
	
		
			
				|  |  |          PageInfo<MusicArrearageStudentDto> result = musicGroupPaymentCalenderDetailService.queryArrearageStudents(queryInfo);
 | 
	
	
		
			
				|  | @@ -3080,13 +2810,13 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          OutputStream outputStream = response.getOutputStream();
 | 
	
		
			
				|  |  |          try {
 | 
	
		
			
				|  |  | -            for (MusicEnlightenmentQuestionnaire row : practiceGroupReviews.getRows()) {
 | 
	
		
			
				|  |  | -                if(Objects.isNull(row.getSubjectName())){
 | 
	
		
			
				|  |  | -                    row.setSubjectName("无");
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +//            for (MusicEnlightenmentQuestionnaire row : practiceGroupReviews.getRows()) {
 | 
	
		
			
				|  |  | +//                if(Objects.isNull(row.getSubjectName())){
 | 
	
		
			
				|  |  | +//                    row.setSubjectName("无");
 | 
	
		
			
				|  |  | +//                }
 | 
	
		
			
				|  |  | +//            }
 | 
	
		
			
				|  |  |              String[] header = {"学员姓名","联系电话","年级","班级","老师推荐专业","是否在学习某件乐器","目前所学乐器","报名参加管乐团家长会了解相关情况","备注"};
 | 
	
		
			
				|  |  | -            String[] body = {"userName","phone","currentGrade","currentClass","subjectName","musicalInstrumentsLearning?'是':'否'",
 | 
	
		
			
				|  |  | +            String[] body = {"userName","phone","currentGrade","currentClass","subjectName == null?'无':subjectName","musicalInstrumentsLearning?'是':'否'",
 | 
	
		
			
				|  |  |                      "musicalInstrumentsName","joinParentMeeting?'是':'否'","remark"};
 | 
	
		
			
				|  |  |              HSSFWorkbook workbook = POIUtil.exportExcel(header, body, practiceGroupReviews.getRows());
 | 
	
		
			
				|  |  |              response.setContentType("application/octet-stream");
 |