|
@@ -3117,9 +3117,9 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
- String[] header = {"老师编号", "老师姓名", "学员总数", "付费学员数量",
|
|
|
- "试用会员", "会员占比"};
|
|
|
- String[] body = {"teacherId", "teacherName", "totalStudentNum", "vipStudentNum", "eVipStudentNum", "vipStudentDuty+\"%\""};
|
|
|
+ String[] header = {"老师编号", "老师姓名", "学员总数", "使用人数", "使用人数比", "付费学员数量", "会员占比"};
|
|
|
+ String[] body = {"teacherId", "teacherName", "totalStudentNum", "cloudStudyUseStudentNum", "cloudStudyUseStudentDuty+\"%\"",
|
|
|
+ "vipStudentNum", "vipStudentDuty+\"%\""};
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(header, body, rows);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=employeeInfo-" + DateUtil.getDate(new Date()) + ".xls");
|
|
@@ -3170,8 +3170,9 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
- String[] header = {"分部", "学员总数", "付费会员数量","会员占比"};
|
|
|
- String[] body = {"organName", "totalStudentNum", "vipStudentNum", "vipStudentDuty+\"%\""};
|
|
|
+ String[] header = {"分部", "学员总数", "活跃人数", "使用人数", "新增使用人数", "使用比例", "付费会员数", "付费会员占比"};
|
|
|
+ String[] body = {"organName", "totalStudentNum", "cloudStudyLivelyStudentNum", "cloudStudyUseStudentNum", "newCloudStudyStudentNum",
|
|
|
+ "cloudStudyUseStudentDuty+\"%\"", "vipStudentNum", "vipStudentDuty+\"%\""};
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(header, body, rows);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=employeeInfo-" + DateUtil.getDate(new Date()) + ".xls");
|
|
@@ -3222,9 +3223,58 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
- String[] header = {"排名", "分部", "学员总数", "活跃人数", "活跃人数占比", "使用人数", "使用人数占比", "付费会员数量","付费会员占比", "新增付费会员"};
|
|
|
+ String[] header = {"排名", "分部", "学员总数", "活跃人数", "活跃人数比", "当日使用人数", "当日新增使用人数", "使用人数占比", "付费会员数量","付费会员占比", "新增付费会员"};
|
|
|
String[] body = {"index", "organName", "totalStudentNum", "cloudStudyLivelyStudentNum", "cloudStudyLivelyStudentDuty+\"%\"",
|
|
|
- "cloudStudyUseStudentNum", "cloudStudyUseStudentDuty+\"%\"", "vipStudentNum", "vipStudentDuty+\"%\"", "newCloudStudyStudentNum"};
|
|
|
+ "cloudStudyUseStudentNum", "newCloudStudyStudentNum", "cloudStudyUseStudentDuty+\"%\"", "vipStudentNum", "vipStudentDuty+\"%\"", "newCloudStudyStudentNum"};
|
|
|
+ HSSFWorkbook workbook = POIUtil.exportExcel(header, body, rows);
|
|
|
+ response.setContentType("application/octet-stream");
|
|
|
+ response.setHeader("Content-Disposition", "attachment;filename=employeeInfo-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
+ response.flushBuffer();
|
|
|
+ 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/cloudStudyStudentTrainData")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('export/cloudStudyStudentTrainData')")
|
|
|
+ public void cloudStudyStudentTrainData(StudentQueryInfo queryInfo,HttpServletResponse response) throws IOException {
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if (sysUser == null) {
|
|
|
+ throw new BizException("用户信息获取失败");
|
|
|
+ }
|
|
|
+ queryInfo.setPage(1);
|
|
|
+ queryInfo.setRows(49999);
|
|
|
+
|
|
|
+ List<EduOrganStudentListDto> rows = ((PageInfo<EduOrganStudentListDto>)studentService.organStudentData(queryInfo).getDetail()).getRows();
|
|
|
+ if (CollectionUtils.isEmpty(rows)) {
|
|
|
+ response.setStatus(200);
|
|
|
+ response.setContentType("Content-Type: application/json;charset=UTF-8");
|
|
|
+ response.getOutputStream().write("{\"data\": null, \"code\": 500, \"status\": false, \"msg\": \"没有可导出的记录\"}".getBytes());
|
|
|
+ response.flushBuffer();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ for (EduOrganStudentListDto row : rows) {
|
|
|
+ row.setCloudStudyUseTime(Math.round(row.getCloudStudyUseTime()));
|
|
|
+ row.setCloudStudyUseAvgTime(Math.round(row.getCloudStudyUseAvgTime()));
|
|
|
+ }
|
|
|
+ OutputStream outputStream = response.getOutputStream();
|
|
|
+ try {
|
|
|
+ String[] header = {"学员编号", "学员", "训练总时长", "连续训练天数", "乐团", "指导老师", "声部", "是否有小课", "训练次数", "训练天数", "训练平均时长", "会员有效期"};
|
|
|
+ String[] body = {"studentId", "studentName", "cloudStudyUseTime+\"分钟\"", "cloudStudyRunningDays+\"天\"", "musicGroupNames",
|
|
|
+ "teacherName", "subjectName", "hasVipGroup>0?\"是\":\"否\"", "cloudStudyUseNum+\"次\"", "cloudStudyUseDays+\"天\"",
|
|
|
+ "cloudStudyUseAvgTime+\"分钟\"", "membershipEndTime"};
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(header, body, rows);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=employeeInfo-" + DateUtil.getDate(new Date()) + ".xls");
|