|  | @@ -22,7 +22,6 @@ import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  |  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;
 | 
	
	
		
			
				|  | @@ -71,6 +70,36 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |      private PracticeGroupDao practiceGroupDao;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private CourseReviewService courseReviewService;
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private TenantPaymentOrderService tenantPaymentOrderService;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @ApiOperation(value = "导出对外订单列表")
 | 
	
		
			
				|  |  | +    @PostMapping("export/tenantPaymentOrder")
 | 
	
		
			
				|  |  | +    @PreAuthorize("@pcs.hasPermissions('export/tenantPaymentOrder')")
 | 
	
		
			
				|  |  | +    public void tenantPaymentOrder(HttpServletResponse response,TenantPaymentOrderQueryInfo queryInfo) {
 | 
	
		
			
				|  |  | +        queryInfo.setRows(49999);
 | 
	
		
			
				|  |  | +        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | +        if (sysUser == null) {
 | 
	
		
			
				|  |  | +            throw new BizException("用户信息获取失败");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        List<TenantPaymentOrder> paymentOrders = tenantPaymentOrderService.queryPage(queryInfo).getRows();
 | 
	
		
			
				|  |  | +//        if (paymentOrders.size() > 50000) {
 | 
	
		
			
				|  |  | +//            throw new BizException("数据集太大,不能导出.最大数据集不能超过50000");
 | 
	
		
			
				|  |  | +//        }
 | 
	
		
			
				|  |  | +        try {
 | 
	
		
			
				|  |  | +            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"交易流水号", "订单号", "订单日期", "交易类型", "应付金额",
 | 
	
		
			
				|  |  | +                    "实付金额", "用户姓名", "交易方式", "收款账户", "交易状态", "备注", "交易方式"}, new String[]{
 | 
	
		
			
				|  |  | +                    "transNo", "orderNo", "createTime", "type.desc", "expectAmount",
 | 
	
		
			
				|  |  | +                    "actualAmount", "username", "paymentChannel", "merNos", "status.msg", "memo", "paymentChannel.desc"}, paymentOrders);
 | 
	
		
			
				|  |  | +            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("export/teacherSalary")
 | 
	
	
		
			
				|  | @@ -312,33 +341,6 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |              e.printStackTrace();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -/*
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "导出学员是否有课")
 | 
	
		
			
				|  |  | -    @PostMapping("export/studentHasCourse")
 | 
	
		
			
				|  |  | -    @PreAuthorize("@pcs.hasPermissions('export/studentHasCourse')")
 | 
	
		
			
				|  |  | -    public void studentHasCourse(HttpServletResponse response,String organId) {
 | 
	
		
			
				|  |  | -        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | -        if (sysUser == null) {
 | 
	
		
			
				|  |  | -            throw new BizException("获取用户信息失败");
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        if(StringUtils.isEmpty(organId)){
 | 
	
		
			
				|  |  | -            Employee employee = employeeDao.get(sysUser.getId());
 | 
	
		
			
				|  |  | -            organId = employee.getOrganIdList();
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        List<StudentHasCourseDto> hasCourseDtos = studentManageService.queryHasCourseStudent(organId);
 | 
	
		
			
				|  |  | -        try {
 | 
	
		
			
				|  |  | -            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"学员编号", "姓名", "分部", "所在乐团", "乐团所属声部", "所在vip课","是否激活","是否预约陪练课","是否有陪练课"}, new String[]{
 | 
	
		
			
				|  |  | -                    "userId", "userName", "organName", "musicGroupName", "subjectName", "vipGroupName","isActive.msg","isMake.msg","hasPracticeCourse.msg"}, 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 = "导出乐器采购清单")
 |