|
@@ -76,6 +76,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.util.FileCopyUtils;
|
|
import org.springframework.util.FileCopyUtils;
|
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import javax.imageio.ImageIO;
|
|
import javax.imageio.ImageIO;
|
|
@@ -1332,7 +1333,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public void scoreReportDownload(JSONObject jsonObject, HttpServletResponse response) {
|
|
|
|
|
|
+ public void scoreReportDownload(MultipartFile file, HttpServletResponse response) {
|
|
String rootPath = null;
|
|
String rootPath = null;
|
|
File htmlFile;
|
|
File htmlFile;
|
|
File pdfFile;
|
|
File pdfFile;
|
|
@@ -1356,7 +1357,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
htmlFile.createNewFile();
|
|
htmlFile.createNewFile();
|
|
}
|
|
}
|
|
// 生成html文件
|
|
// 生成html文件
|
|
- FileCopyUtils.copy(jsonObject.getString("htmlContent").getBytes(StandardCharsets.UTF_8), htmlFile);
|
|
|
|
|
|
+ FileCopyUtils.copy(file.getBytes(), htmlFile);
|
|
|
|
|
|
// pdf文件
|
|
// pdf文件
|
|
String cardPdfPath = rootPath + File.separator + System.currentTimeMillis() + File.separator + "temp"
|
|
String cardPdfPath = rootPath + File.separator + System.currentTimeMillis() + File.separator + "temp"
|