Merge pull request #9502 from ulleo/dev

fix(X-Pack):【数据填报】修复下载模板同名表头会合并的问题
This commit is contained in:
ulleo 2024-05-07 12:01:51 +08:00 committed by GitHub
commit 2a2e886c89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -195,6 +195,7 @@ public class DataFillController {
// 这里需要设置不关闭流
EasyExcel.write(response.getOutputStream())
.head(dataFillService.getExcelHead(formId))
.automaticMergeHead(false)
.inMemory(true)
.registerWriteHandler(dataFillService.getCommentWriteHandler(formId))
.autoCloseStream(Boolean.FALSE)
@ -206,8 +207,6 @@ public class DataFillController {
@PostMapping("/form/{formId}/excel/upload")
public void excelUpload(@RequestParam("file") MultipartFile file, @PathVariable String formId) throws Exception {
String filename = file.getOriginalFilename();
System.out.println(filename);
System.out.println(formId);
dataFillDataService.importExcelData(file, formId);
}