Просмотр исходного кода

Merge branch 'feature/1219_opt' of http://git.dayaedu.com/yonge/cooleshow into feature/1219_opt

刘俊驰 4 месяцев назад
Родитель
Сommit
9a5e6ad2d7

+ 7 - 1
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/TeacherHomeController.java

@@ -163,7 +163,13 @@ public class TeacherHomeController extends BaseController {
                 JSON.parseArray(JSON.toJSONString(teacherHomeStudent), TeacherIndexWrapper.StudentPracticeSummaryExportDto.class);
         DateFormat dateFormat1 = new SimpleDateFormat("yyMMddHHmmss");
         Date date = new Date();
-        String filePath = "/tmp/klx/studentPractice/" + dateFormat1.format(date) + "/"  + studentSearch.getTeacherId() + "_" + System.currentTimeMillis() + ".xlsx";
+        StringBuffer sb = new StringBuffer("/tmp/klx/studentPractice/");
+        sb.append(dateFormat1.format(date)).append("/练习记录")
+                .append(studentSearch.getStartTime()).append("~")
+                .append(studentSearch.getEndTime())
+                .append(studentSearch.getTeacherId()).append("_")
+                .append(System.currentTimeMillis()).append(".xlsx");
+        String filePath = sb.toString();
         File srcFile = new File(filePath);
         File directory = new File(filePath).getParentFile();
         if (!directory.exists()) {