|
@@ -166,20 +166,15 @@ public class TeacherHomeController extends BaseController {
|
|
}
|
|
}
|
|
List<TeacherIndexWrapper.StudentPracticeSummaryExportDto> list =
|
|
List<TeacherIndexWrapper.StudentPracticeSummaryExportDto> list =
|
|
JSON.parseArray(JSON.toJSONString(teacherHomeStudent), TeacherIndexWrapper.StudentPracticeSummaryExportDto.class);
|
|
JSON.parseArray(JSON.toJSONString(teacherHomeStudent), TeacherIndexWrapper.StudentPracticeSummaryExportDto.class);
|
|
- DateFormat dateFormat1 = new SimpleDateFormat("yyMMddHHmmss");
|
|
|
|
Date date = new Date();
|
|
Date date = new Date();
|
|
- StringBuffer sb = new StringBuffer("/tmp/klx/studentPractice/");
|
|
|
|
- sb.append(dateFormat1.format(date)).append("/练习记录")
|
|
|
|
|
|
+ StringBuffer sb = new StringBuffer("/tmp");
|
|
|
|
+ sb.append("/练习记录")
|
|
.append(studentSearch.getStartTime()).append("~")
|
|
.append(studentSearch.getStartTime()).append("~")
|
|
.append(studentSearch.getEndTime()).append("_")
|
|
.append(studentSearch.getEndTime()).append("_")
|
|
.append(studentSearch.getTeacherId()).append("_")
|
|
.append(studentSearch.getTeacherId()).append("_")
|
|
.append(System.currentTimeMillis()).append(".xlsx");
|
|
.append(System.currentTimeMillis()).append(".xlsx");
|
|
String filePath = sb.toString();
|
|
String filePath = sb.toString();
|
|
File srcFile = new File(filePath);
|
|
File srcFile = new File(filePath);
|
|
- File directory = new File(filePath).getParentFile();
|
|
|
|
- if (!directory.exists()) {
|
|
|
|
- directory.mkdirs(); // 创建目录
|
|
|
|
- }
|
|
|
|
EasyExcel.write(filePath,TeacherIndexWrapper.StudentPracticeSummaryExportDto.class).sheet("学员练习统计").doWrite(list);
|
|
EasyExcel.write(filePath,TeacherIndexWrapper.StudentPracticeSummaryExportDto.class).sheet("学员练习统计").doWrite(list);
|
|
//上传到oss
|
|
//上传到oss
|
|
DateFormat dateFormatOss = new SimpleDateFormat("yyyy/MM/dd");
|
|
DateFormat dateFormatOss = new SimpleDateFormat("yyyy/MM/dd");
|