|
@@ -160,10 +160,10 @@ public class MailTemplateController {
|
|
|
studentAttendanceService.getStudentAttendanceErrorListForTeacher(pageReqVO.setSupervisorId(getLoginUserId())),
|
|
|
StudentAttendanceSupervisorTemplateVO.class
|
|
|
);
|
|
|
- List<StudentAttendanceSupervisorTemplateVO> excusedList = BeanUtils.toBean(
|
|
|
- studentAttendanceService.getStudentAttendanceExcusedListForTeacher(pageReqVO.setSupervisorId(getLoginUserId())),
|
|
|
- StudentAttendanceSupervisorTemplateVO.class
|
|
|
- );
|
|
|
+// List<StudentAttendanceSupervisorTemplateVO> excusedList = BeanUtils.toBean(
|
|
|
+// studentAttendanceService.getStudentAttendanceExcusedListForTeacher(pageReqVO.setSupervisorId(getLoginUserId())),
|
|
|
+// StudentAttendanceSupervisorTemplateVO.class
|
|
|
+// );
|
|
|
// 创建 ByteArrayOutputStream 用来存储 Excel 文件数据
|
|
|
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
|
|
|
|
@@ -171,12 +171,12 @@ public class MailTemplateController {
|
|
|
try (ExcelWriter excelWriter = EasyExcel.write(byteArrayOutputStream, StudentAttendanceSupervisorTemplateVO.class).build()) {
|
|
|
WriteSheet writeSheetNormal = EasyExcel.writerSheet("正常打卡信息").build();
|
|
|
WriteSheet writeSheetError = EasyExcel.writerSheet("未打卡信息").build();
|
|
|
- WriteSheet writeSheetExcused = EasyExcel.writerSheet("请假信息").build();
|
|
|
+// WriteSheet writeSheetExcused = EasyExcel.writerSheet("请假信息").build();
|
|
|
|
|
|
// 将各个 List 数据写入不同的 Sheet 中
|
|
|
excelWriter.write(normalList, writeSheetNormal);
|
|
|
excelWriter.write(errorList, writeSheetError);
|
|
|
- excelWriter.write(excusedList, writeSheetExcused);
|
|
|
+// excelWriter.write(excusedList, writeSheetExcused);
|
|
|
}
|
|
|
|
|
|
// 创建附件 Map
|
|
@@ -229,14 +229,14 @@ public class MailTemplateController {
|
|
|
})
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
- List<StudentAttendanceCollegeTemplateVO> excusedList = studentAttendanceService.getStudentAttendanceExcusedListForTeacher(attendanceReqVO)
|
|
|
- .stream()
|
|
|
- .map(studentAttendance -> {
|
|
|
- StudentAttendanceCollegeTemplateVO vo = BeanUtils.toBean(studentAttendance, StudentAttendanceCollegeTemplateVO.class);
|
|
|
- vo.setClockInTime("请假");
|
|
|
- return vo;
|
|
|
- })
|
|
|
- .collect(Collectors.toList());
|
|
|
+// List<StudentAttendanceCollegeTemplateVO> excusedList = studentAttendanceService.getStudentAttendanceExcusedListForTeacher(attendanceReqVO)
|
|
|
+// .stream()
|
|
|
+// .map(studentAttendance -> {
|
|
|
+// StudentAttendanceCollegeTemplateVO vo = BeanUtils.toBean(studentAttendance, StudentAttendanceCollegeTemplateVO.class);
|
|
|
+// vo.setClockInTime("请假");
|
|
|
+// return vo;
|
|
|
+// })
|
|
|
+// .collect(Collectors.toList());
|
|
|
|
|
|
// 输出 Excel
|
|
|
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
|
@@ -245,11 +245,11 @@ public class MailTemplateController {
|
|
|
try (ExcelWriter excelWriter = EasyExcel.write(byteArrayOutputStream, StudentAttendanceCollegeTemplateVO.class).build()) {
|
|
|
WriteSheet writeSheetNormal = EasyExcel.writerSheet("正常打卡信息").build();
|
|
|
WriteSheet writeSheetError = EasyExcel.writerSheet("未打卡信息").build();
|
|
|
- WriteSheet writeSheetExcused = EasyExcel.writerSheet("请假信息").build();
|
|
|
+// WriteSheet writeSheetExcused = EasyExcel.writerSheet("请假信息").build();
|
|
|
|
|
|
excelWriter.write(normalList, writeSheetNormal);
|
|
|
excelWriter.write(errorList, writeSheetError);
|
|
|
- excelWriter.write(excusedList, writeSheetExcused);
|
|
|
+// excelWriter.write(excusedList, writeSheetExcused);
|
|
|
}
|
|
|
|
|
|
// 附件
|
|
@@ -300,10 +300,10 @@ public class MailTemplateController {
|
|
|
studentAttendanceService.getStudentAttendanceErrorListForTeacher(pageReqVO),
|
|
|
StudentAttendanceEmailVO.class
|
|
|
);
|
|
|
- List<StudentAttendanceEmailVO> excusedList = BeanUtils.toBean(
|
|
|
- studentAttendanceService.getStudentAttendanceExcusedListForTeacher(pageReqVO),
|
|
|
- StudentAttendanceEmailVO.class
|
|
|
- );
|
|
|
+// List<StudentAttendanceEmailVO> excusedList = BeanUtils.toBean(
|
|
|
+// studentAttendanceService.getStudentAttendanceExcusedListForTeacher(pageReqVO),
|
|
|
+// StudentAttendanceEmailVO.class
|
|
|
+// );
|
|
|
|
|
|
StringBuilder normalListBuilder = new StringBuilder();
|
|
|
for (StudentAttendanceEmailVO attendance : normalList) {
|
|
@@ -325,19 +325,19 @@ public class MailTemplateController {
|
|
|
.append("<br/>");
|
|
|
}
|
|
|
|
|
|
- StringBuilder excusedListBuilder = new StringBuilder();
|
|
|
- for (StudentAttendanceEmailVO attendance : excusedList) {
|
|
|
- excusedListBuilder
|
|
|
- .append(", 学生姓名: ").append(attendance.getStudentName())
|
|
|
- .append(", 学生学号: ").append(attendance.getUserNumber() != null ? attendance.getUserNumber() : "无")
|
|
|
- .append(", 日期: ").append(attendance.getDate())
|
|
|
- .append(", 打卡时间: ").append(attendance.getClockInTime() != null ? attendance.getClockInTime() : "请假")
|
|
|
- .append("<br/>");
|
|
|
- }
|
|
|
+// StringBuilder excusedListBuilder = new StringBuilder();
|
|
|
+// for (StudentAttendanceEmailVO attendance : excusedList) {
|
|
|
+// excusedListBuilder
|
|
|
+// .append(", 学生姓名: ").append(attendance.getStudentName())
|
|
|
+// .append(", 学生学号: ").append(attendance.getUserNumber() != null ? attendance.getUserNumber() : "无")
|
|
|
+// .append(", 日期: ").append(attendance.getDate())
|
|
|
+// .append(", 打卡时间: ").append(attendance.getClockInTime() != null ? attendance.getClockInTime() : "请假")
|
|
|
+// .append("<br/>");
|
|
|
+// }
|
|
|
|
|
|
templateParams.put("normalList", normalListBuilder.toString());
|
|
|
templateParams.put("errorList", errorListBuilder.toString());
|
|
|
- templateParams.put("excusedList", excusedListBuilder.toString());
|
|
|
+// templateParams.put("excusedList", excusedListBuilder.toString());
|
|
|
if (teacher.getEmail() != null) {
|
|
|
mailSendService.sendSingleMailToMember(teacher.getEmail(), null, "attendance-list", templateParams);
|
|
|
}
|
|
@@ -385,10 +385,10 @@ public class MailTemplateController {
|
|
|
studentAttendanceService.getStudentAttendanceErrorListForTeacher(attendanceReqVO),
|
|
|
StudentAttendanceEmailVO.class
|
|
|
);
|
|
|
- List<StudentAttendanceEmailVO> excusedList = BeanUtils.toBean(//请假
|
|
|
- studentAttendanceService.getStudentAttendanceExcusedListForTeacher(attendanceReqVO),
|
|
|
- StudentAttendanceEmailVO.class
|
|
|
- );
|
|
|
+// List<StudentAttendanceEmailVO> excusedList = BeanUtils.toBean(//请假
|
|
|
+// studentAttendanceService.getStudentAttendanceExcusedListForTeacher(attendanceReqVO),
|
|
|
+// StudentAttendanceEmailVO.class
|
|
|
+// );
|
|
|
|
|
|
StringBuilder normalListBuilder = new StringBuilder();
|
|
|
for (StudentAttendanceEmailVO attendance : normalList) {
|
|
@@ -414,21 +414,21 @@ public class MailTemplateController {
|
|
|
.append("<br/>");
|
|
|
}
|
|
|
|
|
|
- StringBuilder excusedListBuilder = new StringBuilder();
|
|
|
- for (StudentAttendanceEmailVO attendance : excusedList) {
|
|
|
- excusedListBuilder
|
|
|
- .append(", 学生姓名: ").append(attendance.getStudentName())
|
|
|
- .append(", 学生学号: ").append(attendance.getUserNumber() != null ? attendance.getUserNumber() : "无")
|
|
|
- .append(", 工作间名称: ").append(attendance.getDeptName()!=null?attendance.getDeptName():"无")
|
|
|
- .append(", 导师名称:").append(attendance.getSupervisor()!=null ? attendance.getSupervisor():"无" )
|
|
|
- .append(", 日期: ").append(attendance.getDate())
|
|
|
- .append(", 打卡时间: ").append(attendance.getClockInTime() != null ? attendance.getClockInTime() : "请假")
|
|
|
- .append("<br/>");
|
|
|
- }
|
|
|
+// StringBuilder excusedListBuilder = new StringBuilder();
|
|
|
+// for (StudentAttendanceEmailVO attendance : excusedList) {
|
|
|
+// excusedListBuilder
|
|
|
+// .append(", 学生姓名: ").append(attendance.getStudentName())
|
|
|
+// .append(", 学生学号: ").append(attendance.getUserNumber() != null ? attendance.getUserNumber() : "无")
|
|
|
+// .append(", 工作间名称: ").append(attendance.getDeptName()!=null?attendance.getDeptName():"无")
|
|
|
+// .append(", 导师名称:").append(attendance.getSupervisor()!=null ? attendance.getSupervisor():"无" )
|
|
|
+// .append(", 日期: ").append(attendance.getDate())
|
|
|
+// .append(", 打卡时间: ").append(attendance.getClockInTime() != null ? attendance.getClockInTime() : "请假")
|
|
|
+// .append("<br/>");
|
|
|
+// }
|
|
|
|
|
|
templateParams.put("normalList", normalListBuilder.toString());
|
|
|
templateParams.put("errorList", errorListBuilder.toString());
|
|
|
- templateParams.put("excusedList", excusedListBuilder.toString());
|
|
|
+// templateParams.put("excusedList", excusedListBuilder.toString());
|
|
|
if (college.getEmail() != null) {
|
|
|
mailSendService.sendSingleMailToMember(college.getEmail(), null, "attendance-list", templateParams);
|
|
|
}
|
|
@@ -468,14 +468,14 @@ public class MailTemplateController {
|
|
|
})
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
- List<StudentAttendanceSupervisorTemplateVO> excusedList = studentAttendanceService.getStudentAttendanceExcusedListForTeacher(pageReqVO)
|
|
|
- .stream()
|
|
|
- .map(studentAttendance -> {
|
|
|
- StudentAttendanceSupervisorTemplateVO vo = BeanUtils.toBean(studentAttendance, StudentAttendanceSupervisorTemplateVO.class);
|
|
|
- vo.setClockInTime("请假");
|
|
|
- return vo;
|
|
|
- })
|
|
|
- .collect(Collectors.toList());
|
|
|
+// List<StudentAttendanceSupervisorTemplateVO> excusedList = studentAttendanceService.getStudentAttendanceExcusedListForTeacher(pageReqVO)
|
|
|
+// .stream()
|
|
|
+// .map(studentAttendance -> {
|
|
|
+// StudentAttendanceSupervisorTemplateVO vo = BeanUtils.toBean(studentAttendance, StudentAttendanceSupervisorTemplateVO.class);
|
|
|
+// vo.setClockInTime("请假");
|
|
|
+// return vo;
|
|
|
+// })
|
|
|
+// .collect(Collectors.toList());
|
|
|
|
|
|
// 创建 ByteArrayOutputStream 用来存储 Excel 文件数据
|
|
|
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
|
@@ -489,7 +489,7 @@ public class MailTemplateController {
|
|
|
|
|
|
excelWriter.write(normalList, writeSheetNormal);
|
|
|
excelWriter.write(errorList, writeSheetError);
|
|
|
- excelWriter.write(excusedList, writeSheetExcused);
|
|
|
+// excelWriter.write(excusedList, writeSheetExcused);
|
|
|
}
|
|
|
|
|
|
// 创建附件 Map
|
|
@@ -542,14 +542,14 @@ public class MailTemplateController {
|
|
|
})
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
- List<StudentAttendanceCollegeTemplateVO> excusedList = studentAttendanceService.getStudentAttendanceExcusedListForTeacher(attendanceReqVO)
|
|
|
- .stream()
|
|
|
- .map(studentAttendance -> {
|
|
|
- StudentAttendanceCollegeTemplateVO vo = BeanUtils.toBean(studentAttendance, StudentAttendanceCollegeTemplateVO.class);
|
|
|
- vo.setClockInTime("请假");
|
|
|
- return vo;
|
|
|
- })
|
|
|
- .collect(Collectors.toList());
|
|
|
+// List<StudentAttendanceCollegeTemplateVO> excusedList = studentAttendanceService.getStudentAttendanceExcusedListForTeacher(attendanceReqVO)
|
|
|
+// .stream()
|
|
|
+// .map(studentAttendance -> {
|
|
|
+// StudentAttendanceCollegeTemplateVO vo = BeanUtils.toBean(studentAttendance, StudentAttendanceCollegeTemplateVO.class);
|
|
|
+// vo.setClockInTime("请假");
|
|
|
+// return vo;
|
|
|
+// })
|
|
|
+// .collect(Collectors.toList());
|
|
|
|
|
|
// 输出 Excel
|
|
|
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
|
@@ -558,12 +558,12 @@ public class MailTemplateController {
|
|
|
try (ExcelWriter excelWriter = EasyExcel.write(byteArrayOutputStream, StudentAttendanceCollegeTemplateVO.class).build()) {
|
|
|
WriteSheet writeSheetNormal = EasyExcel.writerSheet("正常打卡信息").build();
|
|
|
WriteSheet writeSheetError = EasyExcel.writerSheet("未打卡信息").build();
|
|
|
- WriteSheet writeSheetExcused = EasyExcel.writerSheet("请假信息").build();
|
|
|
+// WriteSheet writeSheetExcused = EasyExcel.writerSheet("请假信息").build();
|
|
|
|
|
|
// 将各个 List 数据写入不同的 Sheet 中
|
|
|
excelWriter.write(normalList, writeSheetNormal);
|
|
|
excelWriter.write(errorList, writeSheetError);
|
|
|
- excelWriter.write(excusedList, writeSheetExcused);
|
|
|
+// excelWriter.write(excusedList, writeSheetExcused);
|
|
|
}
|
|
|
|
|
|
Map<String, InputStream> attachments = new HashMap<>();
|