|
@@ -8,6 +8,7 @@ import java.io.*;
|
|
|
import java.lang.reflect.Field;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.net.URLEncoder;
|
|
|
+import java.nio.charset.StandardCharsets;
|
|
|
import java.util.*;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -1516,7 +1517,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
log.debug("导出Excel开始...");
|
|
|
ExcelWriter writer = ExcelWriter.create(ExcelType.XLSX);
|
|
|
writer.writeDataArrays("成绩单", null, columnNames, columnValues.listIterator());
|
|
|
- FileOutputStream fileOut = new FileOutputStream(downloadFilePath + File.separator + basicCourse.getName() + "-成绩单" + SystemConstant.EXCEL_PREFIX);
|
|
|
+ FileOutputStream fileOut = new FileOutputStream(downloadFilePath + File.separator + new String((basicCourse.getName() + "-成绩单" + SystemConstant.EXCEL_PREFIX).getBytes(), StandardCharsets.UTF_8));
|
|
|
writer.output(fileOut);
|
|
|
fileOut.flush();
|
|
|
fileOut.close();
|
|
@@ -1528,7 +1529,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
for (Map.Entry<Object, List<CellValue[]>> entry : entrySet) {
|
|
|
writer = ExcelWriter.create(ExcelType.XLSX);
|
|
|
writer.writeDataArrays("成绩单", null, columnNames, entry.getValue().listIterator());
|
|
|
- FileOutputStream classFileOut = new FileOutputStream(downloadFilePath + File.separator + basicCourse.getName() + "-" + entry.getKey() + "成绩单" + SystemConstant.EXCEL_PREFIX);
|
|
|
+ FileOutputStream classFileOut = new FileOutputStream(downloadFilePath + File.separator + new String((basicCourse.getName() + "-" + entry.getKey() + "成绩单" + SystemConstant.EXCEL_PREFIX).getBytes(), StandardCharsets.UTF_8));
|
|
|
writer.output(classFileOut);
|
|
|
classFileOut.flush();
|
|
|
classFileOut.close();
|